From d6fae7c673f9480385c49d4e302545b1e83d62d5 Mon Sep 17 00:00:00 2001 From: Justin McKelvy <60718638+Capt-Mac@users.noreply.github.com> Date: Fri, 14 Jul 2023 12:17:13 -0600 Subject: [PATCH] fix bug on hapifhirdal searchbyurl to account for version (#5087) * fix bug on hapifhirdal searchbyurl to account for version * update return type to bundleIterable, update test to validate * add clinical-reasoning 3.0.0-PRE5 * added test comments, updated search, explicit variables * add example comment to search cases * fix typo * spotless apply edits --------- Co-authored-by: justin.mckelvy --- .../ca/uhn/fhir/cr/common/HapiFhirDal.java | 30 +- .../ca/uhn/fhir/cr/r4/HapiFhirDalR4Test.java | 26 ++ .../cr/r4/Bundle-HapiFhirDalTestLibrary.json | 301 ++++++++++++++++++ pom.xml | 2 +- 4 files changed, 354 insertions(+), 5 deletions(-) create mode 100644 hapi-fhir-storage-cr/src/test/resources/ca/uhn/fhir/cr/r4/Bundle-HapiFhirDalTestLibrary.json diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirDal.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirDal.java index c83f1fb2b9d..c5ef4652067 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirDal.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirDal.java @@ -21,7 +21,10 @@ package ca.uhn.fhir.cr.common; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.api.server.RequestDetails; +import ca.uhn.fhir.rest.api.server.SystemRequestDetails; +import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.rest.param.UriParam; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; @@ -74,9 +77,28 @@ public class HapiFhirDal implements FhirDal { @Override public Iterable searchByUrl(String theResourceType, String theUrl) { - var b = this.myDaoRegistry - .getResourceDao(theResourceType) - .search(new SearchParameterMap().add("url", new UriParam(theUrl)), myRequestDetails); - return new BundleIterable(myRequestDetails, b); + // version example "http://content.smilecdr.com/fhir/dqm/Library/ImmunizationStatusRoutine|2.0.1" + if (theUrl.contains("|")) { + String[] urlSplit = theUrl.split("\\|"); + String urlBase = urlSplit[0]; + String urlVersion = urlSplit[1]; + + IBundleProvider versionResource = this.myDaoRegistry + .getResourceDao(theResourceType) + .search( + SearchParameterMap.newSynchronous() + .add("url", new UriParam(urlBase)) + .add("version", new TokenParam(urlVersion)), + new SystemRequestDetails()); + return new BundleIterable(myRequestDetails, versionResource); + } else { + // standard example "http://content.smilecdr.com/fhir/dqm/Library/ImmunizationStatusRoutine" + IBundleProvider standardResource = this.myDaoRegistry + .getResourceDao(theResourceType) + .search( + SearchParameterMap.newSynchronous().add("url", new UriParam(theUrl)), + new SystemRequestDetails()); + return new BundleIterable(myRequestDetails, standardResource); + } } } diff --git a/hapi-fhir-storage-cr/src/test/java/ca/uhn/fhir/cr/r4/HapiFhirDalR4Test.java b/hapi-fhir-storage-cr/src/test/java/ca/uhn/fhir/cr/r4/HapiFhirDalR4Test.java index 6647b80c15b..3a4589c3508 100644 --- a/hapi-fhir-storage-cr/src/test/java/ca/uhn/fhir/cr/r4/HapiFhirDalR4Test.java +++ b/hapi-fhir-storage-cr/src/test/java/ca/uhn/fhir/cr/r4/HapiFhirDalR4Test.java @@ -3,12 +3,18 @@ package ca.uhn.fhir.cr.r4; import ca.uhn.fhir.cr.BaseCrR4Test; import ca.uhn.fhir.cr.common.HapiFhirDal; import ca.uhn.fhir.jpa.api.config.JpaStorageSettings; +import org.hl7.fhir.instance.model.api.IBaseResource; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.junit.jupiter.SpringExtension; +import java.util.Iterator; + import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * This class tests the functionality of HapiFhirDal operations inside the cr module */ @@ -37,4 +43,24 @@ public class HapiFhirDalR4Test extends BaseCrR4Test { assertEquals(63, counter, "Patient search results don't match available resources"); } + @Test + void canSearchVersionURL(){ + // load measure resource with Library url containing "|", this is the only component of test resource used. + loadBundle("ca/uhn/fhir/cr/r4/Bundle-HapiFhirDalTestLibrary.json"); + HapiFhirDal hapiFhirDal = new HapiFhirDal(this.getDaoRegistry(), null); + + // library url from loaded measure resource + String url = "http://content.smilecdr.com/fhir/dqm/Library/ImmunizationStatusRoutine|2.0.1"; + // search for resource given url + Iterable result = hapiFhirDal.searchByUrl("Library", url); + Iterator resultIter = result.iterator(); + // validate Iterable contains a resource + assertTrue(resultIter.hasNext()); + // get resource + IBaseResource finalResult = resultIter.next(); + // validate resource exists + assertNotNull(finalResult); + } + + } diff --git a/hapi-fhir-storage-cr/src/test/resources/ca/uhn/fhir/cr/r4/Bundle-HapiFhirDalTestLibrary.json b/hapi-fhir-storage-cr/src/test/resources/ca/uhn/fhir/cr/r4/Bundle-HapiFhirDalTestLibrary.json new file mode 100644 index 00000000000..10ccb219e2c --- /dev/null +++ b/hapi-fhir-storage-cr/src/test/resources/ca/uhn/fhir/cr/r4/Bundle-HapiFhirDalTestLibrary.json @@ -0,0 +1,301 @@ +{ + "resourceType": "Bundle", + "id": "bundle-hapifhirdaltest", + "type": "transaction", + "entry": [ + { + "fullUrl": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300940000", + "resource": { + "resourceType": "Library", + "id": "ImmunizationStatusRoutine", + "extension": [ + { + "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem", + "valueReference": { + "reference": "Device/cqf-tooling" + } + } + ], + "url": "http://content.smilecdr.com/fhir/dqm/Library/ImmunizationStatusRoutine", + "version": "2.0.1", + "name": "ImmunizationStatusRoutine", + "title": "Library - Immunization Status for Patients Starting Immunization in Infancy", + "status": "draft", + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/library-type", + "code": "logic-library" + } + ] + }, + "description": "Percentage of population that is fully vaccinated based on the routine schedule of the Publicly Funded Immunization Schedules for Ontario – June 2022 (Page 3)", + "jurisdiction": [ + { + "coding": [ + { + "system": "urn:iso:std:iso:3166", + "version": "4.0.1", + "code": "US", + "display": "United States of America" + } + ], + "text": "United States of America" + } + ], + "relatedArtifact": [ + { + "type": "depends-on", + "display": "FHIR model information", + "resource": "http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1" + }, + { + "type": "depends-on", + "display": "Library FHIRHelpers", + "resource": "http://content.smilecdr.com/fhir/dqm/Library/FHIRHelpers|4.0.1" + }, + { + "type": "depends-on", + "display": "Library FC", + "resource": "http://content.smilecdr.com/fhir/dqm/Library/FHIRCommon|4.0.1" + } + ], + "parameter": [ + { + "name": "Measurement Period", + "use": "in", + "min": 0, + "max": "1", + "type": "Period" + }, + { + "name": "Patient", + "use": "out", + "min": 0, + "max": "1", + "type": "Patient" + }, + { + "name": "Practitioner", + "use": "out", + "min": 0, + "max": "1", + "type": "Practitioner" + }, + { + "name": "Qualifying Encounters During Measurement Period", + "use": "out", + "min": 0, + "max": "*", + "type": "Encounter" + }, + { + "name": "Initial Population", + "use": "out", + "min": 0, + "max": "1", + "type": "boolean" + }, + { + "name": "Denominator", + "use": "out", + "min": 0, + "max": "1", + "type": "boolean" + }, + { + "name": "Numerator", + "use": "out", + "min": 0, + "max": "1", + "type": "boolean" + } + ], + "dataRequirement": [ + { + "type": "Patient", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/Patient" + ] + } + ], + "content": [ + { + "contentType": "text/cql", + "data": "LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwovKiBDb3B5cmlnaHQgKEMpIDIwMTQgL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gc2luZ2xlIGludGVydmFsIGZyb20gYSBUaW1pbmcgdHlwZScpCiAgICB3aGVuIGNob2ljZSBpcyBGSElSLnN0cmluZyB0aGVuCiAgICAgIE1lc3NhZ2UobnVsbCBhcyBJbnRlcnZhbDxEYXRlVGltZT4sIHRydWUsICcxJywgJ0Vycm9yJywgJ0Nhbm5vdCBjb21wdXRlIGFuIGludGVydmFsIGZyb20gYSBTdHJpbmcgdmFsdWUnKQogIAkJZWxzZQogIAkJCW51bGwgYXMgSW50ZXJ2YWw8RGF0ZVRpbWU+CiAgCWVuZAoKZGVmaW5lIGZ1bmN0aW9uICJIYXNFbmQiKHBlcmlvZCBJbnRlcnZhbDxEYXRlVGltZT4gKToKICBub3QgKAogICAgZW5kIG9mIHBlcmlvZCBpcyBudWxsCiAgICAgIG9yCiAgICAgIGVuZCBvZiBwZXJpb2QgPSBtYXhpbXVtIERhdGVUaW1lCiAgKQoKZGVmaW5lIGZ1bmN0aW9uICJMYXRlc3QiKGNob2ljZSBDaG9pY2U8RkhJUi5kYXRlVGltZSwgRkhJUi5QZXJpb2QsIEZISVIuVGltaW5nLCBGSElSLmluc3RhbnQsIEZISVIuc3RyaW5nLCBGSElSLkFnZSwgRkhJUi5SYW5nZT4gKToKICAoIk5vcm1hbGl6ZSBJbnRlcnZhbCIoY2hvaWNlKSkgcGVyaW9kCiAgICByZXR1cm4KICAgICAgaWYgKCBIYXNFbmQocGVyaW9kKSkgdGhlbiBlbmQgb2YgcGVyaW9kCiAgICAgIGVsc2Ugc3RhcnQgb2YgcGVyaW9kCg==" + } + ] + }, + "request": { + "method": "PUT", + "url": "Library/ImmunizationStatusRoutine" + } + }, + { + "resource": { + "resourceType": "Measure", + "id": "ImmunizationStatusRoutine", + "url": "http://content.smilecdr.com/fhir/dqm/Measure/ImmunizationStatusRoutine", + "name": "Children-Immunization-Status-Routine", + "title": "Immunization Status for Patients Starting Immunization in Infancy", + "status": "active", + "experimental": true, + "date": "2022-08-07T07:41:37-07:00", + "publisher": "Smile CDR", + "contact": [ + { + "telecom": [ + { + "system": "url", + "value": "https://smilecdr.com" + } + ] + } + ], + "description": "Percentage of population that is fully vaccinated based on the routine schedule of the Publicly Funded Immunization Schedules for Ontario – June 2022 (Page 3)", + "useContext": [ + { + "code": { + "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", + "version": "4.0.1", + "code": "program", + "display": "Program" + }, + "valueCodeableConcept": { + "text": "eligible-provider" + } + } + ], + "jurisdiction": [ + { + "coding": [ + { + "system": "urn:iso:std:iso:3166", + "version": "4.0.1", + "code": "CAN", + "display": "Canada" + } + ] + } + ], + "purpose": "Efficiency and Cost Reduction.", + "effectivePeriod": { + "start": "2022-01-01T00:00:00-07:00", + "end": "2022-12-31T23:59:59-07:00" + }, + "topic": [ + { + "coding": [ + { + "system": "http://loinc.org", + "code": "57024-2", + "display": "Health Quality Measure Document" + } + ] + } + ], + "library": [ + "http://content.smilecdr.com/fhir/dqm/Library/ImmunizationStatusRoutine|2.0.1" + ], + "scoring": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/measure-scoring", + "version": "4.0.1", + "code": "proportion", + "display": "Proportion" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/measure-type", + "version": "4.2.0", + "code": "process", + "display": "Process" + } + ] + } + ], + "improvementNotation": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/measure-improvement-notation", + "version": "0.1.0", + "code": "increase", + "display": "Increased score indicates improvement" + } + ] + }, + "group": [ + { + "id": "group-1", + "code": { + "coding": [ + { + "display": "group-1" + } + ] + }, + "population": [ + { + "id": "initial-population-1", + "code": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "initial-population", + "display": "Initial Population" + } + ] + }, + "criteria": { + "language": "text/cql-identifier", + "expression": "Initial Population" + } + }, + { + "id": "numerator", + "code": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "numerator", + "display": "Numerator" + } + ] + }, + "criteria": { + "language": "text/cql-identifier", + "expression": "Numerator" + } + }, + { + "id": "denominator", + "code": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "denominator", + "display": "Denominator" + } + ] + }, + "criteria": { + "language": "text/cql-identifier", + "expression": "Initial Population" + } + } + ] + } + ] + }, + "request": { + "method": "PUT", + "url": "Measure/ImmunizationStatusRoutine" + } + } + ] +} diff --git a/pom.xml b/pom.xml index 15587093a10..228c3a27979 100644 --- a/pom.xml +++ b/pom.xml @@ -987,7 +987,7 @@ 1.28.4 - 3.0.0-PRE4 + 3.0.0-PRE5 5.4.1