Skip to content

Commit

Permalink
Merge pull request #94 from IsantePlus/pmanko-lnsp-fixes
Browse files Browse the repository at this point in the history
Add fixes for global settings reuse in fhir and LNSP workflows
  • Loading branch information
ccwhite333 committed Aug 11, 2023
2 parents b06a3a6 + a0678df commit 97d1885
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
Expand Up @@ -40,8 +40,10 @@ public class XdsSenderConfig {
private static final String ENCOUNTER_ROOT = "xdssender.encounterRoot";

private static final String OBS_ROOT = "xdssender.obsRoot";

private static final String ECID_ROOT = "xdssender.ecidRoot";

private static final String CR_ROOT = "xdssender.crRoot";

private static final String CODE_NATIONAL_ROOT = "xdssender.codeNationalRoot";

Expand Down Expand Up @@ -247,5 +249,8 @@ private <T> T getComponentByGlobalProperty(String propertyName, Class<T> type) {
return Context.getRegisteredComponent(getProperty(propertyName), type);
}

public String getCrRoot() {
return getProperty(CR_ROOT, "http://openclientregistry.org/fhir/sourceid");
}

}
Expand Up @@ -118,8 +118,8 @@ private org.hl7.fhir.r4.model.Patient checkAndSetSystemIdentifier(Patient patien
throw new ResourceGenerationException("Unable to retrieve the Local PID, ensure that the \"PID LOCAL\" global property has been set");
}

patientResource.addIdentifier().setSystem(XdsSenderConfig.getInstance().getEcidRoot()).setValue(systemPatientIdentifier.getIdentifier());
// qpatientResource.addIdentifier().setSystem(XdsSenderConstants.IDENTIFIER_SYSTEM).setValue(systemPatientIdentifier.getIdentifier());
patientResource.addIdentifier().setSystem(XdsSenderConfig.getInstance().getCrRoot()).setValue(systemPatientIdentifier.getIdentifier());
// patientResource.addIdentifier().setSystem(XdsSenderConstants.IDENTIFIER_SYSTEM).setValue(systemPatientIdentifier.getIdentifier());
}

return patientResource;
Expand Down
8 changes: 6 additions & 2 deletions api/src/test/resources/global-configs.xml
Expand Up @@ -10,10 +10,14 @@
description="PID Local"
uuid="EF15944A-D73C-4D9C-9D86-E06FC076CA70"/>
<global_property property="xdssender.ecidRoot"
property_value="http://openclientregistry.org/fhir/sourceid"
property_value="2.16.840.1.113883.4.56"
description="ECID Root/Identifier Assigning Authotity"
uuid="8998B26D-2B53-4AC9-BF03-0F442A43062B"/>
<!-- property_value="2.16.840.1.113883.4.56"-->

<global_property property="xdssender.crRoot"
property_value="http://openclientregistry.org/fhir/sourceid"
description="CR Root for Identifier going to CR"
uuid="8998B244-2B53-4AC9-CE03-0F442A43011C" />
<global_property property="mpi-client.pid.local"
property_value="http://test-local"
description="PID Local"
Expand Down
6 changes: 6 additions & 0 deletions omod/src/main/resources/config.xml
Expand Up @@ -162,6 +162,12 @@
<globalProperty>
<property>xdssender.ecidRoot</property>
<description>ECID Root</description>
<defaultValue>2.16.840.1.113883.4.56</defaultValue>
</globalProperty>

<globalProperty>
<property>xdssender.crRoot</property>
<description>CR Root</description>
<defaultValue>http://openclientregistry.org/fhir/sourceid</defaultValue>
</globalProperty>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -28,7 +28,7 @@
</modules>

<properties>
<revision>2.3.0</revision>
<revision>2.4.0-SNAPSHOT</revision>
<openmrsPlatformVersion>2.0.5</openmrsPlatformVersion>
<everestVersion>1.1.0</everestVersion>
<dcm4chee-xds2Version>2.0.6</dcm4chee-xds2Version>
Expand Down

0 comments on commit 97d1885

Please sign in to comment.