Retrieving healthcare facility ID details using aql

Hi,
I am committing the heatcare facility id context details n my compositions as below

“clinical_notes/context/health_care_facility|id”: “123456-123”,

“clinical_notes/context/health_care_facility|id_scheme”: “UUID”,

“clinical_notes/context/health_care_facility|id_namespace”: “EHR.NETWORK”,

“clinical_notes/context/health_care_facility|name”: “HealtheLife”,

Trying to retrieve this in aql using

c/context/health_care_facility/id/value as orgID andc/context/health_care_facility/identifier/value as orgID

both returns error “Could not interpret field:context/health_care_facility/identifier/value”

What is the aql syntax to retrieve healthcare facility ID

regards

Hi Dileep,

Here the UML site is your friend. This is the part of the model you are referring to.

Click through PARTY_IDENTIFIED and you will see that the relevant property is ‘identifiers’, not ‘identifier’.

Alternatively, see here in the RM Common IM spec.

  • thomas

I was about to say the same thing. The other helpful approach is just to return the whole composition as a RAW JSON or XML file and see how the paths work out - they will normally be very close tothintended AQL.

Thomas’s suggestion may be correct for Ethercis but I think that Think!Ehr actually maps that FLAT JSON construct to the external_ref in PARRTY_IDENTIFED rather then the identifiers attribute that is a PARTY_REF class which has an id attribute which has a value attribute which is a String

c/context/health_care_facility/external_ref/id/value as facilityId should work on ThinkEhr

Ian

Iam testing with Ethercis

Thomas’s pointers were very useful. However I tried all the following options and still getting error

c/context/health_care_facility/identifiers/id/value as orgID
c/context/health_care_facility/identifiers/id as orgID
c/context/health_care_facility/identifiers/value as orgID

I will try Ian’s suggestion of getting the RAW JSON of the composition to try and figure out, but am not sure how to get the JSON file. Is there an API for this in Ethercis?

regards

Hi Dileep

GERT /composition format=RAW

Ian

Thanks Ian,

I could get the path from RAW json (c/context/health_care_facility/external_ref/id/value as orgId). This works for composer but not for health_care_facility and give error in Ethercis. Looks like and Ethercis bug. So I will raise a ticket there.

regards