FHIR Chat · Logical references · shorthand

Stream: shorthand

Topic: Logical references


view this post on Zulip Jose Costa Teixeira (Nov 14 2020 at 14:04):

How can I add a logical reference in an instance?

view this post on Zulip Mark Kramer (Nov 14 2020 at 17:43):

foo = Reference(my-instance-name)

Is that what you mean?

view this post on Zulip Jose Costa Teixeira (Nov 14 2020 at 17:48):

per http://build.fhir.org/references.html#logical
I have on the profile
* foo only Reference(Patient)
and I want to have in an instance
*foo.identifier.value = "NR8957784733"
*foo.identifier.system = "http://moh.gov.nr/socsecurityid"

view this post on Zulip Mark Kramer (Nov 14 2020 at 17:56):

That looks like it should work, except that system is a URI (no quotes) and you should have a space after the asterisks. What is the SUSHI error message?

view this post on Zulip Mark Kramer (Nov 14 2020 at 17:57):

Also, I wonder if you need to first add the reference. I bet SUSHI thinks foo is empty. (I'm just guessing now)

view this post on Zulip Mark Kramer (Nov 14 2020 at 18:26):

I tried it and without the quotes on the system URL, SUSHI tries to resolve the URL, which is strange. But I'm not getting any errors.

view this post on Zulip Chris Moesel (Nov 14 2020 at 19:15):

URI values are still encoded as strings in FSH (just like FHIR) -- so you do need the quotes.

I just tried this in FSHOnline and it compiled w/ no problems:

Profile: PatientProcedure
Parent: Procedure
* subject only Reference(Patient)

Instance: MyPatientProcedure
InstanceOf: PatientProcedure
* status = #completed
* subject.identifier.value = "NR8957784733"
* subject.identifier.system = "http://moh.gov.nr/socsecurityid"

view this post on Zulip Jose Costa Teixeira (Nov 14 2020 at 20:48):

I don't know what I was doing wrong before, but this seems to work. Thanks


Last updated: Apr 12 2022 at 19:14 UTC