It seems like you might have included in the question a different Transformation than the one the Warning is pointing at?
As it refers to this one:
osuwmc.Scott.FHIR.DemoOutboundHL7Message
(and not: osuwmc.Epic.FHIR.DTL.FHIRResponseToPatient)
And it seems like the Source of that Transformation is expected to be an HL7 message (with a DocType property) but for some reason, at least at runtime, the source is instead of type: osuwmc.Epic.FHIR.DataStructures.PatientSearch.Record
In any case it looks like we're not seeing the wider picture in order to help you address this issue.
Are you instantiating the 'target' variable?...
It doesn't look like it, hence your Invalid Oref when trying to access the MRN property (unless you're sending it in ByRef, but in that case it seems not be an object either).
So it looks like you were focused on the right side of your SET command, though the problem might be on the left side.







If you want an example of doing this in a wider scope, for a whole package, you can see this example (part of the DeleteHelper sample).