drajer-health / eCRNow

Repository for eCRNow app.
Apache License 2.0
40 stars 54 forks source link

Guardian Code always populates with OTH value #748

Closed linh-phan-vn closed 1 day ago

linh-phan-vn commented 3 months ago

Hi Teams, I am working with SolidPractice and the app version is 3.1.4.

I am facing an issue with Guardian Code. As described in the CDA specification image image

I am not sure how to fill this value into the FHIR resource to have it populated in the eICR. I looked through the source for more info, but it made me confused at https://github.com/drajer-health/eCRNow/blob/f7257c942e22b3b30bea4d7d052dff911d29ebb4/src/main/java/com/drajer/cdafromr4/CdaHeaderGenerator.java#L993-L1008

For generating <code>, it used the codingvariable and filtered by the code system CdaGeneratorConstants.FHIR_LOC_ROLE_CODE_TYPE_V3 while the codingvariable was retrieved from another code system CdaGeneratorConstants.FHIR_CONTACT_RELATIONSHIP_CODESYSTEM. Therefore, the generated output was OTHall the time. Could you please help me go through this case? Or show me an example of FHIR data that can populate guardian.code rather than OTH. Thanks,

nbashyam commented 3 months ago

We have been previously using a different and an older code system for the relationship. We should look into using the US Core 7.0.0 Patient Relationship value set and see if it can be translated properly.

nbashyam commented 3 months ago

Please attach the loading query.

linh-phan-vn commented 2 months ago

Hi @nbashyam, Please see the attached file. LoadingQueryBundle.json

nbashyam commented 1 day ago

Fixed in 3.1.5