From a2aa2ca1c37ec9f171285c0ef8d3502448c8b37e Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Thu, 29 Jul 2021 15:52:09 -0400 Subject: [PATCH 001/143] 2849 Added new parameter to MDM processing --- .../ca/uhn/fhir/interceptor/api/Pointcut.java | 6 +- .../jpa/mdm/broker/MdmMessageHandler.java | 18 ++++-- .../fhir/jpa/mdm/svc/MdmEidUpdateService.java | 2 + .../uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java | 5 ++ .../fhir/jpa/mdm/helper/BaseMdmHelper.java | 3 + .../interceptor/MdmStorageInterceptorIT.java | 26 +++++++++ .../uhn/fhir/mdm/api/MdmLinkChangeEvent.java | 55 +++++++++++++++++++ .../fhir/mdm/model/MdmTransactionContext.java | 11 ++++ 8 files changed, 119 insertions(+), 7 deletions(-) create mode 100644 hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java index db6dff8b7a1..d8f0f33ae9f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java @@ -1986,13 +1986,17 @@ public enum Pointcut implements IPointcut { * *

*

* Hooks should return void. *

*/ - MDM_AFTER_PERSISTED_RESOURCE_CHECKED(void.class, "ca.uhn.fhir.rest.server.messaging.ResourceOperationMessage", "ca.uhn.fhir.rest.server.TransactionLogMessages"), + MDM_AFTER_PERSISTED_RESOURCE_CHECKED(void.class, + "ca.uhn.fhir.rest.server.messaging.ResourceOperationMessage", + "ca.uhn.fhir.rest.server.TransactionLogMessages", + "ca.uhn.fhir.mdm.api.MdmLinkChangeEvent"), /** * Performance Tracing Hook: diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java index 3a84eebb083..b80d2caafc7 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java @@ -30,12 +30,15 @@ import ca.uhn.fhir.jpa.mdm.svc.candidate.TooManyCandidatesException; import ca.uhn.fhir.jpa.subscription.model.ResourceModifiedJsonMessage; import ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage; import ca.uhn.fhir.mdm.api.IMdmSettings; +import ca.uhn.fhir.mdm.api.MdmLinkChangeEvent; import ca.uhn.fhir.mdm.log.Logs; import ca.uhn.fhir.mdm.model.MdmTransactionContext; import ca.uhn.fhir.rest.server.TransactionLogMessages; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.messaging.ResourceOperationMessage; import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.Message; @@ -89,11 +92,11 @@ public class MdmMessageHandler implements MessageHandler { try { switch (theMsg.getOperationType()) { case CREATE: - handleCreatePatientOrPractitioner(theMsg, mdmContext); + handleCreateResource(theMsg, mdmContext); break; case UPDATE: case MANUALLY_TRIGGERED: - handleUpdatePatientOrPractitioner(theMsg, mdmContext); + handleUpdateResource(theMsg, mdmContext); break; case DELETE: default: @@ -105,12 +108,15 @@ public class MdmMessageHandler implements MessageHandler { } finally { // Interceptor call: MDM_AFTER_PERSISTED_RESOURCE_CHECKED - ResourceOperationMessage outgoingMsg = new ResourceOperationMessage(myFhirContext, theMsg.getPayload(myFhirContext), theMsg.getOperationType()); + IBaseResource targetResource = theMsg.getPayload(myFhirContext); + ResourceOperationMessage outgoingMsg = new ResourceOperationMessage(myFhirContext, targetResource, theMsg.getOperationType()); outgoingMsg.setTransactionId(theMsg.getTransactionId()); HookParams params = new HookParams() .add(ResourceOperationMessage.class, outgoingMsg) - .add(TransactionLogMessages.class, mdmContext.getTransactionLogMessages()); + .add(TransactionLogMessages.class, mdmContext.getTransactionLogMessages()) + .add(MdmLinkChangeEvent.class, mdmContext.getMdmLinkChangeEvent()); + myInterceptorBroadcaster.callHooks(Pointcut.MDM_AFTER_PERSISTED_RESOURCE_CHECKED, params); } } @@ -142,7 +148,7 @@ public class MdmMessageHandler implements MessageHandler { } } - private void handleCreatePatientOrPractitioner(ResourceModifiedMessage theMsg, MdmTransactionContext theMdmTransactionContext) { + private void handleCreateResource(ResourceModifiedMessage theMsg, MdmTransactionContext theMdmTransactionContext) { myMdmMatchLinkSvc.updateMdmLinksForMdmSource(getResourceFromPayload(theMsg), theMdmTransactionContext); } @@ -150,7 +156,7 @@ public class MdmMessageHandler implements MessageHandler { return (IAnyResource) theMsg.getNewPayload(myFhirContext); } - private void handleUpdatePatientOrPractitioner(ResourceModifiedMessage theMsg, MdmTransactionContext theMdmTransactionContext) { + private void handleUpdateResource(ResourceModifiedMessage theMsg, MdmTransactionContext theMdmTransactionContext) { myMdmMatchLinkSvc.updateMdmLinksForMdmSource(getResourceFromPayload(theMsg), theMdmTransactionContext); } diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java index 94db6849073..d23c27db9f1 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java @@ -85,6 +85,8 @@ public class MdmEidUpdateService { myMdmSurvivorshipService.applySurvivorshipRulesToGoldenResource(theTargetResource, updateContext.getMatchedGoldenResource(), theMdmTransactionContext); myMdmResourceDaoSvc.upsertGoldenResource(updateContext.getMatchedGoldenResource(), theMdmTransactionContext.getResourceType()); } + + theMdmTransactionContext.getMdmLinkChangeEvent().setGoldenResourceId(updateContext.getExistingGoldenResource()); } private void handleNoEidsInCommon(IAnyResource theResource, MatchedGoldenResourceCandidate theMatchedGoldenResourceCandidate, MdmTransactionContext theMdmTransactionContext, MdmUpdateContext theUpdateContext) { diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java index fdd04914646..90020ffc259 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java @@ -112,11 +112,14 @@ public class MdmMatchLinkSvc { //Set all GoldenResources as POSSIBLE_DUPLICATE of the last GoldenResource. IAnyResource firstGoldenResource = goldenResources.get(0); + theMdmTransactionContext.getMdmLinkChangeEvent().setGoldenResourceId(firstGoldenResource); + goldenResources.subList(1, goldenResources.size()) .forEach(possibleDuplicateGoldenResource -> { MdmMatchOutcome outcome = MdmMatchOutcome.POSSIBLE_DUPLICATE; outcome.setEidMatch(theCandidateList.isEidMatch()); myMdmLinkSvc.updateLink(firstGoldenResource, possibleDuplicateGoldenResource, outcome, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); + theMdmTransactionContext.getMdmLinkChangeEvent().addDuplicateGoldenResourceId(possibleDuplicateGoldenResource); }); } } @@ -129,6 +132,8 @@ public class MdmMatchLinkSvc { // 2. Create source resource for the MDM source // 3. UPDATE MDM LINK TABLE myMdmLinkSvc.updateLink(newGoldenResource, theResource, MdmMatchOutcome.NEW_GOLDEN_RESOURCE_MATCH, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); + + theMdmTransactionContext.getMdmLinkChangeEvent().setGoldenResourceId(newGoldenResource); } private void handleMdmCreate(IAnyResource theTargetResource, MatchedGoldenResourceCandidate theGoldenResourceCandidate, MdmTransactionContext theMdmTransactionContext) { diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/helper/BaseMdmHelper.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/helper/BaseMdmHelper.java index 1389c4c5ea1..601b3ce2920 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/helper/BaseMdmHelper.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/helper/BaseMdmHelper.java @@ -106,5 +106,8 @@ public abstract class BaseMdmHelper implements BeforeEachCallback, AfterEachCall return channel.getQueueSizeForUnitTest(); } + public PointcutLatch getAfterMdmLatch() { + return myAfterMdmLatch; + } } diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java index c722b23dab2..7d24395852d 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java @@ -7,13 +7,16 @@ import ca.uhn.fhir.jpa.mdm.BaseMdmR4Test; import ca.uhn.fhir.jpa.mdm.helper.MdmHelperConfig; import ca.uhn.fhir.jpa.mdm.helper.MdmHelperR4; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.mdm.api.MdmLinkChangeEvent; import ca.uhn.fhir.mdm.model.CanonicalEID; import ca.uhn.fhir.mdm.rules.config.MdmSettings; +import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import ca.uhn.fhir.rest.param.ReferenceParam; import ca.uhn.fhir.rest.server.TransactionLogMessages; import ca.uhn.fhir.rest.server.exceptions.ForbiddenOperationException; +import ca.uhn.fhir.rest.server.messaging.ResourceOperationMessage; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; @@ -21,16 +24,21 @@ import org.hl7.fhir.r4.model.Enumerations; import org.hl7.fhir.r4.model.Medication; import org.hl7.fhir.r4.model.Organization; import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Practitioner; import org.hl7.fhir.r4.model.SearchParameter; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Example; +import org.springframework.data.domain.ExampleMatcher; +import org.springframework.data.domain.Pageable; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import java.util.Date; import java.util.List; +import java.util.Optional; import static ca.uhn.fhir.mdm.api.MdmConstants.CODE_GOLDEN_RECORD; import static ca.uhn.fhir.mdm.api.MdmConstants.CODE_GOLDEN_RECORD_REDIRECTED; @@ -67,6 +75,24 @@ public class MdmStorageInterceptorIT extends BaseMdmR4Test { assertLinkCount(1); } + @Test + public void testCreateLinkChangeEvent() throws InterruptedException { + Practitioner pr = buildPractitionerWithNameAndId("Young", "AC-DC"); + myMdmHelper.createWithLatch(pr); + + ResourceOperationMessage resourceOperationMessage = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(ResourceOperationMessage.class); + assertNotNull(resourceOperationMessage); + assertEquals(pr.getId(), resourceOperationMessage.getId()); + + MdmLink example = new MdmLink(); + example.setSourcePid(pr.getIdElement().getIdPartAsLong()); + MdmLink link = myMdmLinkDao.findAll(Example.of(example)).get(0); + + MdmLinkChangeEvent linkChangeEvent = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(MdmLinkChangeEvent.class); + assertNotNull(linkChangeEvent); + assertEquals(link.getGoldenResourcePid(), new IdDt(linkChangeEvent.getGoldenResourceId()).getIdPartAsLong()); + } + @Test public void testSearchExpandingInterceptorWorks() { SearchParameterMap subject = new SearchParameterMap("subject", new ReferenceParam("Patient/123").setMdmExpand(true)).setLoadSynchronous(true); diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java new file mode 100644 index 00000000000..374d955aba8 --- /dev/null +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java @@ -0,0 +1,55 @@ +package ca.uhn.fhir.mdm.api; + +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +public class MdmLinkChangeEvent { + + private String myGoldenResourceId; + private Set myDuplicateGoldenResourceIds = new HashSet<>(); + + public String getGoldenResourceId() { + return myGoldenResourceId; + } + + public void setGoldenResourceId(IBaseResource theGoldenResourceId) { + setGoldenResourceId(getIdAsString(theGoldenResourceId)); + } + + public void setGoldenResourceId(String theGoldenResourceId) { + myGoldenResourceId = theGoldenResourceId; + } + + private String getIdAsString(IBaseResource theResource) { + if (theResource == null) { + return null; + } + IIdType idElement = theResource.getIdElement(); + if (idElement == null) { + return null; + } + return idElement.getValueAsString(); + } + + public Set getDuplicateGoldenResourceIds() { + return myDuplicateGoldenResourceIds; + } + + public void setDuplicateGoldenResourceIds(Set theDuplicateGoldenResourceIds) { + myDuplicateGoldenResourceIds = theDuplicateGoldenResourceIds; + } + + public MdmLinkChangeEvent addDuplicateGoldenResourceId(IBaseResource theDuplicateGoldenResourceId) { + String id = getIdAsString(theDuplicateGoldenResourceId); + if (id != null) { + getDuplicateGoldenResourceIds().add(id); + } + return this; + } + +} diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java index a2fb07fe200..db699fd602b 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java @@ -20,6 +20,7 @@ package ca.uhn.fhir.mdm.model; * #L% */ +import ca.uhn.fhir.mdm.api.MdmLinkChangeEvent; import ca.uhn.fhir.rest.server.TransactionLogMessages; public class MdmTransactionContext { @@ -45,6 +46,8 @@ public class MdmTransactionContext { private String myResourceType; + private MdmLinkChangeEvent myMdmLinkChangeEvent = new MdmLinkChangeEvent(); + public TransactionLogMessages getTransactionLogMessages() { return myTransactionLogMessages; } @@ -92,4 +95,12 @@ public class MdmTransactionContext { public void setResourceType(String myResourceType) { this.myResourceType = myResourceType; } + + public MdmLinkChangeEvent getMdmLinkChangeEvent() { + return myMdmLinkChangeEvent; + } + + public void setMdmLinkChangeEvent(MdmLinkChangeEvent theMdmLinkChangeEvent) { + myMdmLinkChangeEvent = theMdmLinkChangeEvent; + } } From 0d34fe61c81da55d5d641a496cef957de1c5fd4b Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Fri, 30 Jul 2021 11:17:56 -0400 Subject: [PATCH 002/143] Adding tests --- .../jpa/mdm/broker/MdmMessageHandler.java | 1 + .../interceptor/MdmStorageInterceptorIT.java | 36 +++++++++++++++++++ .../uhn/fhir/mdm/api/MdmLinkChangeEvent.java | 16 +++++++-- 3 files changed, 51 insertions(+), 2 deletions(-) diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java index b80d2caafc7..967349c0823 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java @@ -111,6 +111,7 @@ public class MdmMessageHandler implements MessageHandler { IBaseResource targetResource = theMsg.getPayload(myFhirContext); ResourceOperationMessage outgoingMsg = new ResourceOperationMessage(myFhirContext, targetResource, theMsg.getOperationType()); outgoingMsg.setTransactionId(theMsg.getTransactionId()); + mdmContext.getMdmLinkChangeEvent().setTargetResourceId(targetResource); HookParams params = new HookParams() .add(ResourceOperationMessage.class, outgoingMsg) diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java index 7d24395852d..919911a3e25 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java @@ -91,6 +91,42 @@ public class MdmStorageInterceptorIT extends BaseMdmR4Test { MdmLinkChangeEvent linkChangeEvent = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(MdmLinkChangeEvent.class); assertNotNull(linkChangeEvent); assertEquals(link.getGoldenResourcePid(), new IdDt(linkChangeEvent.getGoldenResourceId()).getIdPartAsLong()); + assertEquals(link.getSourcePid(), new IdDt(linkChangeEvent.getTargetResourceId()).getIdPartAsLong()); + } + + @Test + public void testUpdateLinkChangeEvent() throws InterruptedException { + Patient patient1 = addExternalEID(buildJanePatient(), "eid-1"); + patient1 = createPatientAndUpdateLinks(patient1); + + Patient patient2 = addExternalEID(buildJanePatient(), "eid-2"); + patient2 = createPatientAndUpdateLinks(patient2); + + MdmLinkChangeEvent linkChangeEvent = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(MdmLinkChangeEvent.class); + assertNotNull(linkChangeEvent); +// assertEquals(link.getGoldenResourcePid(), new IdDt(linkChangeEvent.getGoldenResourceId()).getIdPartAsLong()); +// assertEquals(link.getSourcePid(), new IdDt(linkChangeEvent.getTargetResourceId()).getIdPartAsLong()); + } + + @Test + public void testDuplicateLinkChangeEvent() throws InterruptedException { + fail(); + + Practitioner pr = buildPractitionerWithNameAndId("Young", "AC-DC"); + myMdmHelper.createWithLatch(pr); + + ResourceOperationMessage resourceOperationMessage = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(ResourceOperationMessage.class); + assertNotNull(resourceOperationMessage); + assertEquals(pr.getId(), resourceOperationMessage.getId()); + + MdmLink example = new MdmLink(); + example.setSourcePid(pr.getIdElement().getIdPartAsLong()); + MdmLink link = myMdmLinkDao.findAll(Example.of(example)).get(0); + + MdmLinkChangeEvent linkChangeEvent = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(MdmLinkChangeEvent.class); + assertNotNull(linkChangeEvent); + assertEquals(link.getGoldenResourcePid(), new IdDt(linkChangeEvent.getGoldenResourceId()).getIdPartAsLong()); + assertEquals(link.getSourcePid(), new IdDt(linkChangeEvent.getTargetResourceId()).getIdPartAsLong()); } @Test diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java index 374d955aba8..c0593b2929d 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java @@ -1,15 +1,15 @@ package ca.uhn.fhir.mdm.api; +import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; -import java.util.ArrayList; import java.util.HashSet; -import java.util.List; import java.util.Set; public class MdmLinkChangeEvent { + private String myTargetResourceId; private String myGoldenResourceId; private Set myDuplicateGoldenResourceIds = new HashSet<>(); @@ -36,6 +36,18 @@ public class MdmLinkChangeEvent { return idElement.getValueAsString(); } + public String getTargetResourceId() { + return myTargetResourceId; + } + + public void setTargetResourceId(IBaseResource theTargetResource) { + setTargetResourceId(getIdAsString(theTargetResource)); + } + + public void setTargetResourceId(String theTargetResourceId) { + myTargetResourceId = theTargetResourceId; + } + public Set getDuplicateGoldenResourceIds() { return myDuplicateGoldenResourceIds; } From 891a6304d0e021021c540282e8ebf8b7adf6c0f4 Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Wed, 4 Aug 2021 11:06:14 -0400 Subject: [PATCH 003/143] WIP --- .../dao/r4/FhirResourceDaoCodeSystemR4.java | 2 +- .../jpa/mdm/broker/MdmMessageHandler.java | 1 - .../uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java | 6 +++ .../interceptor/MdmStorageInterceptorIT.java | 54 ++++++++----------- .../uhn/fhir/mdm/api/MdmLinkChangeEvent.java | 36 ++++++++++++- .../fhir/mdm/model/MdmTransactionContext.java | 1 + 6 files changed, 65 insertions(+), 35 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCodeSystemR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCodeSystemR4.java index 2ff1ee51c70..335cef64375 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCodeSystemR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCodeSystemR4.java @@ -139,7 +139,7 @@ public class FhirResourceDaoCodeSystemR4 extends BaseHapiFhirResourceDao myDuplicateGoldenResourceIds = new HashSet<>(); public String getGoldenResourceId() { @@ -64,4 +88,12 @@ public class MdmLinkChangeEvent { return this; } + @Override + public String toString() { + return "MdmLinkChangeEvent{" + + "myTargetResourceId='" + myTargetResourceId + '\'' + + ", myGoldenResourceId='" + myGoldenResourceId + '\'' + + ", myDuplicateGoldenResourceIds=" + myDuplicateGoldenResourceIds + + '}'; + } } diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java index db699fd602b..ce35ea3f150 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java @@ -103,4 +103,5 @@ public class MdmTransactionContext { public void setMdmLinkChangeEvent(MdmLinkChangeEvent theMdmLinkChangeEvent) { myMdmLinkChangeEvent = theMdmLinkChangeEvent; } + } From 4be3334f6ff29f13629d65e67957475547de0c46 Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Wed, 4 Aug 2021 16:33:59 -0400 Subject: [PATCH 004/143] WIP after persistence checked --- .../dao/r4/FhirResourceDaoCodeSystemR4.java | 2 +- .../jpa/mdm/broker/MdmMessageHandler.java | 30 ++++++++++++++++--- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCodeSystemR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCodeSystemR4.java index 6a01ab94c70..5f2aa32a2ec 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCodeSystemR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCodeSystemR4.java @@ -138,7 +138,7 @@ public class FhirResourceDaoCodeSystemR4 extends BaseHapiFhirResourceDao mdmLinkBySource = myMdmLinkDaoSvc.findMdmLinkBySource(targetResource); + if (!mdmLinkBySource.isPresent()) { + ourLog.warn("Unable to find link by source for {}", targetResource.getIdElement()); + } + + mdmLinkBySource.ifPresent(link -> { + linkChangeEvent.setMdmMatchResult(link.getMatchResult()); + linkChangeEvent.setMdmLinkSource(link.getLinkSource()); + linkChangeEvent.setEidMatch(link.isEidMatchPresent()); + linkChangeEvent.setNewGoldenResource(link.getHadToCreateNewGoldenResource()); + linkChangeEvent.setScore(link.getScore()); + linkChangeEvent.setRuleCount(link.getRuleCount()); + }); + HookParams params = new HookParams() .add(ResourceOperationMessage.class, outgoingMsg) .add(TransactionLogMessages.class, mdmContext.getTransactionLogMessages()) From 8670f107b5118c274b00c92327478f26f55bc9ad Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Tue, 17 Aug 2021 13:17:44 -0400 Subject: [PATCH 005/143] Updated link expansion --- .../ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java | 9 +++ .../fhir/jpa/dao/mdm/MdmLinkExpandSvc.java | 22 +++++- .../fhir/jpa/mdm/dao/MdmLinkDaoSvcTest.java | 9 +++ .../uhn/fhir/mdm/api/MdmLinkChangeEvent.java | 72 ++++++++++++++++++- 4 files changed, 106 insertions(+), 6 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java index 16834facbe2..be0a6289a4e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java @@ -67,4 +67,13 @@ public interface IMdmLinkDao extends JpaRepository { "AND ml.myMatchResult=:matchResult") List expandPidsBySourcePidAndMatchResult(@Param("sourcePid") Long theSourcePid, @Param("matchResult") MdmMatchResultEnum theMdmMatchResultEnum); + @Query("SELECT DISTINCT ml.myGoldenResourcePid as goldenPid, ml.mySourcePid as sourcePid " + + "FROM MdmLink ml " + + "INNER JOIN MdmLink ml2 " + + "ON ml.myGoldenResourcePid = ml2.myGoldenResourcePid " + + "WHERE (ml2.mySourcePid = :sourceOrGoldenPid OR ml2.myGoldenResourcePid = :sourceOrGoldenPid) " + + "AND ml2.myMatchResult=:matchResult " + + "AND ml.myMatchResult=:matchResult") + List expandPidsBySourceOrGoldenResourcePidAndMatchResult(@Param("sourceOrGoldenPid") Long theSourceOrGoldenPid, @Param("matchResult") MdmMatchResultEnum theMdmMatchResultEnum); + } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmLinkExpandSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmLinkExpandSvc.java index 66af7f5a706..b03e22d04b8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmLinkExpandSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmLinkExpandSvc.java @@ -72,6 +72,19 @@ public class MdmLinkExpandSvc { return expandMdmBySourceResourcePid(pidOrThrowException); } + /** + * Given a resource ID of a source resource or golden resource, perform MDM expansion and return all the resource + * IDs of all resources that are MDM-Matched to this resource. + * + * @param theId The Resource ID of the resource to MDM-Expand + * @return A set of strings representing the FHIR ids of the expanded resources. + */ + public Set expandMdmBySourceOrGoldenResourceId(IIdType theId) { + ourLog.debug("About to expand source resource with resource id {}", theId); + Long pidOrThrowException = myIdHelperService.getPidOrThrowException(theId); + return flatten(myMdmLinkDao.expandPidsBySourceOrGoldenResourcePidAndMatchResult(pidOrThrowException, MdmMatchResultEnum.MATCH)); + } + /** * Given a PID of a source resource, perform MDM expansion and return all the resource IDs of all resources that are * MDM-Matched to this resource. @@ -81,14 +94,17 @@ public class MdmLinkExpandSvc { */ public Set expandMdmBySourceResourcePid(Long theSourceResourcePid) { ourLog.debug("About to expand source resource with PID {}", theSourceResourcePid); - List goldenPidSourcePidTuples = myMdmLinkDao.expandPidsBySourcePidAndMatchResult(theSourceResourcePid, MdmMatchResultEnum.MATCH); + return flatten(myMdmLinkDao.expandPidsBySourcePidAndMatchResult(theSourceResourcePid, MdmMatchResultEnum.MATCH)); + } + + protected Set flatten(List thePidTuples) { Set flattenedPids = new HashSet<>(); - goldenPidSourcePidTuples.forEach(tuple -> { + thePidTuples.forEach(tuple -> { flattenedPids.add(tuple.getSourcePid()); flattenedPids.add(tuple.getGoldenPid()); }); Set resourceIds = myIdHelperService.translatePidsToFhirResourceIds(flattenedPids); - ourLog.debug("Pid {} has been expanded to [{}]", theSourceResourcePid, String.join(",", resourceIds)); + ourLog.debug("Expanded pids are [{}]", String.join(",", resourceIds)); return resourceIds; } diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvcTest.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvcTest.java index ae034af6fa7..b5deb25f0c6 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvcTest.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvcTest.java @@ -83,6 +83,15 @@ public class MdmLinkDaoSvcTest extends BaseMdmR4Test { assertThat(lists, hasSize(10)); + lists.stream() + .forEach(tuple -> { + assertThat(tuple.getGoldenPid(), is(equalTo(golden.getIdElement().getIdPartAsLong()))); + assertThat(tuple.getSourcePid(), is(in(expectedExpandedPids))); + }); + + lists = myMdmLinkDao.expandPidsBySourceOrGoldenResourcePidAndMatchResult(mdmLinks.get(0).getGoldenResourcePid(), MdmMatchResultEnum.MATCH); + assertThat(lists, hasSize(10)); + lists.stream() .forEach(tuple -> { assertThat(tuple.getGoldenPid(), is(equalTo(golden.getIdElement().getIdPartAsLong()))); diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java index e2d6b199812..8e306c16e6e 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java @@ -30,9 +30,21 @@ import java.util.Set; public class MdmLinkChangeEvent implements IModelJson { - @JsonProperty(value = "targetResourceId") + @JsonProperty(value = "matchResult") + private MdmMatchResultEnum myMdmMatchResult; + @JsonProperty(value = "linkSource") + private MdmLinkSourceEnum myMdmLinkSource; + @JsonProperty(value = "eidMatch") + private Boolean myEidMatch; + @JsonProperty(value = "newGoldenResource") + private Boolean myNewGoldenResource; + @JsonProperty(value = "score") + private Double myScore; + @JsonProperty(value = "ruleCount") + private Long myRuleCount; + @JsonProperty(value = "targetResourceId", required = true) private String myTargetResourceId; - @JsonProperty(value = "goldenResourceId") + @JsonProperty(value = "goldenResourceId", required = true) private String myGoldenResourceId; @JsonProperty(value = "duplicateResourceIds") private Set myDuplicateGoldenResourceIds = new HashSet<>(); @@ -88,10 +100,64 @@ public class MdmLinkChangeEvent implements IModelJson { return this; } + public MdmMatchResultEnum getMdmMatchResult() { + return myMdmMatchResult; + } + + public void setMdmMatchResult(MdmMatchResultEnum theMdmMatchResult) { + myMdmMatchResult = theMdmMatchResult; + } + + public MdmLinkSourceEnum getMdmLinkSource() { + return myMdmLinkSource; + } + + public void setMdmLinkSource(MdmLinkSourceEnum theMdmLinkSource) { + myMdmLinkSource = theMdmLinkSource; + } + + public Boolean getEidMatch() { + return myEidMatch; + } + + public void setEidMatch(Boolean theEidMatch) { + myEidMatch = theEidMatch; + } + + public Boolean getNewGoldenResource() { + return myNewGoldenResource; + } + + public void setNewGoldenResource(Boolean theNewGoldenResource) { + myNewGoldenResource = theNewGoldenResource; + } + + public Double getScore() { + return myScore; + } + + public void setScore(Double theScore) { + myScore = theScore; + } + + public Long getRuleCount() { + return myRuleCount; + } + + public void setRuleCount(Long theRuleCount) { + myRuleCount = theRuleCount; + } + @Override public String toString() { return "MdmLinkChangeEvent{" + - "myTargetResourceId='" + myTargetResourceId + '\'' + + "myMdmMatchResult=" + myMdmMatchResult + + ", myMdmLinkSource=" + myMdmLinkSource + + ", myEidMatch=" + myEidMatch + + ", myNewGoldenResource=" + myNewGoldenResource + + ", myScore=" + myScore + + ", myRuleCount=" + myRuleCount + + ", myTargetResourceId='" + myTargetResourceId + '\'' + ", myGoldenResourceId='" + myGoldenResourceId + '\'' + ", myDuplicateGoldenResourceIds=" + myDuplicateGoldenResourceIds + '}'; From 07937e4431024bca5e58261af65a8405743c24d3 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 19 Aug 2021 10:35:14 -0400 Subject: [PATCH 006/143] Start with failing test --- ...irResourceDaoR4VersionedReferenceTest.java | 25 ++ .../test/resources/npe-causing-bundle.json | 402 ++++++++++++++++++ 2 files changed, 427 insertions(+) create mode 100644 hapi-fhir-jpaserver-base/src/test/resources/npe-causing-bundle.json diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java index 76ebb3e0b74..d682d9a6304 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java @@ -1,8 +1,10 @@ package ca.uhn.fhir.jpa.dao.r4; +import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.partition.SystemRequestDetails; +import ca.uhn.fhir.jpa.provider.r4.ResourceProviderR4Test; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.param.TokenParam; @@ -20,8 +22,10 @@ import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Task; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import java.io.InputStreamReader; import java.util.Arrays; import java.util.Date; import java.util.HashSet; @@ -782,4 +786,25 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { } + @Test + @DisplayName("GH-2901 Test no NPE is thrown on autoversioned references") + public void testNoNpeOnEoBBundle() { + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + List strings = Arrays.asList( + "ExplanationOfBenefit.patient", + "ExplanationOfBenefit.insurer", + "ExplanationOfBenefit.provider", + "ExplanationOfBenefit.careTeam.provider", + "ExplanationOfBenefit.insurance.coverage", + "ExplanationOfBenefit.payee.party" + ); + myModelConfig.setAutoVersionReferenceAtPaths(new HashSet(strings)); + + Bundle bundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, new InputStreamReader(FhirResourceDaoR4VersionedReferenceTest.class.getResourceAsStream("/npe-causing-bundle.json"))); + + Bundle transaction = mySystemDao.transaction(new SystemRequestDetails(), bundle); + + } + + } diff --git a/hapi-fhir-jpaserver-base/src/test/resources/npe-causing-bundle.json b/hapi-fhir-jpaserver-base/src/test/resources/npe-causing-bundle.json new file mode 100644 index 00000000000..ef1d7645e5b --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/resources/npe-causing-bundle.json @@ -0,0 +1,402 @@ +{ + "resourceType": "Bundle", + "type": "transaction", + "entry": [ { + "resource": { + "resourceType": "ExplanationOfBenefit", + "id": "26d4cebd-95c6-39ea-855c-dc819bc68d08", + "meta": { + "lastUpdated": "2016-01-01T00:56:00.000-05:00", + "profile": [ "http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Inpatient-Institutional" ] + }, + "identifier": [ { + "type": { + "coding": [ { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code": "uc" + } ] + }, + "system": "fhir/CodeSystem/sid/eob-inpatient-claim-id", + "value": "20550047" + } ], + "status": "active", + "type": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/claim-type", + "code": "institutional" + } ] + }, + "use": "claim", + "patient": { + "reference": "Patient/123" + }, + "billablePeriod": { + "start": "2015-12-14T00:00:00-05:00" + }, + "created": "2021-08-16T13:54:10-04:00", + "insurer": { + "reference": "Organization/1" + }, + "provider": { + "reference": "Organization/b9d22776-1ee9-3843-bc48-b4bf67861483" + }, + "outcome": "complete", + "careTeam": [ { + "sequence": 1, + "provider": { + "reference": "Practitioner/1" + }, + "role": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/claimcareteamrole", + "code": "primary" + } ] + } + }, { + "sequence": 2, + "provider": { + "reference": "Practitioner/2" + }, + "role": { + "coding": [ { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", + "code": "attending" + } ] + } + }, { + "sequence": 3, + "provider": { + "reference": "Practitioner/3" + }, + "role": { + "coding": [ { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", + "code": "performing" + } ] + } + } ], + "supportingInfo": [ { + "sequence": 1, + "category": { + "coding": [ { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", + "code": "admissionperiod" + } ] + }, + "timingPeriod": { + "start": "2015-12-14T00:00:00-05:00", + "end": "2016-01-11T14:11:00-05:00" + } + }, { + "sequence": 2, + "category": { + "coding": [ { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", + "code": "clmrecvddate" + } ] + }, + "timingDate": "2018-12-23" + }, { + "sequence": 3, + "category": { + "coding": [ { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", + "code": "admtype" + } ] + }, + "code": { + "coding": [ { + "system": "https://www.nubc.org/CodeSystem/PriorityTypeOfAdmitOrVisit", + "code": "4" + } ] + } + } ], + "diagnosis": [ { + "sequence": 1, + "diagnosisCodeableConcept": { + "coding": [ { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "Z38.00" + } ] + }, + "type": [ { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype", + "code": "principal" + } ] + } ] + } ], + "insurance": [ { + "focal": true, + "coverage": { + "reference": "Coverage/10" + } + } ], + "total": [ { + "category": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit" + } ] + }, + "amount": { + "value": 1039.28 + } + }, { + "category": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted" + } ] + }, + "amount": { + "value": 2011 + } + } ] + }, + "request": { + "method": "PUT", + "url": "ExplanationOfBenefit/26d4cebd-95c6-39ea-855c-dc819bc68d08" + } + }, { + "resource": { + "resourceType": "ExplanationOfBenefit", + "id": "a25f1c3a-09b9-3f17-8f1b-0fbbf6391fce", + "meta": { + "lastUpdated": "2016-01-01T00:58:00.000-05:00", + "profile": [ "http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Inpatient-Institutional" ] + }, + "identifier": [ { + "type": { + "coding": [ { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code": "uc" + } ] + }, + "system": "fhir/CodeSystem/sid/eob-inpatient-claim-id", + "value": "20586901" + } ], + "status": "active", + "type": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/claim-type", + "code": "institutional" + } ] + }, + "use": "claim", + "patient": { + "reference": "Patient/123" + }, + "billablePeriod": { + "start": "2015-12-18T00:00:00-05:00" + }, + "created": "2021-08-16T13:54:10-04:00", + "insurer": { + "reference": "Organization/1" + }, + "provider": { + "reference": "Organization/d10823cf-ee15-3a0e-a12e-1509cd18cda4" + }, + "outcome": "complete", + "careTeam": [ { + "sequence": 1, + "provider": { + "reference": "Practitioner/4" + }, + "role": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/claimcareteamrole", + "code": "primary" + } ] + } + }, { + "sequence": 2, + "provider": { + "reference": "Practitioner/5" + }, + "role": { + "coding": [ { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", + "code": "attending" + } ] + } + }, { + "sequence": 3, + "provider": { + "reference": "Practitioner/6" + }, + "role": { + "coding": [ { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", + "code": "performing" + } ] + } + } ], + "supportingInfo": [ { + "sequence": 1, + "category": { + "coding": [ { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", + "code": "admissionperiod" + } ] + }, + "timingPeriod": { + "start": "2015-12-18T00:00:00-05:00", + "end": "2016-01-11T14:12:00-05:00" + } + }, { + "sequence": 2, + "category": { + "coding": [ { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", + "code": "clmrecvddate" + } ] + }, + "timingDate": "2018-12-29" + }, { + "sequence": 3, + "category": { + "coding": [ { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", + "code": "admtype" + } ] + }, + "code": { + "coding": [ { + "system": "https://www.nubc.org/CodeSystem/PriorityTypeOfAdmitOrVisit", + "code": "4" + } ] + } + } ], + "diagnosis": [ { + "sequence": 1, + "diagnosisCodeableConcept": { + "coding": [ { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "Z38.00" + } ] + }, + "type": [ { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype", + "code": "principal" + } ] + } ] + }, { + "sequence": 2, + "diagnosisCodeableConcept": { + "coding": [ { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "P96.89" + } ] + }, + "type": [ { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype", + "code": "principal" + } ] + } ] + }, { + "sequence": 3, + "diagnosisCodeableConcept": { + "coding": [ { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R25.8" + } ] + }, + "type": [ { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype", + "code": "principal" + } ] + } ] + }, { + "sequence": 4, + "diagnosisCodeableConcept": { + "coding": [ { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "P08.21" + } ] + }, + "type": [ { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype", + "code": "principal" + } ] + } ] + }, { + "sequence": 5, + "diagnosisCodeableConcept": { + "coding": [ { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "P92.5" + } ] + }, + "type": [ { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype", + "code": "principal" + } ] + } ] + }, { + "sequence": 6, + "diagnosisCodeableConcept": { + "coding": [ { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "P92.6" + } ] + }, + "type": [ { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype", + "code": "principal" + } ] + } ] + }, { + "sequence": 7, + "diagnosisCodeableConcept": { + "coding": [ { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "Z23" + } ] + }, + "type": [ { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype", + "code": "principal" + } ] + } ] + } ], + "insurance": [ { + "focal": true, + "coverage": { + "reference": "Coverage/10" + } + } ], + "total": [ { + "category": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit" + } ] + }, + "amount": { + "value": 1421.31 + } + }, { + "category": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted" + } ] + }, + "amount": { + "value": 2336 + } + } ] + }, + "request": { + "method": "PUT", + "url": "ExplanationOfBenefit/a25f1c3a-09b9-3f17-8f1b-0fbbf6391fce" + } + } ] } From 19d181989c317a81b2a5a1eed49229419ed37649 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 19 Aug 2021 14:52:48 -0400 Subject: [PATCH 007/143] Add another failing test --- .../ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java | 1 + .../dao/index/DaoResourceLinkResolver.java | 1 - ...irResourceDaoR4VersionedReferenceTest.java | 26 +++++++++++++++++++ .../test/resources/npe-causing-bundle.json | 24 ++++++++--------- 4 files changed, 39 insertions(+), 13 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java index bd2e964e523..1fc0bb8f9d2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java @@ -1206,6 +1206,7 @@ public abstract class BaseHapiFhirDao extends BaseStora if (thePerformIndexing || ((ResourceTable) theEntity).getVersion() == 1) { newParams = new ResourceIndexedSearchParams(); + //FIX ME GGG: This is where the placeholder references end up getting created, deeeeeep down the stakc. mySearchParamWithInlineReferencesExtractor.populateFromResource(newParams, theTransactionDetails, entity, theResource, existingParams, theRequest, thePerformIndexing); changed = populateResourceIntoEntity(theTransactionDetails, theRequest, theResource, entity, true); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoResourceLinkResolver.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoResourceLinkResolver.java index a219f39f292..07daf83c2da 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoResourceLinkResolver.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoResourceLinkResolver.java @@ -94,7 +94,6 @@ public class DaoResourceLinkResolver implements IResourceLinkResolver { throw new InvalidRequestException("Resource " + resName + "/" + idPart + " not found, specified in path: " + theSourcePath); } - resolvedResource = createdTableOpt.get(); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java index d682d9a6304..7476befb401 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java @@ -2,6 +2,7 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.jpa.provider.r4.ResourceProviderR4Test; @@ -34,7 +35,9 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Supplier; import java.util.stream.Collectors; +import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.matchesPattern; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -803,7 +806,30 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { Bundle bundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, new InputStreamReader(FhirResourceDaoR4VersionedReferenceTest.class.getResourceAsStream("/npe-causing-bundle.json"))); Bundle transaction = mySystemDao.transaction(new SystemRequestDetails(), bundle); + } + @Test + public void testAutoVersionPathsWithAutoCreatePlaceholders() { + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + + Observation obs = new Observation(); + obs.setId("Observation/CDE"); + obs.setSubject(new Reference("Patient/ABC")); + DaoMethodOutcome update = myObservationDao.create(obs); + Observation resource = (Observation)update.getResource(); + String versionedPatientReference = resource.getSubject().getReference(); + assertThat(versionedPatientReference, is(equalTo("Patient/ABC"))); + + myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); + + obs = new Observation(); + obs.setId("Observation/DEF"); + obs.setSubject(new Reference("Patient/RED")); + update = myObservationDao.create(obs); + resource = (Observation)update.getResource(); + versionedPatientReference = resource.getSubject().getReference(); + + assertThat(versionedPatientReference, is(equalTo("Patient/RED/_history/1"))); } diff --git a/hapi-fhir-jpaserver-base/src/test/resources/npe-causing-bundle.json b/hapi-fhir-jpaserver-base/src/test/resources/npe-causing-bundle.json index ef1d7645e5b..a645b167d35 100644 --- a/hapi-fhir-jpaserver-base/src/test/resources/npe-causing-bundle.json +++ b/hapi-fhir-jpaserver-base/src/test/resources/npe-causing-bundle.json @@ -28,14 +28,14 @@ }, "use": "claim", "patient": { - "reference": "Patient/123" + "reference": "Patient/ABC" }, "billablePeriod": { "start": "2015-12-14T00:00:00-05:00" }, "created": "2021-08-16T13:54:10-04:00", "insurer": { - "reference": "Organization/1" + "reference": "Organization/A" }, "provider": { "reference": "Organization/b9d22776-1ee9-3843-bc48-b4bf67861483" @@ -44,7 +44,7 @@ "careTeam": [ { "sequence": 1, "provider": { - "reference": "Practitioner/1" + "reference": "Practitioner/H" }, "role": { "coding": [ { @@ -55,7 +55,7 @@ }, { "sequence": 2, "provider": { - "reference": "Practitioner/2" + "reference": "Practitioner/I" }, "role": { "coding": [ { @@ -66,7 +66,7 @@ }, { "sequence": 3, "provider": { - "reference": "Practitioner/3" + "reference": "Practitioner/J" }, "role": { "coding": [ { @@ -129,7 +129,7 @@ "insurance": [ { "focal": true, "coverage": { - "reference": "Coverage/10" + "reference": "Coverage/G" } } ], "total": [ { @@ -185,14 +185,14 @@ }, "use": "claim", "patient": { - "reference": "Patient/123" + "reference": "Patient/ABC" }, "billablePeriod": { "start": "2015-12-18T00:00:00-05:00" }, "created": "2021-08-16T13:54:10-04:00", "insurer": { - "reference": "Organization/1" + "reference": "Organization/A" }, "provider": { "reference": "Organization/d10823cf-ee15-3a0e-a12e-1509cd18cda4" @@ -201,7 +201,7 @@ "careTeam": [ { "sequence": 1, "provider": { - "reference": "Practitioner/4" + "reference": "Practitioner/D" }, "role": { "coding": [ { @@ -212,7 +212,7 @@ }, { "sequence": 2, "provider": { - "reference": "Practitioner/5" + "reference": "Practitioner/E" }, "role": { "coding": [ { @@ -223,7 +223,7 @@ }, { "sequence": 3, "provider": { - "reference": "Practitioner/6" + "reference": "Practitioner/F" }, "role": { "coding": [ { @@ -370,7 +370,7 @@ "insurance": [ { "focal": true, "coverage": { - "reference": "Coverage/10" + "reference": "Coverage/G" } } ], "total": [ { From 1e41621eca369ceb8e3a116db4002d1b334cc33f Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Thu, 19 Aug 2021 16:43:51 -0400 Subject: [PATCH 008/143] Rolled back changes --- .../ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java | 9 -------- .../fhir/jpa/dao/mdm/MdmLinkExpandSvc.java | 22 +++---------------- .../fhir/jpa/mdm/dao/MdmLinkDaoSvcTest.java | 9 -------- 3 files changed, 3 insertions(+), 37 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java index be0a6289a4e..16834facbe2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java @@ -67,13 +67,4 @@ public interface IMdmLinkDao extends JpaRepository { "AND ml.myMatchResult=:matchResult") List expandPidsBySourcePidAndMatchResult(@Param("sourcePid") Long theSourcePid, @Param("matchResult") MdmMatchResultEnum theMdmMatchResultEnum); - @Query("SELECT DISTINCT ml.myGoldenResourcePid as goldenPid, ml.mySourcePid as sourcePid " + - "FROM MdmLink ml " + - "INNER JOIN MdmLink ml2 " + - "ON ml.myGoldenResourcePid = ml2.myGoldenResourcePid " + - "WHERE (ml2.mySourcePid = :sourceOrGoldenPid OR ml2.myGoldenResourcePid = :sourceOrGoldenPid) " + - "AND ml2.myMatchResult=:matchResult " + - "AND ml.myMatchResult=:matchResult") - List expandPidsBySourceOrGoldenResourcePidAndMatchResult(@Param("sourceOrGoldenPid") Long theSourceOrGoldenPid, @Param("matchResult") MdmMatchResultEnum theMdmMatchResultEnum); - } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmLinkExpandSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmLinkExpandSvc.java index b03e22d04b8..66af7f5a706 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmLinkExpandSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmLinkExpandSvc.java @@ -72,19 +72,6 @@ public class MdmLinkExpandSvc { return expandMdmBySourceResourcePid(pidOrThrowException); } - /** - * Given a resource ID of a source resource or golden resource, perform MDM expansion and return all the resource - * IDs of all resources that are MDM-Matched to this resource. - * - * @param theId The Resource ID of the resource to MDM-Expand - * @return A set of strings representing the FHIR ids of the expanded resources. - */ - public Set expandMdmBySourceOrGoldenResourceId(IIdType theId) { - ourLog.debug("About to expand source resource with resource id {}", theId); - Long pidOrThrowException = myIdHelperService.getPidOrThrowException(theId); - return flatten(myMdmLinkDao.expandPidsBySourceOrGoldenResourcePidAndMatchResult(pidOrThrowException, MdmMatchResultEnum.MATCH)); - } - /** * Given a PID of a source resource, perform MDM expansion and return all the resource IDs of all resources that are * MDM-Matched to this resource. @@ -94,17 +81,14 @@ public class MdmLinkExpandSvc { */ public Set expandMdmBySourceResourcePid(Long theSourceResourcePid) { ourLog.debug("About to expand source resource with PID {}", theSourceResourcePid); - return flatten(myMdmLinkDao.expandPidsBySourcePidAndMatchResult(theSourceResourcePid, MdmMatchResultEnum.MATCH)); - } - - protected Set flatten(List thePidTuples) { + List goldenPidSourcePidTuples = myMdmLinkDao.expandPidsBySourcePidAndMatchResult(theSourceResourcePid, MdmMatchResultEnum.MATCH); Set flattenedPids = new HashSet<>(); - thePidTuples.forEach(tuple -> { + goldenPidSourcePidTuples.forEach(tuple -> { flattenedPids.add(tuple.getSourcePid()); flattenedPids.add(tuple.getGoldenPid()); }); Set resourceIds = myIdHelperService.translatePidsToFhirResourceIds(flattenedPids); - ourLog.debug("Expanded pids are [{}]", String.join(",", resourceIds)); + ourLog.debug("Pid {} has been expanded to [{}]", theSourceResourcePid, String.join(",", resourceIds)); return resourceIds; } diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvcTest.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvcTest.java index b5deb25f0c6..ae034af6fa7 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvcTest.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvcTest.java @@ -83,15 +83,6 @@ public class MdmLinkDaoSvcTest extends BaseMdmR4Test { assertThat(lists, hasSize(10)); - lists.stream() - .forEach(tuple -> { - assertThat(tuple.getGoldenPid(), is(equalTo(golden.getIdElement().getIdPartAsLong()))); - assertThat(tuple.getSourcePid(), is(in(expectedExpandedPids))); - }); - - lists = myMdmLinkDao.expandPidsBySourceOrGoldenResourcePidAndMatchResult(mdmLinks.get(0).getGoldenResourcePid(), MdmMatchResultEnum.MATCH); - assertThat(lists, hasSize(10)); - lists.stream() .forEach(tuple -> { assertThat(tuple.getGoldenPid(), is(equalTo(golden.getIdElement().getIdPartAsLong()))); From 3556299332cce58ff58d07dd3b660fa7b24cd891 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 19 Aug 2021 17:25:15 -0400 Subject: [PATCH 009/143] Add another failing Test --- .../FhirResourceDaoR4VersionedReferenceTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java index 7476befb401..f61bf54ae59 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java @@ -832,5 +832,19 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { assertThat(versionedPatientReference, is(equalTo("Patient/RED/_history/1"))); } + @Test + public void testNoNpeMinimal() { + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); + + Observation obs = new Observation(); + obs.setId("Observation/DEF"); + obs.setSubject(new Reference("Patient/RED")); + BundleBuilder builder = new BundleBuilder(myFhirCtx); + builder.addTransactionUpdateEntry(obs); + + mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); + } + } From c2e3401185a1795909f1d0b1ba37d849927bd932 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 19 Aug 2021 17:25:51 -0400 Subject: [PATCH 010/143] Move display name --- .../jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java index f61bf54ae59..f2c661b4522 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java @@ -790,7 +790,6 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { } @Test - @DisplayName("GH-2901 Test no NPE is thrown on autoversioned references") public void testNoNpeOnEoBBundle() { myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); List strings = Arrays.asList( @@ -833,6 +832,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { } @Test + @DisplayName("GH-2901 Test no NPE is thrown on autoversioned references") public void testNoNpeMinimal() { myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); From 6ea58f74d1e3317683242a8fd0f94ac8bb2b881d Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Mon, 23 Aug 2021 10:55:09 -0400 Subject: [PATCH 011/143] Code review --- .../jpa/mdm/broker/MdmMessageHandler.java | 22 +++----- .../jpa/mdm/config/MdmConsumerConfig.java | 11 +++- .../jpa/mdm/svc/IMdmModelConverterSvc.java | 39 ++++++++++++++ ...cImpl.java => MdmLinkQuerySvcImplSvc.java} | 32 ++++-------- .../jpa/mdm/svc/MdmModelConverterSvcImpl.java | 52 +++++++++++++++++++ .../interceptor/MdmStorageInterceptorIT.java | 7 +-- ...LinkChangeEvent.java => MdmLinkEvent.java} | 21 +++++++- .../java/ca/uhn/fhir/mdm/api/MdmLinkJson.java | 19 ++++++- .../fhir/mdm/model/MdmTransactionContext.java | 12 ++--- 9 files changed, 160 insertions(+), 55 deletions(-) create mode 100644 hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/IMdmModelConverterSvc.java rename hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/{MdmLinkQuerySvcImpl.java => MdmLinkQuerySvcImplSvc.java} (73%) create mode 100644 hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmModelConverterSvcImpl.java rename hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/{MdmLinkChangeEvent.java => MdmLinkEvent.java} (86%) diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java index 5f103311abb..701f00b034b 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java @@ -26,15 +26,14 @@ import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.interceptor.api.Pointcut; import ca.uhn.fhir.jpa.entity.MdmLink; import ca.uhn.fhir.jpa.mdm.dao.MdmLinkDaoSvc; -import ca.uhn.fhir.jpa.mdm.svc.MdmLinkSvcImpl; +import ca.uhn.fhir.jpa.mdm.svc.IMdmModelConverterSvc; import ca.uhn.fhir.jpa.mdm.svc.MdmMatchLinkSvc; import ca.uhn.fhir.jpa.mdm.svc.MdmResourceFilteringSvc; import ca.uhn.fhir.jpa.mdm.svc.candidate.TooManyCandidatesException; import ca.uhn.fhir.jpa.subscription.model.ResourceModifiedJsonMessage; import ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage; -import ca.uhn.fhir.mdm.api.IMdmLinkSvc; import ca.uhn.fhir.mdm.api.IMdmSettings; -import ca.uhn.fhir.mdm.api.MdmLinkChangeEvent; +import ca.uhn.fhir.mdm.api.MdmLinkEvent; import ca.uhn.fhir.mdm.log.Logs; import ca.uhn.fhir.mdm.model.MdmTransactionContext; import ca.uhn.fhir.rest.server.TransactionLogMessages; @@ -42,7 +41,6 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.messaging.ResourceOperationMessage; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.instance.model.api.IIdType; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.Message; @@ -69,6 +67,8 @@ public class MdmMessageHandler implements MessageHandler { private MdmResourceFilteringSvc myMdmResourceFilteringSvc; @Autowired private IMdmSettings myMdmSettings; + @Autowired + private IMdmModelConverterSvc myModelConverter; @Override public void handleMessage(Message theMessage) throws MessagingException { @@ -119,25 +119,17 @@ public class MdmMessageHandler implements MessageHandler { ResourceOperationMessage outgoingMsg = new ResourceOperationMessage(myFhirContext, targetResource, theMsg.getOperationType()); outgoingMsg.setTransactionId(theMsg.getTransactionId()); - MdmLinkChangeEvent linkChangeEvent = mdmContext.getMdmLinkChangeEvent(); + MdmLinkEvent linkChangeEvent = mdmContext.getMdmLinkChangeEvent(); Optional mdmLinkBySource = myMdmLinkDaoSvc.findMdmLinkBySource(targetResource); if (!mdmLinkBySource.isPresent()) { ourLog.warn("Unable to find link by source for {}", targetResource.getIdElement()); } - mdmLinkBySource.ifPresent(link -> { - linkChangeEvent.setMdmMatchResult(link.getMatchResult()); - linkChangeEvent.setMdmLinkSource(link.getLinkSource()); - linkChangeEvent.setEidMatch(link.isEidMatchPresent()); - linkChangeEvent.setNewGoldenResource(link.getHadToCreateNewGoldenResource()); - linkChangeEvent.setScore(link.getScore()); - linkChangeEvent.setRuleCount(link.getRuleCount()); - }); - + mdmLinkBySource.ifPresent(link -> linkChangeEvent.setFromLink(myModelConverter.toJson(link))); HookParams params = new HookParams() .add(ResourceOperationMessage.class, outgoingMsg) .add(TransactionLogMessages.class, mdmContext.getTransactionLogMessages()) - .add(MdmLinkChangeEvent.class, mdmContext.getMdmLinkChangeEvent()); + .add(MdmLinkEvent.class, mdmContext.getMdmLinkChangeEvent()); myInterceptorBroadcaster.callHooks(Pointcut.MDM_AFTER_PERSISTED_RESOURCE_CHECKED, params); } diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/config/MdmConsumerConfig.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/config/MdmConsumerConfig.java index 51981cdecaa..56f81f8b87a 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/config/MdmConsumerConfig.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/config/MdmConsumerConfig.java @@ -31,15 +31,17 @@ import ca.uhn.fhir.jpa.mdm.dao.MdmLinkFactory; import ca.uhn.fhir.jpa.mdm.interceptor.IMdmStorageInterceptor; import ca.uhn.fhir.jpa.mdm.interceptor.MdmStorageInterceptor; import ca.uhn.fhir.jpa.mdm.svc.GoldenResourceMergerSvcImpl; +import ca.uhn.fhir.jpa.mdm.svc.IMdmModelConverterSvc; import ca.uhn.fhir.jpa.mdm.svc.MdmClearSvcImpl; import ca.uhn.fhir.jpa.mdm.svc.MdmControllerSvcImpl; import ca.uhn.fhir.jpa.mdm.svc.MdmEidUpdateService; import ca.uhn.fhir.jpa.mdm.svc.MdmGoldenResourceDeletingSvc; -import ca.uhn.fhir.jpa.mdm.svc.MdmLinkQuerySvcImpl; +import ca.uhn.fhir.jpa.mdm.svc.MdmLinkQuerySvcImplSvc; import ca.uhn.fhir.jpa.mdm.svc.MdmLinkSvcImpl; import ca.uhn.fhir.jpa.mdm.svc.MdmLinkUpdaterSvcImpl; import ca.uhn.fhir.jpa.mdm.svc.MdmMatchFinderSvcImpl; import ca.uhn.fhir.jpa.mdm.svc.MdmMatchLinkSvc; +import ca.uhn.fhir.jpa.mdm.svc.MdmModelConverterSvcImpl; import ca.uhn.fhir.jpa.mdm.svc.MdmResourceDaoSvc; import ca.uhn.fhir.jpa.mdm.svc.MdmResourceFilteringSvc; import ca.uhn.fhir.jpa.mdm.svc.MdmSearchParamSvc; @@ -179,7 +181,12 @@ public class MdmConsumerConfig { @Bean IMdmLinkQuerySvc mdmLinkQuerySvc() { - return new MdmLinkQuerySvcImpl(); + return new MdmLinkQuerySvcImplSvc(); + } + + @Bean + IMdmModelConverterSvc mdmModelConverterSvc() { + return new MdmModelConverterSvcImpl(); } @Bean diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/IMdmModelConverterSvc.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/IMdmModelConverterSvc.java new file mode 100644 index 00000000000..67c534a9489 --- /dev/null +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/IMdmModelConverterSvc.java @@ -0,0 +1,39 @@ +package ca.uhn.fhir.jpa.mdm.svc; + +/*- + * #%L + * HAPI FHIR JPA Server - Master Data Management + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.entity.MdmLink; +import ca.uhn.fhir.mdm.api.MdmLinkJson; + +/** + * Contract for decoupling API dependency from the base / JPA modules. + */ +public interface IMdmModelConverterSvc { + + /** + * Creates JSON representation of the provided MDM link + * + * @param theLink Link to convert + * @return Returns the converted link + */ + public MdmLinkJson toJson(MdmLink theLink); + +} diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkQuerySvcImpl.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkQuerySvcImplSvc.java similarity index 73% rename from hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkQuerySvcImpl.java rename to hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkQuerySvcImplSvc.java index ea00e81ec4d..996dbe8e5cc 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkQuerySvcImpl.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkQuerySvcImplSvc.java @@ -36,20 +36,24 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Example; import org.springframework.data.domain.Page; -public class MdmLinkQuerySvcImpl implements IMdmLinkQuerySvc { +public class MdmLinkQuerySvcImplSvc implements IMdmLinkQuerySvc { - private static final Logger ourLog = LoggerFactory.getLogger(MdmLinkQuerySvcImpl.class); + private static final Logger ourLog = LoggerFactory.getLogger(MdmLinkQuerySvcImplSvc.class); + + @Autowired + MdmLinkDaoSvc myMdmLinkDaoSvc; @Autowired IdHelperService myIdHelperService; + @Autowired - MdmLinkDaoSvc myMdmLinkDaoSvc; + IMdmModelConverterSvc myMdmModelConverterSvc; @Override public Page queryLinks(IIdType theGoldenResourceId, IIdType theSourceResourceId, MdmMatchResultEnum theMatchResult, MdmLinkSourceEnum theLinkSource, MdmTransactionContext theMdmContext, MdmPageRequest thePageRequest) { Example exampleLink = exampleLinkFromParameters(theGoldenResourceId, theSourceResourceId, theMatchResult, theLinkSource); Page mdmLinkByExample = myMdmLinkDaoSvc.findMdmLinkByExample(exampleLink, thePageRequest); - Page map = mdmLinkByExample.map(this::toJson); + Page map = mdmLinkByExample.map(myMdmModelConverterSvc::toJson); return map; } @@ -57,28 +61,10 @@ public class MdmLinkQuerySvcImpl implements IMdmLinkQuerySvc { public Page getDuplicateGoldenResources(MdmTransactionContext theMdmContext, MdmPageRequest thePageRequest) { Example exampleLink = exampleLinkFromParameters(null, null, MdmMatchResultEnum.POSSIBLE_DUPLICATE, null); Page mdmLinkPage = myMdmLinkDaoSvc.findMdmLinkByExample(exampleLink, thePageRequest); - Page map = mdmLinkPage.map(this::toJson); + Page map = mdmLinkPage.map(myMdmModelConverterSvc::toJson); return map; } - private MdmLinkJson toJson(MdmLink theLink) { - MdmLinkJson retval = new MdmLinkJson(); - String sourceId = myIdHelperService.resourceIdFromPidOrThrowException(theLink.getSourcePid()).toVersionless().getValue(); - retval.setSourceId(sourceId); - String goldenResourceId = myIdHelperService.resourceIdFromPidOrThrowException(theLink.getGoldenResourcePid()).toVersionless().getValue(); - retval.setGoldenResourceId(goldenResourceId); - retval.setCreated(theLink.getCreated()); - retval.setEidMatch(theLink.getEidMatch()); - retval.setLinkSource(theLink.getLinkSource()); - retval.setMatchResult(theLink.getMatchResult()); - retval.setLinkCreatedNewResource(theLink.getHadToCreateNewGoldenResource()); - retval.setScore(theLink.getScore()); - retval.setUpdated(theLink.getUpdated()); - retval.setVector(theLink.getVector()); - retval.setVersion(theLink.getVersion()); - return retval; - } - private Example exampleLinkFromParameters(IIdType theGoldenResourceId, IIdType theSourceId, MdmMatchResultEnum theMatchResult, MdmLinkSourceEnum theLinkSource) { MdmLink mdmLink = myMdmLinkDaoSvc.newMdmLink(); if (theGoldenResourceId != null) { diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmModelConverterSvcImpl.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmModelConverterSvcImpl.java new file mode 100644 index 00000000000..195ac388e68 --- /dev/null +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmModelConverterSvcImpl.java @@ -0,0 +1,52 @@ +package ca.uhn.fhir.jpa.mdm.svc; + +/*- + * #%L + * HAPI FHIR JPA Server - Master Data Management + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.dao.index.IdHelperService; +import ca.uhn.fhir.jpa.entity.MdmLink; +import ca.uhn.fhir.mdm.api.MdmLinkJson; +import org.springframework.beans.factory.annotation.Autowired; + +public class MdmModelConverterSvcImpl implements IMdmModelConverterSvc { + + @Autowired + IdHelperService myIdHelperService; + + public MdmLinkJson toJson(MdmLink theLink) { + MdmLinkJson retval = new MdmLinkJson(); + String sourceId = myIdHelperService.resourceIdFromPidOrThrowException(theLink.getSourcePid()).toVersionless().getValue(); + retval.setSourceId(sourceId); + String goldenResourceId = myIdHelperService.resourceIdFromPidOrThrowException(theLink.getGoldenResourcePid()).toVersionless().getValue(); + retval.setGoldenResourceId(goldenResourceId); + retval.setCreated(theLink.getCreated()); + retval.setEidMatch(theLink.getEidMatch()); + retval.setLinkSource(theLink.getLinkSource()); + retval.setMatchResult(theLink.getMatchResult()); + retval.setLinkCreatedNewResource(theLink.getHadToCreateNewGoldenResource()); + retval.setScore(theLink.getScore()); + retval.setUpdated(theLink.getUpdated()); + retval.setVector(theLink.getVector()); + retval.setVersion(theLink.getVersion()); + retval.setRuleCount(theLink.getRuleCount()); + return retval; + } + +} diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java index 4d729730f7c..cd1518cbc59 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java @@ -7,7 +7,7 @@ import ca.uhn.fhir.jpa.mdm.BaseMdmR4Test; import ca.uhn.fhir.jpa.mdm.helper.MdmHelperConfig; import ca.uhn.fhir.jpa.mdm.helper.MdmHelperR4; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; -import ca.uhn.fhir.mdm.api.MdmLinkChangeEvent; +import ca.uhn.fhir.mdm.api.MdmLinkEvent; import ca.uhn.fhir.mdm.model.CanonicalEID; import ca.uhn.fhir.mdm.model.MdmTransactionContext; import ca.uhn.fhir.mdm.rules.config.MdmSettings; @@ -32,14 +32,11 @@ import org.junit.jupiter.api.extension.RegisterExtension; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Example; -import org.springframework.data.domain.ExampleMatcher; -import org.springframework.data.domain.Pageable; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import java.util.Date; import java.util.List; -import java.util.Optional; import static ca.uhn.fhir.mdm.api.MdmConstants.CODE_GOLDEN_RECORD; import static ca.uhn.fhir.mdm.api.MdmConstants.CODE_GOLDEN_RECORD_REDIRECTED; @@ -89,7 +86,7 @@ public class MdmStorageInterceptorIT extends BaseMdmR4Test { MdmLink link = getLinkByTargetId(pr); - MdmLinkChangeEvent linkChangeEvent = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(MdmLinkChangeEvent.class); + MdmLinkEvent linkChangeEvent = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(MdmLinkEvent.class); assertNotNull(linkChangeEvent); assertEquals(link.getGoldenResourcePid(), new IdDt(linkChangeEvent.getGoldenResourceId()).getIdPartAsLong()); assertEquals(link.getSourcePid(), new IdDt(linkChangeEvent.getTargetResourceId()).getIdPartAsLong()); diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkEvent.java similarity index 86% rename from hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java rename to hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkEvent.java index 8e306c16e6e..7eda6f328d8 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkChangeEvent.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkEvent.java @@ -28,7 +28,7 @@ import org.hl7.fhir.instance.model.api.IIdType; import java.util.HashSet; import java.util.Set; -public class MdmLinkChangeEvent implements IModelJson { +public class MdmLinkEvent implements IModelJson { @JsonProperty(value = "matchResult") private MdmMatchResultEnum myMdmMatchResult; @@ -92,7 +92,7 @@ public class MdmLinkChangeEvent implements IModelJson { myDuplicateGoldenResourceIds = theDuplicateGoldenResourceIds; } - public MdmLinkChangeEvent addDuplicateGoldenResourceId(IBaseResource theDuplicateGoldenResourceId) { + public MdmLinkEvent addDuplicateGoldenResourceId(IBaseResource theDuplicateGoldenResourceId) { String id = getIdAsString(theDuplicateGoldenResourceId); if (id != null) { getDuplicateGoldenResourceIds().add(id); @@ -121,6 +121,10 @@ public class MdmLinkChangeEvent implements IModelJson { } public void setEidMatch(Boolean theEidMatch) { + if (theEidMatch == null) { + myEidMatch = Boolean.FALSE; + return; + } myEidMatch = theEidMatch; } @@ -129,6 +133,10 @@ public class MdmLinkChangeEvent implements IModelJson { } public void setNewGoldenResource(Boolean theNewGoldenResource) { + if (theNewGoldenResource == null) { + myNewGoldenResource = Boolean.FALSE; + return; + } myNewGoldenResource = theNewGoldenResource; } @@ -148,6 +156,15 @@ public class MdmLinkChangeEvent implements IModelJson { myRuleCount = theRuleCount; } + public void setFromLink(MdmLinkJson theMdmLinkJson) { + setMdmMatchResult(theMdmLinkJson.getMatchResult()); + setMdmLinkSource(theMdmLinkJson.getLinkSource()); + setEidMatch(theMdmLinkJson.getEidMatch()); + setNewGoldenResource(theMdmLinkJson.getLinkCreatedNewResource()); + setScore(theMdmLinkJson.getScore()); + setRuleCount(theMdmLinkJson.getRuleCount()); + } + @Override public String toString() { return "MdmLinkChangeEvent{" + diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkJson.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkJson.java index 744aa384823..424298418b4 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkJson.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkJson.java @@ -48,11 +48,15 @@ public class MdmLinkJson implements IModelJson { @JsonProperty("version") private String myVersion; - /** This link was created as a result of an eid match **/ + /** + * This link was created as a result of an eid match + **/ @JsonProperty("eidMatch") private Boolean myEidMatch; - /** This link created a new golden resource **/ + /** + * This link created a new golden resource + **/ @JsonProperty("linkCreatedNewGoldenResource") private Boolean myLinkCreatedNewResource; @@ -62,6 +66,9 @@ public class MdmLinkJson implements IModelJson { @JsonProperty("score") private Double myScore; + @JsonProperty("ruleCount") + private Long myRuleCount; + public String getGoldenResourceId() { return myGoldenResourceId; } @@ -160,4 +167,12 @@ public class MdmLinkJson implements IModelJson { myScore = theScore; return this; } + + public Long getRuleCount() { + return myRuleCount; + } + + public void setRuleCount(Long theRuleCount) { + myRuleCount = theRuleCount; + } } diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java index ce35ea3f150..9853918a9d7 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java @@ -20,7 +20,7 @@ package ca.uhn.fhir.mdm.model; * #L% */ -import ca.uhn.fhir.mdm.api.MdmLinkChangeEvent; +import ca.uhn.fhir.mdm.api.MdmLinkEvent; import ca.uhn.fhir.rest.server.TransactionLogMessages; public class MdmTransactionContext { @@ -46,7 +46,7 @@ public class MdmTransactionContext { private String myResourceType; - private MdmLinkChangeEvent myMdmLinkChangeEvent = new MdmLinkChangeEvent(); + private MdmLinkEvent myMdmLinkEvent = new MdmLinkEvent(); public TransactionLogMessages getTransactionLogMessages() { return myTransactionLogMessages; @@ -96,12 +96,12 @@ public class MdmTransactionContext { this.myResourceType = myResourceType; } - public MdmLinkChangeEvent getMdmLinkChangeEvent() { - return myMdmLinkChangeEvent; + public MdmLinkEvent getMdmLinkChangeEvent() { + return myMdmLinkEvent; } - public void setMdmLinkChangeEvent(MdmLinkChangeEvent theMdmLinkChangeEvent) { - myMdmLinkChangeEvent = theMdmLinkChangeEvent; + public void setMdmLinkChangeEvent(MdmLinkEvent theMdmLinkEvent) { + myMdmLinkEvent = theMdmLinkEvent; } } From 3a5e391c77690c0cc57975cd6dd9cf478fe174a0 Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Mon, 23 Aug 2021 11:00:04 -0400 Subject: [PATCH 012/143] Fixed pointcut def --- .../src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java index d8f0f33ae9f..30f81b90889 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java @@ -1996,7 +1996,7 @@ public enum Pointcut implements IPointcut { MDM_AFTER_PERSISTED_RESOURCE_CHECKED(void.class, "ca.uhn.fhir.rest.server.messaging.ResourceOperationMessage", "ca.uhn.fhir.rest.server.TransactionLogMessages", - "ca.uhn.fhir.mdm.api.MdmLinkChangeEvent"), + "ca.uhn.fhir.mdm.api.MdmLinkEvent"), /** * Performance Tracing Hook: From b51c7227559fd222040e3ea0dd0038ef53a20ffd Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Wed, 25 Aug 2021 10:41:58 -0400 Subject: [PATCH 013/143] stashing minor refactors --- .../java/ca/uhn/fhir/util/FhirTerser.java | 1 + .../jpa/dao/BaseTransactionProcessor.java | 368 +++++++++++------- .../ca/uhn/fhir/jpa/dao/r4/AAAATests.java | 83 ++++ ...irResourceDaoR4VersionedReferenceTest.java | 15 +- .../uhn/fhir/rest/server/mail/MailConfig.java | 20 + .../ca/uhn/fhir/rest/server/mail/MailSvc.java | 20 + .../model/dstu2/composite/NarrativeDt.java | 16 - 7 files changed, 357 insertions(+), 166 deletions(-) create mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/AAAATests.java diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java index 8cc1c9be1de..b0dca947658 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java @@ -961,6 +961,7 @@ public class FhirTerser { for (BaseRuntimeChildDefinition nextChild : childDef.getChildrenAndExtension()) { List values = nextChild.getAccessor().getValues(theElement); + if (values != null) { for (Object nextValueObject : values) { IBase nextValue; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index f599b5bc435..3e30960b590 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -240,8 +240,10 @@ public abstract class BaseTransactionProcessor { myVersionAdapter.populateEntryWithOperationOutcome(caughtEx, nextEntry); } - private void handleTransactionCreateOrUpdateOutcome(Map idSubstitutions, Map idToPersistedOutcome, IIdType nextResourceId, DaoMethodOutcome outcome, - IBase newEntry, String theResourceType, IBaseResource theRes, RequestDetails theRequestDetails) { + private void handleTransactionCreateOrUpdateOutcome(Map idSubstitutions, Map idToPersistedOutcome, + IIdType nextResourceId, DaoMethodOutcome outcome, + IBase newEntry, String theResourceType, + IBaseResource theRes, RequestDetails theRequestDetails) { IIdType newId = outcome.getId().toUnqualified(); IIdType resourceId = isPlaceholder(nextResourceId) ? nextResourceId : nextResourceId.toUnqualifiedVersionless(); if (newId.equals(resourceId) == false) { @@ -652,8 +654,129 @@ public abstract class BaseTransactionProcessor { myModelConfig = theModelConfig; } - protected Map doTransactionWriteOperations(final RequestDetails theRequest, String theActionName, TransactionDetails theTransactionDetails, Set theAllIds, - Map theIdSubstitutions, Map theIdToPersistedOutcome, IBaseBundle theResponse, IdentityHashMap theOriginalRequestOrder, List theEntries, StopWatch theTransactionStopWatch) { + /** + * Searches for duplicate conditional creates and consolidates them. + * + * @param theEntries + */ + private void consolidateDuplicateConditionalCreates(List theEntries) { + final HashMap keyToUuid = new HashMap<>(); + for (int index = 0, originalIndex = 0; index < theEntries.size(); index++, originalIndex++) { + IBase nextReqEntry = theEntries.get(index); + IBaseResource resource = myVersionAdapter.getResource(nextReqEntry); + if (resource != null) { + String verb = myVersionAdapter.getEntryRequestVerb(myContext, nextReqEntry); + String entryUrl = myVersionAdapter.getFullUrl(nextReqEntry); + String requestUrl = myVersionAdapter.getEntryRequestUrl(nextReqEntry); + String ifNoneExist = myVersionAdapter.getEntryRequestIfNoneExist(nextReqEntry); + String key = verb + "|" + requestUrl + "|" + ifNoneExist; + + // Conditional UPDATE + boolean consolidateEntry = false; + if ("PUT".equals(verb)) { + if (isNotBlank(entryUrl) && isNotBlank(requestUrl)) { + int questionMarkIndex = requestUrl.indexOf('?'); + if (questionMarkIndex >= 0 && requestUrl.length() > (questionMarkIndex + 1)) { + consolidateEntry = true; + } + } + } + + // Conditional CREATE + if ("POST".equals(verb)) { + if (isNotBlank(entryUrl) && isNotBlank(requestUrl) && isNotBlank(ifNoneExist)) { + if (!entryUrl.equals(requestUrl)) { + consolidateEntry = true; + } + } + } + + if (consolidateEntry) { + if (!keyToUuid.containsKey(key)) { + keyToUuid.put(key, entryUrl); + } else { + ourLog.info("Discarding transaction bundle entry {} as it contained a duplicate conditional {}", originalIndex, verb); + theEntries.remove(index); + index--; + String existingUuid = keyToUuid.get(key); + for (IBase nextEntry : theEntries) { + IBaseResource nextResource = myVersionAdapter.getResource(nextEntry); + for (IBaseReference nextReference : myContext.newTerser().getAllPopulatedChildElementsOfType(nextResource, IBaseReference.class)) { + // We're interested in any references directly to the placeholder ID, but also + // references that have a resource target that has the placeholder ID. + String nextReferenceId = nextReference.getReferenceElement().getValue(); + if (isBlank(nextReferenceId) && nextReference.getResource() != null) { + nextReferenceId = nextReference.getResource().getIdElement().getValue(); + } + if (entryUrl.equals(nextReferenceId)) { + nextReference.setReference(existingUuid); + nextReference.setResource(null); + } + } + } + } + } + } + } + } + + /** + * Retrieves teh next resource id (IIdType) from the base resource and next request entry. + * @param theBaseResource - base resource + * @param theNextReqEntry - next request entry + * @param theAllIds - set of all IIdType values + * @return + */ + private IIdType getNextResourceIdFromBaseResource(IBaseResource theBaseResource, + IBase theNextReqEntry, + Set theAllIds) { + IIdType nextResourceId = null; + if (theBaseResource != null) { + nextResourceId = theBaseResource.getIdElement(); + + String fullUrl = myVersionAdapter.getFullUrl(theNextReqEntry); + if (isNotBlank(fullUrl)) { + IIdType fullUrlIdType = newIdType(fullUrl); + if (isPlaceholder(fullUrlIdType)) { + nextResourceId = fullUrlIdType; + } else if (!nextResourceId.hasIdPart()) { + nextResourceId = fullUrlIdType; + } + } + + if (nextResourceId.hasIdPart() && nextResourceId.getIdPart().matches("[a-zA-Z]+:.*") && !isPlaceholder(nextResourceId)) { + throw new InvalidRequestException("Invalid placeholder ID found: " + nextResourceId.getIdPart() + " - Must be of the form 'urn:uuid:[uuid]' or 'urn:oid:[oid]'"); + } + + if (nextResourceId.hasIdPart() && !nextResourceId.hasResourceType() && !isPlaceholder(nextResourceId)) { + nextResourceId = newIdType(toResourceName(theBaseResource.getClass()), nextResourceId.getIdPart()); + theBaseResource.setId(nextResourceId); + } + + /* + * Ensure that the bundle doesn't have any duplicates, since this causes all kinds of weirdness + */ + if (isPlaceholder(nextResourceId)) { + if (!theAllIds.add(nextResourceId)) { + throw new InvalidRequestException(myContext.getLocalizer().getMessage(BaseHapiFhirSystemDao.class, "transactionContainsMultipleWithDuplicateId", nextResourceId)); + } + } else if (nextResourceId.hasResourceType() && nextResourceId.hasIdPart()) { + IIdType nextId = nextResourceId.toUnqualifiedVersionless(); + if (!theAllIds.add(nextId)) { + throw new InvalidRequestException(myContext.getLocalizer().getMessage(BaseHapiFhirSystemDao.class, "transactionContainsMultipleWithDuplicateId", nextId)); + } + } + + } + + return nextResourceId; + } + + protected Map doTransactionWriteOperations(final RequestDetails theRequest, String theActionName, + TransactionDetails theTransactionDetails, Set theAllIds, + Map theIdSubstitutions, Map theIdToPersistedOutcome, + IBaseBundle theResponse, IdentityHashMap theOriginalRequestOrder, + List theEntries, StopWatch theTransactionStopWatch) { theTransactionDetails.beginAcceptingDeferredInterceptorBroadcasts( Pointcut.STORAGE_PRECOMMIT_RESOURCE_CREATED, @@ -661,7 +784,6 @@ public abstract class BaseTransactionProcessor { Pointcut.STORAGE_PRECOMMIT_RESOURCE_DELETED ); try { - Set deletedResources = new HashSet<>(); DeleteConflictList deleteConflicts = new DeleteConflictList(); Map entriesToProcess = new IdentityHashMap<>(); @@ -673,117 +795,20 @@ public abstract class BaseTransactionProcessor { /* * Look for duplicate conditional creates and consolidate them */ - final HashMap keyToUuid = new HashMap<>(); - for (int index = 0, originalIndex = 0; index < theEntries.size(); index++, originalIndex++) { - IBase nextReqEntry = theEntries.get(index); - IBaseResource resource = myVersionAdapter.getResource(nextReqEntry); - if (resource != null) { - String verb = myVersionAdapter.getEntryRequestVerb(myContext, nextReqEntry); - String entryUrl = myVersionAdapter.getFullUrl(nextReqEntry); - String requestUrl = myVersionAdapter.getEntryRequestUrl(nextReqEntry); - String ifNoneExist = myVersionAdapter.getEntryRequestIfNoneExist(nextReqEntry); - String key = verb + "|" + requestUrl + "|" + ifNoneExist; - - // Conditional UPDATE - boolean consolidateEntry = false; - if ("PUT".equals(verb)) { - if (isNotBlank(entryUrl) && isNotBlank(requestUrl)) { - int questionMarkIndex = requestUrl.indexOf('?'); - if (questionMarkIndex >= 0 && requestUrl.length() > (questionMarkIndex + 1)) { - consolidateEntry = true; - } - } - } - - // Conditional CREATE - if ("POST".equals(verb)) { - if (isNotBlank(entryUrl) && isNotBlank(requestUrl) && isNotBlank(ifNoneExist)) { - if (!entryUrl.equals(requestUrl)) { - consolidateEntry = true; - } - } - } - - if (consolidateEntry) { - if (!keyToUuid.containsKey(key)) { - keyToUuid.put(key, entryUrl); - } else { - ourLog.info("Discarding transaction bundle entry {} as it contained a duplicate conditional {}", originalIndex, verb); - theEntries.remove(index); - index--; - String existingUuid = keyToUuid.get(key); - for (IBase nextEntry : theEntries) { - IBaseResource nextResource = myVersionAdapter.getResource(nextEntry); - for (IBaseReference nextReference : myContext.newTerser().getAllPopulatedChildElementsOfType(nextResource, IBaseReference.class)) { - // We're interested in any references directly to the placeholder ID, but also - // references that have a resource target that has the placeholder ID. - String nextReferenceId = nextReference.getReferenceElement().getValue(); - if (isBlank(nextReferenceId) && nextReference.getResource() != null) { - nextReferenceId = nextReference.getResource().getIdElement().getValue(); - } - if (entryUrl.equals(nextReferenceId)) { - nextReference.setReference(existingUuid); - nextReference.setResource(null); - } - } - } - } - } - } - } - + consolidateDuplicateConditionalCreates(theEntries); /* * Loop through the request and process any entries of type * PUT, POST or DELETE */ for (int i = 0; i < theEntries.size(); i++) { - if (i % 250 == 0) { ourLog.debug("Processed {} non-GET entries out of {} in transaction", i, theEntries.size()); } IBase nextReqEntry = theEntries.get(i); IBaseResource res = myVersionAdapter.getResource(nextReqEntry); - IIdType nextResourceId = null; - if (res != null) { - - nextResourceId = res.getIdElement(); - - String fullUrl = myVersionAdapter.getFullUrl(nextReqEntry); - if (isNotBlank(fullUrl)) { - IIdType fullUrlIdType = newIdType(fullUrl); - if (isPlaceholder(fullUrlIdType)) { - nextResourceId = fullUrlIdType; - } else if (!nextResourceId.hasIdPart()) { - nextResourceId = fullUrlIdType; - } - } - - if (nextResourceId.hasIdPart() && nextResourceId.getIdPart().matches("[a-zA-Z]+:.*") && !isPlaceholder(nextResourceId)) { - throw new InvalidRequestException("Invalid placeholder ID found: " + nextResourceId.getIdPart() + " - Must be of the form 'urn:uuid:[uuid]' or 'urn:oid:[oid]'"); - } - - if (nextResourceId.hasIdPart() && !nextResourceId.hasResourceType() && !isPlaceholder(nextResourceId)) { - nextResourceId = newIdType(toResourceName(res.getClass()), nextResourceId.getIdPart()); - res.setId(nextResourceId); - } - - /* - * Ensure that the bundle doesn't have any duplicates, since this causes all kinds of weirdness - */ - if (isPlaceholder(nextResourceId)) { - if (!theAllIds.add(nextResourceId)) { - throw new InvalidRequestException(myContext.getLocalizer().getMessage(BaseHapiFhirSystemDao.class, "transactionContainsMultipleWithDuplicateId", nextResourceId)); - } - } else if (nextResourceId.hasResourceType() && nextResourceId.hasIdPart()) { - IIdType nextId = nextResourceId.toUnqualifiedVersionless(); - if (!theAllIds.add(nextId)) { - throw new InvalidRequestException(myContext.getLocalizer().getMessage(BaseHapiFhirSystemDao.class, "transactionContainsMultipleWithDuplicateId", nextId)); - } - } - - } + IIdType nextResourceId = getNextResourceIdFromBaseResource(res, nextReqEntry, theAllIds); String verb = myVersionAdapter.getEntryRequestVerb(myContext, nextReqEntry); String resourceType = res != null ? myContext.getResourceType(res) : null; @@ -891,7 +916,8 @@ public abstract class BaseTransactionProcessor { } } - handleTransactionCreateOrUpdateOutcome(theIdSubstitutions, theIdToPersistedOutcome, nextResourceId, outcome, nextRespEntry, resourceType, res, theRequest); + handleTransactionCreateOrUpdateOutcome(theIdSubstitutions, theIdToPersistedOutcome, nextResourceId, + outcome, nextRespEntry, resourceType, res, theRequest); entriesToProcess.put(nextRespEntry, outcome.getId()); break; } @@ -958,52 +984,24 @@ public abstract class BaseTransactionProcessor { * was also deleted as a part of this transaction, which is why we check this now at the * end. */ - for (Iterator iter = deleteConflicts.iterator(); iter.hasNext(); ) { - DeleteConflict nextDeleteConflict = iter.next(); + checkForDeleteConflicts(deleteConflicts, deletedResources, updatedResources); - /* - * If we have a conflict, it means we can't delete Resource/A because - * Resource/B has a reference to it. We'll ignore that conflict though - * if it turns out we're also deleting Resource/B in this transaction. - */ - if (deletedResources.contains(nextDeleteConflict.getSourceId().toUnqualifiedVersionless().getValue())) { - iter.remove(); - continue; - } - - /* - * And then, this is kind of a last ditch check. It's also ok to delete - * Resource/A if Resource/B isn't being deleted, but it is being UPDATED - * in this transaction, and the updated version of it has no references - * to Resource/A any more. - */ - String sourceId = nextDeleteConflict.getSourceId().toUnqualifiedVersionless().getValue(); - String targetId = nextDeleteConflict.getTargetId().toUnqualifiedVersionless().getValue(); - Optional updatedSource = updatedResources - .stream() - .filter(t -> sourceId.equals(t.getIdElement().toUnqualifiedVersionless().getValue())) - .findFirst(); - if (updatedSource.isPresent()) { - List referencesInSource = myContext.newTerser().getAllResourceReferences(updatedSource.get()); - boolean sourceStillReferencesTarget = referencesInSource - .stream() - .anyMatch(t -> targetId.equals(t.getResourceReference().getReferenceElement().toUnqualifiedVersionless().getValue())); - if (!sourceStillReferencesTarget) { - iter.remove(); - } - } - } - DeleteConflictService.validateDeleteConflictsEmptyOrThrowException(myContext, deleteConflicts); - - theIdToPersistedOutcome.entrySet().forEach(t -> theTransactionDetails.addResolvedResourceId(t.getKey(), t.getValue().getPersistentId())); + theIdToPersistedOutcome.entrySet().forEach(idAndOutcome -> { + theTransactionDetails.addResolvedResourceId(idAndOutcome.getKey(), idAndOutcome.getValue().getPersistentId()); + }); /* * Perform ID substitutions and then index each resource we have saved */ - resolveReferencesThenSaveAndIndexResources(theRequest, theTransactionDetails, theIdSubstitutions, theIdToPersistedOutcome, theTransactionStopWatch, entriesToProcess, nonUpdatedEntities, updatedEntities); + resolveReferencesThenSaveAndIndexResources(theRequest, theTransactionDetails, + theIdSubstitutions, theIdToPersistedOutcome, + theTransactionStopWatch, entriesToProcess, + nonUpdatedEntities, updatedEntities); theTransactionStopWatch.endCurrentTask(); + + // flush writes to db theTransactionStopWatch.startTask("Flush writes to database"); flushSession(theIdToPersistedOutcome); @@ -1061,6 +1059,53 @@ public abstract class BaseTransactionProcessor { } } + /** + * Checks for any delete conflicts. + * @param theDeleteConflicts - set of delete conflicts + * @param theDeletedResources - set of deleted resources + * @param theUpdatedResources - list of updated resources + */ + private void checkForDeleteConflicts(DeleteConflictList theDeleteConflicts, + Set theDeletedResources, + List theUpdatedResources) { + for (Iterator iter = theDeleteConflicts.iterator(); iter.hasNext(); ) { + DeleteConflict nextDeleteConflict = iter.next(); + + /* + * If we have a conflict, it means we can't delete Resource/A because + * Resource/B has a reference to it. We'll ignore that conflict though + * if it turns out we're also deleting Resource/B in this transaction. + */ + if (theDeletedResources.contains(nextDeleteConflict.getSourceId().toUnqualifiedVersionless().getValue())) { + iter.remove(); + continue; + } + + /* + * And then, this is kind of a last ditch check. It's also ok to delete + * Resource/A if Resource/B isn't being deleted, but it is being UPDATED + * in this transaction, and the updated version of it has no references + * to Resource/A any more. + */ + String sourceId = nextDeleteConflict.getSourceId().toUnqualifiedVersionless().getValue(); + String targetId = nextDeleteConflict.getTargetId().toUnqualifiedVersionless().getValue(); + Optional updatedSource = theUpdatedResources + .stream() + .filter(t -> sourceId.equals(t.getIdElement().toUnqualifiedVersionless().getValue())) + .findFirst(); + if (updatedSource.isPresent()) { + List referencesInSource = myContext.newTerser().getAllResourceReferences(updatedSource.get()); + boolean sourceStillReferencesTarget = referencesInSource + .stream() + .anyMatch(t -> targetId.equals(t.getResourceReference().getReferenceElement().toUnqualifiedVersionless().getValue())); + if (!sourceStillReferencesTarget) { + iter.remove(); + } + } + } + DeleteConflictService.validateDeleteConflictsEmptyOrThrowException(myContext, theDeleteConflicts); + } + /** * This method replaces any placeholder references in the * source transaction Bundle with their actual targets, then stores the resource contents and indexes @@ -1083,7 +1128,10 @@ public abstract class BaseTransactionProcessor { * pass because it's too complex to try and insert the auto-versioned references and still * account for NOPs, so we block NOPs in that pass. */ - private void resolveReferencesThenSaveAndIndexResources(RequestDetails theRequest, TransactionDetails theTransactionDetails, Map theIdSubstitutions, Map theIdToPersistedOutcome, StopWatch theTransactionStopWatch, Map entriesToProcess, Set nonUpdatedEntities, Set updatedEntities) { + private void resolveReferencesThenSaveAndIndexResources(RequestDetails theRequest, TransactionDetails theTransactionDetails, + Map theIdSubstitutions, Map theIdToPersistedOutcome, + StopWatch theTransactionStopWatch, Map entriesToProcess, + Set nonUpdatedEntities, Set updatedEntities) { FhirTerser terser = myContext.newTerser(); theTransactionStopWatch.startTask("Index " + theIdToPersistedOutcome.size() + " resources"); IdentityHashMap> deferredIndexesForAutoVersioning = null; @@ -1105,14 +1153,28 @@ public abstract class BaseTransactionProcessor { Set referencesToAutoVersion = BaseStorageDao.extractReferencesToAutoVersion(myContext, myModelConfig, nextResource); if (referencesToAutoVersion.isEmpty()) { - resolveReferencesThenSaveAndIndexResource(theRequest, theTransactionDetails, theIdSubstitutions, theIdToPersistedOutcome, entriesToProcess, nonUpdatedEntities, updatedEntities, terser, nextOutcome, nextResource, referencesToAutoVersion); + // no references to autoversion - we can do the resolve and save now + resolveReferencesThenSaveAndIndexResource(theRequest, theTransactionDetails, + theIdSubstitutions, theIdToPersistedOutcome, + entriesToProcess, nonUpdatedEntities, + updatedEntities, terser, + nextOutcome, nextResource, + referencesToAutoVersion); // this is empty } else { if (deferredIndexesForAutoVersioning == null) { deferredIndexesForAutoVersioning = new IdentityHashMap<>(); } deferredIndexesForAutoVersioning.put(nextOutcome, referencesToAutoVersion); - } + // TODO - add the references to the + // idsToPersistedOutcomes +// for (IBaseReference autoVersion: referencesToAutoVersion) { +// IBaseResource resource = myVersionAdapter.getResource(autoVersion); +// IFhirResourceDao dao = getDaoOrThrowException(resource.getClass()); +// +// } +// theIdToPersistedOutcome.put() + } } // If we have any resources we'll be auto-versioning, index these next @@ -1121,12 +1183,22 @@ public abstract class BaseTransactionProcessor { DaoMethodOutcome nextOutcome = nextEntry.getKey(); Set referencesToAutoVersion = nextEntry.getValue(); IBaseResource nextResource = nextOutcome.getResource(); - resolveReferencesThenSaveAndIndexResource(theRequest, theTransactionDetails, theIdSubstitutions, theIdToPersistedOutcome, entriesToProcess, nonUpdatedEntities, updatedEntities, terser, nextOutcome, nextResource, referencesToAutoVersion); + resolveReferencesThenSaveAndIndexResource(theRequest, theTransactionDetails, + theIdSubstitutions, theIdToPersistedOutcome, + entriesToProcess, nonUpdatedEntities, + updatedEntities, terser, + nextOutcome, nextResource, + referencesToAutoVersion); } } } - private void resolveReferencesThenSaveAndIndexResource(RequestDetails theRequest, TransactionDetails theTransactionDetails, Map theIdSubstitutions, Map theIdToPersistedOutcome, Map entriesToProcess, Set nonUpdatedEntities, Set updatedEntities, FhirTerser terser, DaoMethodOutcome nextOutcome, IBaseResource nextResource, Set theReferencesToAutoVersion) { + private void resolveReferencesThenSaveAndIndexResource(RequestDetails theRequest, TransactionDetails theTransactionDetails, + Map theIdSubstitutions, Map theIdToPersistedOutcome, + Map entriesToProcess, Set nonUpdatedEntities, + Set updatedEntities, FhirTerser terser, + DaoMethodOutcome nextOutcome, IBaseResource nextResource, + Set theReferencesToAutoVersion) { // References List allRefs = terser.getAllResourceReferences(nextResource); for (ResourceReferenceInfo nextRef : allRefs) { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/AAAATests.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/AAAATests.java new file mode 100644 index 00000000000..8f92f333392 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/AAAATests.java @@ -0,0 +1,83 @@ +package ca.uhn.fhir.jpa.dao.r4; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.ParserOptions; +import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; +import ca.uhn.fhir.jpa.model.entity.ModelConfig; +import ca.uhn.fhir.jpa.partition.SystemRequestDetails; +import ca.uhn.fhir.jpa.provider.r4.ResourceProviderR4Test; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.api.server.IBundleProvider; +import ca.uhn.fhir.rest.param.TokenParam; +import ca.uhn.fhir.util.BundleBuilder; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Condition; +import org.hl7.fhir.r4.model.Encounter; +import org.hl7.fhir.r4.model.ExplanationOfBenefit; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Organization; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Reference; +import org.hl7.fhir.r4.model.Task; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +import java.io.InputStreamReader; +import java.util.Arrays; +import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.matchesPattern; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class AAAATests extends BaseJpaR4Test { + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4VersionedReferenceTest.class); + + @AfterEach + public void afterEach() { + myFhirCtx.getParserOptions().setStripVersionsFromReferences(true); + myFhirCtx.getParserOptions().getDontStripVersionsFromReferencesAtPaths().clear(); + myDaoConfig.setDeleteEnabled(new DaoConfig().isDeleteEnabled()); + myModelConfig.setRespectVersionsForSearchIncludes(new ModelConfig().isRespectVersionsForSearchIncludes()); + myModelConfig.setAutoVersionReferenceAtPaths(new ModelConfig().getAutoVersionReferenceAtPaths()); + } + + + @Test + @DisplayName("GH-2901 Test no NPE is thrown on autoversioned references") + public void testNoNpeMinimal() { + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(false); + myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); + +// ParserOptions options = new ParserOptions(); +// options.setDontStripVersionsFromReferencesAtPaths("Observation.subject"); +// myFhirCtx.setParserOptions(options); + + Patient patient = new Patient(); + patient.setId("Patient/RED"); + myPatientDao.update(patient); + + Observation obs = new Observation(); + obs.setId("Observation/DEF"); + obs.setSubject(new Reference("Patient/RED")); + BundleBuilder builder = new BundleBuilder(myFhirCtx); + builder.addTransactionUpdateEntry(obs); + + mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); + } + + +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java index f2c661b4522..73063fe38cb 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java @@ -1,6 +1,7 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.ParserOptions; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.model.entity.ModelConfig; @@ -802,7 +803,9 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { ); myModelConfig.setAutoVersionReferenceAtPaths(new HashSet(strings)); - Bundle bundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, new InputStreamReader(FhirResourceDaoR4VersionedReferenceTest.class.getResourceAsStream("/npe-causing-bundle.json"))); + Bundle bundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, + new InputStreamReader( + FhirResourceDaoR4VersionedReferenceTest.class.getResourceAsStream("/npe-causing-bundle.json"))); Bundle transaction = mySystemDao.transaction(new SystemRequestDetails(), bundle); } @@ -834,9 +837,17 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { @Test @DisplayName("GH-2901 Test no NPE is thrown on autoversioned references") public void testNoNpeMinimal() { - myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(false); myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); +// ParserOptions options = new ParserOptions(); +// options.setDontStripVersionsFromReferencesAtPaths("Observation.subject"); +// myFhirCtx.setParserOptions(options); + + Patient patient = new Patient(); + patient.setId("Patient/RED"); + myPatientDao.update(patient); + Observation obs = new Observation(); obs.setId("Observation/DEF"); obs.setSubject(new Reference("Patient/RED")); diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/MailConfig.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/MailConfig.java index 02bb16f9fdc..2202f27b77e 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/MailConfig.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/MailConfig.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.rest.server.mail; +/*- + * #%L + * HAPI FHIR - Server Framework + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/MailSvc.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/MailSvc.java index 5c87c4256dd..df1cd4e9dca 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/MailSvc.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/MailSvc.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.rest.server.mail; +/*- + * #%L + * HAPI FHIR - Server Framework + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import org.apache.commons.lang3.Validate; import org.simplejavamail.MailException; import org.simplejavamail.api.email.Email; diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/NarrativeDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/NarrativeDt.java index ef74811416d..085008a62b1 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/NarrativeDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/NarrativeDt.java @@ -1,19 +1,3 @@ - - - - - - - - - - - - - - - - package ca.uhn.fhir.model.dstu2.composite; /* From 646592b1b7cd685b22f3308cae752f7d9834a8a7 Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Wed, 25 Aug 2021 15:56:55 -0400 Subject: [PATCH 014/143] issue-2901 some refactoring --- .../jpa/dao/BaseTransactionProcessor.java | 188 ++++++++++-------- .../ca/uhn/fhir/jpa/dao/r4/AAAATests.java | 83 -------- ...irResourceDaoR4VersionedReferenceTest.java | 7 - 3 files changed, 105 insertions(+), 173 deletions(-) delete mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/AAAATests.java diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index 3e30960b590..866b3e780d9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -384,7 +384,8 @@ public abstract class BaseTransactionProcessor { myHapiTransactionService = theHapiTransactionService; } - private IBaseBundle processTransaction(final RequestDetails theRequestDetails, final IBaseBundle theRequest, final String theActionName, boolean theNestedMode) { + private IBaseBundle processTransaction(final RequestDetails theRequestDetails, final IBaseBundle theRequest, + final String theActionName, boolean theNestedMode) { validateDependencies(); String transactionType = myVersionAdapter.getBundleType(theRequest); @@ -440,10 +441,11 @@ public abstract class BaseTransactionProcessor { List getEntries = new ArrayList<>(); final IdentityHashMap originalRequestOrder = new IdentityHashMap<>(); for (int i = 0; i < requestEntries.size(); i++) { - originalRequestOrder.put(requestEntries.get(i), i); + IBase requestEntry = requestEntries.get(i); + originalRequestOrder.put(requestEntry, i); myVersionAdapter.addEntry(response); - if (myVersionAdapter.getEntryRequestVerb(myContext, requestEntries.get(i)).equals("GET")) { - getEntries.add(requestEntries.get(i)); + if (myVersionAdapter.getEntryRequestVerb(myContext, requestEntry).equals("GET")) { + getEntries.add(requestEntry); } } @@ -462,73 +464,17 @@ public abstract class BaseTransactionProcessor { } entries.sort(new TransactionSorter(placeholderIds)); - doTransactionWriteOperations(theRequestDetails, theActionName, transactionDetails, transactionStopWatch, response, originalRequestOrder, entries); + // perform all writes + doTransactionWriteOperations(theRequestDetails, theActionName, + transactionDetails, transactionStopWatch, + response, originalRequestOrder, entries); - /* - * Loop through the request and process any entries of type GET - */ - if (getEntries.size() > 0) { - transactionStopWatch.startTask("Process " + getEntries.size() + " GET entries"); - } - for (IBase nextReqEntry : getEntries) { - - if (theNestedMode) { - throw new InvalidRequestException("Can not invoke read operation on nested transaction"); - } - - if (!(theRequestDetails instanceof ServletRequestDetails)) { - throw new MethodNotAllowedException("Can not call transaction GET methods from this context"); - } - - ServletRequestDetails srd = (ServletRequestDetails) theRequestDetails; - Integer originalOrder = originalRequestOrder.get(nextReqEntry); - IBase nextRespEntry = (IBase) myVersionAdapter.getEntries(response).get(originalOrder); - - ArrayListMultimap paramValues = ArrayListMultimap.create(); - - String transactionUrl = extractTransactionUrlOrThrowException(nextReqEntry, "GET"); - - ServletSubRequestDetails requestDetails = ServletRequestUtil.getServletSubRequestDetails(srd, transactionUrl, paramValues); - - String url = requestDetails.getRequestPath(); - - BaseMethodBinding method = srd.getServer().determineResourceMethod(requestDetails, url); - if (method == null) { - throw new IllegalArgumentException("Unable to handle GET " + url); - } - - if (isNotBlank(myVersionAdapter.getEntryRequestIfMatch(nextReqEntry))) { - requestDetails.addHeader(Constants.HEADER_IF_MATCH, myVersionAdapter.getEntryRequestIfMatch(nextReqEntry)); - } - if (isNotBlank(myVersionAdapter.getEntryRequestIfNoneExist(nextReqEntry))) { - requestDetails.addHeader(Constants.HEADER_IF_NONE_EXIST, myVersionAdapter.getEntryRequestIfNoneExist(nextReqEntry)); - } - if (isNotBlank(myVersionAdapter.getEntryRequestIfNoneMatch(nextReqEntry))) { - requestDetails.addHeader(Constants.HEADER_IF_NONE_MATCH, myVersionAdapter.getEntryRequestIfNoneMatch(nextReqEntry)); - } - - Validate.isTrue(method instanceof BaseResourceReturningMethodBinding, "Unable to handle GET {}", url); - try { - - BaseResourceReturningMethodBinding methodBinding = (BaseResourceReturningMethodBinding) method; - requestDetails.setRestOperationType(methodBinding.getRestOperationType()); - - IBaseResource resource = methodBinding.doInvokeServer(srd.getServer(), requestDetails); - if (paramValues.containsKey(Constants.PARAM_SUMMARY) || paramValues.containsKey(Constants.PARAM_CONTENT)) { - resource = filterNestedBundle(requestDetails, resource); - } - myVersionAdapter.setResource(nextRespEntry, resource); - myVersionAdapter.setResponseStatus(nextRespEntry, toStatusString(Constants.STATUS_HTTP_200_OK)); - } catch (NotModifiedException e) { - myVersionAdapter.setResponseStatus(nextRespEntry, toStatusString(Constants.STATUS_HTTP_304_NOT_MODIFIED)); - } catch (BaseServerResponseException e) { - ourLog.info("Failure processing transaction GET {}: {}", url, e.toString()); - myVersionAdapter.setResponseStatus(nextRespEntry, toStatusString(e.getStatusCode())); - populateEntryWithOperationOutcome(e, nextRespEntry); - } - - } - transactionStopWatch.endCurrentTask(); + // perform all gets + // (we do these last so that the gets happen on the final state of the DB; + // see above note) + doTransactionReadOperations(theRequestDetails, response, + getEntries, originalRequestOrder, + transactionStopWatch, theNestedMode); // Interceptor broadcast: JPA_PERFTRACE_INFO if (CompositeInterceptorBroadcaster.hasHooks(Pointcut.JPA_PERFTRACE_INFO, myInterceptorBroadcaster, theRequestDetails)) { @@ -545,6 +491,74 @@ public abstract class BaseTransactionProcessor { return response; } + private void doTransactionReadOperations(final RequestDetails theRequestDetails, IBaseBundle theResponse, + List theGetEntries, IdentityHashMap theOriginalRequestOrder, + StopWatch theTransactionStopWatch, boolean theNestedMode) { + if (theGetEntries.size() > 0) { + theTransactionStopWatch.startTask("Process " + theGetEntries.size() + " GET entries"); + + /* + * Loop through the request and process any entries of type GET + */ + for (IBase nextReqEntry : theGetEntries) { + if (theNestedMode) { + throw new InvalidRequestException("Can not invoke read operation on nested transaction"); + } + + if (!(theRequestDetails instanceof ServletRequestDetails)) { + throw new MethodNotAllowedException("Can not call transaction GET methods from this context"); + } + + ServletRequestDetails srd = (ServletRequestDetails) theRequestDetails; + Integer originalOrder = theOriginalRequestOrder.get(nextReqEntry); + IBase nextRespEntry = (IBase) myVersionAdapter.getEntries(theResponse).get(originalOrder); + + ArrayListMultimap paramValues = ArrayListMultimap.create(); + + String transactionUrl = extractTransactionUrlOrThrowException(nextReqEntry, "GET"); + + ServletSubRequestDetails requestDetails = ServletRequestUtil.getServletSubRequestDetails(srd, transactionUrl, paramValues); + + String url = requestDetails.getRequestPath(); + + BaseMethodBinding method = srd.getServer().determineResourceMethod(requestDetails, url); + if (method == null) { + throw new IllegalArgumentException("Unable to handle GET " + url); + } + + if (isNotBlank(myVersionAdapter.getEntryRequestIfMatch(nextReqEntry))) { + requestDetails.addHeader(Constants.HEADER_IF_MATCH, myVersionAdapter.getEntryRequestIfMatch(nextReqEntry)); + } + if (isNotBlank(myVersionAdapter.getEntryRequestIfNoneExist(nextReqEntry))) { + requestDetails.addHeader(Constants.HEADER_IF_NONE_EXIST, myVersionAdapter.getEntryRequestIfNoneExist(nextReqEntry)); + } + if (isNotBlank(myVersionAdapter.getEntryRequestIfNoneMatch(nextReqEntry))) { + requestDetails.addHeader(Constants.HEADER_IF_NONE_MATCH, myVersionAdapter.getEntryRequestIfNoneMatch(nextReqEntry)); + } + + Validate.isTrue(method instanceof BaseResourceReturningMethodBinding, "Unable to handle GET {}", url); + try { + BaseResourceReturningMethodBinding methodBinding = (BaseResourceReturningMethodBinding) method; + requestDetails.setRestOperationType(methodBinding.getRestOperationType()); + + IBaseResource resource = methodBinding.doInvokeServer(srd.getServer(), requestDetails); + if (paramValues.containsKey(Constants.PARAM_SUMMARY) || paramValues.containsKey(Constants.PARAM_CONTENT)) { + resource = filterNestedBundle(requestDetails, resource); + } + myVersionAdapter.setResource(nextRespEntry, resource); + myVersionAdapter.setResponseStatus(nextRespEntry, toStatusString(Constants.STATUS_HTTP_200_OK)); + } catch (NotModifiedException e) { + myVersionAdapter.setResponseStatus(nextRespEntry, toStatusString(Constants.STATUS_HTTP_304_NOT_MODIFIED)); + } catch (BaseServerResponseException e) { + ourLog.info("Failure processing transaction GET {}: {}", url, e.toString()); + myVersionAdapter.setResponseStatus(nextRespEntry, toStatusString(e.getStatusCode())); + populateEntryWithOperationOutcome(e, nextRespEntry); + } + } + theTransactionStopWatch.endCurrentTask(); + } + } + /** * All of the write operations in the transaction (PUT, POST, etc.. basically anything * except GET) are performed in their own database transaction before we do the reads. @@ -554,7 +568,10 @@ public abstract class BaseTransactionProcessor { * heavy load with lots of concurrent transactions using all available * database connections. */ - private void doTransactionWriteOperations(RequestDetails theRequestDetails, String theActionName, TransactionDetails theTransactionDetails, StopWatch theTransactionStopWatch, IBaseBundle theResponse, IdentityHashMap theOriginalRequestOrder, List theEntries) { + private void doTransactionWriteOperations(RequestDetails theRequestDetails, String theActionName, + TransactionDetails theTransactionDetails, StopWatch theTransactionStopWatch, + IBaseBundle theResponse, IdentityHashMap theOriginalRequestOrder, + List theEntries) { TransactionWriteOperationsDetails writeOperationsDetails = null; if (CompositeInterceptorBroadcaster.hasHooks(Pointcut.STORAGE_TRANSACTION_WRITE_OPERATIONS_PRE, myInterceptorBroadcaster, theRequestDetails) || CompositeInterceptorBroadcaster.hasHooks(Pointcut.STORAGE_TRANSACTION_WRITE_OPERATIONS_POST, myInterceptorBroadcaster, theRequestDetails)) { @@ -583,14 +600,18 @@ public abstract class BaseTransactionProcessor { .add(TransactionDetails.class, theTransactionDetails) .add(TransactionWriteOperationsDetails.class, writeOperationsDetails); CompositeInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequestDetails, Pointcut.STORAGE_TRANSACTION_WRITE_OPERATIONS_PRE, params); - } TransactionCallback> txCallback = status -> { final Set allIds = new LinkedHashSet<>(); final Map idSubstitutions = new HashMap<>(); final Map idToPersistedOutcome = new HashMap<>(); - Map retVal = doTransactionWriteOperations(theRequestDetails, theActionName, theTransactionDetails, allIds, idSubstitutions, idToPersistedOutcome, theResponse, theOriginalRequestOrder, theEntries, theTransactionStopWatch); + + Map retVal = doTransactionWriteOperations(theRequestDetails, theActionName, + theTransactionDetails, allIds, + idSubstitutions, idToPersistedOutcome, + theResponse, theOriginalRequestOrder, + theEntries, theTransactionStopWatch); theTransactionStopWatch.startTask("Commit writes to database"); return retVal; @@ -721,7 +742,7 @@ public abstract class BaseTransactionProcessor { } /** - * Retrieves teh next resource id (IIdType) from the base resource and next request entry. + * Retrieves the next resource id (IIdType) from the base resource and next request entry. * @param theBaseResource - base resource * @param theNextReqEntry - next request entry * @param theAllIds - set of all IIdType values @@ -1161,19 +1182,11 @@ public abstract class BaseTransactionProcessor { nextOutcome, nextResource, referencesToAutoVersion); // this is empty } else { + // we have autoversioned things to defer until later if (deferredIndexesForAutoVersioning == null) { deferredIndexesForAutoVersioning = new IdentityHashMap<>(); } deferredIndexesForAutoVersioning.put(nextOutcome, referencesToAutoVersion); - - // TODO - add the references to the - // idsToPersistedOutcomes -// for (IBaseReference autoVersion: referencesToAutoVersion) { -// IBaseResource resource = myVersionAdapter.getResource(autoVersion); -// IFhirResourceDao dao = getDaoOrThrowException(resource.getClass()); -// -// } -// theIdToPersistedOutcome.put() } } @@ -1183,6 +1196,15 @@ public abstract class BaseTransactionProcessor { DaoMethodOutcome nextOutcome = nextEntry.getKey(); Set referencesToAutoVersion = nextEntry.getValue(); IBaseResource nextResource = nextOutcome.getResource(); + + //TODO - should we add the autoversioned resources to our idtoPersistedoutcomes here? +// for (IBaseReference autoVersionRef : referencesToAutoVersion) { +// IBaseResource baseResource = myVersionAdapter.getResource(autoVersionRef); +// IFhirResourceDao dao = getDaoOrThrowException(baseResource.getClass()); +// +// theIdToPersistedOutcome.put(baseResource.getIdElement(), ); +// } + resolveReferencesThenSaveAndIndexResource(theRequest, theTransactionDetails, theIdSubstitutions, theIdToPersistedOutcome, entriesToProcess, nonUpdatedEntities, diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/AAAATests.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/AAAATests.java deleted file mode 100644 index 8f92f333392..00000000000 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/AAAATests.java +++ /dev/null @@ -1,83 +0,0 @@ -package ca.uhn.fhir.jpa.dao.r4; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.ParserOptions; -import ca.uhn.fhir.jpa.api.config.DaoConfig; -import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; -import ca.uhn.fhir.jpa.model.entity.ModelConfig; -import ca.uhn.fhir.jpa.partition.SystemRequestDetails; -import ca.uhn.fhir.jpa.provider.r4.ResourceProviderR4Test; -import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; -import ca.uhn.fhir.rest.api.server.IBundleProvider; -import ca.uhn.fhir.rest.param.TokenParam; -import ca.uhn.fhir.util.BundleBuilder; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.r4.model.Bundle; -import org.hl7.fhir.r4.model.Condition; -import org.hl7.fhir.r4.model.Encounter; -import org.hl7.fhir.r4.model.ExplanationOfBenefit; -import org.hl7.fhir.r4.model.IdType; -import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Organization; -import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.Reference; -import org.hl7.fhir.r4.model.Task; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; - -import java.io.InputStreamReader; -import java.util.Arrays; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Supplier; -import java.util.stream.Collectors; - -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.matchesPattern; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class AAAATests extends BaseJpaR4Test { - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4VersionedReferenceTest.class); - - @AfterEach - public void afterEach() { - myFhirCtx.getParserOptions().setStripVersionsFromReferences(true); - myFhirCtx.getParserOptions().getDontStripVersionsFromReferencesAtPaths().clear(); - myDaoConfig.setDeleteEnabled(new DaoConfig().isDeleteEnabled()); - myModelConfig.setRespectVersionsForSearchIncludes(new ModelConfig().isRespectVersionsForSearchIncludes()); - myModelConfig.setAutoVersionReferenceAtPaths(new ModelConfig().getAutoVersionReferenceAtPaths()); - } - - - @Test - @DisplayName("GH-2901 Test no NPE is thrown on autoversioned references") - public void testNoNpeMinimal() { - myDaoConfig.setAutoCreatePlaceholderReferenceTargets(false); - myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); - -// ParserOptions options = new ParserOptions(); -// options.setDontStripVersionsFromReferencesAtPaths("Observation.subject"); -// myFhirCtx.setParserOptions(options); - - Patient patient = new Patient(); - patient.setId("Patient/RED"); - myPatientDao.update(patient); - - Observation obs = new Observation(); - obs.setId("Observation/DEF"); - obs.setSubject(new Reference("Patient/RED")); - BundleBuilder builder = new BundleBuilder(myFhirCtx); - builder.addTransactionUpdateEntry(obs); - - mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); - } - - -} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java index 73063fe38cb..043883b5515 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java @@ -303,7 +303,6 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { myFhirCtx.getParserOptions().setStripVersionsFromReferences(false); myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); - BundleBuilder builder = new BundleBuilder(myFhirCtx); Patient patient = new Patient(); @@ -334,7 +333,6 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { observation = myObservationDao.read(observationId); assertEquals(patientId.getValue(), observation.getSubject().getReference()); assertEquals(encounterId.toVersionless().getValue(), observation.getEncounter().getReference()); - } @Test @@ -397,7 +395,6 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { assertEquals(patientId.getValue(), observation.getSubject().getReference()); assertEquals("2", observation.getSubject().getReferenceElement().getVersionIdPart()); assertEquals(encounterId.toVersionless().getValue(), observation.getEncounter().getReference()); - } @@ -417,7 +414,6 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { // Update patient to make a second version patient.setActive(false); myPatientDao.update(patient); - } BundleBuilder builder = new BundleBuilder(myFhirCtx); @@ -466,7 +462,6 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { // Update patient to make a second version patient.setActive(false); myPatientDao.update(patient); - } BundleBuilder builder = new BundleBuilder(myFhirCtx); @@ -499,10 +494,8 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { // Read back and verify that reference is now versioned observation = myObservationDao.read(observationId); assertEquals(patientId.getValue(), observation.getSubject().getReference()); - } - @Test public void testSearchAndIncludeVersionedReference_Asynchronous() { myFhirCtx.getParserOptions().setStripVersionsFromReferences(false); From 99cd8651741dde3ab30e7f65a3a1bae7380bb188 Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Thu, 26 Aug 2021 08:47:45 -0400 Subject: [PATCH 015/143] test --- .../main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index 866b3e780d9..2ab95f57992 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -1205,6 +1205,7 @@ public abstract class BaseTransactionProcessor { // theIdToPersistedOutcome.put(baseResource.getIdElement(), ); // } + resolveReferencesThenSaveAndIndexResource(theRequest, theTransactionDetails, theIdSubstitutions, theIdToPersistedOutcome, entriesToProcess, nonUpdatedEntities, From 91a961f9fd6ec0b4cfc61746891a1b086cb30799 Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Fri, 27 Aug 2021 10:48:19 -0400 Subject: [PATCH 016/143] Added changelog --- .../hapi/fhir/changelog/5_6_0/2850-updated-mdm-pointcut.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2850-updated-mdm-pointcut.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2850-updated-mdm-pointcut.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2850-updated-mdm-pointcut.yaml new file mode 100644 index 00000000000..712e336d130 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2850-updated-mdm-pointcut.yaml @@ -0,0 +1,4 @@ +--- +type: add +issue: 2850 +title: "Updated handling of MDM_AFTER_PERSISTED_RESOURCE_CHECKED pointcut to include additional MDM related info." From 4e012236c21e3614bc2615ffed7bfe67c9c5ea01 Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Fri, 27 Aug 2021 16:31:23 -0400 Subject: [PATCH 017/143] Updated comments and added misc refactorings --- .../fhir/jpa/mdm/broker/MdmMessageHandler.java | 4 ++-- .../fhir/jpa/mdm/svc/MdmEidUpdateService.java | 2 +- .../uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java | 12 ++++++------ .../candidate/FindCandidateByExampleSvc.java | 10 +++++----- .../ca/uhn/fhir/jpa/mdm/BaseMdmR4Test.java | 4 ++-- .../interceptor/MdmStorageInterceptorIT.java | 18 ++++++++++++------ .../fhir/mdm/model/MdmTransactionContext.java | 2 +- 7 files changed, 29 insertions(+), 23 deletions(-) diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java index 701f00b034b..6589d6b41e9 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java @@ -119,7 +119,7 @@ public class MdmMessageHandler implements MessageHandler { ResourceOperationMessage outgoingMsg = new ResourceOperationMessage(myFhirContext, targetResource, theMsg.getOperationType()); outgoingMsg.setTransactionId(theMsg.getTransactionId()); - MdmLinkEvent linkChangeEvent = mdmContext.getMdmLinkChangeEvent(); + MdmLinkEvent linkChangeEvent = mdmContext.getMdmLinkEvent(); Optional mdmLinkBySource = myMdmLinkDaoSvc.findMdmLinkBySource(targetResource); if (!mdmLinkBySource.isPresent()) { ourLog.warn("Unable to find link by source for {}", targetResource.getIdElement()); @@ -129,7 +129,7 @@ public class MdmMessageHandler implements MessageHandler { HookParams params = new HookParams() .add(ResourceOperationMessage.class, outgoingMsg) .add(TransactionLogMessages.class, mdmContext.getTransactionLogMessages()) - .add(MdmLinkEvent.class, mdmContext.getMdmLinkChangeEvent()); + .add(MdmLinkEvent.class, mdmContext.getMdmLinkEvent()); myInterceptorBroadcaster.callHooks(Pointcut.MDM_AFTER_PERSISTED_RESOURCE_CHECKED, params); } diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java index d23c27db9f1..2e035615200 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java @@ -86,7 +86,7 @@ public class MdmEidUpdateService { myMdmResourceDaoSvc.upsertGoldenResource(updateContext.getMatchedGoldenResource(), theMdmTransactionContext.getResourceType()); } - theMdmTransactionContext.getMdmLinkChangeEvent().setGoldenResourceId(updateContext.getExistingGoldenResource()); + theMdmTransactionContext.getMdmLinkEvent().setGoldenResourceId(updateContext.getExistingGoldenResource()); } private void handleNoEidsInCommon(IAnyResource theResource, MatchedGoldenResourceCandidate theMatchedGoldenResourceCandidate, MdmTransactionContext theMdmTransactionContext, MdmUpdateContext theUpdateContext) { diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java index e0f6b932557..ce285b58bac 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java @@ -78,7 +78,7 @@ public class MdmMatchLinkSvc { private MdmTransactionContext doMdmUpdate(IAnyResource theResource, MdmTransactionContext theMdmTransactionContext) { CandidateList candidateList = myMdmGoldenResourceFindingSvc.findGoldenResourceCandidates(theResource); - theMdmTransactionContext.getMdmLinkChangeEvent().setTargetResourceId(theResource); + theMdmTransactionContext.getMdmLinkEvent().setTargetResourceId(theResource); if (candidateList.isEmpty()) { handleMdmWithNoCandidates(theResource, theMdmTransactionContext); @@ -114,14 +114,14 @@ public class MdmMatchLinkSvc { //Set all GoldenResources as POSSIBLE_DUPLICATE of the last GoldenResource. IAnyResource firstGoldenResource = goldenResources.get(0); - theMdmTransactionContext.getMdmLinkChangeEvent().setGoldenResourceId(firstGoldenResource); + theMdmTransactionContext.getMdmLinkEvent().setGoldenResourceId(firstGoldenResource); goldenResources.subList(1, goldenResources.size()) .forEach(possibleDuplicateGoldenResource -> { MdmMatchOutcome outcome = MdmMatchOutcome.POSSIBLE_DUPLICATE; outcome.setEidMatch(theCandidateList.isEidMatch()); myMdmLinkSvc.updateLink(firstGoldenResource, possibleDuplicateGoldenResource, outcome, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); - theMdmTransactionContext.getMdmLinkChangeEvent().addDuplicateGoldenResourceId(possibleDuplicateGoldenResource); + theMdmTransactionContext.getMdmLinkEvent().addDuplicateGoldenResourceId(possibleDuplicateGoldenResource); }); } } @@ -135,7 +135,7 @@ public class MdmMatchLinkSvc { // 3. UPDATE MDM LINK TABLE myMdmLinkSvc.updateLink(newGoldenResource, theResource, MdmMatchOutcome.NEW_GOLDEN_RESOURCE_MATCH, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); - theMdmTransactionContext.getMdmLinkChangeEvent().setGoldenResourceId(newGoldenResource); + theMdmTransactionContext.getMdmLinkEvent().setGoldenResourceId(newGoldenResource); } private void handleMdmCreate(IAnyResource theTargetResource, MatchedGoldenResourceCandidate theGoldenResourceCandidate, MdmTransactionContext theMdmTransactionContext) { @@ -145,7 +145,7 @@ public class MdmMatchLinkSvc { if (myGoldenResourceHelper.isPotentialDuplicate(goldenResource, theTargetResource)) { log(theMdmTransactionContext, "Duplicate detected based on the fact that both resources have different external EIDs."); IAnyResource newGoldenResource = myGoldenResourceHelper.createGoldenResourceFromMdmSourceResource(theTargetResource, theMdmTransactionContext); - theMdmTransactionContext.getMdmLinkChangeEvent().setGoldenResourceId(newGoldenResource); + theMdmTransactionContext.getMdmLinkEvent().setGoldenResourceId(newGoldenResource); myMdmLinkSvc.updateLink(newGoldenResource, theTargetResource, MdmMatchOutcome.NEW_GOLDEN_RESOURCE_MATCH, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); myMdmLinkSvc.updateLink(newGoldenResource, goldenResource, MdmMatchOutcome.POSSIBLE_DUPLICATE, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); @@ -155,7 +155,7 @@ public class MdmMatchLinkSvc { myEidUpdateService.applySurvivorshipRulesAndSaveGoldenResource(theTargetResource, goldenResource, theMdmTransactionContext); } - theMdmTransactionContext.getMdmLinkChangeEvent().setGoldenResourceId(goldenResource); + theMdmTransactionContext.getMdmLinkEvent().setGoldenResourceId(goldenResource); myMdmLinkSvc.updateLink(goldenResource, theTargetResource, theGoldenResourceCandidate.getMatchResult(), MdmLinkSourceEnum.AUTO, theMdmTransactionContext); } } diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/candidate/FindCandidateByExampleSvc.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/candidate/FindCandidateByExampleSvc.java index 43606a95818..5533c82667b 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/candidate/FindCandidateByExampleSvc.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/candidate/FindCandidateByExampleSvc.java @@ -54,9 +54,9 @@ public class FindCandidateByExampleSvc extends BaseCandidateFinder { private IMdmMatchFinderSvc myMdmMatchFinderSvc; /** - * Attempt to find matching Golden Resources by resolving them from similar Matching target resources, where target resource - * can be either Patient or Practitioner. Runs MDM logic over the existing target resources, then finds their - * entries in the MdmLink table, and returns all the matches found therein. + * Attempt to find matching Golden Resources by resolving them from similar Matching target resources. Runs MDM logic + * over the existing target resources, then finds their entries in the MdmLink table, and returns all the matches + * found therein. * * @param theTarget the {@link IBaseResource} which we want to find candidate Golden Resources for. * @return an Optional list of {@link MatchedGoldenResourceCandidate} indicating matches. @@ -69,8 +69,8 @@ public class FindCandidateByExampleSvc extends BaseCandidateFinder { List matchedCandidates = myMdmMatchFinderSvc.getMatchedTargets(myFhirContext.getResourceType(theTarget), theTarget); - //Convert all possible match targets to their equivalent Golden Resources by looking up in the MdmLink table, - //while ensuring that the matches aren't in our NO_MATCH list. + // Convert all possible match targets to their equivalent Golden Resources by looking up in the MdmLink table, + // while ensuring that the matches aren't in our NO_MATCH list. // The data flow is as follows -> // MatchedTargetCandidate -> Golden Resource -> MdmLink -> MatchedGoldenResourceCandidate matchedCandidates = matchedCandidates.stream().filter(mc -> mc.isMatch() || mc.isPossibleMatch()).collect(Collectors.toList()); diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/BaseMdmR4Test.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/BaseMdmR4Test.java index 96115a95bf2..60936356c54 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/BaseMdmR4Test.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/BaseMdmR4Test.java @@ -326,14 +326,14 @@ abstract public class BaseMdmR4Test extends BaseJpaR4Test { assertEquals(theExpectedCount, myMdmLinkDao.count()); } - protected IAnyResource getGoldenResourceFromTargetResource(IAnyResource theBaseResource) { + protected T getGoldenResourceFromTargetResource(T theBaseResource) { String resourceType = theBaseResource.getIdElement().getResourceType(); IFhirResourceDao relevantDao = myDaoRegistry.getResourceDao(resourceType); Optional matchedLinkForTargetPid = myMdmLinkDaoSvc.getMatchedLinkForSourcePid(myIdHelperService.getPidOrNull(theBaseResource)); if (matchedLinkForTargetPid.isPresent()) { Long goldenResourcePid = matchedLinkForTargetPid.get().getGoldenResourcePid(); - return (IAnyResource) relevantDao.readByPid(new ResourcePersistentId(goldenResourcePid)); + return (T) relevantDao.readByPid(new ResourcePersistentId(goldenResourcePid)); } else { return null; } diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java index cd1518cbc59..330e1380bef 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java @@ -6,8 +6,12 @@ import ca.uhn.fhir.jpa.entity.MdmLink; import ca.uhn.fhir.jpa.mdm.BaseMdmR4Test; import ca.uhn.fhir.jpa.mdm.helper.MdmHelperConfig; import ca.uhn.fhir.jpa.mdm.helper.MdmHelperR4; +import ca.uhn.fhir.jpa.mdm.svc.MdmLinkSvcImpl; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.mdm.api.IMdmLinkSvc; import ca.uhn.fhir.mdm.api.MdmLinkEvent; +import ca.uhn.fhir.mdm.api.MdmLinkSourceEnum; +import ca.uhn.fhir.mdm.api.MdmMatchOutcome; import ca.uhn.fhir.mdm.model.CanonicalEID; import ca.uhn.fhir.mdm.model.MdmTransactionContext; import ca.uhn.fhir.mdm.rules.config.MdmSettings; @@ -68,6 +72,8 @@ public class MdmStorageInterceptorIT extends BaseMdmR4Test { public MdmHelperR4 myMdmHelper; @Autowired private IdHelperService myIdHelperService; + @Autowired + private IMdmLinkSvc myMdmLinkSvc; @Test public void testCreatePractitioner() throws InterruptedException { @@ -105,17 +111,17 @@ public class MdmStorageInterceptorIT extends BaseMdmR4Test { MdmTransactionContext ctx = createContextForCreate("Patient"); myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient1, ctx); - ourLog.info(ctx.getMdmLinkChangeEvent().toString()); - assertEquals(patient1.getIdElement().getValue(), ctx.getMdmLinkChangeEvent().getTargetResourceId()); - assertEquals(getLinkByTargetId(patient1).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkChangeEvent().getGoldenResourceId()).getIdPartAsLong()); + ourLog.info(ctx.getMdmLinkEvent().toString()); + assertEquals(patient1.getIdElement().getValue(), ctx.getMdmLinkEvent().getTargetResourceId()); + assertEquals(getLinkByTargetId(patient1).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkEvent().getGoldenResourceId()).getIdPartAsLong()); Patient patient2 = addExternalEID(buildJanePatient(), "eid-2"); myMdmHelper.createWithLatch(patient2); ctx = createContextForCreate("Patient"); myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient2, ctx); - ourLog.info(ctx.getMdmLinkChangeEvent().toString()); - assertEquals(patient2.getIdElement().getValue(), ctx.getMdmLinkChangeEvent().getTargetResourceId()); - assertEquals(getLinkByTargetId(patient2).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkChangeEvent().getGoldenResourceId()).getIdPartAsLong()); + ourLog.info(ctx.getMdmLinkEvent().toString()); + assertEquals(patient2.getIdElement().getValue(), ctx.getMdmLinkEvent().getTargetResourceId()); + assertEquals(getLinkByTargetId(patient2).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkEvent().getGoldenResourceId()).getIdPartAsLong()); } @Test diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java index 9853918a9d7..4f13e7ac706 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java @@ -96,7 +96,7 @@ public class MdmTransactionContext { this.myResourceType = myResourceType; } - public MdmLinkEvent getMdmLinkChangeEvent() { + public MdmLinkEvent getMdmLinkEvent() { return myMdmLinkEvent; } From 9bdef1a9fad8b372448ad5500c9258abee4c8322 Mon Sep 17 00:00:00 2001 From: Frank Tao Date: Sat, 28 Aug 2021 13:24:09 -0400 Subject: [PATCH 018/143] Fix search of :not modifier --- .../fhir/jpa/search/builder/QueryStack.java | 50 +++- .../ResourceProviderSearchModifierR4Test.java | 248 ++++++++++++++++++ 2 files changed, 286 insertions(+), 12 deletions(-) create mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderSearchModifierR4Test.java diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java index 253b07e33b6..71857a9e0b5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java @@ -988,9 +988,12 @@ public class QueryStack { String theSpnamePrefix, RuntimeSearchParam theSearchParam, List theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) { - List tokens = new ArrayList<>(); + List tokens = new ArrayList<>(); + + boolean paramInverted = false; + + TokenParamModifier modifier = null; for (IQueryParameterType nextOr : theList) { - if (nextOr instanceof TokenParam) { if (!((TokenParam) nextOr).isEmpty()) { TokenParam id = (TokenParam) nextOr; @@ -1009,17 +1012,23 @@ public class QueryStack { } return createPredicateString(theSourceJoinColumn, theResourceName, theSpnamePrefix, theSearchParam, theList, null, theRequestPartitionId); + } + + modifier = id.getModifier(); + // for all :not modifier, create a token list, and remove the :not modifier + if (modifier != null && modifier == TokenParamModifier.NOT) { + IQueryParameterType notToken = new TokenParam(((TokenParam) nextOr).getSystem(), ((TokenParam) nextOr).getValue()); + tokens.add(notToken); + paramInverted = true; + } else { + tokens.add(nextOr); } - - tokens.add(nextOr); - } } else { tokens.add(nextOr); } - } if (tokens.isEmpty()) { @@ -1027,14 +1036,31 @@ public class QueryStack { } String paramName = getParamNameWithPrefix(theSpnamePrefix, theSearchParam.getName()); + Condition predicate; + BaseJoiningPredicateBuilder join; + + if (paramInverted) { + SearchQueryBuilder sqlBuilder = mySqlBuilder.newChildSqlBuilder(); + TokenPredicateBuilder tokenSelector = sqlBuilder.addTokenPredicateBuilder(null); + sqlBuilder.addPredicate(tokenSelector.createPredicateToken(tokens, theResourceName, theSpnamePrefix, theSearchParam, theRequestPartitionId)); + SelectQuery sql = sqlBuilder.getSelect(); + Expression subSelect = new Subquery(sql); + + join = mySqlBuilder.getOrCreateFirstPredicateBuilder(); + predicate = new InCondition(join.getResourceIdColumn(), subSelect).setNegate(true); + + } else { + + TokenPredicateBuilder tokenJoin = createOrReusePredicateBuilder(PredicateBuilderTypeEnum.TOKEN, theSourceJoinColumn, paramName, () -> mySqlBuilder.addTokenPredicateBuilder(theSourceJoinColumn)).getResult(); - TokenPredicateBuilder join = createOrReusePredicateBuilder(PredicateBuilderTypeEnum.TOKEN, theSourceJoinColumn, paramName, () -> mySqlBuilder.addTokenPredicateBuilder(theSourceJoinColumn)).getResult(); + if (theList.get(0).getMissing() != null) { + return tokenJoin.createPredicateParamMissingForNonReference(theResourceName, paramName, theList.get(0).getMissing(), theRequestPartitionId); + } - if (theList.get(0).getMissing() != null) { - return join.createPredicateParamMissingForNonReference(theResourceName, paramName, theList.get(0).getMissing(), theRequestPartitionId); - } - - Condition predicate = join.createPredicateToken(tokens, theResourceName, theSpnamePrefix, theSearchParam, theOperation, theRequestPartitionId); + predicate = tokenJoin.createPredicateToken(tokens, theResourceName, theSpnamePrefix, theSearchParam, theOperation, theRequestPartitionId); + join = tokenJoin; + } + return join.combineWithRequestPartitionIdPredicate(theRequestPartitionId, predicate); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderSearchModifierR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderSearchModifierR4Test.java new file mode 100644 index 00000000000..22210d36e56 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderSearchModifierR4Test.java @@ -0,0 +1,248 @@ +package ca.uhn.fhir.jpa.provider.r4; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.io.IOUtils; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.CodeableConcept; +import org.hl7.fhir.r4.model.DateTimeType; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Observation.ObservationStatus; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Quantity; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.parser.StrictErrorHandler; +import ca.uhn.fhir.rest.client.interceptor.CapturingInterceptor; + + +public class ResourceProviderSearchModifierR4Test extends BaseResourceProviderR4Test { + + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceProviderSearchModifierR4Test.class); + private CapturingInterceptor myCapturingInterceptor = new CapturingInterceptor(); + + @Override + @AfterEach + public void after() throws Exception { + super.after(); + + myDaoConfig.setAllowMultipleDelete(new DaoConfig().isAllowMultipleDelete()); + myDaoConfig.setAllowExternalReferences(new DaoConfig().isAllowExternalReferences()); + myDaoConfig.setReuseCachedSearchResultsForMillis(new DaoConfig().getReuseCachedSearchResultsForMillis()); + myDaoConfig.setCountSearchResultsUpTo(new DaoConfig().getCountSearchResultsUpTo()); + myDaoConfig.setSearchPreFetchThresholds(new DaoConfig().getSearchPreFetchThresholds()); + myDaoConfig.setAllowContainsSearches(new DaoConfig().isAllowContainsSearches()); + myDaoConfig.setIndexMissingFields(new DaoConfig().getIndexMissingFields()); + + myClient.unregisterInterceptor(myCapturingInterceptor); + } + + @BeforeEach + @Override + public void before() throws Exception { + super.before(); + myFhirCtx.setParserErrorHandler(new StrictErrorHandler()); + + myDaoConfig.setAllowMultipleDelete(true); + myClient.registerInterceptor(myCapturingInterceptor); + myDaoConfig.setSearchPreFetchThresholds(new DaoConfig().getSearchPreFetchThresholds()); + } + + @BeforeEach + public void beforeDisableResultReuse() { + myDaoConfig.setReuseCachedSearchResultsForMillis(null); + } + + @Test + public void testSearch_SingleCode_not_modifier() throws Exception { + + List obsList = createObs(10, false); + + String uri = ourServerBase + "/Observation?code:not=2345-3"; + List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); + + assertEquals(9, ids.size()); + assertEquals(obsList.get(0).toString(), ids.get(0)); + assertEquals(obsList.get(1).toString(), ids.get(1)); + assertEquals(obsList.get(2).toString(), ids.get(2)); + assertEquals(obsList.get(4).toString(), ids.get(3)); + assertEquals(obsList.get(5).toString(), ids.get(4)); + assertEquals(obsList.get(6).toString(), ids.get(5)); + assertEquals(obsList.get(7).toString(), ids.get(6)); + assertEquals(obsList.get(8).toString(), ids.get(7)); + assertEquals(obsList.get(9).toString(), ids.get(8)); + } + + @Test + public void testSearch_SingleCode_multiple_not_modifier() throws Exception { + + List obsList = createObs(10, false); + + String uri = ourServerBase + "/Observation?code:not=2345-3&code:not=2345-7&code:not=2345-9"; + List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); + + assertEquals(7, ids.size()); + assertEquals(obsList.get(0).toString(), ids.get(0)); + assertEquals(obsList.get(1).toString(), ids.get(1)); + assertEquals(obsList.get(2).toString(), ids.get(2)); + assertEquals(obsList.get(4).toString(), ids.get(3)); + assertEquals(obsList.get(5).toString(), ids.get(4)); + assertEquals(obsList.get(6).toString(), ids.get(5)); + assertEquals(obsList.get(8).toString(), ids.get(6)); + } + + @Test + public void testSearch_SingleCode_mix_modifier() throws Exception { + + List obsList = createObs(10, false); + + // Observation?code:not=2345-3&code:not=2345-7&code:not=2345-9 + // slower than Observation?code:not=2345-3&code=2345-7&code:not=2345-9 + String uri = ourServerBase + "/Observation?code:not=2345-3&code=2345-7&code:not=2345-9"; + List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); + + assertEquals(1, ids.size()); + assertEquals(obsList.get(7).toString(), ids.get(0)); + } + + @Test + public void testSearch_SingleCode_or_not_modifier() throws Exception { + + List obsList = createObs(10, false); + + String uri = ourServerBase + "/Observation?code:not=2345-3,2345-7,2345-9"; + List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); + + assertEquals(7, ids.size()); + assertEquals(obsList.get(0).toString(), ids.get(0)); + assertEquals(obsList.get(1).toString(), ids.get(1)); + assertEquals(obsList.get(2).toString(), ids.get(2)); + assertEquals(obsList.get(4).toString(), ids.get(3)); + assertEquals(obsList.get(5).toString(), ids.get(4)); + assertEquals(obsList.get(6).toString(), ids.get(5)); + assertEquals(obsList.get(8).toString(), ids.get(6)); + } + + @Test + public void testSearch_MultiCode_not_modifier() throws Exception { + + List obsList = createObs(10, true); + + String uri = ourServerBase + "/Observation?code:not=2345-3"; + List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); + + assertEquals(8, ids.size()); + assertEquals(obsList.get(0).toString(), ids.get(0)); + assertEquals(obsList.get(1).toString(), ids.get(1)); + assertEquals(obsList.get(4).toString(), ids.get(2)); + assertEquals(obsList.get(5).toString(), ids.get(3)); + assertEquals(obsList.get(6).toString(), ids.get(4)); + assertEquals(obsList.get(7).toString(), ids.get(5)); + assertEquals(obsList.get(8).toString(), ids.get(6)); + assertEquals(obsList.get(9).toString(), ids.get(7)); + } + + @Test + public void testSearch_MultiCode_multiple_not_modifier() throws Exception { + + List obsList = createObs(10, true); + + String uri = ourServerBase + "/Observation?code:not=2345-3&code:not=2345-4"; + List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); + + assertEquals(7, ids.size()); + assertEquals(obsList.get(0).toString(), ids.get(0)); + assertEquals(obsList.get(1).toString(), ids.get(1)); + assertEquals(obsList.get(5).toString(), ids.get(2)); + assertEquals(obsList.get(6).toString(), ids.get(3)); + assertEquals(obsList.get(7).toString(), ids.get(4)); + assertEquals(obsList.get(8).toString(), ids.get(5)); + assertEquals(obsList.get(9).toString(), ids.get(6)); + } + + @Test + public void testSearch_MultiCode_mix_modifier() throws Exception { + + List obsList = createObs(10, true); + + String uri = ourServerBase + "/Observation?code:not=2345-3&code=2345-7&code:not=2345-9"; + List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); + + assertEquals(2, ids.size()); + assertEquals(obsList.get(6).toString(), ids.get(0)); + assertEquals(obsList.get(7).toString(), ids.get(1)); + } + + @Test + public void testSearch_MultiCode_or_not_modifier() throws Exception { + + List obsList = createObs(10, true); + + String uri = ourServerBase + "/Observation?code:not=2345-3,2345-7,2345-9"; + List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); + + assertEquals(4, ids.size()); + assertEquals(obsList.get(0).toString(), ids.get(0)); + assertEquals(obsList.get(1).toString(), ids.get(1)); + assertEquals(obsList.get(4).toString(), ids.get(2)); + assertEquals(obsList.get(5).toString(), ids.get(3)); + } + + + private List searchAndReturnUnqualifiedVersionlessIdValues(String uri) throws IOException { + List ids; + HttpGet get = new HttpGet(uri); + + try (CloseableHttpResponse response = ourHttpClient.execute(get)) { + String resp = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); + ourLog.info("Response was: {}", resp); + Bundle bundle = myFhirCtx.newXmlParser().parseResource(Bundle.class, resp); + ourLog.info("Bundle: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); + ids = toUnqualifiedVersionlessIdValues(bundle); + } + return ids; + } + + private List createObs(int obsNum, boolean isMultiple) { + + Patient patient = new Patient(); + patient.addIdentifier().setSystem("urn:system").setValue("001"); + patient.addName().setFamily("Tester").addGiven("Joe"); + IIdType pid = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); + + List obsIds = new ArrayList<>(); + IIdType obsId = null; + for (int i=0; i Date: Sat, 28 Aug 2021 13:27:40 -0400 Subject: [PATCH 019/143] Update the comment --- .../java/ca/uhn/fhir/jpa/search/builder/QueryStack.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java index 71857a9e0b5..17595ff89a6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java @@ -991,8 +991,8 @@ public class QueryStack { List tokens = new ArrayList<>(); boolean paramInverted = false; - TokenParamModifier modifier = null; + for (IQueryParameterType nextOr : theList) { if (nextOr instanceof TokenParam) { if (!((TokenParam) nextOr).isEmpty()) { @@ -1015,7 +1015,7 @@ public class QueryStack { } modifier = id.getModifier(); - // for all :not modifier, create a token list, and remove the :not modifier + // for :not modifier, create a token and remove the :not modifier if (modifier != null && modifier == TokenParamModifier.NOT) { IQueryParameterType notToken = new TokenParam(((TokenParam) nextOr).getSystem(), ((TokenParam) nextOr).getValue()); tokens.add(notToken); @@ -1024,9 +1024,7 @@ public class QueryStack { tokens.add(nextOr); } } - } else { - tokens.add(nextOr); } } From 3f128be34da9e6a92cabe68f583b5515a3ddd59f Mon Sep 17 00:00:00 2001 From: Frank Tao Date: Sat, 28 Aug 2021 13:29:00 -0400 Subject: [PATCH 020/143] Update the code --- .../main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java index 17595ff89a6..068c06c5fe9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java @@ -1017,8 +1017,7 @@ public class QueryStack { modifier = id.getModifier(); // for :not modifier, create a token and remove the :not modifier if (modifier != null && modifier == TokenParamModifier.NOT) { - IQueryParameterType notToken = new TokenParam(((TokenParam) nextOr).getSystem(), ((TokenParam) nextOr).getValue()); - tokens.add(notToken); + tokens.add(new TokenParam(((TokenParam) nextOr).getSystem(), ((TokenParam) nextOr).getValue())); paramInverted = true; } else { tokens.add(nextOr); From 3c0a197407cf6e4c5621e2f48e8b8e9ea532dc5c Mon Sep 17 00:00:00 2001 From: Frank Tao Date: Sat, 28 Aug 2021 16:23:09 -0400 Subject: [PATCH 021/143] Added changelog --- .../2837-search-with-not-modifier-on-multiple-codes.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2837-search-with-not-modifier-on-multiple-codes.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2837-search-with-not-modifier-on-multiple-codes.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2837-search-with-not-modifier-on-multiple-codes.yaml new file mode 100644 index 00000000000..fed478a7120 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2837-search-with-not-modifier-on-multiple-codes.yaml @@ -0,0 +1,4 @@ +--- +type: fix +issue: 2837 +title: "The :not modifier does not currently work for observations with multiple codes for the search. This is fixed." From e7c6ce920d9aed0067f6fa73a8f527b022bb3df1 Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Mon, 30 Aug 2021 10:29:59 -0400 Subject: [PATCH 022/143] issue-2901 checkin to test --- .../ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java | 2 +- .../jpa/dao/BaseTransactionProcessor.java | 81 ++++++++++++++++--- ...irResourceDaoCreatePlaceholdersR4Test.java | 60 ++++++++++++++ ...irResourceDaoR4VersionedReferenceTest.java | 81 ++++++++++++++++--- 4 files changed, 205 insertions(+), 19 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java index 1fc0bb8f9d2..7716efca962 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java @@ -1206,7 +1206,7 @@ public abstract class BaseHapiFhirDao extends BaseStora if (thePerformIndexing || ((ResourceTable) theEntity).getVersion() == 1) { newParams = new ResourceIndexedSearchParams(); - //FIX ME GGG: This is where the placeholder references end up getting created, deeeeeep down the stakc. + //FIXME GGG: This is where the placeholder references end up getting created, deeeeeep down the stakc. mySearchParamWithInlineReferencesExtractor.populateFromResource(newParams, theTransactionDetails, entity, theResource, existingParams, theRequest, thePerformIndexing); changed = populateResourceIntoEntity(theTransactionDetails, theRequest, theResource, entity, true); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index 2ab95f57992..ea7d3251d0a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -61,6 +61,7 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.MethodNotAllowedException; import ca.uhn.fhir.rest.server.exceptions.NotModifiedException; import ca.uhn.fhir.rest.server.exceptions.PayloadTooLargeException; +import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor; import ca.uhn.fhir.rest.server.method.BaseMethodBinding; import ca.uhn.fhir.rest.server.method.BaseResourceReturningMethodBinding; @@ -403,7 +404,8 @@ public abstract class BaseTransactionProcessor { throw new InvalidRequestException("Unable to process transaction where incoming Bundle.type = " + transactionType); } - int numberOfEntries = myVersionAdapter.getEntries(theRequest).size(); + List requestEntries = myVersionAdapter.getEntries(theRequest); + int numberOfEntries = requestEntries.size(); if (myDaoConfig.getMaximumTransactionBundleSize() != null && numberOfEntries > myDaoConfig.getMaximumTransactionBundleSize()) { throw new PayloadTooLargeException("Transaction Bundle Too large. Transaction bundle contains " + @@ -416,7 +418,27 @@ public abstract class BaseTransactionProcessor { final TransactionDetails transactionDetails = new TransactionDetails(); final StopWatch transactionStopWatch = new StopWatch(); - List requestEntries = myVersionAdapter.getEntries(theRequest); + //TODO + // Create Autoreference Placeholders is enabled + // we should create any sub reference that doesn't already exist +// if (myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { +// List referencesToCreate = new ArrayList<>(); +// for (IBase entry : requestEntries) { +// IBaseResource resource = myVersionAdapter.getResource(entry); +// Set referencesToAutoVersion = BaseStorageDao.extractReferencesToAutoVersion(myContext, +// myModelConfig, +// resource); +// for (IBaseReference subReference : referencesToAutoVersion) { +// // doesn't exist - add it to the entries to be created +// org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent req = new org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent(); +// req.setMethod(org.hl7.fhir.r4.model.Bundle.HTTPVerb.PUT); +// req.setUrl(subReference.getReferenceElement().getValue()); +//// req.setIfNoneExist(); //TODO - look at conditional creates to see how this works +// referencesToCreate.add(req); // adding the request should add it to theIdToPersistence map later +// } +// } +// requestEntries.addAll(referencesToCreate); +// } // Do all entries have a verb? for (int i = 0; i < numberOfEntries; i++) { @@ -488,6 +510,9 @@ public abstract class BaseTransactionProcessor { CompositeInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequestDetails, Pointcut.JPA_PERFTRACE_INFO, params); } + //FIXME - remove before committing + ourLog.info(myContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); + return response; } @@ -614,13 +639,22 @@ public abstract class BaseTransactionProcessor { theEntries, theTransactionStopWatch); theTransactionStopWatch.startTask("Commit writes to database"); + ourLog.info("Retval has " + retVal.values().size()); return retVal; }; Map entriesToProcess; try { entriesToProcess = myHapiTransactionService.execute(theRequestDetails, theTransactionDetails, txCallback); - } finally { + } + catch (Exception ex) { + //FIXME - remove + ourLog.info("FindME"); + ourLog.info(ex.getLocalizedMessage()); + ex.printStackTrace(); + entriesToProcess = new HashMap<>(); + } + finally { if (writeOperationsDetails != null) { HookParams params = new HookParams() .add(TransactionDetails.class, theTransactionDetails) @@ -1198,14 +1232,24 @@ public abstract class BaseTransactionProcessor { IBaseResource nextResource = nextOutcome.getResource(); //TODO - should we add the autoversioned resources to our idtoPersistedoutcomes here? + // idToPersistedOutcomes has no entry for them at this point (if they were not in the + // top level bundle) + // should we just add no-op values to the map (since they are all going to be gets)? // for (IBaseReference autoVersionRef : referencesToAutoVersion) { -// IBaseResource baseResource = myVersionAdapter.getResource(autoVersionRef); -// IFhirResourceDao dao = getDaoOrThrowException(baseResource.getClass()); -// -// theIdToPersistedOutcome.put(baseResource.getIdElement(), ); +// IFhirResourceDao dao = myDaoRegistry.getResourceDao(autoVersionRef.getReferenceElement().getResourceType()); +// IBaseResource baseResource; +// try { +// baseResource = dao.read(autoVersionRef.getReferenceElement()); +// } catch (ResourceNotFoundException ex) { + // not found +// baseResource = +// DaoMethodOutcome outcome = new DaoMethodOutcome(); +// outcome.setResource(baseResource); +// outcome.setNop(true); // we are just reading it +// theIdToPersistedOutcome.put(autoVersionRef.getReferenceElement(), outcome); +// } // } - resolveReferencesThenSaveAndIndexResource(theRequest, theTransactionDetails, theIdSubstitutions, theIdToPersistedOutcome, entriesToProcess, nonUpdatedEntities, @@ -1263,8 +1307,27 @@ public abstract class BaseTransactionProcessor { throw new InvalidRequestException("Unable to satisfy placeholder ID " + nextId.getValue() + " found in element named '" + nextRef.getName() + "' within resource of type: " + nextResource.getIdElement().getResourceType()); } else { if (theReferencesToAutoVersion.contains(resourceReference)) { + + //TODO - if we get here and there's still no + // value in theIdToPersistedOutcome map + // we should throw an invalid request exception + DaoMethodOutcome outcome = theIdToPersistedOutcome.get(nextId); - if (!outcome.isNop() && !Boolean.TRUE.equals(outcome.getCreated())) { + + if (outcome == null) { + IFhirResourceDao dao = myDaoRegistry.getResourceDao(resourceReference.getReferenceElement().getResourceType()); + IBaseResource baseResource; + try { + // DB hit + baseResource = dao.read(resourceReference.getReferenceElement()); + } catch (ResourceNotFoundException ex) { + // does not exist - add the history/1 + String val = resourceReference.getReferenceElement().getValue(); + resourceReference.getReferenceElement().setValue(val + "/_history/1"); + } + } + + if (outcome != null && !outcome.isNop() && !Boolean.TRUE.equals(outcome.getCreated())) { addRollbackReferenceRestore(theTransactionDetails, resourceReference); resourceReference.setReference(nextId.getValue()); resourceReference.setResource(null); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java index c00baf2f536..0451769f045 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java @@ -1,17 +1,20 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.param.ReferenceParam; import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; +import ca.uhn.fhir.util.BundleBuilder; import ca.uhn.fhir.util.HapiExtensions; import com.google.common.collect.Sets; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.AuditEvent; import org.hl7.fhir.r4.model.BooleanType; +import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Extension; import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.Identifier; @@ -21,6 +24,8 @@ import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Task; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import java.util.List; @@ -565,6 +570,61 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { } + @Test + public void testAutocreatePlaceholderTest() { + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + + Observation obs = new Observation(); + obs.setId("Observation/DEF"); + Reference patientRef = new Reference("Patient/RED"); + obs.setSubject(patientRef); + BundleBuilder builder = new BundleBuilder(myFhirCtx); + builder.addTransactionUpdateEntry(obs); + + mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); + + Patient returned = myPatientDao.read(patientRef.getReferenceElement()); + Assertions.assertTrue(returned != null); + } + @Test + public void testAutocreatePlaceholderWithTargetExistingAlreadyTest() { + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + + myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); + + String patientId = "Patient/RED"; + + // create + Patient patient = new Patient(); +// patient.setId(patientId); + patient.setIdElement(new IdType(patientId)); +// patient.setActive(true); + myPatientDao.update(patient); + + // update + patient.setActive(true); + myPatientDao.update(patient); + + // observation (with version 2) + Observation obs = new Observation(); + obs.setId("Observation/DEF"); + Reference patientRef = new Reference(patientId); + obs.setSubject(patientRef); + BundleBuilder builder = new BundleBuilder(myFhirCtx); + builder.addTransactionUpdateEntry(obs); + + Bundle transaction = mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); + + Patient returned = myPatientDao.read(patientRef.getReferenceElement()); + Assertions.assertTrue(returned != null); + Assertions.assertTrue(returned.getActive()); + + Observation retObservation = myObservationDao.read(obs.getIdElement()); + Assertions.assertTrue(retObservation != null); + } + + // always work with the put + // conditional create (replace put with conditional create?) } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java index 043883b5515..efc8510c5c7 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java @@ -1,12 +1,10 @@ package ca.uhn.fhir.jpa.dao.r4; -import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.ParserOptions; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.partition.SystemRequestDetails; -import ca.uhn.fhir.jpa.provider.r4.ResourceProviderR4Test; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.param.TokenParam; @@ -24,10 +22,12 @@ import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Task; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import java.io.InputStreamReader; +import java.sql.Ref; import java.util.Arrays; import java.util.Date; import java.util.HashSet; @@ -298,6 +298,53 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { assertEquals(patientIdString, observation.getSubject().getReference()); } + + @Test + public void testInsertVersionedReferenceAtPathUsingTransaction() { +// myFhirCtx.getParserOptions().setStripVersionsFromReferences(false); +// myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); + + Patient p = new Patient(); + p.setActive(true); + IIdType patientId = myPatientDao.create(p).getId().toUnqualified(); + assertEquals("1", patientId.getVersionIdPart()); + assertEquals(null, patientId.getBaseUrl()); + String patientIdString = patientId.getValue(); + + // Create - put an unversioned reference in the subject + Observation observation = new Observation(); + observation.getSubject().setReference(patientId.toVersionless().getValue()); + + BundleBuilder builder = new BundleBuilder(myFhirCtx); + builder.addTransactionUpdateEntry(observation); + + Bundle transaction = mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); + + Observation ret = myObservationDao.read(observation.getIdElement()); + Assertions.assertTrue(ret != null); + + // Read back and verify that reference is now versioned +// observation = myObservationDao.read(observationId); +// assertEquals(patientIdString, observation.getSubject().getReference()); +// +// myCaptureQueriesListener.clear(); +// +// // Update - put an unversioned reference in the subject +// observation = new Observation(); +// observation.setId(observationId); +// observation.addIdentifier().setSystem("http://foo").setValue("bar"); +// observation.getSubject().setReference(patientId.toVersionless().getValue()); +// myObservationDao.update(observation); +// +// // Make sure we're not introducing any extra DB operations +// assertEquals(5, myCaptureQueriesListener.logSelectQueries().size()); +// +// // Read back and verify that reference is now versioned +// observation = myObservationDao.read(observationId); +// assertEquals(patientIdString, observation.getSubject().getReference()); + } + @Test public void testInsertVersionedReferenceAtPath_InTransaction_SourceAndTargetBothCreated() { myFhirCtx.getParserOptions().setStripVersionsFromReferences(false); @@ -827,27 +874,43 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { assertThat(versionedPatientReference, is(equalTo("Patient/RED/_history/1"))); } + + @Test @DisplayName("GH-2901 Test no NPE is thrown on autoversioned references") public void testNoNpeMinimal() { - myDaoConfig.setAutoCreatePlaceholderReferenceTargets(false); + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); // ParserOptions options = new ParserOptions(); // options.setDontStripVersionsFromReferencesAtPaths("Observation.subject"); // myFhirCtx.setParserOptions(options); - Patient patient = new Patient(); - patient.setId("Patient/RED"); - myPatientDao.update(patient); - Observation obs = new Observation(); obs.setId("Observation/DEF"); - obs.setSubject(new Reference("Patient/RED")); + Reference patientRef = new Reference("Patient/RED"); + obs.setSubject(patientRef); BundleBuilder builder = new BundleBuilder(myFhirCtx); builder.addTransactionUpdateEntry(obs); - mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); + //1 make sure this test throws the InvalidRequestException (make separate test for this) + //2 add a test for patient created before bundle and then process observation with reference to patient (null check for outcome) + //3 + +// Assertions.assertThrows() + try { + Bundle returnedTr = mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); + + System.out.println("returned " + returnedTr.getEntry().size()); + Observation obRet = myObservationDao.read(obs.getIdElement()); + System.out.println("HELLO " + obRet.getId()); + Patient returned = myPatientDao.read(patientRef.getReferenceElement()); + Assertions.assertTrue(returned != null); + } + catch (Exception ex) { + System.out.println("TEST " + ex.getLocalizedMessage()); + Assertions.assertTrue(ex == null); + } } From f04ff3fd0af2f81368e3b043e6d7efdadddd38a2 Mon Sep 17 00:00:00 2001 From: Ben Li-Sauerwine Date: Tue, 31 Aug 2021 02:04:27 -0400 Subject: [PATCH 023/143] Adds failing test for expunging and recreating a Patient with a profile in its meta field. --- .../fhir/jpa/dao/expunge/ExpungeHookTest.java | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java index a13947beb62..8a9f3106569 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java @@ -10,6 +10,7 @@ import ca.uhn.fhir.jpa.dao.dstu3.BaseJpaDstu3Test; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.test.concurrency.PointcutLatch; import org.hl7.fhir.dstu3.model.Patient; +import org.hl7.fhir.dstu3.model.Meta; import org.hl7.fhir.instance.model.api.IIdType; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -40,6 +41,8 @@ public class ExpungeHookTest extends BaseJpaDstu3Test { @BeforeEach public void before() { myDaoConfig.setExpungeEnabled(true); + myDaoConfig.setResourceClientIdStrategy(DaoConfig.ClientIdStrategyEnum.ALPHANUMERIC); + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); myInterceptorService.registerAnonymousInterceptor(Pointcut.STORAGE_PRESTORAGE_EXPUNGE_EVERYTHING, myEverythingLatch); myInterceptorService.registerAnonymousInterceptor(Pointcut.STORAGE_PRESTORAGE_EXPUNGE_RESOURCE, myExpungeResourceLatch); } @@ -65,6 +68,43 @@ public class ExpungeHookTest extends BaseJpaDstu3Test { assertPatientGone(id); } + @Test + public void expungeEverythingAndRecreate() throws InterruptedException { + // Create a patient. + Patient thePatient = new Patient(); + thePatient.setId("ABC123"); + Meta theMeta = new Meta(); + theMeta.addProfile("http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"); + thePatient.setMeta(theMeta); + myPatientDao.update(thePatient, mySrd); + + IIdType id = myPatientDao.update(thePatient, mySrd).getId(); + assertNotNull(myPatientDao.read(id)); + + // Expunge it directly. + myPatientDao.delete(id); + ExpungeOptions options = new ExpungeOptions(); + options.setExpungeEverything(true); + options.setExpungeDeletedResources(true); + options.setExpungeOldVersions(true); + myPatientDao.expunge(id.toUnqualifiedVersionless(), options, mySrd); + assertPatientGone(id); + + // Create it a second time. + myPatientDao.update(thePatient, mySrd); + assertNotNull(myPatientDao.read(id)); + + // Expunge everything with the service. + myEverythingLatch.setExpectedCount(1); + myExpungeService.expunge(null, null, null, options, mySrd); + myEverythingLatch.awaitExpected(); + assertPatientGone(id); + + // Create it a third time. + myPatientDao.update(thePatient, mySrd); + assertNotNull(myPatientDao.read(id)); + } + private void assertPatientGone(IIdType theId) { try { myPatientDao.read(theId); From a38b7911415053ba64e6f15d63404f1a9dbe6d1a Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Tue, 31 Aug 2021 10:12:40 -0400 Subject: [PATCH 024/143] issue-2901 added db access method for existence and setting the version to 1 if createplaceholders is true and object does not exist in db --- .../fhir/jpa/api/dao/IFhirResourceDao.java | 9 +++ .../fhir/jpa/dao/BaseHapiFhirResourceDao.java | 17 +++++ .../fhir/jpa/dao/BaseHapiFhirSystemDao.java | 1 + .../jpa/dao/BaseTransactionProcessor.java | 70 ++++++++++++++----- .../uhn/fhir/jpa/dao/data/IForcedIdDao.java | 7 ++ ...irResourceDaoR4VersionedReferenceTest.java | 27 ++++--- 6 files changed, 98 insertions(+), 33 deletions(-) diff --git a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java index ff8fa2a2303..f9f9bb39345 100644 --- a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java +++ b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java @@ -161,6 +161,15 @@ public interface IFhirResourceDao extends IDao { */ T read(IIdType theId); + /** + * Helper method to determine if some resources exist in the DB (without throwing). + * Returns a set that contains the IIdType for every resource found. + * If it's not found, it won't be included in the set. + * @param theIds - list of IIdType ids (for the same resource) + * @return + */ + Set hasResources(Collection theIds); + /** * Read a resource by its internal PID */ diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java index 2d2911b9f92..5476e89352b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java @@ -37,6 +37,7 @@ import ca.uhn.fhir.jpa.api.model.LazyDaoMethodOutcome; import ca.uhn.fhir.jpa.dao.index.IdHelperService; import ca.uhn.fhir.jpa.dao.tx.HapiTransactionService; import ca.uhn.fhir.jpa.delete.DeleteConflictService; +import ca.uhn.fhir.jpa.model.cross.IResourceLookup; import ca.uhn.fhir.jpa.model.entity.BaseHasResource; import ca.uhn.fhir.jpa.model.entity.BaseTag; import ca.uhn.fhir.jpa.model.entity.ForcedId; @@ -1156,6 +1157,22 @@ public abstract class BaseHapiFhirResourceDao extends B return myTransactionService.execute(theRequest, transactionDetails, tx -> doRead(theId, theRequest, theDeletedOk)); } + @Override + public Set hasResources(Collection theIds) { + List idPortions = theIds.stream().map(t -> t.getIdPart()).collect(Collectors.toList()); + Collection matches = myForcedIdDao.findResourcesByForcedId(getResourceName(), + idPortions); + + HashSet collected = new HashSet<>(); + for (Object[] match : matches) { + String resourceType = (String) match[0]; + String forcedId = (String) match[1]; + collected.add(new IdDt(resourceType, forcedId)); + } + + return collected; + } + public T doRead(IIdType theId, RequestDetails theRequest, boolean theDeletedOk) { assert TransactionSynchronizationManager.isActualTransactionActive(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java index 32d37758dde..909cd1bf481 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java @@ -7,6 +7,7 @@ import ca.uhn.fhir.jpa.util.ResourceCountCache; import ca.uhn.fhir.rest.api.RestOperationTypeEnum; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.api.server.RequestDetails; +import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor.ActionRequestDetails; import ca.uhn.fhir.util.StopWatch; import com.google.common.annotations.VisibleForTesting; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index ea7d3251d0a..6f137a5bfe3 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -650,6 +650,7 @@ public abstract class BaseTransactionProcessor { catch (Exception ex) { //FIXME - remove ourLog.info("FindME"); + ourLog.info(ex.getLocalizedMessage()); ex.printStackTrace(); entriesToProcess = new HashMap<>(); @@ -1306,28 +1307,61 @@ public abstract class BaseTransactionProcessor { } else if (nextId.getValue().startsWith("urn:")) { throw new InvalidRequestException("Unable to satisfy placeholder ID " + nextId.getValue() + " found in element named '" + nextRef.getName() + "' within resource of type: " + nextResource.getIdElement().getResourceType()); } else { - if (theReferencesToAutoVersion.contains(resourceReference)) { + // resource type -> set of Ids + // we'll populate this with only those resource/ids of + // resource references that: + // a) do not exist in the idToPersistedOutcome + // (so not in top level of bundle) + // b) do not exist in DB + // (so newly created resources) + // + // we only do this if autocreateplaceholders is on + HashMap> resourceTypeToListOfIds = new HashMap<>(); + if (myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { + for (IBaseReference ref : theReferencesToAutoVersion) { + IIdType id = ref.getReferenceElement(); + // if we don't have this in our idToPersistedOutcome + // and we have createplaceholderreferences on + // we will have to check if these objects exist in the DB + if (!theIdToPersistedOutcome.containsKey(id)) { + if (!resourceTypeToListOfIds.containsKey(id.getResourceType())) { + resourceTypeToListOfIds.put(id.getResourceType(), new HashSet<>()); + } - //TODO - if we get here and there's still no - // value in theIdToPersistedOutcome map - // we should throw an invalid request exception - - DaoMethodOutcome outcome = theIdToPersistedOutcome.get(nextId); - - if (outcome == null) { - IFhirResourceDao dao = myDaoRegistry.getResourceDao(resourceReference.getReferenceElement().getResourceType()); - IBaseResource baseResource; - try { - // DB hit - baseResource = dao.read(resourceReference.getReferenceElement()); - } catch (ResourceNotFoundException ex) { - // does not exist - add the history/1 - String val = resourceReference.getReferenceElement().getValue(); - resourceReference.getReferenceElement().setValue(val + "/_history/1"); + resourceTypeToListOfIds.get(id.getResourceType()).add(id); } } - if (outcome != null && !outcome.isNop() && !Boolean.TRUE.equals(outcome.getCreated())) { + for (String resourceType : resourceTypeToListOfIds.keySet()) { + IFhirResourceDao dao = myDaoRegistry.getResourceDao(resourceType); + Set idSet = resourceTypeToListOfIds.get(resourceType); + + // DB hit :( + Set existing = dao.hasResources(idSet); + + // we remove all the ids that are found, leaving + // only the ids of those not in the DB at all + idSet.removeAll(existing); + } + } + + if (theReferencesToAutoVersion.contains(resourceReference)) { + DaoMethodOutcome outcome = theIdToPersistedOutcome.get(nextId); + + if (outcome == null && myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { + // null outcome means it's a resource reference that was not at top of bundle + IIdType id = resourceReference.getReferenceElement(); + String resourceType = id.getResourceType(); + // if it exists in resourceTypeToListOfIds + // it's not in the DB (new resource) + Set ids = resourceTypeToListOfIds.get(resourceType); + if (!ids.contains(id)) { + // doesn't exist in the DB + // which means the history necessarily is 1 (first one) + resourceReference.getReferenceElement().setValue(id.getValue() + "/_history/1"); + } + } + else if (outcome != null && !outcome.isNop() && !Boolean.TRUE.equals(outcome.getCreated())) { addRollbackReferenceRestore(theTransactionDetails, resourceReference); resourceReference.setReference(nextId.getValue()); resourceReference.setResource(null); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java index 3a10f6be0d5..2a747ab089d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java @@ -111,6 +111,13 @@ public interface IForcedIdDao extends JpaRepository { "WHERE f.myResourceType = :resource_type AND f.myForcedId IN ( :forced_id )") Collection findAndResolveByForcedIdWithNoType(@Param("resource_type") String theResourceType, @Param("forced_id") Collection theForcedIds); + @Query("" + + "SELECT " + + " f.myResourceType, f.myForcedId " + + "FROM ForcedId f " + + "WHERE f.myResourceType = :resource_type AND f.myForcedId IN ( :forced_id )") + Collection findResourcesByForcedId(@Param("resource_type") String theResourceType, @Param("forced_id") Collection theForcedIds); + /** * This method returns a Collection where each row is an element in the collection. Each element in the collection * is an object array, where the order matters (the array represents columns returned by the query). Be careful if you change this query in any way. diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java index efc8510c5c7..a4e65f4ee4d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java @@ -301,8 +301,8 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { @Test public void testInsertVersionedReferenceAtPathUsingTransaction() { -// myFhirCtx.getParserOptions().setStripVersionsFromReferences(false); -// myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + myFhirCtx.getParserOptions().setStripVersionsFromReferences(false); + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); Patient p = new Patient(); @@ -893,24 +893,21 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { BundleBuilder builder = new BundleBuilder(myFhirCtx); builder.addTransactionUpdateEntry(obs); + Bundle submitted = (Bundle)builder.getBundle(); + //1 make sure this test throws the InvalidRequestException (make separate test for this) //2 add a test for patient created before bundle and then process observation with reference to patient (null check for outcome) //3 -// Assertions.assertThrows() - try { - Bundle returnedTr = mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); + Bundle returnedTr = mySystemDao.transaction(new SystemRequestDetails(), submitted); - System.out.println("returned " + returnedTr.getEntry().size()); - Observation obRet = myObservationDao.read(obs.getIdElement()); - System.out.println("HELLO " + obRet.getId()); - Patient returned = myPatientDao.read(patientRef.getReferenceElement()); - Assertions.assertTrue(returned != null); - } - catch (Exception ex) { - System.out.println("TEST " + ex.getLocalizedMessage()); - Assertions.assertTrue(ex == null); - } + Assertions.assertTrue(returnedTr != null); + + // some verification + Observation obRet = myObservationDao.read(obs.getIdElement()); + Assertions.assertTrue(obRet != null); + Patient returned = myPatientDao.read(patientRef.getReferenceElement()); + Assertions.assertTrue(returned != null); } From cc2e968595d8f285926e640049cf0e1e3ed9eae1 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 31 Aug 2021 11:04:20 -0400 Subject: [PATCH 025/143] Add version.yaml --- .../resources/ca/uhn/hapi/fhir/changelog/5_5_1/version.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_5_1/version.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_5_1/version.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_5_1/version.yaml new file mode 100644 index 00000000000..41c2e9375cf --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_5_1/version.yaml @@ -0,0 +1,3 @@ +--- +release-date: "2021-08-30" +codename: "Quasar" From 9cba9411c4595958021c8ef47faaf26f5612e51a Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 31 Aug 2021 09:58:38 -0400 Subject: [PATCH 026/143] Add failing test --- .../fhir/jpa/dao/TransactionProcessor.java | 4 +- .../r4/FhirResourceDaoR4SearchNoFtTest.java | 80 +++++++++++++++++++ .../src/test/resources/logback-test.xml | 2 +- 3 files changed, 83 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java index 748ffa6352b..bc73ea4a623 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java @@ -261,7 +261,7 @@ public class TransactionProcessor extends BaseTransactionProcessor { // No matches .filter(match -> !match.myResolved) .forEach(match -> { - ourLog.warn("Was unable to match url {} from database", match.myRequestUrl); + ourLog.debug("Was unable to match url {} from database", match.myRequestUrl); theTransactionDetails.addResolvedMatchUrl(match.myRequestUrl, TransactionDetails.NOT_FOUND); }); } @@ -337,7 +337,7 @@ public class TransactionProcessor extends BaseTransactionProcessor { } private void setSearchToResolvedAndPrefetchFoundResourcePid(TransactionDetails theTransactionDetails, List idsToPreFetch, ResourceIndexedSearchParamToken nextResult, MatchUrlToResolve nextSearchParameterMap) { - ourLog.warn("Matched url {} from database", nextSearchParameterMap.myRequestUrl); + ourLog.debug("Matched url {} from database", nextSearchParameterMap.myRequestUrl); idsToPreFetch.add(nextResult.getResourcePid()); myMatchResourceUrlService.matchUrlResolved(theTransactionDetails, nextSearchParameterMap.myResourceDefinition.getName(), nextSearchParameterMap.myRequestUrl, new ResourcePersistentId(nextResult.getResourcePid())); theTransactionDetails.addResolvedMatchUrl(nextSearchParameterMap.myRequestUrl, new ResourcePersistentId(nextResult.getResourcePid())); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java index c5cfa742aa0..ad456ccebe7 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java @@ -20,6 +20,7 @@ import ca.uhn.fhir.jpa.model.entity.ResourceLink; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.model.search.StorageProcessingMessage; import ca.uhn.fhir.jpa.model.util.UcumServiceUtil; +import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.jpa.searchparam.MatchUrlService; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap.EverythingModeEnum; @@ -151,12 +152,14 @@ import java.util.stream.Collectors; import static ca.uhn.fhir.rest.api.Constants.PARAM_TYPE; import static org.apache.commons.lang3.StringUtils.countMatches; +import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.endsWith; +import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.Matchers.hasSize; @@ -1357,6 +1360,83 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { assertThat(actual, contains(id)); } + @Test + public void testDuplicateConditionalCreatesOnToken() { + String bundle = "{\n" + + " \"resourceType\": \"Bundle\",\n" + + " \"type\": \"transaction\",\n" + + " \"entry\": [ {\n" + + " \"fullUrl\": \"urn:uuid:33b76421-1c91-471f-ae1c-e7486e804f18\",\n" + + " \"resource\": {\n" + + " \"resourceType\": \"Organization\",\n" + + " \"identifier\": [ {\n" + + " \"system\": \"https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-health-care-facility-id\",\n" + + " \"value\": \"3972\"\n" + + " } ]\n" + + " },\n" + + " \"request\": {\n" + + " \"method\": \"POST\",\n" + + " \"url\": \"/Organization\",\n" + + " \"ifNoneExist\": \"Organization?identifier=https%3A%2F%2Ffhir.infoway-inforoute.ca%2FNamingSystem%2Fca-on-health-care-facility-id|3972\"\n" + + " }\n" + + " }, {\n" + + " \"fullUrl\": \"urn:uuid:65d2bf18-543e-4d05-b66b-07cee541172f\",\n" + + " \"resource\": {\n" + + " \"resourceType\": \"Organization\",\n" + + " \"identifier\": [ {\n" + + " \"system\": \"https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-health-care-facility-id\",\n" + + " \"value\": \"3972\"\n" + + " } ]\n" + + " },\n" + + " \"request\": {\n" + + " \"method\": \"POST\",\n" + + " \"url\": \"/Organization\",\n" + + " \"ifNoneExist\": \"Organization?identifier=https%3A%2F%2Ffhir.infoway-inforoute.ca%2FNamingSystem%2Fca-on-health-care-facility-id|3972\"\n" + + " }\n" + + " }, {\n" + + " \"fullUrl\": \"urn:uuid:2a4635e2-e678-4ed7-9a92-901d67787434\",\n" + + " \"resource\": {\n" + + " \"resourceType\": \"ServiceRequest\",\n" + + " \"identifier\": [ {\n" + + " \"system\": \"https://corhealth-ontario.ca/NamingSystem/service-request-id\",\n" + + " \"value\": \"1\"\n" + + " } ],\n" + + " \"performer\": [ {\n" + + " \"reference\": \"urn:uuid:65d2bf18-543e-4d05-b66b-07cee541172f\",\n" + + " \"type\": \"Organization\"\n" + + " } ]\n" + + " },\n" + + " \"request\": {\n" + + " \"method\": \"PUT\",\n" + + " \"url\": \"/ServiceRequest?identifier=https%3A%2F%2Fcorhealth-ontario.ca%2FNamingSystem%2Fservice-request-id|1\"\n" + + " }\n" + + " } ]\n" + + "}"; + + Bundle bundle1 = (Bundle) myFhirCtx.newJsonParser().parseResource(bundle); + Bundle duplicateBundle = (Bundle) myFhirCtx.newJsonParser().parseResource(bundle); + ourLog.error("TRANS 1"); + Bundle bundleResponse = mySystemDao.transaction(new SystemRequestDetails(), bundle1); + bundleResponse.getEntry().stream() + .forEach( entry -> { + assertThat(entry.getResponse().getStatus(), is(equalTo("201 Created"))); + }); + + IBundleProvider search = myOrganizationDao.search(new SearchParameterMap().setLoadSynchronous(true)); + assertEquals(1, search.getAllResources().size()); + + //Running the bundle again should just result in 0 new resources created, as the org should already exist, and there is no update to the SR. + ourLog.error("TRANS 2"); + bundleResponse= mySystemDao.transaction(new SystemRequestDetails(), duplicateBundle); + bundleResponse.getEntry().stream() + .forEach( entry -> { + assertThat(entry.getResponse().getStatus(), is(equalTo("200 OK"))); + }); + + search = myOrganizationDao.search(new SearchParameterMap().setLoadSynchronous(true), new SystemRequestDetails()); + assertEquals(1, search.getAllResources().size()); + } + @Test public void testIndexNoDuplicatesToken() { Patient res = new Patient(); diff --git a/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml b/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml index ac75e0d04be..36a83af6599 100644 --- a/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml +++ b/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml @@ -42,7 +42,7 @@ - + From ad6c6d67c50fff99724ae51b1115f9fb4e2e53b9 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 31 Aug 2021 10:47:23 -0400 Subject: [PATCH 027/143] Fix bug in hashToSearchMap --- .../fhir/jpa/dao/TransactionProcessor.java | 22 ++++-- .../r4/FhirResourceDaoR4SearchNoFtTest.java | 74 ++++--------------- .../duplicate-conditional-create.json | 66 +++++++++++++++++ 3 files changed, 94 insertions(+), 68 deletions(-) create mode 100644 hapi-fhir-jpaserver-base/src/test/resources/duplicate-conditional-create.json diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java index bc73ea4a623..c8e25d517e3 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java @@ -244,17 +244,21 @@ public class TransactionProcessor extends BaseTransactionProcessor { if (orPredicates.size() > 1) { cq.where(cb.or(orPredicates.toArray(EMPTY_PREDICATE_ARRAY))); - Map hashToSearchMap = buildHashToSearchMap(searchParameterMapsToResolve); + Map> hashToSearchMap = buildHashToSearchMap(searchParameterMapsToResolve); TypedQuery query = myEntityManager.createQuery(cq); List results = query.getResultList(); for (ResourceIndexedSearchParamToken nextResult : results) { - Optional matchedSearch = Optional.ofNullable(hashToSearchMap.get(nextResult.getHashSystemAndValue())); + Optional> matchedSearch = Optional.ofNullable(hashToSearchMap.get(nextResult.getHashSystemAndValue())); if (!matchedSearch.isPresent()) { matchedSearch = Optional.ofNullable(hashToSearchMap.get(nextResult.getHashValue())); } - matchedSearch.ifPresent(matchUrlToResolve -> setSearchToResolvedAndPrefetchFoundResourcePid(theTransactionDetails, idsToPreFetch, nextResult, matchUrlToResolve)); + matchedSearch.ifPresent(matchUrlsToResolve -> { + matchUrlsToResolve.forEach(matchUrl -> { + setSearchToResolvedAndPrefetchFoundResourcePid(theTransactionDetails, idsToPreFetch, nextResult, matchUrl); + }); + }); } //For each SP Map which did not return a result, tag it as not found. searchParameterMapsToResolve.stream() @@ -322,15 +326,19 @@ public class TransactionProcessor extends BaseTransactionProcessor { return hashPredicate; } - private Map buildHashToSearchMap(List searchParameterMapsToResolve) { - Map hashToSearch = new HashMap<>(); + private Map> buildHashToSearchMap(List searchParameterMapsToResolve) { + Map> hashToSearch = new HashMap<>(); //Build a lookup map so we don't have to iterate over the searches repeatedly. for (MatchUrlToResolve nextSearchParameterMap : searchParameterMapsToResolve) { if (nextSearchParameterMap.myHashSystemAndValue != null) { - hashToSearch.put(nextSearchParameterMap.myHashSystemAndValue, nextSearchParameterMap); + List matchUrlsToResolve = hashToSearch.getOrDefault(nextSearchParameterMap.myHashSystemAndValue, new ArrayList<>()); + matchUrlsToResolve.add(nextSearchParameterMap); + hashToSearch.put(nextSearchParameterMap.myHashSystemAndValue, matchUrlsToResolve); } if (nextSearchParameterMap.myHashValue!= null) { - hashToSearch.put(nextSearchParameterMap.myHashValue, nextSearchParameterMap); + List matchUrlsToResolve = hashToSearch.getOrDefault(nextSearchParameterMap.myHashValue, new ArrayList<>()); + matchUrlsToResolve.add(nextSearchParameterMap); + hashToSearch.put(nextSearchParameterMap.myHashValue, matchUrlsToResolve); } } return hashToSearch; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java index ad456ccebe7..a5707a9aa9c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java @@ -128,6 +128,7 @@ import org.hl7.fhir.r4.model.ValueSet; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; import org.mockito.ArgumentMatchers; @@ -1361,74 +1362,25 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { } @Test - public void testDuplicateConditionalCreatesOnToken() { - String bundle = "{\n" + - " \"resourceType\": \"Bundle\",\n" + - " \"type\": \"transaction\",\n" + - " \"entry\": [ {\n" + - " \"fullUrl\": \"urn:uuid:33b76421-1c91-471f-ae1c-e7486e804f18\",\n" + - " \"resource\": {\n" + - " \"resourceType\": \"Organization\",\n" + - " \"identifier\": [ {\n" + - " \"system\": \"https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-health-care-facility-id\",\n" + - " \"value\": \"3972\"\n" + - " } ]\n" + - " },\n" + - " \"request\": {\n" + - " \"method\": \"POST\",\n" + - " \"url\": \"/Organization\",\n" + - " \"ifNoneExist\": \"Organization?identifier=https%3A%2F%2Ffhir.infoway-inforoute.ca%2FNamingSystem%2Fca-on-health-care-facility-id|3972\"\n" + - " }\n" + - " }, {\n" + - " \"fullUrl\": \"urn:uuid:65d2bf18-543e-4d05-b66b-07cee541172f\",\n" + - " \"resource\": {\n" + - " \"resourceType\": \"Organization\",\n" + - " \"identifier\": [ {\n" + - " \"system\": \"https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-health-care-facility-id\",\n" + - " \"value\": \"3972\"\n" + - " } ]\n" + - " },\n" + - " \"request\": {\n" + - " \"method\": \"POST\",\n" + - " \"url\": \"/Organization\",\n" + - " \"ifNoneExist\": \"Organization?identifier=https%3A%2F%2Ffhir.infoway-inforoute.ca%2FNamingSystem%2Fca-on-health-care-facility-id|3972\"\n" + - " }\n" + - " }, {\n" + - " \"fullUrl\": \"urn:uuid:2a4635e2-e678-4ed7-9a92-901d67787434\",\n" + - " \"resource\": {\n" + - " \"resourceType\": \"ServiceRequest\",\n" + - " \"identifier\": [ {\n" + - " \"system\": \"https://corhealth-ontario.ca/NamingSystem/service-request-id\",\n" + - " \"value\": \"1\"\n" + - " } ],\n" + - " \"performer\": [ {\n" + - " \"reference\": \"urn:uuid:65d2bf18-543e-4d05-b66b-07cee541172f\",\n" + - " \"type\": \"Organization\"\n" + - " } ]\n" + - " },\n" + - " \"request\": {\n" + - " \"method\": \"PUT\",\n" + - " \"url\": \"/ServiceRequest?identifier=https%3A%2F%2Fcorhealth-ontario.ca%2FNamingSystem%2Fservice-request-id|1\"\n" + - " }\n" + - " } ]\n" + - "}"; + @DisplayName("Duplicate Conditional Creates all resolve to the same match") + public void testDuplicateConditionalCreatesOnToken() throws IOException { + String inputString = IOUtils.toString(getClass().getResourceAsStream("/duplicate-conditional-create.json"), StandardCharsets.UTF_8); + Bundle firstBundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, inputString); - Bundle bundle1 = (Bundle) myFhirCtx.newJsonParser().parseResource(bundle); - Bundle duplicateBundle = (Bundle) myFhirCtx.newJsonParser().parseResource(bundle); - ourLog.error("TRANS 1"); - Bundle bundleResponse = mySystemDao.transaction(new SystemRequestDetails(), bundle1); - bundleResponse.getEntry().stream() - .forEach( entry -> { - assertThat(entry.getResponse().getStatus(), is(equalTo("201 Created"))); - }); + //Before you ask, yes, this has to be separately parsed. The reason for this is that the parameters passed to mySystemDao.transaction are _not_ immutable, so we cannot + //simply reuse the original bundle object. + Bundle duplicateBundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, inputString); + + Bundle bundleResponse = mySystemDao.transaction(new SystemRequestDetails(), firstBundle); + bundleResponse.getEntry() + .forEach( entry -> assertThat(entry.getResponse().getStatus(), is(equalTo("201 Created")))); IBundleProvider search = myOrganizationDao.search(new SearchParameterMap().setLoadSynchronous(true)); assertEquals(1, search.getAllResources().size()); //Running the bundle again should just result in 0 new resources created, as the org should already exist, and there is no update to the SR. - ourLog.error("TRANS 2"); bundleResponse= mySystemDao.transaction(new SystemRequestDetails(), duplicateBundle); - bundleResponse.getEntry().stream() + bundleResponse.getEntry() .forEach( entry -> { assertThat(entry.getResponse().getStatus(), is(equalTo("200 OK"))); }); diff --git a/hapi-fhir-jpaserver-base/src/test/resources/duplicate-conditional-create.json b/hapi-fhir-jpaserver-base/src/test/resources/duplicate-conditional-create.json new file mode 100644 index 00000000000..26ea0369f1f --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/resources/duplicate-conditional-create.json @@ -0,0 +1,66 @@ +{ + "resourceType": "Bundle", + "type": "transaction", + "entry": [ + { + "fullUrl": "urn:uuid:4cd35592-5d4d-462b-8483-e404c023d316", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.tester.ca/NamingSystem/ca-on-health-care-facility-id", + "value": "3972" + } + ] + }, + "request": { + "method": "POST", + "url": "/Organization", + "ifNoneExist": "Organization?identifier=https://fhir.tester.ca/NamingSystem/ca-on-health-care-facility-id|3972" + } + }, + { + "fullUrl": "urn:uuid:02643c1d-94d1-4991-a063-036fa0f57ec2", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.tester.ca/NamingSystem/ca-on-health-care-facility-id", + "value": "3972" + } + ] + }, + "request": { + "method": "POST", + "url": "/Organization", + "ifNoneExist": "Organization?identifier=https://fhir.tester.ca/NamingSystem/ca-on-health-care-facility-id|3972" + } + }, + { + "fullUrl": "urn:uuid:8271e94f-e08b-498e-ad6d-751928c3ff99", + "resource": { + "resourceType": "ServiceRequest", + "identifier": [ + { + "system": "https://fhir-tester.ca/NamingSystem/service-request-id", + "value": "1" + } + ], + "performer": [ + { + "reference": "urn:uuid:4cd35592-5d4d-462b-8483-e404c023d316", + "type": "Organization" + }, + { + "reference": "urn:uuid:02643c1d-94d1-4991-a063-036fa0f57ec2", + "type": "Organization" + } + ] + }, + "request": { + "method": "PUT", + "url": "/ServiceRequest?identifier=https://fhir-tester.ca/NamingSystem/service-request-id|1" + } + } + ] +} From 7fc6a2f16b5ad7dc7b96a23024962d58f978edee Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 31 Aug 2021 10:53:14 -0400 Subject: [PATCH 028/143] Add changelog --- .../changelog/5_6_0/2933-fix-double-conditional-create.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2933-fix-double-conditional-create.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2933-fix-double-conditional-create.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2933-fix-double-conditional-create.yaml new file mode 100644 index 00000000000..49727c0125c --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2933-fix-double-conditional-create.yaml @@ -0,0 +1,6 @@ +--- +type: add +issue: 2933 +jira: SMILE-3056 +title: "Fixed a regression which causes transactions with multiple identical ifNoneExist clauses to create duplicate data." + From dd5c4525f3511e4fcff5d64ac702f645aaacc073 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 31 Aug 2021 10:56:31 -0400 Subject: [PATCH 029/143] Revert logging --- hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml b/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml index 36a83af6599..ac75e0d04be 100644 --- a/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml +++ b/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml @@ -42,7 +42,7 @@ - + From 993b2a2f476fdb5b2bec00edb6561304923515f0 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 31 Aug 2021 11:41:17 -0400 Subject: [PATCH 030/143] Backport changelog --- .../fhir/changelog/5_6_0/2933-fix-double-conditional-create.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2933-fix-double-conditional-create.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2933-fix-double-conditional-create.yaml index 49727c0125c..b43658c202a 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2933-fix-double-conditional-create.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2933-fix-double-conditional-create.yaml @@ -1,6 +1,7 @@ --- type: add issue: 2933 +backport: 5.5.1 jira: SMILE-3056 title: "Fixed a regression which causes transactions with multiple identical ifNoneExist clauses to create duplicate data." From 87986d3da8a10011c883b8efd6fe3cc2cf47d7db Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 31 Aug 2021 11:42:26 -0400 Subject: [PATCH 031/143] Add versionenum --- hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionEnum.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionEnum.java index 207b072cc96..bae45ce7a0f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionEnum.java @@ -75,6 +75,7 @@ public enum VersionEnum { V5_4_1, V5_4_2, V5_5_0, + V5_5_1, ; From e1272a3825d5595bfe7d0ac393a872382ef14230 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 31 Aug 2021 11:43:17 -0400 Subject: [PATCH 032/143] Bump version of HAPI-FHIR --- hapi-deployable-pom/pom.xml | 2 +- hapi-fhir-android/pom.xml | 2 +- hapi-fhir-base/pom.xml | 2 +- hapi-fhir-bom/pom.xml | 4 ++-- hapi-fhir-cli/hapi-fhir-cli-api/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-app/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml | 2 +- hapi-fhir-cli/pom.xml | 2 +- hapi-fhir-client-okhttp/pom.xml | 2 +- hapi-fhir-client/pom.xml | 2 +- hapi-fhir-converter/pom.xml | 2 +- hapi-fhir-dist/pom.xml | 2 +- hapi-fhir-docs/pom.xml | 2 +- hapi-fhir-jacoco/pom.xml | 2 +- hapi-fhir-jaxrsserver-base/pom.xml | 2 +- hapi-fhir-jaxrsserver-example/pom.xml | 2 +- hapi-fhir-jpaserver-api/pom.xml | 2 +- hapi-fhir-jpaserver-base/pom.xml | 2 +- hapi-fhir-jpaserver-batch/pom.xml | 2 +- hapi-fhir-jpaserver-cql/pom.xml | 2 +- hapi-fhir-jpaserver-mdm/pom.xml | 2 +- hapi-fhir-jpaserver-migrate/pom.xml | 2 +- hapi-fhir-jpaserver-model/pom.xml | 2 +- hapi-fhir-jpaserver-searchparam/pom.xml | 2 +- hapi-fhir-jpaserver-subscription/pom.xml | 2 +- hapi-fhir-jpaserver-test-utilities/pom.xml | 2 +- hapi-fhir-jpaserver-uhnfhirtest/pom.xml | 2 +- hapi-fhir-server-mdm/pom.xml | 2 +- hapi-fhir-server-openapi/pom.xml | 2 +- hapi-fhir-server/pom.xml | 2 +- .../hapi-fhir-spring-boot-autoconfigure/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../hapi-fhir-spring-boot-samples/pom.xml | 2 +- .../hapi-fhir-spring-boot-starter/pom.xml | 2 +- hapi-fhir-spring-boot/pom.xml | 2 +- hapi-fhir-structures-dstu2.1/pom.xml | 2 +- hapi-fhir-structures-dstu2/pom.xml | 2 +- hapi-fhir-structures-dstu3/pom.xml | 2 +- hapi-fhir-structures-hl7org-dstu2/pom.xml | 2 +- hapi-fhir-structures-r4/pom.xml | 2 +- hapi-fhir-structures-r5/pom.xml | 2 +- hapi-fhir-test-utilities/pom.xml | 2 +- hapi-fhir-testpage-overlay/pom.xml | 2 +- hapi-fhir-validation-resources-dstu2.1/pom.xml | 2 +- hapi-fhir-validation-resources-dstu2/pom.xml | 2 +- hapi-fhir-validation-resources-dstu3/pom.xml | 2 +- hapi-fhir-validation-resources-r4/pom.xml | 2 +- hapi-fhir-validation-resources-r5/pom.xml | 2 +- hapi-fhir-validation/pom.xml | 2 +- hapi-tinder-plugin/pom.xml | 16 ++++++++-------- hapi-tinder-test/pom.xml | 2 +- pom.xml | 2 +- restful-server-example/pom.xml | 2 +- .../pom.xml | 2 +- tests/hapi-fhir-base-test-mindeps-client/pom.xml | 2 +- tests/hapi-fhir-base-test-mindeps-server/pom.xml | 2 +- 58 files changed, 66 insertions(+), 66 deletions(-) diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index 5bef19e912c..ac605f553a1 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0 + 5.5.1 ../pom.xml diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index f71644c24d5..175bec82ea9 100644 --- a/hapi-fhir-android/pom.xml +++ b/hapi-fhir-android/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index 3593d59fc1e..eb519e5ac01 100644 --- a/hapi-fhir-base/pom.xml +++ b/hapi-fhir-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml index 5d141ed0870..2dec6d925fa 100644 --- a/hapi-fhir-bom/pom.xml +++ b/hapi-fhir-bom/pom.xml @@ -3,14 +3,14 @@ 4.0.0 ca.uhn.hapi.fhir hapi-fhir-bom - 5.5.0 + 5.5.1 pom HAPI FHIR BOM ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml index d55491e16a3..764bffdc649 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml index 9b9c776ddaa..c2398c507e7 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir-cli - 5.5.0 + 5.5.1 ../pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml index 337b6c2fa01..1d64ca375a8 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../../hapi-deployable-pom diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml index 515c86524f8..98d960582ab 100644 --- a/hapi-fhir-cli/pom.xml +++ b/hapi-fhir-cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0 + 5.5.1 ../pom.xml diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml index 849be33ec18..c0cb5b02945 100644 --- a/hapi-fhir-client-okhttp/pom.xml +++ b/hapi-fhir-client-okhttp/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml index 4c3f41cdbd4..ef78ddc3625 100644 --- a/hapi-fhir-client/pom.xml +++ b/hapi-fhir-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml index 89b9a18563d..bd66c15803c 100644 --- a/hapi-fhir-converter/pom.xml +++ b/hapi-fhir-converter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml index 85f5bf0f678..ecb02449845 100644 --- a/hapi-fhir-dist/pom.xml +++ b/hapi-fhir-dist/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0 + 5.5.1 ../pom.xml diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml index a6221bc215d..2aeedf71e57 100644 --- a/hapi-fhir-docs/pom.xml +++ b/hapi-fhir-docs/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml index ab6ca7747ab..be5c8924dd7 100644 --- a/hapi-fhir-jacoco/pom.xml +++ b/hapi-fhir-jacoco/pom.xml @@ -11,7 +11,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml index 2aa5e750a1c..347a602d24a 100644 --- a/hapi-fhir-jaxrsserver-base/pom.xml +++ b/hapi-fhir-jaxrsserver-base/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-example/pom.xml b/hapi-fhir-jaxrsserver-example/pom.xml index a639f589b29..698604938f3 100644 --- a/hapi-fhir-jaxrsserver-example/pom.xml +++ b/hapi-fhir-jaxrsserver-example/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0 + 5.5.1 ../pom.xml diff --git a/hapi-fhir-jpaserver-api/pom.xml b/hapi-fhir-jpaserver-api/pom.xml index 9d293f09528..59b52688143 100644 --- a/hapi-fhir-jpaserver-api/pom.xml +++ b/hapi-fhir-jpaserver-api/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index 7803c8a05cb..b9e24140cc4 100644 --- a/hapi-fhir-jpaserver-base/pom.xml +++ b/hapi-fhir-jpaserver-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-batch/pom.xml b/hapi-fhir-jpaserver-batch/pom.xml index 0d18f5ec19b..82d781a6fc4 100644 --- a/hapi-fhir-jpaserver-batch/pom.xml +++ b/hapi-fhir-jpaserver-batch/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-cql/pom.xml b/hapi-fhir-jpaserver-cql/pom.xml index ad5a613caba..107cec959e5 100644 --- a/hapi-fhir-jpaserver-cql/pom.xml +++ b/hapi-fhir-jpaserver-cql/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml index 7501c1d3a99..1b6ab5e2eb0 100644 --- a/hapi-fhir-jpaserver-mdm/pom.xml +++ b/hapi-fhir-jpaserver-mdm/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-migrate/pom.xml b/hapi-fhir-jpaserver-migrate/pom.xml index 02e0f784b95..19d94aa41b7 100644 --- a/hapi-fhir-jpaserver-migrate/pom.xml +++ b/hapi-fhir-jpaserver-migrate/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml index 4611dfa87a4..40eebae0685 100644 --- a/hapi-fhir-jpaserver-model/pom.xml +++ b/hapi-fhir-jpaserver-model/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml index d54b133f41b..1a14b581c43 100755 --- a/hapi-fhir-jpaserver-searchparam/pom.xml +++ b/hapi-fhir-jpaserver-searchparam/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml index 6b9c1acbd99..9d068148864 100644 --- a/hapi-fhir-jpaserver-subscription/pom.xml +++ b/hapi-fhir-jpaserver-subscription/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml index 920aa9fc564..0a28c161578 100644 --- a/hapi-fhir-jpaserver-test-utilities/pom.xml +++ b/hapi-fhir-jpaserver-test-utilities/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index 4e59cf3d3a4..487db101f6f 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0 + 5.5.1 ../pom.xml diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml index a6bc599a030..90638114fef 100644 --- a/hapi-fhir-server-mdm/pom.xml +++ b/hapi-fhir-server-mdm/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml index e15d3fc4ee2..e6b970796a4 100644 --- a/hapi-fhir-server-openapi/pom.xml +++ b/hapi-fhir-server-openapi/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml index 39fc59b2e28..1b95ea31b85 100644 --- a/hapi-fhir-server/pom.xml +++ b/hapi-fhir-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml index b6d98eca624..ae9164f5b74 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml index 0b3d030206c..378ea6e0032 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 5.5.0 + 5.5.1 hapi-fhir-spring-boot-sample-client-apache diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml index 1328c2189ff..34f2462191e 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 5.5.0 + 5.5.1 hapi-fhir-spring-boot-sample-client-okhttp diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml index 04d3deefcec..b776bc747ef 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 5.5.0 + 5.5.1 hapi-fhir-spring-boot-sample-server-jersey diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml index 74ecf61c270..aae25dfdc2d 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot - 5.5.0 + 5.5.1 hapi-fhir-spring-boot-samples diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml index d49dd34a8ea..b5882277d6e 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml index 06983de95d6..be4dc5c5b0a 100644 --- a/hapi-fhir-spring-boot/pom.xml +++ b/hapi-fhir-spring-boot/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0 + 5.5.1 ../pom.xml diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml index d89a0a8fcf7..354d81c4513 100644 --- a/hapi-fhir-structures-dstu2.1/pom.xml +++ b/hapi-fhir-structures-dstu2.1/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml index 0abf455f1e8..b7835b38512 100644 --- a/hapi-fhir-structures-dstu2/pom.xml +++ b/hapi-fhir-structures-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml index 8ebb5c5395d..e6f417f2276 100644 --- a/hapi-fhir-structures-dstu3/pom.xml +++ b/hapi-fhir-structures-dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml index 363ca7cfc54..082b47cf53a 100644 --- a/hapi-fhir-structures-hl7org-dstu2/pom.xml +++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml index 98d9be6d55b..02ee1e5ad68 100644 --- a/hapi-fhir-structures-r4/pom.xml +++ b/hapi-fhir-structures-r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml index b38fddd471d..34ed9894948 100644 --- a/hapi-fhir-structures-r5/pom.xml +++ b/hapi-fhir-structures-r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml index 6db6e12abae..3f7fccbd1c3 100644 --- a/hapi-fhir-test-utilities/pom.xml +++ b/hapi-fhir-test-utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml index 2c53f7b8c3e..494814e6276 100644 --- a/hapi-fhir-testpage-overlay/pom.xml +++ b/hapi-fhir-testpage-overlay/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0 + 5.5.1 ../pom.xml diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml index eaa98985cea..6e31ef2d9a0 100644 --- a/hapi-fhir-validation-resources-dstu2.1/pom.xml +++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml index 718f1cfeb50..ae9d4ae1c82 100644 --- a/hapi-fhir-validation-resources-dstu2/pom.xml +++ b/hapi-fhir-validation-resources-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml index 040d2f10a1d..1e89972c466 100644 --- a/hapi-fhir-validation-resources-dstu3/pom.xml +++ b/hapi-fhir-validation-resources-dstu3/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml index ca4fc60e376..0134800541e 100644 --- a/hapi-fhir-validation-resources-r4/pom.xml +++ b/hapi-fhir-validation-resources-r4/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml index 389b0eee6d4..1ea695712f5 100644 --- a/hapi-fhir-validation-resources-r5/pom.xml +++ b/hapi-fhir-validation-resources-r5/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml index 056d1f2f158..22049b95f48 100644 --- a/hapi-fhir-validation/pom.xml +++ b/hapi-fhir-validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0 + 5.5.1 ../hapi-deployable-pom/pom.xml diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml index cf307f2497e..a3f5635977e 100644 --- a/hapi-tinder-plugin/pom.xml +++ b/hapi-tinder-plugin/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0 + 5.5.1 ../pom.xml @@ -58,37 +58,37 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu3 - 5.5.0 + 5.5.1 ca.uhn.hapi.fhir hapi-fhir-structures-hl7org-dstu2 - 5.5.0 + 5.5.1 ca.uhn.hapi.fhir hapi-fhir-structures-r4 - 5.5.0 + 5.5.1 ca.uhn.hapi.fhir hapi-fhir-structures-r5 - 5.5.0 + 5.5.1 ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu2 - 5.5.0 + 5.5.1 ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu3 - 5.5.0 + 5.5.1 ca.uhn.hapi.fhir hapi-fhir-validation-resources-r4 - 5.5.0 + 5.5.1 org.apache.velocity diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml index 53b48277dea..cee673c6deb 100644 --- a/hapi-tinder-test/pom.xml +++ b/hapi-tinder-test/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0 + 5.5.1 ../pom.xml diff --git a/pom.xml b/pom.xml index 2428e886f62..3753100ca69 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir pom - 5.5.0 + 5.5.1 HAPI-FHIR An open-source implementation of the FHIR specification in Java. https://hapifhir.io diff --git a/restful-server-example/pom.xml b/restful-server-example/pom.xml index da11b4ab4cf..09520df3ba4 100644 --- a/restful-server-example/pom.xml +++ b/restful-server-example/pom.xml @@ -8,7 +8,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0 + 5.5.1 ../pom.xml diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml index cb1f01a0026..030aefd2b54 100644 --- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml +++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0 + 5.5.1 ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml index f748df5ff68..8245677d071 100644 --- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0 + 5.5.1 ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml index 9a78104a2bf..33ff24cab3d 100644 --- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0 + 5.5.1 ../../pom.xml From ef4adda5274a96f81485ee9da7d8403b39cf2a7c Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Tue, 31 Aug 2021 14:53:05 -0400 Subject: [PATCH 033/143] failing tests --- .../java/ca/uhn/fhir/jpa/util/SqlQuery.java | 5 +- .../r4/ResourceProviderR4SearchTest.java | 184 ++++++++++++++++++ 2 files changed, 188 insertions(+), 1 deletion(-) create mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SqlQuery.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SqlQuery.java index 1b70580aa20..d2221bd8eec 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SqlQuery.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SqlQuery.java @@ -126,5 +126,8 @@ public class SqlQuery { } - + @Override + public String toString() { + return getSql(true, true); + } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java new file mode 100644 index 00000000000..fa3c54f7d85 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java @@ -0,0 +1,184 @@ +package ca.uhn.fhir.jpa.provider.r4; + +import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.dao.r4.BaseJpaR4Test; +import ca.uhn.fhir.jpa.model.entity.ModelConfig; +import ca.uhn.fhir.jpa.searchparam.MatchUrlService; +import ca.uhn.fhir.jpa.searchparam.ResourceSearch; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.parser.StrictErrorHandler; +import ca.uhn.fhir.rest.api.server.IBundleProvider; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Organization; +import org.hl7.fhir.r4.model.Patient; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.contains; +import static org.junit.jupiter.api.Assertions.assertEquals; + + +public class ResourceProviderR4SearchTest extends BaseJpaR4Test { + + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceProviderR4SearchTest.class); + + @Autowired + MatchUrlService myMatchUrlService; + + @AfterEach + public void after() throws Exception { + + myDaoConfig.setAllowMultipleDelete(new DaoConfig().isAllowMultipleDelete()); + myDaoConfig.setAllowExternalReferences(new DaoConfig().isAllowExternalReferences()); + myDaoConfig.setReuseCachedSearchResultsForMillis(new DaoConfig().getReuseCachedSearchResultsForMillis()); + myDaoConfig.setCountSearchResultsUpTo(new DaoConfig().getCountSearchResultsUpTo()); + myDaoConfig.setSearchPreFetchThresholds(new DaoConfig().getSearchPreFetchThresholds()); + myDaoConfig.setAllowContainsSearches(new DaoConfig().isAllowContainsSearches()); + myDaoConfig.setIndexMissingFields(new DaoConfig().getIndexMissingFields()); + + myModelConfig.setIndexOnContainedResources(false); + myModelConfig.setIndexOnContainedResources(new ModelConfig().isIndexOnContainedResources()); + } + + @BeforeEach + public void before() throws Exception { + myFhirCtx.setParserErrorHandler(new StrictErrorHandler()); + + myDaoConfig.setAllowMultipleDelete(true); + myDaoConfig.setSearchPreFetchThresholds(new DaoConfig().getSearchPreFetchThresholds()); + myModelConfig.setIndexOnContainedResources(true); + myDaoConfig.setReuseCachedSearchResultsForMillis(null); + } + + @Test + public void testAllResourcesStandAlone() throws Exception { + + // setup + IIdType oid1; + + { + Organization org = new Organization(); + org.setId(IdType.newRandomUuid()); + org.setName("HealthCo"); + myOrganizationDao.create(org, mySrd); + + Patient p = new Patient(); + p.setId(IdType.newRandomUuid()); + p.addName().setFamily("Smith").addGiven("John"); + p.getManagingOrganization().setReference(org.getId()); + myPatientDao.create(p, mySrd); + + Observation obs = new Observation(); + obs.getCode().setText("Observation 1"); + obs.getSubject().setReference(p.getId()); + + oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); + + ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); + } + + String url = "/Observation?subject.organization.name=HealthCo"; + + // execute + myCaptureQueriesListener.clear(); + List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); + ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + + // validate + assertEquals(1L, oids.size()); + assertThat(oids, contains(oid1.getIdPart())); + } + + @Test + public void testContainedResourceAtTheEndOfTheChain() throws Exception { + // This is the case that is most relevant to SMILE-2899 + IIdType oid1; + + { + Organization org = new Organization(); + org.setId("org"); + org.setName("HealthCo"); + + Patient p = new Patient(); + p.setId(IdType.newRandomUuid()); + p.getContained().add(org); + p.addName().setFamily("Smith").addGiven("John"); + p.getManagingOrganization().setReference("#org"); + myPatientDao.create(p, mySrd); + + Observation obs = new Observation(); + obs.getCode().setText("Observation 1"); + obs.getSubject().setReference(p.getId()); + + oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); + + ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); + } + + String url = "/Observation?subject.organization.name=HealthCo"; + myCaptureQueriesListener.clear(); + List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); + ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + + assertEquals(1L, oids.size()); + assertThat(oids, contains(oid1.getIdPart())); + } + + @Test + public void testContainedResourceAtTheBeginningOfTheChain() throws Exception { + // This case seems like it would be less frequent in production, but we don't want to + // paint ourselves into a corner where we require the contained link to be the last + // one in the chain + + IIdType oid1; + + { + Organization org = new Organization(); + org.setId(IdType.newRandomUuid()); + org.setName("HealthCo"); + myOrganizationDao.create(org, mySrd); + + Patient p = new Patient(); + p.setId("pat"); + p.addName().setFamily("Smith").addGiven("John"); + p.getManagingOrganization().setReference(org.getId()); + + Observation obs = new Observation(); + obs.getContained().add(p); + obs.getCode().setText("Observation 1"); + obs.getSubject().setReference("#pat"); + + oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); + + ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); + } + + String url = "/Observation?subject.organization.name=HealthCo"; + myCaptureQueriesListener.clear(); + List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); + ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + + assertEquals(1L, oids.size()); + assertThat(oids, contains(oid1.getIdPart())); + } + + private List searchAndReturnUnqualifiedVersionlessIdValues(String theUrl) throws IOException { + List ids = new ArrayList<>(); + + ResourceSearch search = myMatchUrlService.getResourceSearch(theUrl); + SearchParameterMap map = search.getSearchParameterMap(); + map.setLoadSynchronous(true); + IBundleProvider result = myObservationDao.search(map); + return result.getAllResourceIds(); + } + +} From c1dc34265992efaf3aa5d2e2608ed93a70c1eb07 Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Tue, 31 Aug 2021 15:06:51 -0400 Subject: [PATCH 034/143] more logs --- .../r4/ChainedContainedR4SearchTest.java} | 7 ++--- .../r4/FhirResourceDaoR4ContainedTest.java | 29 +++++++++---------- 2 files changed, 17 insertions(+), 19 deletions(-) rename hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/{provider/r4/ResourceProviderR4SearchTest.java => dao/r4/ChainedContainedR4SearchTest.java} (96%) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java similarity index 96% rename from hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java rename to hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java index fa3c54f7d85..0c73197bdcd 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java @@ -1,7 +1,6 @@ -package ca.uhn.fhir.jpa.provider.r4; +package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.jpa.api.config.DaoConfig; -import ca.uhn.fhir.jpa.dao.r4.BaseJpaR4Test; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.searchparam.MatchUrlService; import ca.uhn.fhir.jpa.searchparam.ResourceSearch; @@ -27,9 +26,9 @@ import static org.hamcrest.Matchers.contains; import static org.junit.jupiter.api.Assertions.assertEquals; -public class ResourceProviderR4SearchTest extends BaseJpaR4Test { +public class ChainedContainedR4SearchTest extends BaseJpaR4Test { - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceProviderR4SearchTest.class); + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ChainedContainedR4SearchTest.class); @Autowired MatchUrlService myMatchUrlService; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ContainedTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ContainedTest.java index d5c3ffb9ba9..2074f5ab126 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ContainedTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ContainedTest.java @@ -1,10 +1,10 @@ package ca.uhn.fhir.jpa.dao.r4; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.containsInAnyOrder; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.fail; - +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.api.SearchContainedModeEnum; +import ca.uhn.fhir.rest.api.server.IBundleProvider; +import ca.uhn.fhir.rest.param.ReferenceParam; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Address; import org.hl7.fhir.r4.model.Address.AddressUse; @@ -26,15 +26,13 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import ca.uhn.fhir.rest.api.SearchContainedModeEnum; -import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; -import ca.uhn.fhir.rest.api.server.IBundleProvider; -import ca.uhn.fhir.rest.param.ReferenceParam; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; - -import java.util.stream.Collector; import java.util.stream.Collectors; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + public class FhirResourceDaoR4ContainedTest extends BaseJpaR4Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4ContainedTest.class); @@ -80,7 +78,6 @@ public class FhirResourceDaoR4ContainedTest extends BaseJpaR4Test { map = new SearchParameterMap(); map.add("subject", new ReferenceParam("name", "Smith")); map.setSearchContainedMode(SearchContainedModeEnum.TRUE); - assertThat(toUnqualifiedVersionlessIdValues(myObservationDao.search(map)), containsInAnyOrder(toValues(id))); } @@ -110,14 +107,16 @@ public class FhirResourceDaoR4ContainedTest extends BaseJpaR4Test { .getSingleResult(); assertEquals(1L, i.longValue()); }); - + SearchParameterMap map; map = new SearchParameterMap(); map.add("subject", new ReferenceParam("name", "Smith")); map.setSearchContainedMode(SearchContainedModeEnum.TRUE); - + map.setLoadSynchronous(true); + myCaptureQueriesListener.clear(); assertThat(toUnqualifiedVersionlessIdValues(myObservationDao.search(map)), containsInAnyOrder(toValues(id))); + ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); } From a1fbeeacaa710cc2bf6bbb457425cf7989f0e7ca Mon Sep 17 00:00:00 2001 From: katie_smilecdr Date: Tue, 31 Aug 2021 15:11:06 -0400 Subject: [PATCH 035/143] [2935] Escape "%" in like expression --- ...935-Search-with-trailing-percent-sign.yaml | 5 +++ .../predicate/StringPredicateBuilder.java | 6 ++-- .../provider/r4/ResourceProviderR4Test.java | 32 ++++++++++++++++++- 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2935-Search-with-trailing-percent-sign.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2935-Search-with-trailing-percent-sign.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2935-Search-with-trailing-percent-sign.yaml new file mode 100644 index 00000000000..5c99ab10b71 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2935-Search-with-trailing-percent-sign.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 2935 +jira: SMILE-3022 +title: "No resource returned when search with percent sign. Problem is now fixed" diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/StringPredicateBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/StringPredicateBuilder.java index 88fd7cdae18..bc5b9a4c891 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/StringPredicateBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/StringPredicateBuilder.java @@ -225,15 +225,15 @@ public class StringPredicateBuilder extends BaseSearchParamPredicateBuilder { } public static String createLeftAndRightMatchLikeExpression(String likeExpression) { - return "%" + likeExpression.replace("%", "[%]") + "%"; + return "%" + likeExpression.replace("%", "\\%") + "%"; } public static String createLeftMatchLikeExpression(String likeExpression) { - return likeExpression.replace("%", "[%]") + "%"; + return likeExpression.replace("%", "\\%") + "%"; } public static String createRightMatchLikeExpression(String likeExpression) { - return "%" + likeExpression.replace("%", "[%]"); + return "%" + likeExpression.replace("%", "\\%"); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java index 73233bd5e84..b939c4b1536 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java @@ -295,7 +295,6 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { myCaptureQueriesListener.logSelectQueries(); } - @Test public void testSearchWithContainsLowerCase() { myDaoConfig.setAllowContainsSearches(true); @@ -333,6 +332,37 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { } + @Test + public void testSearchWithPercentSign() { + myDaoConfig.setAllowContainsSearches(true); + + Patient pt1 = new Patient(); + pt1.addName().setFamily("Smith%"); + String pt1id = myPatientDao.create(pt1).getId().toUnqualifiedVersionless().getValue(); + + Bundle output = myClient + .search() + .forResource("Patient") + .where(Patient.NAME.contains().value("Smith%")) + .returnBundle(Bundle.class) + .execute(); + List ids = output.getEntry().stream().map(t -> t.getResource().getIdElement().toUnqualifiedVersionless().getValue()).collect(Collectors.toList()); + assertThat(ids, containsInAnyOrder(pt1id)); + + Patient pt2 = new Patient(); + pt2.addName().setFamily("Sm%ith"); + String pt2id = myPatientDao.create(pt2).getId().toUnqualifiedVersionless().getValue(); + + output = myClient + .search() + .forResource("Patient") + .where(Patient.NAME.contains().value("Sm%ith")) + .returnBundle(Bundle.class) + .execute(); + ids = output.getEntry().stream().map(t -> t.getResource().getIdElement().toUnqualifiedVersionless().getValue()).collect(Collectors.toList()); + assertThat(ids, containsInAnyOrder(pt2id)); + } + @Test public void testSearchWithDateInvalid() throws IOException { HttpGet get = new HttpGet(ourServerBase + "/Condition?onset-date=junk"); From 44b0d3e9e77ac77f5019ab63c02cee646a69fff9 Mon Sep 17 00:00:00 2001 From: Frank Tao <38163583+frankjtao@users.noreply.github.com> Date: Tue, 31 Aug 2021 18:18:40 -0400 Subject: [PATCH 036/143] Fixed $lookup with displayLanguage caching issue (#2932) * Fixed $lookup with displayLanguage caching issue * Added changelog and optimized the test cases --- ...2-lookup-display-language-cache-issue.yaml | 5 + .../fhir/jpa/term/BaseTermReadSvcImpl.java | 2 +- ...ceProviderR4CodeSystemDesignationTest.java | 196 ++++++++++++------ .../support/CachingValidationSupport.java | 2 +- 4 files changed, 142 insertions(+), 63 deletions(-) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2932-lookup-display-language-cache-issue.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2932-lookup-display-language-cache-issue.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2932-lookup-display-language-cache-issue.yaml new file mode 100644 index 00000000000..d966668766f --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2932-lookup-display-language-cache-issue.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 2923 +title: "$lookup operation cache was based on system and code, it becomes a defect + after adding displayLanguage support. Problem is now fixed." diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseTermReadSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseTermReadSvcImpl.java index 3c79196b2ef..a66bf88efe9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseTermReadSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseTermReadSvcImpl.java @@ -2005,9 +2005,9 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc { result.setCodeDisplay(code.getDisplay()); for (TermConceptDesignation next : code.getDesignations()) { - IValidationSupport.ConceptDesignation designation = new IValidationSupport.ConceptDesignation(); // filter out the designation based on displayLanguage if any if (isDisplayLanguageMatch(theDisplayLanguage, next.getLanguage())) { + IValidationSupport.ConceptDesignation designation = new IValidationSupport.ConceptDesignation(); designation.setLanguage(next.getLanguage()); designation.setUseSystem(next.getUseSystem()); designation.setUseCode(next.getUseCode()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CodeSystemDesignationTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CodeSystemDesignationTest.java index 0d9c5eedf27..5f53a3afcd9 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CodeSystemDesignationTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CodeSystemDesignationTest.java @@ -45,33 +45,15 @@ public class ResourceProviderR4CodeSystemDesignationTest extends BaseResourcePro String resp = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam); ourLog.info(resp); - + //-- The designations should have de-AT and default language List parameterList = respParam.getParameter(); + + verifyParameterList(parameterList); List designationList = getDesignations(parameterList); - - assertEquals("display", respParam.getParameter().get(0).getName()); - assertEquals(("Systolic blood pressure 12 hour minimum"), ((StringType) respParam.getParameter().get(0).getValue()).getValue()); - - assertEquals("abstract", respParam.getParameter().get(1).getName()); - assertEquals(false, ((BooleanType) respParam.getParameter().get(1).getValue()).getValue()); - - //-- designationList - assertEquals(2, designationList.size()); - - // 1. de-AT:Systolic blood pressure 12 hour minimum - ParametersParameterComponent designation = designationList.get(0); - assertEquals("language", designation.getPart().get(0).getName()); - assertEquals("de-AT", designation.getPart().get(0).getValue().toString()); - assertEquals("value", designation.getPart().get(2).getName()); - assertEquals("de-AT:Systolic blood pressure 12 hour minimum", designation.getPart().get(2).getValue().toString()); - - // 2. Systolic blood pressure 12 hour minimum (no language) - designation = designationList.get(1); - assertEquals("language", designation.getPart().get(0).getName()); - assertNull(designation.getPart().get(0).getValue()); - assertEquals("value", designation.getPart().get(2).getName()); - assertEquals("Systolic blood pressure 12 hour minimum", designation.getPart().get(2).getValue().toString()); - + // should be de-AT and default + assertEquals(2, designationList.size()); + verifyDesignationDeAT(designationList.get(0)); + verifyDesignationNoLanguage(designationList.get(1)); } @@ -89,25 +71,14 @@ public class ResourceProviderR4CodeSystemDesignationTest extends BaseResourcePro String resp = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam); ourLog.info(resp); - + //-- The designations should have default language only List parameterList = respParam.getParameter(); + + verifyParameterList(parameterList); List designationList = getDesignations(parameterList); - - assertEquals("display", respParam.getParameter().get(0).getName()); - assertEquals(("Systolic blood pressure 12 hour minimum"), ((StringType) respParam.getParameter().get(0).getValue()).getValue()); - - assertEquals("abstract", respParam.getParameter().get(1).getName()); - assertEquals(false, ((BooleanType) respParam.getParameter().get(1).getValue()).getValue()); - - //-- designationList - assertEquals(1, designationList.size()); - - // 1. Systolic blood pressure 12 hour minimum (no language) - ParametersParameterComponent designation = designationList.get(0); - assertEquals("language", designation.getPart().get(0).getName()); - assertNull(designation.getPart().get(0).getValue()); - assertEquals("value", designation.getPart().get(2).getName()); - assertEquals("Systolic blood pressure 12 hour minimum", designation.getPart().get(2).getValue().toString()); + // should be default only + assertEquals(1, designationList.size()); + verifyDesignationNoLanguage(designationList.get(0)); } @@ -124,41 +95,145 @@ public class ResourceProviderR4CodeSystemDesignationTest extends BaseResourcePro String resp = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam); ourLog.info(resp); - + //-- The designations should have all languages and the default language List parameterList = respParam.getParameter(); + + verifyParameterList(parameterList); List designationList = getDesignations(parameterList); - - assertEquals("display", respParam.getParameter().get(0).getName()); - assertEquals(("Systolic blood pressure 12 hour minimum"), ((StringType) respParam.getParameter().get(0).getValue()).getValue()); - - assertEquals("abstract", respParam.getParameter().get(1).getName()); - assertEquals(false, ((BooleanType) respParam.getParameter().get(1).getValue()).getValue()); + // designation should be fr-FR, De-AT and default + assertEquals(3, designationList.size()); + verifyDesignationfrFR(designationList.get(0)); + verifyDesignationDeAT(designationList.get(1)); + verifyDesignationNoLanguage(designationList.get(2)); - //-- designationList - assertEquals(3, designationList.size()); + } + + @Test + public void testLookupWithDisplayLanguageCaching() { - // 1. fr-FR:Systolic blood pressure 12 hour minimum - ParametersParameterComponent designation = designationList.get(0); + //-- first call with de-AT + Parameters respParam = myClient + .operation() + .onType(CodeSystem.class) + .named("lookup") + .withParameter(Parameters.class, "code", new CodeType("8494-7")) + .andParameter("system", new UriType(CS_ACME_URL)) + .andParameter("displayLanguage",new CodeType("de-AT")) + .execute(); + + String resp = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam); + ourLog.info(resp); + + //-- The designations should have de-AT and default language + List parameterList = respParam.getParameter(); + + verifyParameterList(parameterList); + List designationList = getDesignations(parameterList); + // should be de-AT and default + assertEquals(2, designationList.size()); + verifyDesignationDeAT(designationList.get(0)); + verifyDesignationNoLanguage(designationList.get(1)); + + //-- second call with zh-CN (not-exist) + respParam = myClient + .operation() + .onType(CodeSystem.class) + .named("lookup") + .withParameter(Parameters.class, "code", new CodeType("8494-7")) + .andParameter("system", new UriType(CS_ACME_URL)) + .andParameter("displayLanguage",new CodeType("zh-CN")) + .execute(); + + resp = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam); + ourLog.info(resp); + + //-- The designations should have default language only + parameterList = respParam.getParameter(); + + verifyParameterList(parameterList); + designationList = getDesignations(parameterList); + // should be default only + assertEquals(1, designationList.size()); + verifyDesignationNoLanguage(designationList.get(0)); + + //-- third call with no language + respParam = myClient + .operation() + .onType(CodeSystem.class) + .named("lookup") + .withParameter(Parameters.class, "code", new CodeType("8494-7")) + .andParameter("system", new UriType(CS_ACME_URL)) + .execute(); + + resp = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam); + ourLog.info(resp); + + //-- The designations should have all languages and the default language + parameterList = respParam.getParameter(); + + verifyParameterList(parameterList); + designationList = getDesignations(parameterList); + // designation should be fr-FR, De-AT and default + assertEquals(3, designationList.size()); + verifyDesignationfrFR(designationList.get(0)); + verifyDesignationDeAT(designationList.get(1)); + verifyDesignationNoLanguage(designationList.get(2)); + + //-- forth call with fr-FR + respParam = myClient + .operation() + .onType(CodeSystem.class) + .named("lookup") + .withParameter(Parameters.class, "code", new CodeType("8494-7")) + .andParameter("system", new UriType(CS_ACME_URL)) + .andParameter("displayLanguage",new CodeType("fr-FR")) + .execute(); + + resp = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam); + ourLog.info(resp); + + //-- The designations should have fr-FR languages and the default language + parameterList = respParam.getParameter(); + + verifyParameterList(parameterList); + designationList = getDesignations(parameterList); + // designation should be fr-FR, default + assertEquals(2, designationList.size()); + verifyDesignationfrFR(designationList.get(0)); + verifyDesignationNoLanguage(designationList.get(1)); + } + + + private void verifyParameterList(List parameterList) { + assertEquals("display", parameterList.get(0).getName()); + assertEquals(("Systolic blood pressure 12 hour minimum"), + ((StringType) parameterList.get(0).getValue()).getValue()); + + assertEquals("abstract", parameterList.get(1).getName()); + assertEquals(false, ((BooleanType) parameterList.get(1).getValue()).getValue()); + } + + private void verifyDesignationfrFR(ParametersParameterComponent designation) { assertEquals("language", designation.getPart().get(0).getName()); assertEquals("fr-FR", designation.getPart().get(0).getValue().toString()); assertEquals("value", designation.getPart().get(2).getName()); assertEquals("fr-FR:Systolic blood pressure 12 hour minimum", designation.getPart().get(2).getValue().toString()); - - // 2. de-AT:Systolic blood pressure 12 hour minimum - designation = designationList.get(1); + } + + private void verifyDesignationDeAT(ParametersParameterComponent designation) { assertEquals("language", designation.getPart().get(0).getName()); assertEquals("de-AT", designation.getPart().get(0).getValue().toString()); assertEquals("value", designation.getPart().get(2).getName()); assertEquals("de-AT:Systolic blood pressure 12 hour minimum", designation.getPart().get(2).getValue().toString()); - - // 3. Systolic blood pressure 12 hour minimum (no language) - designation = designationList.get(2); + } + + private void verifyDesignationNoLanguage(ParametersParameterComponent designation) { assertEquals("language", designation.getPart().get(0).getName()); assertNull(designation.getPart().get(0).getValue()); assertEquals("value", designation.getPart().get(2).getName()); assertEquals("Systolic blood pressure 12 hour minimum", designation.getPart().get(2).getValue().toString()); - } + private List getDesignations(List parameterList) { List designationList = new ArrayList<>(); @@ -168,6 +243,5 @@ public class ResourceProviderR4CodeSystemDesignationTest extends BaseResourcePro designationList.add(parameter); } return designationList; - } } diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CachingValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CachingValidationSupport.java index ba5a427ab36..79f5402fb07 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CachingValidationSupport.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CachingValidationSupport.java @@ -112,7 +112,7 @@ public class CachingValidationSupport extends BaseValidationSupportWrapper imple @Override public LookupCodeResult lookupCode(ValidationSupportContext theValidationSupportContext, String theSystem, String theCode, String theDisplayLanguage) { - String key = "lookupCode " + theSystem + " " + theCode; + String key = "lookupCode " + theSystem + " " + theCode + " " + defaultIfBlank(theDisplayLanguage, "NO_LANG"); return loadFromCache(myLookupCodeCache, key, t -> super.lookupCode(theValidationSupportContext, theSystem, theCode, theDisplayLanguage)); } From 51fe5ec5e714a2a04be41d79e6e79329d4d0d1a8 Mon Sep 17 00:00:00 2001 From: Ben Li-Sauerwine Date: Tue, 31 Aug 2021 20:16:22 -0400 Subject: [PATCH 037/143] Remove extra update from test. --- .../test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java index 8a9f3106569..8cd0e76e03c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java @@ -76,7 +76,6 @@ public class ExpungeHookTest extends BaseJpaDstu3Test { Meta theMeta = new Meta(); theMeta.addProfile("http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"); thePatient.setMeta(theMeta); - myPatientDao.update(thePatient, mySrd); IIdType id = myPatientDao.update(thePatient, mySrd).getId(); assertNotNull(myPatientDao.read(id)); From 7001272e4b0a7b832620110579fd4c390fa8e53c Mon Sep 17 00:00:00 2001 From: Ben Li-Sauerwine Date: Wed, 1 Sep 2021 01:26:47 -0400 Subject: [PATCH 038/143] Clear out the memory cache whenever we call the ExpungeEverythingService. --- .../dao/expunge/ExpungeEverythingService.java | 104 +++++++++++------- 1 file changed, 63 insertions(+), 41 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java index 1fa83140368..24441e1d9fe 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java @@ -65,6 +65,7 @@ import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.model.entity.ResourceTag; import ca.uhn.fhir.jpa.model.entity.SearchParamPresent; import ca.uhn.fhir.jpa.model.entity.TagDefinition; +import ca.uhn.fhir.jpa.util.MemoryCacheService; import ca.uhn.fhir.rest.server.util.CompositeInterceptorBroadcaster; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; @@ -100,6 +101,9 @@ public class ExpungeEverythingService { private TransactionTemplate myTxTemplate; + @Autowired + private MemoryCacheService myMemoryCacheService; + @PostConstruct public void initTxTemplate() { myTxTemplate = new TransactionTemplate(myPlatformTransactionManager); @@ -122,37 +126,37 @@ public class ExpungeEverythingService { counter.addAndGet(doExpungeEverythingQuery("UPDATE " + TermCodeSystem.class.getSimpleName() + " d SET d.myCurrentVersion = null")); return null; }); - counter.addAndGet(expungeEverythingByType(NpmPackageVersionResourceEntity.class)); - counter.addAndGet(expungeEverythingByType(NpmPackageVersionEntity.class)); - counter.addAndGet(expungeEverythingByType(NpmPackageEntity.class)); - counter.addAndGet(expungeEverythingByType(SearchParamPresent.class)); - counter.addAndGet(expungeEverythingByType(BulkImportJobFileEntity.class)); - counter.addAndGet(expungeEverythingByType(BulkImportJobEntity.class)); - counter.addAndGet(expungeEverythingByType(ForcedId.class)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamDate.class)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamNumber.class)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamQuantity.class)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamQuantityNormalized.class)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamString.class)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamToken.class)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamUri.class)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamCoords.class)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedComboStringUnique.class)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedComboTokenNonUnique.class)); - counter.addAndGet(expungeEverythingByType(ResourceLink.class)); - counter.addAndGet(expungeEverythingByType(SearchResult.class)); - counter.addAndGet(expungeEverythingByType(SearchInclude.class)); - counter.addAndGet(expungeEverythingByType(TermValueSetConceptDesignation.class)); - counter.addAndGet(expungeEverythingByType(TermValueSetConcept.class)); - counter.addAndGet(expungeEverythingByType(TermValueSet.class)); - counter.addAndGet(expungeEverythingByType(TermConceptParentChildLink.class)); - counter.addAndGet(expungeEverythingByType(TermConceptMapGroupElementTarget.class)); - counter.addAndGet(expungeEverythingByType(TermConceptMapGroupElement.class)); - counter.addAndGet(expungeEverythingByType(TermConceptMapGroup.class)); - counter.addAndGet(expungeEverythingByType(TermConceptMap.class)); - counter.addAndGet(expungeEverythingByType(TermConceptProperty.class)); - counter.addAndGet(expungeEverythingByType(TermConceptDesignation.class)); - counter.addAndGet(expungeEverythingByType(TermConcept.class)); + counter.addAndGet(expungeEverythingByType(NpmPackageVersionResourceEntity.class, false)); + counter.addAndGet(expungeEverythingByType(NpmPackageVersionEntity.class, false)); + counter.addAndGet(expungeEverythingByType(NpmPackageEntity.class, false)); + counter.addAndGet(expungeEverythingByType(SearchParamPresent.class, false)); + counter.addAndGet(expungeEverythingByType(BulkImportJobFileEntity.class, false)); + counter.addAndGet(expungeEverythingByType(BulkImportJobEntity.class, false)); + counter.addAndGet(expungeEverythingByType(ForcedId.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamDate.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamNumber.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamQuantity.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamQuantityNormalized.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamString.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamToken.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamUri.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamCoords.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceIndexedComboStringUnique.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceIndexedComboTokenNonUnique.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceLink.class, false)); + counter.addAndGet(expungeEverythingByType(SearchResult.class, false)); + counter.addAndGet(expungeEverythingByType(SearchInclude.class, false)); + counter.addAndGet(expungeEverythingByType(TermValueSetConceptDesignation.class, false)); + counter.addAndGet(expungeEverythingByType(TermValueSetConcept.class, false)); + counter.addAndGet(expungeEverythingByType(TermValueSet.class, false)); + counter.addAndGet(expungeEverythingByType(TermConceptParentChildLink.class, false)); + counter.addAndGet(expungeEverythingByType(TermConceptMapGroupElementTarget.class, false)); + counter.addAndGet(expungeEverythingByType(TermConceptMapGroupElement.class, false)); + counter.addAndGet(expungeEverythingByType(TermConceptMapGroup.class, false)); + counter.addAndGet(expungeEverythingByType(TermConceptMap.class, false)); + counter.addAndGet(expungeEverythingByType(TermConceptProperty.class, false)); + counter.addAndGet(expungeEverythingByType(TermConceptDesignation.class, false)); + counter.addAndGet(expungeEverythingByType(TermConcept.class, false)); myTxTemplate.execute(t -> { for (TermCodeSystem next : myEntityManager.createQuery("SELECT c FROM " + TermCodeSystem.class.getName() + " c", TermCodeSystem.class).getResultList()) { next.setCurrentVersion(null); @@ -160,24 +164,42 @@ public class ExpungeEverythingService { } return null; }); - counter.addAndGet(expungeEverythingByType(TermCodeSystemVersion.class)); - counter.addAndGet(expungeEverythingByType(TermCodeSystem.class)); - counter.addAndGet(expungeEverythingByType(SubscriptionTable.class)); - counter.addAndGet(expungeEverythingByType(ResourceHistoryTag.class)); - counter.addAndGet(expungeEverythingByType(ResourceTag.class)); - counter.addAndGet(expungeEverythingByType(TagDefinition.class)); - counter.addAndGet(expungeEverythingByType(ResourceHistoryProvenanceEntity.class)); - counter.addAndGet(expungeEverythingByType(ResourceHistoryTable.class)); - counter.addAndGet(expungeEverythingByType(ResourceTable.class)); - counter.addAndGet(expungeEverythingByType(PartitionEntity.class)); + counter.addAndGet(expungeEverythingByType(TermCodeSystemVersion.class, false)); + counter.addAndGet(expungeEverythingByType(TermCodeSystem.class, false)); + counter.addAndGet(expungeEverythingByType(SubscriptionTable.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceHistoryTag.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceTag.class, false)); + counter.addAndGet(expungeEverythingByType(TagDefinition.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceHistoryProvenanceEntity.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceHistoryTable.class, false)); + counter.addAndGet(expungeEverythingByType(ResourceTable.class, false)); + counter.addAndGet(expungeEverythingByType(PartitionEntity.class, false)); myTxTemplate.execute(t -> { counter.addAndGet(doExpungeEverythingQuery("DELETE from " + Search.class.getSimpleName() + " d")); return null; }); + myTxTemplate.execute(t -> { + myMemoryCacheService.invalidateAllCaches(); + return null; + }); + ourLog.info("COMPLETED GLOBAL $expunge - Deleted {} rows", counter.get()); } + public int expungeEverythingByType(Class theEntityType, boolean purgeMemoryCache) { + int outcome = expungeEverythingByType(theEntityType); + + if (purgeMemoryCache) { + myTxTemplate.execute(t -> { + myMemoryCacheService.invalidateAllCaches(); + return null; + }); + } + + return outcome; + } + public int expungeEverythingByType(Class theEntityType) { int outcome = 0; From 2e2048ce5284992059bff4d1baccaede3483c29d Mon Sep 17 00:00:00 2001 From: Jason Roberts Date: Wed, 1 Sep 2021 13:37:45 -0400 Subject: [PATCH 039/143] Add more test cases, not passing --- .../fhir/jpa/search/builder/QueryStack.java | 9 +- .../dao/r4/ChainedContainedR4SearchTest.java | 67 ++++++- .../r4/ResourceProviderR4SearchTest.java | 187 ++++++++++++++++++ 3 files changed, 258 insertions(+), 5 deletions(-) create mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java index 253b07e33b6..73f6efacf81 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java @@ -1133,10 +1133,15 @@ public class QueryStack { break; case REFERENCE: for (List nextAnd : theAndOrParams) { - if (theSearchContainedMode.equals(SearchContainedModeEnum.TRUE)) + if (theSearchContainedMode.equals(SearchContainedModeEnum.TRUE)) { + // TODO: The _contained parameter is not intended to control search chain interpretation like this. + // See SMILE-2898 for details. + // For now, leave the incorrect implementation alone, just in case someone is relying on it, + // until the complete fix is available. andPredicates.add(createPredicateReferenceForContainedResource(theSourceJoinColumn, theResourceName, theParamName, nextParamDef, nextAnd, null, theRequest, theRequestPartitionId)); - else + } else { andPredicates.add(createPredicateReference(theSourceJoinColumn, theResourceName, theParamName, nextAnd, null, theRequest, theRequestPartitionId)); + } } break; case STRING: diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java index 0c73197bdcd..8efb1df3087 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java @@ -59,7 +59,68 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { } @Test - public void testAllResourcesStandAlone() throws Exception { + public void testShouldResolveATwoLinkChainWithStandAloneResources() throws Exception { + + // setup + IIdType oid1; + + { + Patient p = new Patient(); + p.setId(IdType.newRandomUuid()); + p.addName().setFamily("Smith").addGiven("John"); + myPatientDao.create(p, mySrd); + + Observation obs = new Observation(); + obs.getCode().setText("Observation 1"); + obs.getSubject().setReference(p.getId()); + + oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); + + ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); + } + + String url = "/Observation?subject.name=Smith"; + + // execute + myCaptureQueriesListener.clear(); + List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); + ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + + // validate + assertEquals(1L, oids.size()); + assertThat(oids, contains(oid1.getIdPart())); + } + + @Test + public void testShouldResolveATwoLinkChainWithAContainedResource() throws Exception { + IIdType oid1; + + { + Patient p = new Patient(); + p.setId("pat"); + p.addName().setFamily("Smith").addGiven("John"); + + Observation obs = new Observation(); + obs.getContained().add(p); + obs.getCode().setText("Observation 1"); + obs.getSubject().setReference("#pat"); + + oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); + + ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); + } + + String url = "/Observation?subject.name=Smith"; + myCaptureQueriesListener.clear(); + List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); + ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + + assertEquals(1L, oids.size()); + assertThat(oids, contains(oid1.getIdPart())); + } + + @Test + public void testShouldResolveAThreeLinkChainWhereAllResourcesStandAlone() throws Exception { // setup IIdType oid1; @@ -98,7 +159,7 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { } @Test - public void testContainedResourceAtTheEndOfTheChain() throws Exception { + public void testShouldResolveAThreeLinkChainWithAContainedResourceAtTheEndOfTheChain() throws Exception { // This is the case that is most relevant to SMILE-2899 IIdType oid1; @@ -133,7 +194,7 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { } @Test - public void testContainedResourceAtTheBeginningOfTheChain() throws Exception { + public void testShouldResolveAThreeLinkChainWithAContainedResourceAtTheBeginningOfTheChain() throws Exception { // This case seems like it would be less frequent in production, but we don't want to // paint ourselves into a corner where we require the contained link to be the last // one in the chain diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java new file mode 100644 index 00000000000..d38c44a5097 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java @@ -0,0 +1,187 @@ +package ca.uhn.fhir.jpa.provider.r4; + +import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; +import ca.uhn.fhir.jpa.model.entity.ModelConfig; +import ca.uhn.fhir.parser.StrictErrorHandler; +import ca.uhn.fhir.rest.client.interceptor.CapturingInterceptor; +import org.apache.commons.io.IOUtils; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.ClinicalImpression; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Organization; +import org.hl7.fhir.r4.model.Patient; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.List; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.contains; +import static org.junit.jupiter.api.Assertions.assertEquals; + + +public class ResourceProviderR4SearchTest extends BaseResourceProviderR4Test { + + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceProviderR4SearchTest.class); + @Autowired + @Qualifier("myClinicalImpressionDaoR4") + protected IFhirResourceDao myClinicalImpressionDao; + private CapturingInterceptor myCapturingInterceptor = new CapturingInterceptor(); + + @Override + @AfterEach + public void after() throws Exception { + super.after(); + + myDaoConfig.setAllowMultipleDelete(new DaoConfig().isAllowMultipleDelete()); + myDaoConfig.setAllowExternalReferences(new DaoConfig().isAllowExternalReferences()); + myDaoConfig.setReuseCachedSearchResultsForMillis(new DaoConfig().getReuseCachedSearchResultsForMillis()); + myDaoConfig.setCountSearchResultsUpTo(new DaoConfig().getCountSearchResultsUpTo()); + myDaoConfig.setSearchPreFetchThresholds(new DaoConfig().getSearchPreFetchThresholds()); + myDaoConfig.setAllowContainsSearches(new DaoConfig().isAllowContainsSearches()); + myDaoConfig.setIndexMissingFields(new DaoConfig().getIndexMissingFields()); + + myClient.unregisterInterceptor(myCapturingInterceptor); + myModelConfig.setIndexOnContainedResources(false); + myModelConfig.setIndexOnContainedResources(new ModelConfig().isIndexOnContainedResources()); + } + + @BeforeEach + @Override + public void before() throws Exception { + super.before(); + myFhirCtx.setParserErrorHandler(new StrictErrorHandler()); + + myDaoConfig.setAllowMultipleDelete(true); + myClient.registerInterceptor(myCapturingInterceptor); + myDaoConfig.setSearchPreFetchThresholds(new DaoConfig().getSearchPreFetchThresholds()); + myModelConfig.setIndexOnContainedResources(true); + myDaoConfig.setReuseCachedSearchResultsForMillis(null); + } + + @Test + public void testAllResourcesStandAlone() throws Exception { + + IIdType oid1; + + { + Organization org = new Organization(); + org.setId(IdType.newRandomUuid()); + org.setName("HealthCo"); + myOrganizationDao.create(org, mySrd); + + Patient p = new Patient(); + p.setId(IdType.newRandomUuid()); + p.addName().setFamily("Smith").addGiven("John"); + p.getManagingOrganization().setReference(org.getId()); + myPatientDao.create(p, mySrd); + + Observation obs = new Observation(); + obs.getCode().setText("Observation 1"); + obs.getSubject().setReference(p.getId()); + + oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); + + ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); + } + + String uri = ourServerBase + "/Observation?subject.organization.name=HealthCo"; + List oids = searchAndReturnUnqualifiedVersionlessIdValues(uri); + + assertEquals(1L, oids.size()); + assertThat(oids, contains(oid1.getValue())); + } + + @Test + public void testContainedResourceAtTheEndOfTheChain() throws Exception { + // This is the case that is most relevant to SMILE-2899 + IIdType oid1; + + { + Organization org = new Organization(); + org.setId("org"); + org.setName("HealthCo"); + + Patient p = new Patient(); + p.setId(IdType.newRandomUuid()); + p.getContained().add(org); + p.addName().setFamily("Smith").addGiven("John"); + p.getManagingOrganization().setReference("#org"); + myPatientDao.create(p, mySrd); + + Observation obs = new Observation(); + obs.getCode().setText("Observation 1"); + obs.getSubject().setReference(p.getId()); + + oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); + + ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); + } + + String uri = ourServerBase + "/Observation?subject.organization.name=HealthCo"; + List oids = searchAndReturnUnqualifiedVersionlessIdValues(uri); + + assertEquals(1L, oids.size()); + assertThat(oids, contains(oid1.getValue())); + } + + @Test + public void testContainedResourceAtTheBeginningOfTheChain() throws Exception { + // This case seems like it would be less frequent in production, but we don't want to + // paint ourselves into a corner where we require the contained link to be the last + // one in the chain + + IIdType oid1; + + { + Organization org = new Organization(); + org.setId(IdType.newRandomUuid()); + org.setName("HealthCo"); + myOrganizationDao.create(org, mySrd); + + Patient p = new Patient(); + p.setId("pat"); + p.addName().setFamily("Smith").addGiven("John"); + p.getManagingOrganization().setReference(org.getId()); + + Observation obs = new Observation(); + obs.getContained().add(p); + obs.getCode().setText("Observation 1"); + obs.getSubject().setReference("#pat"); + + oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); + + ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); + } + + String uri = ourServerBase + "/Observation?subject.organization.name=HealthCo"; + List oids = searchAndReturnUnqualifiedVersionlessIdValues(uri); + + assertEquals(1L, oids.size()); + assertThat(oids, contains(oid1.getValue())); + } + + private List searchAndReturnUnqualifiedVersionlessIdValues(String uri) throws IOException { + List ids; + HttpGet get = new HttpGet(uri); + + try (CloseableHttpResponse response = ourHttpClient.execute(get)) { + String resp = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); + ourLog.info(resp); + Bundle bundle = myFhirCtx.newXmlParser().parseResource(Bundle.class, resp); + ids = toUnqualifiedVersionlessIdValues(bundle); + } + return ids; + } + +} From 0724e652bbc48cfc0a6e95c8df3e4e06e096b2e9 Mon Sep 17 00:00:00 2001 From: Ben Li-Sauerwine Date: Wed, 1 Sep 2021 15:04:31 -0400 Subject: [PATCH 040/143] Refactor to prevent adding additional signatures to expungeEverythingByType. --- .../dao/expunge/ExpungeEverythingService.java | 154 +++++++++--------- 1 file changed, 75 insertions(+), 79 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java index 24441e1d9fe..fbc828e47c3 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java @@ -126,37 +126,37 @@ public class ExpungeEverythingService { counter.addAndGet(doExpungeEverythingQuery("UPDATE " + TermCodeSystem.class.getSimpleName() + " d SET d.myCurrentVersion = null")); return null; }); - counter.addAndGet(expungeEverythingByType(NpmPackageVersionResourceEntity.class, false)); - counter.addAndGet(expungeEverythingByType(NpmPackageVersionEntity.class, false)); - counter.addAndGet(expungeEverythingByType(NpmPackageEntity.class, false)); - counter.addAndGet(expungeEverythingByType(SearchParamPresent.class, false)); - counter.addAndGet(expungeEverythingByType(BulkImportJobFileEntity.class, false)); - counter.addAndGet(expungeEverythingByType(BulkImportJobEntity.class, false)); - counter.addAndGet(expungeEverythingByType(ForcedId.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamDate.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamNumber.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamQuantity.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamQuantityNormalized.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamString.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamToken.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamUri.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedSearchParamCoords.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedComboStringUnique.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceIndexedComboTokenNonUnique.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceLink.class, false)); - counter.addAndGet(expungeEverythingByType(SearchResult.class, false)); - counter.addAndGet(expungeEverythingByType(SearchInclude.class, false)); - counter.addAndGet(expungeEverythingByType(TermValueSetConceptDesignation.class, false)); - counter.addAndGet(expungeEverythingByType(TermValueSetConcept.class, false)); - counter.addAndGet(expungeEverythingByType(TermValueSet.class, false)); - counter.addAndGet(expungeEverythingByType(TermConceptParentChildLink.class, false)); - counter.addAndGet(expungeEverythingByType(TermConceptMapGroupElementTarget.class, false)); - counter.addAndGet(expungeEverythingByType(TermConceptMapGroupElement.class, false)); - counter.addAndGet(expungeEverythingByType(TermConceptMapGroup.class, false)); - counter.addAndGet(expungeEverythingByType(TermConceptMap.class, false)); - counter.addAndGet(expungeEverythingByType(TermConceptProperty.class, false)); - counter.addAndGet(expungeEverythingByType(TermConceptDesignation.class, false)); - counter.addAndGet(expungeEverythingByType(TermConcept.class, false)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(NpmPackageVersionResourceEntity.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(NpmPackageVersionEntity.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(NpmPackageEntity.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(SearchParamPresent.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(BulkImportJobFileEntity.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(BulkImportJobEntity.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ForcedId.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceIndexedSearchParamDate.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceIndexedSearchParamNumber.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceIndexedSearchParamQuantity.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceIndexedSearchParamQuantityNormalized.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceIndexedSearchParamString.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceIndexedSearchParamToken.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceIndexedSearchParamUri.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceIndexedSearchParamCoords.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceIndexedComboStringUnique.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceIndexedComboTokenNonUnique.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceLink.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(SearchResult.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(SearchInclude.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TermValueSetConceptDesignation.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TermValueSetConcept.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TermValueSet.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TermConceptParentChildLink.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TermConceptMapGroupElementTarget.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TermConceptMapGroupElement.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TermConceptMapGroup.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TermConceptMap.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TermConceptProperty.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TermConceptDesignation.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TermConcept.class)); myTxTemplate.execute(t -> { for (TermCodeSystem next : myEntityManager.createQuery("SELECT c FROM " + TermCodeSystem.class.getName() + " c", TermCodeSystem.class).getResultList()) { next.setCurrentVersion(null); @@ -164,70 +164,66 @@ public class ExpungeEverythingService { } return null; }); - counter.addAndGet(expungeEverythingByType(TermCodeSystemVersion.class, false)); - counter.addAndGet(expungeEverythingByType(TermCodeSystem.class, false)); - counter.addAndGet(expungeEverythingByType(SubscriptionTable.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceHistoryTag.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceTag.class, false)); - counter.addAndGet(expungeEverythingByType(TagDefinition.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceHistoryProvenanceEntity.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceHistoryTable.class, false)); - counter.addAndGet(expungeEverythingByType(ResourceTable.class, false)); - counter.addAndGet(expungeEverythingByType(PartitionEntity.class, false)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TermCodeSystemVersion.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TermCodeSystem.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(SubscriptionTable.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceHistoryTag.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceTag.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(TagDefinition.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceHistoryProvenanceEntity.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceHistoryTable.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(ResourceTable.class)); + counter.addAndGet(expungeEverythingByTypeWithoutPurging(PartitionEntity.class)); myTxTemplate.execute(t -> { counter.addAndGet(doExpungeEverythingQuery("DELETE from " + Search.class.getSimpleName() + " d")); return null; }); - myTxTemplate.execute(t -> { - myMemoryCacheService.invalidateAllCaches(); - return null; - }); + purgeAllCaches(); ourLog.info("COMPLETED GLOBAL $expunge - Deleted {} rows", counter.get()); } - public int expungeEverythingByType(Class theEntityType, boolean purgeMemoryCache) { - int outcome = expungeEverythingByType(theEntityType); + private void purgeAllCaches() { + myTxTemplate.execute(t -> { + myMemoryCacheService.invalidateAllCaches(); + return null; + }); + } - if (purgeMemoryCache) { - myTxTemplate.execute(t -> { - myMemoryCacheService.invalidateAllCaches(); - return null; + private int expungeEverythingByTypeWithoutPurging(Class theEntityType) { + int outcome = 0; + while (true) { + StopWatch sw = new StopWatch(); + + @SuppressWarnings("ConstantConditions") + int count = myTxTemplate.execute(t -> { + CriteriaBuilder cb = myEntityManager.getCriteriaBuilder(); + CriteriaQuery cq = cb.createQuery(theEntityType); + cq.from(theEntityType); + TypedQuery query = myEntityManager.createQuery(cq); + query.setMaxResults(1000); + List results = query.getResultList(); + for (Object result : results) { + myEntityManager.remove(result); + } + return results.size(); }); - } + outcome += count; + if (count == 0) { + break; + } + + ourLog.info("Have deleted {} entities of type {} in {}", outcome, theEntityType.getSimpleName(), sw.toString()); + } return outcome; } public int expungeEverythingByType(Class theEntityType) { - - int outcome = 0; - while (true) { - StopWatch sw = new StopWatch(); - - @SuppressWarnings("ConstantConditions") - int count = myTxTemplate.execute(t -> { - CriteriaBuilder cb = myEntityManager.getCriteriaBuilder(); - CriteriaQuery cq = cb.createQuery(theEntityType); - cq.from(theEntityType); - TypedQuery query = myEntityManager.createQuery(cq); - query.setMaxResults(1000); - List results = query.getResultList(); - for (Object result : results) { - myEntityManager.remove(result); - } - return results.size(); - }); - - outcome += count; - if (count == 0) { - break; - } - - ourLog.info("Have deleted {} entities of type {} in {}", outcome, theEntityType.getSimpleName(), sw.toString()); - } - return outcome; + int result = expungeEverythingByTypeWithoutPurging(theEntityType); + purgeAllCaches(); + return result; } private int doExpungeEverythingQuery(String theQuery) { From ae2c752c55ad7799752e0a2df48a62aa7dcf5e2d Mon Sep 17 00:00:00 2001 From: Tadgh Date: Wed, 1 Sep 2021 15:54:28 -0400 Subject: [PATCH 041/143] Add attribution for 2793 --- .../5_6_0/2793-expunge-everything-purges-caches.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2793-expunge-everything-purges-caches.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2793-expunge-everything-purges-caches.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2793-expunge-everything-purges-caches.yaml new file mode 100644 index 00000000000..fc20b9e6c47 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2793-expunge-everything-purges-caches.yaml @@ -0,0 +1,4 @@ +--- +type: fix +issue: 2793 +title: "Previously, when using the Expunge Everything operation, caches could retain old invalid values. This has been corrected. Thanks to [Ben Li-Sauerwine](https://github.com/theGOTOguy) for the fix!" From f5de2da6ba5355d16c587d7941622830d508da0f Mon Sep 17 00:00:00 2001 From: Sidharth Ramesh Date: Thu, 2 Sep 2021 14:52:38 +0530 Subject: [PATCH 042/143] Corrected typo in docs - Plain Providers It was "plan providers" before --- .../src/main/resources/ca/uhn/hapi/fhir/docs/files.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/files.properties b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/files.properties index 0a37b3348fe..6e3bb52e90c 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/files.properties +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/files.properties @@ -38,7 +38,7 @@ section.server_plain.title=Plain Server page.server_plain.server_types=REST Server Types page.server_plain.introduction=Plain Server Introduction page.server_plain.get_started=Get Started ⚡ -page.server_plain.resource_providers=Resource Providers and Plan Providers +page.server_plain.resource_providers=Resource Providers and Plain Providers page.server_plain.rest_operations=REST Operations: Overview page.server_plain.rest_operations_search=REST Operations: Search page.server_plain.rest_operations_operations=REST Operations: Extended Operations From 0286eb52783eb658a9c60752912b77fe2770f54b Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Thu, 2 Sep 2021 09:15:39 -0400 Subject: [PATCH 043/143] issue-2901 updated some documentation and added support for autocreated placeholder / autoversioned references at paths when in transactios and have not been created yet --- .../uhn/hapi/fhir/docs/server_jpa/schema.md | 10 +- .../fhir/jpa/api/dao/IFhirResourceDao.java | 2 +- .../ca/uhn/fhir/jpa/config/BaseConfig.java | 7 + .../jpa/dao/AutoVersioningServiceImpl.java | 42 ++++++ .../fhir/jpa/dao/BaseHapiFhirResourceDao.java | 28 +++- .../ca/uhn/fhir/jpa/dao/BaseStorageDao.java | 44 ++++-- .../jpa/dao/BaseTransactionProcessor.java | 128 ++++------------- .../fhir/jpa/dao/IAutoVersioningService.java | 23 +++ .../uhn/fhir/jpa/dao/data/IForcedIdDao.java | 3 +- .../dao/AutoVersioningServiceImplTests.java | 62 ++++++++ .../jpa/dao/BaseHapiFhirResourceDaoTest.java | 132 ++++++++++++++++++ .../ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java | 3 + ...irResourceDaoR4VersionedReferenceTest.java | 116 +++++++-------- 13 files changed, 418 insertions(+), 182 deletions(-) create mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java create mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java create mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/schema.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/schema.md index af83007725e..17499751bb8 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/schema.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/schema.md @@ -302,6 +302,14 @@ If the server has been configured with a [Resource Server ID Strategy](/apidocs/ Contains the specific version (starting with 1) of the resource that this row corresponds to. + + RESOURCE_TYPE + + String + + Contains the string specifying the type of the resource (Patient, Observation, etc). + + @@ -476,7 +484,7 @@ The following columns are common to **all HFJ_SPIDX_xxx tables**. RES_ID FK to HFJ_RESOURCE - String + Long Contains the PID of the resource being indexed. diff --git a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java index f9f9bb39345..69d0716fd4c 100644 --- a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java +++ b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java @@ -168,7 +168,7 @@ public interface IFhirResourceDao extends IDao { * @param theIds - list of IIdType ids (for the same resource) * @return */ - Set hasResources(Collection theIds); + Map getIdsOfExistingResources(Collection theIds); /** * Read a resource by its internal PID diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java index 2aebff2b539..fb58b1912e0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java @@ -27,9 +27,11 @@ import ca.uhn.fhir.jpa.bulk.imprt.api.IBulkDataImportSvc; import ca.uhn.fhir.jpa.bulk.imprt.svc.BulkDataImportSvcImpl; import ca.uhn.fhir.jpa.cache.IResourceVersionSvc; import ca.uhn.fhir.jpa.cache.ResourceVersionSvcDaoImpl; +import ca.uhn.fhir.jpa.dao.AutoVersioningServiceImpl; import ca.uhn.fhir.jpa.dao.DaoSearchParamProvider; import ca.uhn.fhir.jpa.dao.HistoryBuilder; import ca.uhn.fhir.jpa.dao.HistoryBuilderFactory; +import ca.uhn.fhir.jpa.dao.IAutoVersioningService; import ca.uhn.fhir.jpa.dao.ISearchBuilder; import ca.uhn.fhir.jpa.dao.LegacySearchBuilder; import ca.uhn.fhir.jpa.dao.MatchResourceUrlService; @@ -230,6 +232,11 @@ public abstract class BaseConfig { public void initSettings() { } + @Bean + public IAutoVersioningService autoVersioningService() { + return new AutoVersioningServiceImpl(); + } + public void setSearchCoordCorePoolSize(Integer searchCoordCorePoolSize) { this.searchCoordCorePoolSize = searchCoordCorePoolSize; } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java new file mode 100644 index 00000000000..1953273dbed --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java @@ -0,0 +1,42 @@ +package ca.uhn.fhir.jpa.dao; + +import ca.uhn.fhir.jpa.api.dao.DaoRegistry; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; +import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; +import org.hl7.fhir.instance.model.api.IIdType; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class AutoVersioningServiceImpl implements IAutoVersioningService { + + @Autowired + private DaoRegistry myDaoRegistry; + + @Override + public Map getAutoversionsForIds(Collection theIds) { + HashMap idToPID = new HashMap<>(); + HashMap> resourceTypeToIds = new HashMap<>(); + + for (IIdType id : theIds) { + String resourceType = id.getResourceType(); + if (!resourceTypeToIds.containsKey(resourceType)) { + resourceTypeToIds.put(resourceType, new ArrayList<>()); + } + resourceTypeToIds.get(resourceType).add(id); + } + + for (String resourceType : resourceTypeToIds.keySet()) { + IFhirResourceDao dao = myDaoRegistry.getResourceDao(resourceType); + + Map idAndPID = dao.getIdsOfExistingResources(resourceTypeToIds.get(resourceType)); + idToPID.putAll(idAndPID); + } + + return idToPID; + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java index 5476e89352b..667cb450d71 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java @@ -138,9 +138,11 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Date; +import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.UUID; @@ -1158,16 +1160,34 @@ public abstract class BaseHapiFhirResourceDao extends B } @Override - public Set hasResources(Collection theIds) { - List idPortions = theIds.stream().map(t -> t.getIdPart()).collect(Collectors.toList()); + public Map getIdsOfExistingResources(Collection theIds) { + // these are the found Ids that were in the db + HashMap collected = new HashMap<>(); + + if (theIds == null || theIds.isEmpty()) { + return collected; + } + + List idPortions = theIds + .stream() + .map(IIdType::getIdPart) + .collect(Collectors.toList()); + Collection matches = myForcedIdDao.findResourcesByForcedId(getResourceName(), idPortions); - HashSet collected = new HashSet<>(); for (Object[] match : matches) { String resourceType = (String) match[0]; String forcedId = (String) match[1]; - collected.add(new IdDt(resourceType, forcedId)); + Long pid = (Long) match[2]; + Long versionId = (Long) match[3]; + IIdType id = new IdDt(resourceType, forcedId); + // we won't put the version on the IIdType + // so callers can use this as a lookup to match to + ResourcePersistentId persistentId = new ResourcePersistentId(pid); + persistentId.setVersion(versionId); + + collected.put(id, persistentId); } return collected; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java index f181a5760ed..2ad93b1d994 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java @@ -27,7 +27,6 @@ import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.interceptor.api.Pointcut; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.api.model.LazyDaoMethodOutcome; import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; @@ -35,9 +34,6 @@ import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.searchparam.util.JpaParamUtil; -import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; -import ca.uhn.fhir.rest.server.util.ISearchParamRegistry; -import ca.uhn.fhir.rest.server.util.CompositeInterceptorBroadcaster; import ca.uhn.fhir.model.api.IQueryParameterAnd; import ca.uhn.fhir.rest.api.QualifiedParamList; import ca.uhn.fhir.rest.api.server.IPreResourceAccessDetails; @@ -45,12 +41,16 @@ import ca.uhn.fhir.rest.api.server.IPreResourceShowDetails; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.api.server.SimplePreResourceAccessDetails; import ca.uhn.fhir.rest.api.server.SimplePreResourceShowDetails; +import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import ca.uhn.fhir.rest.api.server.storage.TransactionDetails; import ca.uhn.fhir.rest.param.QualifierDetails; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; +import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; +import ca.uhn.fhir.rest.server.util.CompositeInterceptorBroadcaster; +import ca.uhn.fhir.rest.server.util.ISearchParamRegistry; import ca.uhn.fhir.util.BundleUtil; import ca.uhn.fhir.util.FhirTerser; import ca.uhn.fhir.util.OperationOutcomeUtil; @@ -91,6 +91,10 @@ public abstract class BaseStorageDao { protected DaoRegistry myDaoRegistry; @Autowired protected ModelConfig myModelConfig; + @Autowired + protected IAutoVersioningService myAutoVersioningService; + @Autowired + protected DaoConfig myDaoConfig; @VisibleForTesting public void setSearchParamRegistry(ISearchParamRegistry theSearchParamRegistry) { @@ -204,10 +208,34 @@ public abstract class BaseStorageDao { for (IBaseReference nextReference : referencesToVersion) { IIdType referenceElement = nextReference.getReferenceElement(); if (!referenceElement.hasBaseUrl()) { - String resourceType = referenceElement.getResourceType(); - IFhirResourceDao dao = myDaoRegistry.getResourceDao(resourceType); - String targetVersionId = dao.getCurrentVersionId(referenceElement); - String newTargetReference = referenceElement.withVersion(targetVersionId).getValue(); + + Map idToPID = myAutoVersioningService.getAutoversionsForIds( + Collections.singletonList(referenceElement) + ); + + // 3 cases: + // 1) there exists a resource in the db with some version (use this version) + // 2) no resource exists, but we will create one (eventually). The version is 1 + // 3) no resource exists, and none will be made -> throw + Long version; + if (idToPID.containsKey(referenceElement)) { + // the resource exists... latest id + // will bbe the value in the ResourcePersistentId + version = idToPID.get(referenceElement).getVersion(); + } + else if (myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { + // if idToPID doesn't contain object + // but autcreateplaceholders is on + // then the version will be 1 (the first version) + version = 1L; + } + else { + // resource not found + // and no autocreateplaceholders set... + // we throw + throw new ResourceNotFoundException(referenceElement); + } + String newTargetReference = referenceElement.withVersion(version.toString()).getValue(); nextReference.setReference(newTargetReference); } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index 6f137a5bfe3..eb3a51e1c87 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -52,6 +52,7 @@ import ca.uhn.fhir.rest.api.PreferReturnEnum; import ca.uhn.fhir.rest.api.RestOperationTypeEnum; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.api.server.storage.DeferredInterceptorBroadcasts; +import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import ca.uhn.fhir.rest.api.server.storage.TransactionDetails; import ca.uhn.fhir.rest.param.ParameterUtil; import ca.uhn.fhir.rest.server.RestfulServerUtils; @@ -61,7 +62,6 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.MethodNotAllowedException; import ca.uhn.fhir.rest.server.exceptions.NotModifiedException; import ca.uhn.fhir.rest.server.exceptions.PayloadTooLargeException; -import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor; import ca.uhn.fhir.rest.server.method.BaseMethodBinding; import ca.uhn.fhir.rest.server.method.BaseResourceReturningMethodBinding; @@ -69,11 +69,11 @@ import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; import ca.uhn.fhir.rest.server.servlet.ServletSubRequestDetails; import ca.uhn.fhir.rest.server.util.CompositeInterceptorBroadcaster; import ca.uhn.fhir.rest.server.util.ServletRequestUtil; +import ca.uhn.fhir.util.AsyncUtil; import ca.uhn.fhir.util.ElementUtil; import ca.uhn.fhir.util.FhirTerser; import ca.uhn.fhir.util.ResourceReferenceInfo; import ca.uhn.fhir.util.StopWatch; -import ca.uhn.fhir.util.AsyncUtil; import ca.uhn.fhir.util.UrlUtil; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ArrayListMultimap; @@ -116,10 +116,11 @@ import java.util.Optional; import java.util.Set; import java.util.TreeSet; import java.util.concurrent.Callable; -import java.util.concurrent.CountDownLatch; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.regex.Pattern; +import java.util.stream.Collectors; import static ca.uhn.fhir.util.StringUtil.toUtf8String; import static org.apache.commons.lang3.StringUtils.defaultString; @@ -153,6 +154,9 @@ public abstract class BaseTransactionProcessor { @Autowired private InMemoryResourceMatcher myInMemoryResourceMatcher; + @Autowired + private IAutoVersioningService myAutoVersioningService; + private ThreadPoolTaskExecutor myExecutor ; @VisibleForTesting @@ -418,28 +422,6 @@ public abstract class BaseTransactionProcessor { final TransactionDetails transactionDetails = new TransactionDetails(); final StopWatch transactionStopWatch = new StopWatch(); - //TODO - // Create Autoreference Placeholders is enabled - // we should create any sub reference that doesn't already exist -// if (myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { -// List referencesToCreate = new ArrayList<>(); -// for (IBase entry : requestEntries) { -// IBaseResource resource = myVersionAdapter.getResource(entry); -// Set referencesToAutoVersion = BaseStorageDao.extractReferencesToAutoVersion(myContext, -// myModelConfig, -// resource); -// for (IBaseReference subReference : referencesToAutoVersion) { -// // doesn't exist - add it to the entries to be created -// org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent req = new org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent(); -// req.setMethod(org.hl7.fhir.r4.model.Bundle.HTTPVerb.PUT); -// req.setUrl(subReference.getReferenceElement().getValue()); -//// req.setIfNoneExist(); //TODO - look at conditional creates to see how this works -// referencesToCreate.add(req); // adding the request should add it to theIdToPersistence map later -// } -// } -// requestEntries.addAll(referencesToCreate); -// } - // Do all entries have a verb? for (int i = 0; i < numberOfEntries; i++) { IBase nextReqEntry = requestEntries.get(i); @@ -510,9 +492,6 @@ public abstract class BaseTransactionProcessor { CompositeInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequestDetails, Pointcut.JPA_PERFTRACE_INFO, params); } - //FIXME - remove before committing - ourLog.info(myContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); - return response; } @@ -639,7 +618,6 @@ public abstract class BaseTransactionProcessor { theEntries, theTransactionStopWatch); theTransactionStopWatch.startTask("Commit writes to database"); - ourLog.info("Retval has " + retVal.values().size()); return retVal; }; Map entriesToProcess; @@ -647,14 +625,6 @@ public abstract class BaseTransactionProcessor { try { entriesToProcess = myHapiTransactionService.execute(theRequestDetails, theTransactionDetails, txCallback); } - catch (Exception ex) { - //FIXME - remove - ourLog.info("FindME"); - - ourLog.info(ex.getLocalizedMessage()); - ex.printStackTrace(); - entriesToProcess = new HashMap<>(); - } finally { if (writeOperationsDetails != null) { HookParams params = new HookParams() @@ -1232,24 +1202,6 @@ public abstract class BaseTransactionProcessor { Set referencesToAutoVersion = nextEntry.getValue(); IBaseResource nextResource = nextOutcome.getResource(); - //TODO - should we add the autoversioned resources to our idtoPersistedoutcomes here? - // idToPersistedOutcomes has no entry for them at this point (if they were not in the - // top level bundle) - // should we just add no-op values to the map (since they are all going to be gets)? -// for (IBaseReference autoVersionRef : referencesToAutoVersion) { -// IFhirResourceDao dao = myDaoRegistry.getResourceDao(autoVersionRef.getReferenceElement().getResourceType()); -// IBaseResource baseResource; -// try { -// baseResource = dao.read(autoVersionRef.getReferenceElement()); -// } catch (ResourceNotFoundException ex) { - // not found -// baseResource = -// DaoMethodOutcome outcome = new DaoMethodOutcome(); -// outcome.setResource(baseResource); -// outcome.setNop(true); // we are just reading it -// theIdToPersistedOutcome.put(autoVersionRef.getReferenceElement(), outcome); -// } -// } resolveReferencesThenSaveAndIndexResource(theRequest, theTransactionDetails, theIdSubstitutions, theIdToPersistedOutcome, @@ -1307,61 +1259,33 @@ public abstract class BaseTransactionProcessor { } else if (nextId.getValue().startsWith("urn:")) { throw new InvalidRequestException("Unable to satisfy placeholder ID " + nextId.getValue() + " found in element named '" + nextRef.getName() + "' within resource of type: " + nextResource.getIdElement().getResourceType()); } else { - // resource type -> set of Ids - // we'll populate this with only those resource/ids of - // resource references that: - // a) do not exist in the idToPersistedOutcome - // (so not in top level of bundle) - // b) do not exist in DB - // (so newly created resources) - // - // we only do this if autocreateplaceholders is on - HashMap> resourceTypeToListOfIds = new HashMap<>(); - if (myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { - for (IBaseReference ref : theReferencesToAutoVersion) { - IIdType id = ref.getReferenceElement(); - // if we don't have this in our idToPersistedOutcome - // and we have createplaceholderreferences on - // we will have to check if these objects exist in the DB - if (!theIdToPersistedOutcome.containsKey(id)) { - if (!resourceTypeToListOfIds.containsKey(id.getResourceType())) { - resourceTypeToListOfIds.put(id.getResourceType(), new HashSet<>()); - } + // get a map of + // existing ids -> PID (for resources that exist in the DB) + Map idToPID = myAutoVersioningService.getAutoversionsForIds(theReferencesToAutoVersion.stream() + .map(ref -> ref.getReferenceElement()).collect(Collectors.toList())); - resourceTypeToListOfIds.get(id.getResourceType()).add(id); - } + for (IBaseReference baseRef : theReferencesToAutoVersion) { + IIdType id = baseRef.getReferenceElement(); + if (!idToPID.containsKey(id) + && myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { + // not in the db, but autocreateplaceholders is true + // so the version we'll set is "1" (since it will be + // created later) + String newRef = id.withVersion("1").getValue(); + id.setValue(newRef); } - - for (String resourceType : resourceTypeToListOfIds.keySet()) { - IFhirResourceDao dao = myDaoRegistry.getResourceDao(resourceType); - Set idSet = resourceTypeToListOfIds.get(resourceType); - - // DB hit :( - Set existing = dao.hasResources(idSet); - - // we remove all the ids that are found, leaving - // only the ids of those not in the DB at all - idSet.removeAll(existing); + else { + // we will add the looked up info to the transaction + // for later + theTransactionDetails.addResolvedResourceId(id, + idToPID.get(id)); } } if (theReferencesToAutoVersion.contains(resourceReference)) { DaoMethodOutcome outcome = theIdToPersistedOutcome.get(nextId); - if (outcome == null && myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { - // null outcome means it's a resource reference that was not at top of bundle - IIdType id = resourceReference.getReferenceElement(); - String resourceType = id.getResourceType(); - // if it exists in resourceTypeToListOfIds - // it's not in the DB (new resource) - Set ids = resourceTypeToListOfIds.get(resourceType); - if (!ids.contains(id)) { - // doesn't exist in the DB - // which means the history necessarily is 1 (first one) - resourceReference.getReferenceElement().setValue(id.getValue() + "/_history/1"); - } - } - else if (outcome != null && !outcome.isNop() && !Boolean.TRUE.equals(outcome.getCreated())) { + if (outcome != null && !outcome.isNop() && !Boolean.TRUE.equals(outcome.getCreated())) { addRollbackReferenceRestore(theTransactionDetails, resourceReference); resourceReference.setReference(nextId.getValue()); resourceReference.setResource(null); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java new file mode 100644 index 00000000000..720edc41478 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java @@ -0,0 +1,23 @@ +package ca.uhn.fhir.jpa.dao; + +import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; +import org.hl7.fhir.instance.model.api.IIdType; + +import java.util.Collection; +import java.util.Map; + +public interface IAutoVersioningService { + /** + * Takes in a list of IIdType and returns a map of + * IIdType -> ResourcePersistentId. + * ResourcePersistentId will contain the history version + * but the returned IIdType will not (this is to allow consumers + * to use their passed in IIdType as a lookup value). + * + * If the returned map does not return an IIdType -> ResourcePersistentId + * then it means that it is a non-existing resource in the DB + * @param theIds + * @return + */ + Map getAutoversionsForIds(Collection theIds); +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java index 2a747ab089d..0676f124e90 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java @@ -113,8 +113,9 @@ public interface IForcedIdDao extends JpaRepository { @Query("" + "SELECT " + - " f.myResourceType, f.myForcedId " + + " f.myResourceType, f.myForcedId, f.myResourcePid, t.myVersion " + "FROM ForcedId f " + + "JOIN ResourceTable t ON t.myId = f.myResourcePid " + "WHERE f.myResourceType = :resource_type AND f.myForcedId IN ( :forced_id )") Collection findResourcesByForcedId(@Param("resource_type") String theResourceType, @Param("forced_id") Collection theForcedIds); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java new file mode 100644 index 00000000000..6d8d848b01b --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java @@ -0,0 +1,62 @@ +package ca.uhn.fhir.jpa.dao; + +import ca.uhn.fhir.jpa.api.dao.DaoRegistry; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; +import org.hl7.fhir.instance.model.api.IIdType; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; + +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +@ExtendWith(MockitoExtension.class) +public class AutoVersioningServiceImplTests { + + @Mock + private DaoRegistry daoRegistry; + + @InjectMocks + private AutoVersioningServiceImpl myAutoversioningService; + + @Test + public void getAutoversionsForIds_whenResourceExists_returnsMapWithPIDAndVersion() { + IIdType type = new IdDt("Patient/RED"); + ResourcePersistentId pid = new ResourcePersistentId(1); + pid.setVersion(2L); + HashMap map = new HashMap<>(); + map.put(type, pid); + + IFhirResourceDao daoMock = Mockito.mock(IFhirResourceDao.class); + Mockito.when(daoMock.getIdsOfExistingResources(Mockito.anyList())) + .thenReturn(map); + + Map retMap = myAutoversioningService.getAutoversionsForIds(Collections.singletonList(type)); + + Assertions.assertTrue(retMap.containsKey(type)); + Assertions.assertEquals(pid.getVersion(), map.get(type).getVersion()); + } + + @Test + public void getAutoversionsForIds_whenResourceDoesNotExist_returnsEmptyMap() { + IIdType type = new IdDt("Patient/RED"); + + IFhirResourceDao daoMock = Mockito.mock(IFhirResourceDao.class); + Mockito.when(daoMock.getIdsOfExistingResources(Mockito.anyList())) + .thenReturn(new HashMap<>()); + + Map retMap = myAutoversioningService.getAutoversionsForIds(Collections.singletonList(type)); + + Assertions.assertTrue(retMap.isEmpty()); + } + + +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java index bc984843ff4..8292ce448fa 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java @@ -1,18 +1,150 @@ package ca.uhn.fhir.jpa.dao; +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.dao.data.IForcedIdDao; import ca.uhn.fhir.jpa.partition.SystemRequestDetails; +import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.api.server.RequestDetails; +import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; +import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Patient; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; +@ExtendWith(MockitoExtension.class) class BaseHapiFhirResourceDaoTest { + + private class SimpleTestDao extends BaseHapiFhirResourceDao { + public SimpleTestDao() { + super(); + // post inject hooks + setResourceType(Patient.class); + RuntimeResourceDefinition resourceDefinition = Mockito.mock(RuntimeResourceDefinition.class); + Mockito.when(resourceDefinition.getName()).thenReturn("Patient"); + FhirContext myFhirContextMock = Mockito.mock(FhirContext.class); + Mockito.when(myFhirContextMock.getResourceDefinition(Mockito.any(Class.class))) + .thenReturn(resourceDefinition); + setContext(myFhirContextMock); + postConstruct(); + } + + } + + @InjectMocks + private BaseHapiFhirResourceDao myBaseHapiFhirResourceDao = new SimpleTestDao(); + + @Mock + private IForcedIdDao myIForcedIdDao; + + //TODO - all other dependency mocks + + private Object[] createMatchEntryForGetIdsOfExistingResources(IIdType theId, long thePID, long theResourceVersion) { + Object[] arr = new Object[] { + theId.getResourceType(), + theId.getIdPart(), + thePID, + theResourceVersion + }; + return arr; + } + + @Test + public void getIdsOfExistingResources_forExistingResources_returnsMapOfIdToPIDWithVersion() { + // setup + IIdType patientIdAndType = new IdDt("Patient/RED"); + long patientPID = 1L; + long patientResourceVersion = 2L; + IIdType patient2IdAndType = new IdDt("Patient/BLUE"); + long patient2PID = 3L; + long patient2ResourceVersion = 4L; + List inputList = new ArrayList<>(); + inputList.add(patientIdAndType); + inputList.add(patient2IdAndType); + + Collection matches = Arrays.asList( + createMatchEntryForGetIdsOfExistingResources(patientIdAndType, patientPID, patientResourceVersion), + createMatchEntryForGetIdsOfExistingResources(patient2IdAndType, patient2PID, patient2ResourceVersion) + ); + + // when + Mockito.when(myIForcedIdDao.findResourcesByForcedId(Mockito.anyString(), + Mockito.anyList())).thenReturn(matches); + + Map idToPIDOfExistingResources = myBaseHapiFhirResourceDao.getIdsOfExistingResources(inputList); + + Assertions.assertEquals(inputList.size(), idToPIDOfExistingResources.size()); + Assertions.assertTrue(idToPIDOfExistingResources.containsKey(patientIdAndType)); + Assertions.assertTrue(idToPIDOfExistingResources.containsKey(patient2IdAndType)); + Assertions.assertEquals(idToPIDOfExistingResources.get(patientIdAndType).getIdAsLong(), patientPID); + Assertions.assertEquals(idToPIDOfExistingResources.get(patient2IdAndType).getIdAsLong(), patient2PID); + Assertions.assertEquals(idToPIDOfExistingResources.get(patientIdAndType).getVersion(), patientResourceVersion); + Assertions.assertEquals(idToPIDOfExistingResources.get(patient2IdAndType).getVersion(), patient2ResourceVersion); + } + + @Test + public void getIdsOfExistingResources_forNonExistentResources_returnsEmptyMap() { + //setup + IIdType patient = new IdDt("Patient/RED"); + + // when + Mockito.when(myIForcedIdDao.findResourcesByForcedId(Mockito.anyString(), Mockito.anyList())) + .thenReturn(new ArrayList<>()); + + Map map = myBaseHapiFhirResourceDao.getIdsOfExistingResources(Collections.singletonList(patient)); + + Assertions.assertTrue(map.isEmpty()); + } + + @Test + public void getIdsOfExistingResources_whenSomeResourcesExist_returnsOnlyExistingResourcesInMap() { + // setup + IIdType patientIdAndType = new IdDt("Patient/RED"); + long patientPID = 1L; + long patientResourceVersion = 2L; + IIdType patient2IdAndType = new IdDt("Patient/BLUE"); + List inputList = new ArrayList<>(); + inputList.add(patientIdAndType); + inputList.add(patient2IdAndType); + + Collection matches = Collections.singletonList( + createMatchEntryForGetIdsOfExistingResources(patientIdAndType, patientPID, patientResourceVersion) + ); + + // when + Mockito.when(myIForcedIdDao.findResourcesByForcedId(Mockito.anyString(), Mockito.anyList())) + .thenReturn(matches); + + Map map = myBaseHapiFhirResourceDao.getIdsOfExistingResources(inputList); + + // verify + Assertions.assertFalse(map.isEmpty()); + Assertions.assertEquals(inputList.size() - 1, map.size()); + Assertions.assertTrue(map.containsKey(patientIdAndType)); + Assertions.assertFalse(map.containsKey(patient2IdAndType)); + } + + /*******************/ + TestResourceDao mySvc = new TestResourceDao(); @Test diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java index 95a9732fed5..39660fe7399 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java @@ -20,6 +20,7 @@ import ca.uhn.fhir.jpa.binstore.BinaryStorageInterceptor; import ca.uhn.fhir.jpa.bulk.export.api.IBulkDataExportSvc; import ca.uhn.fhir.jpa.config.TestR4Config; import ca.uhn.fhir.jpa.dao.BaseJpaTest; +import ca.uhn.fhir.jpa.dao.IAutoVersioningService; import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc; import ca.uhn.fhir.jpa.dao.data.IForcedIdDao; import ca.uhn.fhir.jpa.dao.data.IMdmLinkDao; @@ -498,6 +499,8 @@ public abstract class BaseJpaR4Test extends BaseJpaTest implements ITestDataBuil protected ValidationSettings myValidationSettings; @Autowired protected IMdmLinkDao myMdmLinkDao; + @Autowired + protected IAutoVersioningService myAutoVersioningService; @AfterEach() public void afterCleanupDao() { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java index a4e65f4ee4d..979d3470f7f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java @@ -1,11 +1,11 @@ package ca.uhn.fhir.jpa.dao.r4; -import ca.uhn.fhir.context.ParserOptions; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.util.BundleBuilder; @@ -27,7 +27,6 @@ import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import java.io.InputStreamReader; -import java.sql.Ref; import java.util.Arrays; import java.util.Date; import java.util.HashSet; @@ -41,6 +40,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.matchesPattern; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { @@ -98,7 +98,6 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { assertEquals("Patient/A/_history/1", eob2.getPatient().getReference()); } - @Test public void testCreateAndUpdateVersionedReferencesInTransaction_VersionedReferenceToVersionedReferenceToUpsertWithNop() { myFhirCtx.getParserOptions().setStripVersionsFromReferences(false); @@ -291,60 +290,13 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { myObservationDao.update(observation); // Make sure we're not introducing any extra DB operations - assertEquals(5, myCaptureQueriesListener.logSelectQueries().size()); + assertEquals(6, myCaptureQueriesListener.logSelectQueries().size()); // Read back and verify that reference is now versioned observation = myObservationDao.read(observationId); assertEquals(patientIdString, observation.getSubject().getReference()); } - - @Test - public void testInsertVersionedReferenceAtPathUsingTransaction() { - myFhirCtx.getParserOptions().setStripVersionsFromReferences(false); - myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); - myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); - - Patient p = new Patient(); - p.setActive(true); - IIdType patientId = myPatientDao.create(p).getId().toUnqualified(); - assertEquals("1", patientId.getVersionIdPart()); - assertEquals(null, patientId.getBaseUrl()); - String patientIdString = patientId.getValue(); - - // Create - put an unversioned reference in the subject - Observation observation = new Observation(); - observation.getSubject().setReference(patientId.toVersionless().getValue()); - - BundleBuilder builder = new BundleBuilder(myFhirCtx); - builder.addTransactionUpdateEntry(observation); - - Bundle transaction = mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); - - Observation ret = myObservationDao.read(observation.getIdElement()); - Assertions.assertTrue(ret != null); - - // Read back and verify that reference is now versioned -// observation = myObservationDao.read(observationId); -// assertEquals(patientIdString, observation.getSubject().getReference()); -// -// myCaptureQueriesListener.clear(); -// -// // Update - put an unversioned reference in the subject -// observation = new Observation(); -// observation.setId(observationId); -// observation.addIdentifier().setSystem("http://foo").setValue("bar"); -// observation.getSubject().setReference(patientId.toVersionless().getValue()); -// myObservationDao.update(observation); -// -// // Make sure we're not introducing any extra DB operations -// assertEquals(5, myCaptureQueriesListener.logSelectQueries().size()); -// -// // Read back and verify that reference is now versioned -// observation = myObservationDao.read(observationId); -// assertEquals(patientIdString, observation.getSubject().getReference()); - } - @Test public void testInsertVersionedReferenceAtPath_InTransaction_SourceAndTargetBothCreated() { myFhirCtx.getParserOptions().setStripVersionsFromReferences(false); @@ -841,13 +793,15 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { "ExplanationOfBenefit.insurance.coverage", "ExplanationOfBenefit.payee.party" ); - myModelConfig.setAutoVersionReferenceAtPaths(new HashSet(strings)); + myModelConfig.setAutoVersionReferenceAtPaths(new HashSet<>(strings)); Bundle bundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, new InputStreamReader( FhirResourceDaoR4VersionedReferenceTest.class.getResourceAsStream("/npe-causing-bundle.json"))); Bundle transaction = mySystemDao.transaction(new SystemRequestDetails(), bundle); + + assertNotNull(transaction); } @Test @@ -862,6 +816,9 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { String versionedPatientReference = resource.getSubject().getReference(); assertThat(versionedPatientReference, is(equalTo("Patient/ABC"))); + Patient p = myPatientDao.read(new IdDt("Patient/ABC")); + Assertions.assertNotNull(p); + myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); obs = new Observation(); @@ -875,6 +832,45 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { } + @Test + @DisplayName("Bundle transaction with AutoVersionReferenceAtPath on and with existing Patient resource should create") + public void bundleTransaction_autoreferenceAtPathWithPreexistingPatientReference_shouldCreate() { + myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); + + String patientId = "Patient/RED"; + IIdType idType = new IdDt(patientId); + + // create patient ahead of time + Patient patient = new Patient(); + patient.setId(patientId); + DaoMethodOutcome outcome = myPatientDao.update(patient); + assertThat(outcome.getResource().getIdElement().getValue(), is(equalTo(patientId + "/_history/1"))); + + Patient returned = myPatientDao.read(idType); + Assertions.assertNotNull(returned); + assertThat(returned.getId(), is(equalTo(patientId + "/_history/1"))); + + // update to change version + patient.setActive(true); + myPatientDao.update(patient); + + Observation obs = new Observation(); + obs.setId("Observation/DEF"); + Reference patientRef = new Reference(patientId); + obs.setSubject(patientRef); + BundleBuilder builder = new BundleBuilder(myFhirCtx); + builder.addTransactionUpdateEntry(obs); + + Bundle submitted = (Bundle)builder.getBundle(); + + Bundle returnedTr = mySystemDao.transaction(new SystemRequestDetails(), submitted); + + Assertions.assertNotNull(returnedTr); + + // some verification + Observation obRet = myObservationDao.read(obs.getIdElement()); + Assertions.assertNotNull(obRet); + } @Test @DisplayName("GH-2901 Test no NPE is thrown on autoversioned references") @@ -882,10 +878,6 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); -// ParserOptions options = new ParserOptions(); -// options.setDontStripVersionsFromReferencesAtPaths("Observation.subject"); -// myFhirCtx.setParserOptions(options); - Observation obs = new Observation(); obs.setId("Observation/DEF"); Reference patientRef = new Reference("Patient/RED"); @@ -895,20 +887,14 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { Bundle submitted = (Bundle)builder.getBundle(); - //1 make sure this test throws the InvalidRequestException (make separate test for this) - //2 add a test for patient created before bundle and then process observation with reference to patient (null check for outcome) - //3 - Bundle returnedTr = mySystemDao.transaction(new SystemRequestDetails(), submitted); - Assertions.assertTrue(returnedTr != null); + Assertions.assertNotNull(returnedTr); // some verification Observation obRet = myObservationDao.read(obs.getIdElement()); - Assertions.assertTrue(obRet != null); + Assertions.assertNotNull(obRet); Patient returned = myPatientDao.read(patientRef.getReferenceElement()); - Assertions.assertTrue(returned != null); + Assertions.assertNotNull(returned); } - - } From 4c90ffe975635e8678de58c959b6ed926deda458 Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Thu, 2 Sep 2021 09:47:55 -0400 Subject: [PATCH 044/143] issue-2901 adding changelog --- ...onatpaths-with-autocreateplaceholders-no-null-pointer.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2901-autoversionatpaths-with-autocreateplaceholders-no-null-pointer.yml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2901-autoversionatpaths-with-autocreateplaceholders-no-null-pointer.yml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2901-autoversionatpaths-with-autocreateplaceholders-no-null-pointer.yml new file mode 100644 index 00000000000..5b5159f2372 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2901-autoversionatpaths-with-autocreateplaceholders-no-null-pointer.yml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 2901 +jira: SMILE-3004 +title: "Processing transactions with AutoversionAtPaths set should create those resources (if AutoCreatePlaceholders is set) and use latest version as expected" From cbfcc02a920881c4f2a1e0fef843451fc9161575 Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Thu, 2 Sep 2021 11:07:06 -0400 Subject: [PATCH 045/143] issue-2901 removing cruft and cleaning up --- .../jpa/dao/AutoVersioningServiceImpl.java | 2 +- .../ca/uhn/fhir/jpa/dao/BaseStorageDao.java | 2 +- .../jpa/dao/BaseTransactionProcessor.java | 3 +- .../fhir/jpa/dao/IAutoVersioningService.java | 2 +- .../uhn/fhir/jpa/dao/data/IForcedIdDao.java | 9 +++++ .../dao/AutoVersioningServiceImplTests.java | 35 +++++++++++++++++-- .../jpa/dao/BaseHapiFhirResourceDaoTest.java | 9 +++++ ...irResourceDaoCreatePlaceholdersR4Test.java | 6 ---- 8 files changed, 54 insertions(+), 14 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java index 1953273dbed..0df25f61e27 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java @@ -18,7 +18,7 @@ public class AutoVersioningServiceImpl implements IAutoVersioningService { private DaoRegistry myDaoRegistry; @Override - public Map getAutoversionsForIds(Collection theIds) { + public Map getExistingAutoversionsForIds(Collection theIds) { HashMap idToPID = new HashMap<>(); HashMap> resourceTypeToIds = new HashMap<>(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java index 2ad93b1d994..b56f0547dd2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java @@ -209,7 +209,7 @@ public abstract class BaseStorageDao { IIdType referenceElement = nextReference.getReferenceElement(); if (!referenceElement.hasBaseUrl()) { - Map idToPID = myAutoVersioningService.getAutoversionsForIds( + Map idToPID = myAutoVersioningService.getExistingAutoversionsForIds( Collections.singletonList(referenceElement) ); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index 724aedc31cd..bf9bbf779ac 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -117,7 +117,6 @@ import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.TreeSet; -import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -1269,7 +1268,7 @@ public abstract class BaseTransactionProcessor { } else { // get a map of // existing ids -> PID (for resources that exist in the DB) - Map idToPID = myAutoVersioningService.getAutoversionsForIds(theReferencesToAutoVersion.stream() + Map idToPID = myAutoVersioningService.getExistingAutoversionsForIds(theReferencesToAutoVersion.stream() .map(ref -> ref.getReferenceElement()).collect(Collectors.toList())); for (IBaseReference baseRef : theReferencesToAutoVersion) { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java index 720edc41478..312c6902a9f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java @@ -19,5 +19,5 @@ public interface IAutoVersioningService { * @param theIds * @return */ - Map getAutoversionsForIds(Collection theIds); + Map getExistingAutoversionsForIds(Collection theIds); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java index 0676f124e90..4854fe421e1 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java @@ -111,6 +111,15 @@ public interface IForcedIdDao extends JpaRepository { "WHERE f.myResourceType = :resource_type AND f.myForcedId IN ( :forced_id )") Collection findAndResolveByForcedIdWithNoType(@Param("resource_type") String theResourceType, @Param("forced_id") Collection theForcedIds); + /** + * This method returns a collection where eah row is an element in the collection. + * Each element in the collection is an object array where order matters. + * The returned order of each object array element is: + * ResourceType (Patient, etc - String), ForcedId (String), ResourcePID (Long), Version (Long) + * @param theResourceType + * @param theForcedIds + * @return + */ @Query("" + "SELECT " + " f.myResourceType, f.myForcedId, f.myResourcePid, t.myVersion " + diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java index 6d8d848b01b..da32e0cbc35 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java @@ -13,7 +13,7 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.Collection; +import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -38,8 +38,10 @@ public class AutoVersioningServiceImplTests { IFhirResourceDao daoMock = Mockito.mock(IFhirResourceDao.class); Mockito.when(daoMock.getIdsOfExistingResources(Mockito.anyList())) .thenReturn(map); + Mockito.when(daoRegistry.getResourceDao(Mockito.anyString())) + .thenReturn(daoMock); - Map retMap = myAutoversioningService.getAutoversionsForIds(Collections.singletonList(type)); + Map retMap = myAutoversioningService.getExistingAutoversionsForIds(Collections.singletonList(type)); Assertions.assertTrue(retMap.containsKey(type)); Assertions.assertEquals(pid.getVersion(), map.get(type).getVersion()); @@ -52,11 +54,38 @@ public class AutoVersioningServiceImplTests { IFhirResourceDao daoMock = Mockito.mock(IFhirResourceDao.class); Mockito.when(daoMock.getIdsOfExistingResources(Mockito.anyList())) .thenReturn(new HashMap<>()); + Mockito.when(daoRegistry.getResourceDao(Mockito.anyString())) + .thenReturn(daoMock); - Map retMap = myAutoversioningService.getAutoversionsForIds(Collections.singletonList(type)); + Map retMap = myAutoversioningService.getExistingAutoversionsForIds(Collections.singletonList(type)); Assertions.assertTrue(retMap.isEmpty()); } + @Test + public void getAutoversionsForIds_whenSomeResourcesDoNotExist_returnsOnlyExistingElements() { + IIdType type = new IdDt("Patient/RED"); + ResourcePersistentId pid = new ResourcePersistentId(1); + pid.setVersion(2L); + HashMap map = new HashMap<>(); + map.put(type, pid); + IIdType type2 = new IdDt("Patient/BLUE"); + // when + IFhirResourceDao daoMock = Mockito.mock(IFhirResourceDao.class); + Mockito.when(daoMock.getIdsOfExistingResources(Mockito.anyList())) + .thenReturn(map); + Mockito.when(daoRegistry.getResourceDao(Mockito.anyString())) + .thenReturn(daoMock); + + // test + Map retMap = myAutoversioningService.getExistingAutoversionsForIds( + Arrays.asList(type, type2) + ); + + // verify + Assertions.assertEquals(map.size(), retMap.size()); + Assertions.assertTrue(retMap.containsKey(type)); + Assertions.assertFalse(retMap.containsKey(type2)); + } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java index 8292ce448fa..951c8a97a38 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java @@ -34,6 +34,7 @@ import static org.junit.jupiter.api.Assertions.fail; @ExtendWith(MockitoExtension.class) class BaseHapiFhirResourceDaoTest { + // our simple concrete test class for BaseHapiFhirResourceDao private class SimpleTestDao extends BaseHapiFhirResourceDao { public SimpleTestDao() { super(); @@ -58,6 +59,14 @@ class BaseHapiFhirResourceDaoTest { //TODO - all other dependency mocks + /** + * Creates a match entry to be returned by myIForcedIdDao. + * This ordering matters (see IForcedIdDao) + * @param theId + * @param thePID + * @param theResourceVersion + * @return + */ private Object[] createMatchEntryForGetIdsOfExistingResources(IIdType theId, long thePID, long theResourceVersion) { Object[] arr = new Object[] { theId.getResourceType(), diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java index 0451769f045..7945896fa60 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java @@ -25,7 +25,6 @@ import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Task; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import java.util.List; @@ -598,9 +597,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { // create Patient patient = new Patient(); -// patient.setId(patientId); patient.setIdElement(new IdType(patientId)); -// patient.setActive(true); myPatientDao.update(patient); // update @@ -624,7 +621,4 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { Observation retObservation = myObservationDao.read(obs.getIdElement()); Assertions.assertTrue(retObservation != null); } - - // always work with the put - // conditional create (replace put with conditional create?) } From ff7433edd7ca51fb47cc45a26b62100640cdd625 Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Thu, 2 Sep 2021 11:43:12 -0400 Subject: [PATCH 046/143] issue-2901 cleaning up test contexts --- .../ca/uhn/fhir/jpa/dao/BaseStorageDao.java | 1 + ...irResourceDaoCreatePlaceholdersR4Test.java | 31 +++++++++---------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java index b56f0547dd2..c042c626bc7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java @@ -233,6 +233,7 @@ public abstract class BaseStorageDao { // resource not found // and no autocreateplaceholders set... // we throw + System.out.println("FINDME"); throw new ResourceNotFoundException(referenceElement); } String newTargetReference = referenceElement.withVersion(version.toString()).getValue(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java index 7945896fa60..870543bdced 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java @@ -1,6 +1,7 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.rest.api.server.IBundleProvider; @@ -52,12 +53,11 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { myDaoConfig.setResourceClientIdStrategy(new DaoConfig().getResourceClientIdStrategy()); myDaoConfig.setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets(new DaoConfig().isPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets()); myDaoConfig.setBundleTypesAllowedForStorage(new DaoConfig().getBundleTypesAllowedForStorage()); - + myModelConfig.setAutoVersionReferenceAtPaths(new ModelConfig().getAutoVersionReferenceAtPaths()); } @Test public void testCreateWithBadReferenceFails() { - Observation o = new Observation(); o.setStatus(ObservationStatus.FINAL); o.getSubject().setReference("Patient/FOO"); @@ -101,27 +101,28 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { params.add(Task.SP_PART_OF, new ReferenceParam("Task/AAA")); List found = toUnqualifiedVersionlessIdValues(myTaskDao.search(params)); assertThat(found, contains(id.getValue())); - - } @Test public void testUpdateWithBadReferenceFails() { + Observation o1 = new Observation(); + o1.setStatus(ObservationStatus.FINAL); + IIdType id = myObservationDao.create(o1, mySrd).getId(); Observation o = new Observation(); - o.setStatus(ObservationStatus.FINAL); - IIdType id = myObservationDao.create(o, mySrd).getId(); - - o = new Observation(); o.setId(id); o.setStatus(ObservationStatus.FINAL); o.getSubject().setReference("Patient/FOO"); - try { + + Assertions.assertThrows(InvalidRequestException.class, () -> { myObservationDao.update(o, mySrd); - fail(); - } catch (InvalidRequestException e) { - assertThat(e.getMessage(), startsWith("Resource Patient/FOO not found, specified in path: Observation.subject")); - } + }); +// try { +// +// fail(); +// } catch (InvalidRequestException e) { +// assertThat(e.getMessage(), startsWith("Resource Patient/FOO not found, specified in path: Observation.subject")); +// } } @Test @@ -454,8 +455,6 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { ourLog.info("\nObservation read after Patient update:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); assertEquals(createdObs.getSubject().getReference(), conditionalUpdatePatId.toUnqualifiedVersionless().getValueAsString()); assertEquals(placeholderPatId.toUnqualifiedVersionless().getValueAsString(), conditionalUpdatePatId.toUnqualifiedVersionless().getValueAsString()); - - } @Test @@ -566,7 +565,6 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { Observation createdObs = myObservationDao.read(id); ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); assertEquals("Patient/ABC", createdObs.getSubject().getReference()); - } @Test @@ -590,7 +588,6 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { @Test public void testAutocreatePlaceholderWithTargetExistingAlreadyTest() { myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); - myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); String patientId = "Patient/RED"; From 49124c298df5e8af0ea20ac4fc88f2b3156f9b8f Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Thu, 2 Sep 2021 13:15:24 -0400 Subject: [PATCH 047/143] issue-2901 fixing test --- .../dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java index 870543bdced..fa953bc28e6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java @@ -114,15 +114,10 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { o.setStatus(ObservationStatus.FINAL); o.getSubject().setReference("Patient/FOO"); - Assertions.assertThrows(InvalidRequestException.class, () -> { + Exception ex = Assertions.assertThrows(InvalidRequestException.class, () -> { myObservationDao.update(o, mySrd); }); -// try { -// -// fail(); -// } catch (InvalidRequestException e) { -// assertThat(e.getMessage(), startsWith("Resource Patient/FOO not found, specified in path: Observation.subject")); -// } + assertThat(ex.getMessage(), startsWith("Resource Patient/FOO not found, specified in path: Observation.subject")); } @Test From 6f82e3568ca8635b7faeecedafac2a5359c10265 Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Thu, 2 Sep 2021 13:20:38 -0400 Subject: [PATCH 048/143] issue-2901 remove debug code --- .../src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java | 1 - 1 file changed, 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java index c042c626bc7..b56f0547dd2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java @@ -233,7 +233,6 @@ public abstract class BaseStorageDao { // resource not found // and no autocreateplaceholders set... // we throw - System.out.println("FINDME"); throw new ResourceNotFoundException(referenceElement); } String newTargetReference = referenceElement.withVersion(version.toString()).getValue(); From 6c700f943226be3769e223c438c0d3540408ce69 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 2 Sep 2021 13:33:27 -0400 Subject: [PATCH 049/143] Add POC for failure --- .../fhir/jpa/dao/dstu3/BaseJpaDstu3Test.java | 8 +++ ...sourceProviderSearchModifierDstu3Test.java | 68 +++++++++++++++++++ .../ResourceProviderSearchModifierR4Test.java | 4 ++ 3 files changed, 80 insertions(+) create mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderSearchModifierDstu3Test.java diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/BaseJpaDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/BaseJpaDstu3Test.java index 7714d442b05..9c60bafa905 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/BaseJpaDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/BaseJpaDstu3Test.java @@ -63,6 +63,7 @@ import org.hl7.fhir.dstu3.model.AllergyIntolerance; import org.hl7.fhir.dstu3.model.Appointment; import org.hl7.fhir.dstu3.model.AuditEvent; import org.hl7.fhir.dstu3.model.Binary; +import org.hl7.fhir.dstu3.model.BodySite; import org.hl7.fhir.dstu3.model.Bundle; import org.hl7.fhir.dstu3.model.CarePlan; import org.hl7.fhir.dstu3.model.CodeSystem; @@ -95,6 +96,7 @@ import org.hl7.fhir.dstu3.model.Organization; import org.hl7.fhir.dstu3.model.Patient; import org.hl7.fhir.dstu3.model.Practitioner; import org.hl7.fhir.dstu3.model.PractitionerRole; +import org.hl7.fhir.dstu3.model.Procedure; import org.hl7.fhir.dstu3.model.ProcedureRequest; import org.hl7.fhir.dstu3.model.Questionnaire; import org.hl7.fhir.dstu3.model.QuestionnaireResponse; @@ -317,6 +319,12 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest { @Qualifier("myTaskDaoDstu3") protected IFhirResourceDao myTaskDao; @Autowired + @Qualifier("myBodySiteDaoDstu3") + protected IFhirResourceDao myBodySiteDao; + @Autowired + @Qualifier("myProcedureDaoDstu3") + protected IFhirResourceDao myProcedureDao; + @Autowired protected ITermConceptDao myTermConceptDao; @Autowired protected ITermCodeSystemDao myTermCodeSystemDao; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderSearchModifierDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderSearchModifierDstu3Test.java new file mode 100644 index 00000000000..b74110c10fd --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderSearchModifierDstu3Test.java @@ -0,0 +1,68 @@ +package ca.uhn.fhir.jpa.provider.dstu3; + +import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; +import ca.uhn.fhir.jpa.searchparam.MatchUrlService; +import ca.uhn.fhir.jpa.searchparam.ResourceSearch; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.api.server.IBundleProvider; +import org.hl7.fhir.dstu3.model.BodySite; +import org.hl7.fhir.dstu3.model.CodeableConcept; +import org.hl7.fhir.dstu3.model.Coding; +import org.hl7.fhir.dstu3.model.Encounter; +import org.hl7.fhir.dstu3.model.Observation; +import org.hl7.fhir.dstu3.model.Patient; +import org.hl7.fhir.dstu3.model.Procedure; +import org.hl7.fhir.dstu3.model.Reference; +import org.hl7.fhir.dstu3.model.SearchParameter; +import org.hl7.fhir.instance.model.api.IIdType; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.Collections; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.is; + +public class ResourceProviderSearchModifierDstu3Test extends BaseResourceProviderDstu3Test{ + @Autowired + MatchUrlService myMatchUrlService; + + @Test + public void testReplicateBugWithNotDuringChain() { + Encounter enc = new Encounter(); + enc.setType(Collections.singletonList(new CodeableConcept().addCoding(new Coding("system", "value", "display")))); + IIdType encId = myEncounterDao.create(enc).getId(); + + Observation obs = new Observation(); + obs.setContext(new Reference(encId)); + myObservationDao.create(obs).getId(); + + { + //Works when not chained: + String encounterSearchString = "Encounter?type:not=system|value"; + ResourceSearch resourceSearch = myMatchUrlService.getResourceSearch(encounterSearchString); + SearchParameterMap searchParameterMap = resourceSearch.getSearchParameterMap(); + IBundleProvider search = myEncounterDao.search(searchParameterMap); + assertThat(search.size(), is(equalTo(0))); + } + { + //Works without the NOT qualifier. + String resultSearchString = "Observation?context.type=system|value"; + ResourceSearch resourceSearch = myMatchUrlService.getResourceSearch(resultSearchString); + SearchParameterMap searchParameterMap = resourceSearch.getSearchParameterMap(); + IBundleProvider search = myObservationDao.search(searchParameterMap); + assertThat(search.size(), is(equalTo(1))); + } + + { + //Fails during a chain + String noResultSearchString = "Observation?context.type:not=system|value"; + ResourceSearch resourceSearch = myMatchUrlService.getResourceSearch(noResultSearchString); + SearchParameterMap searchParameterMap = resourceSearch.getSearchParameterMap(); + IBundleProvider search = myObservationDao.search(searchParameterMap); + assertThat(search.size(), is(equalTo(0))); + } + + } +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderSearchModifierR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderSearchModifierR4Test.java index 22210d36e56..e667422fcda 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderSearchModifierR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderSearchModifierR4Test.java @@ -13,11 +13,14 @@ import org.apache.http.client.methods.HttpGet; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.CodeableConcept; +import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.DateTimeType; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Observation.ObservationStatus; import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Procedure; import org.hl7.fhir.r4.model.Quantity; +import org.hl7.fhir.r4.model.Reference; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -199,6 +202,7 @@ public class ResourceProviderSearchModifierR4Test extends BaseResourceProviderR4 assertEquals(obsList.get(5).toString(), ids.get(3)); } + private List searchAndReturnUnqualifiedVersionlessIdValues(String uri) throws IOException { List ids; From 26ff15f9392f361090b02c72853a12d7c0694030 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 2 Sep 2021 14:33:30 -0400 Subject: [PATCH 050/143] Revert "Fix search of :not modifier" --- ...h-with-not-modifier-on-multiple-codes.yaml | 4 - .../fhir/jpa/search/builder/QueryStack.java | 51 +--- .../ResourceProviderSearchModifierR4Test.java | 248 ------------------ 3 files changed, 14 insertions(+), 289 deletions(-) delete mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2837-search-with-not-modifier-on-multiple-codes.yaml delete mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderSearchModifierR4Test.java diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2837-search-with-not-modifier-on-multiple-codes.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2837-search-with-not-modifier-on-multiple-codes.yaml deleted file mode 100644 index fed478a7120..00000000000 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2837-search-with-not-modifier-on-multiple-codes.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -type: fix -issue: 2837 -title: "The :not modifier does not currently work for observations with multiple codes for the search. This is fixed." diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java index 068c06c5fe9..253b07e33b6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java @@ -988,12 +988,9 @@ public class QueryStack { String theSpnamePrefix, RuntimeSearchParam theSearchParam, List theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) { - List tokens = new ArrayList<>(); - - boolean paramInverted = false; - TokenParamModifier modifier = null; - + List tokens = new ArrayList<>(); for (IQueryParameterType nextOr : theList) { + if (nextOr instanceof TokenParam) { if (!((TokenParam) nextOr).isEmpty()) { TokenParam id = (TokenParam) nextOr; @@ -1012,20 +1009,17 @@ public class QueryStack { } return createPredicateString(theSourceJoinColumn, theResourceName, theSpnamePrefix, theSearchParam, theList, null, theRequestPartitionId); - } - - modifier = id.getModifier(); - // for :not modifier, create a token and remove the :not modifier - if (modifier != null && modifier == TokenParamModifier.NOT) { - tokens.add(new TokenParam(((TokenParam) nextOr).getSystem(), ((TokenParam) nextOr).getValue())); - paramInverted = true; - } else { - tokens.add(nextOr); } + + tokens.add(nextOr); + } + } else { + tokens.add(nextOr); } + } if (tokens.isEmpty()) { @@ -1033,31 +1027,14 @@ public class QueryStack { } String paramName = getParamNameWithPrefix(theSpnamePrefix, theSearchParam.getName()); - Condition predicate; - BaseJoiningPredicateBuilder join; - - if (paramInverted) { - SearchQueryBuilder sqlBuilder = mySqlBuilder.newChildSqlBuilder(); - TokenPredicateBuilder tokenSelector = sqlBuilder.addTokenPredicateBuilder(null); - sqlBuilder.addPredicate(tokenSelector.createPredicateToken(tokens, theResourceName, theSpnamePrefix, theSearchParam, theRequestPartitionId)); - SelectQuery sql = sqlBuilder.getSelect(); - Expression subSelect = new Subquery(sql); - - join = mySqlBuilder.getOrCreateFirstPredicateBuilder(); - predicate = new InCondition(join.getResourceIdColumn(), subSelect).setNegate(true); - - } else { - - TokenPredicateBuilder tokenJoin = createOrReusePredicateBuilder(PredicateBuilderTypeEnum.TOKEN, theSourceJoinColumn, paramName, () -> mySqlBuilder.addTokenPredicateBuilder(theSourceJoinColumn)).getResult(); - if (theList.get(0).getMissing() != null) { - return tokenJoin.createPredicateParamMissingForNonReference(theResourceName, paramName, theList.get(0).getMissing(), theRequestPartitionId); - } + TokenPredicateBuilder join = createOrReusePredicateBuilder(PredicateBuilderTypeEnum.TOKEN, theSourceJoinColumn, paramName, () -> mySqlBuilder.addTokenPredicateBuilder(theSourceJoinColumn)).getResult(); - predicate = tokenJoin.createPredicateToken(tokens, theResourceName, theSpnamePrefix, theSearchParam, theOperation, theRequestPartitionId); - join = tokenJoin; - } - + if (theList.get(0).getMissing() != null) { + return join.createPredicateParamMissingForNonReference(theResourceName, paramName, theList.get(0).getMissing(), theRequestPartitionId); + } + + Condition predicate = join.createPredicateToken(tokens, theResourceName, theSpnamePrefix, theSearchParam, theOperation, theRequestPartitionId); return join.combineWithRequestPartitionIdPredicate(theRequestPartitionId, predicate); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderSearchModifierR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderSearchModifierR4Test.java deleted file mode 100644 index 22210d36e56..00000000000 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderSearchModifierR4Test.java +++ /dev/null @@ -1,248 +0,0 @@ -package ca.uhn.fhir.jpa.provider.r4; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.io.IOUtils; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.HttpGet; -import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.r4.model.Bundle; -import org.hl7.fhir.r4.model.CodeableConcept; -import org.hl7.fhir.r4.model.DateTimeType; -import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Observation.ObservationStatus; -import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.Quantity; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import ca.uhn.fhir.jpa.api.config.DaoConfig; -import ca.uhn.fhir.parser.StrictErrorHandler; -import ca.uhn.fhir.rest.client.interceptor.CapturingInterceptor; - - -public class ResourceProviderSearchModifierR4Test extends BaseResourceProviderR4Test { - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceProviderSearchModifierR4Test.class); - private CapturingInterceptor myCapturingInterceptor = new CapturingInterceptor(); - - @Override - @AfterEach - public void after() throws Exception { - super.after(); - - myDaoConfig.setAllowMultipleDelete(new DaoConfig().isAllowMultipleDelete()); - myDaoConfig.setAllowExternalReferences(new DaoConfig().isAllowExternalReferences()); - myDaoConfig.setReuseCachedSearchResultsForMillis(new DaoConfig().getReuseCachedSearchResultsForMillis()); - myDaoConfig.setCountSearchResultsUpTo(new DaoConfig().getCountSearchResultsUpTo()); - myDaoConfig.setSearchPreFetchThresholds(new DaoConfig().getSearchPreFetchThresholds()); - myDaoConfig.setAllowContainsSearches(new DaoConfig().isAllowContainsSearches()); - myDaoConfig.setIndexMissingFields(new DaoConfig().getIndexMissingFields()); - - myClient.unregisterInterceptor(myCapturingInterceptor); - } - - @BeforeEach - @Override - public void before() throws Exception { - super.before(); - myFhirCtx.setParserErrorHandler(new StrictErrorHandler()); - - myDaoConfig.setAllowMultipleDelete(true); - myClient.registerInterceptor(myCapturingInterceptor); - myDaoConfig.setSearchPreFetchThresholds(new DaoConfig().getSearchPreFetchThresholds()); - } - - @BeforeEach - public void beforeDisableResultReuse() { - myDaoConfig.setReuseCachedSearchResultsForMillis(null); - } - - @Test - public void testSearch_SingleCode_not_modifier() throws Exception { - - List obsList = createObs(10, false); - - String uri = ourServerBase + "/Observation?code:not=2345-3"; - List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); - - assertEquals(9, ids.size()); - assertEquals(obsList.get(0).toString(), ids.get(0)); - assertEquals(obsList.get(1).toString(), ids.get(1)); - assertEquals(obsList.get(2).toString(), ids.get(2)); - assertEquals(obsList.get(4).toString(), ids.get(3)); - assertEquals(obsList.get(5).toString(), ids.get(4)); - assertEquals(obsList.get(6).toString(), ids.get(5)); - assertEquals(obsList.get(7).toString(), ids.get(6)); - assertEquals(obsList.get(8).toString(), ids.get(7)); - assertEquals(obsList.get(9).toString(), ids.get(8)); - } - - @Test - public void testSearch_SingleCode_multiple_not_modifier() throws Exception { - - List obsList = createObs(10, false); - - String uri = ourServerBase + "/Observation?code:not=2345-3&code:not=2345-7&code:not=2345-9"; - List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); - - assertEquals(7, ids.size()); - assertEquals(obsList.get(0).toString(), ids.get(0)); - assertEquals(obsList.get(1).toString(), ids.get(1)); - assertEquals(obsList.get(2).toString(), ids.get(2)); - assertEquals(obsList.get(4).toString(), ids.get(3)); - assertEquals(obsList.get(5).toString(), ids.get(4)); - assertEquals(obsList.get(6).toString(), ids.get(5)); - assertEquals(obsList.get(8).toString(), ids.get(6)); - } - - @Test - public void testSearch_SingleCode_mix_modifier() throws Exception { - - List obsList = createObs(10, false); - - // Observation?code:not=2345-3&code:not=2345-7&code:not=2345-9 - // slower than Observation?code:not=2345-3&code=2345-7&code:not=2345-9 - String uri = ourServerBase + "/Observation?code:not=2345-3&code=2345-7&code:not=2345-9"; - List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); - - assertEquals(1, ids.size()); - assertEquals(obsList.get(7).toString(), ids.get(0)); - } - - @Test - public void testSearch_SingleCode_or_not_modifier() throws Exception { - - List obsList = createObs(10, false); - - String uri = ourServerBase + "/Observation?code:not=2345-3,2345-7,2345-9"; - List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); - - assertEquals(7, ids.size()); - assertEquals(obsList.get(0).toString(), ids.get(0)); - assertEquals(obsList.get(1).toString(), ids.get(1)); - assertEquals(obsList.get(2).toString(), ids.get(2)); - assertEquals(obsList.get(4).toString(), ids.get(3)); - assertEquals(obsList.get(5).toString(), ids.get(4)); - assertEquals(obsList.get(6).toString(), ids.get(5)); - assertEquals(obsList.get(8).toString(), ids.get(6)); - } - - @Test - public void testSearch_MultiCode_not_modifier() throws Exception { - - List obsList = createObs(10, true); - - String uri = ourServerBase + "/Observation?code:not=2345-3"; - List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); - - assertEquals(8, ids.size()); - assertEquals(obsList.get(0).toString(), ids.get(0)); - assertEquals(obsList.get(1).toString(), ids.get(1)); - assertEquals(obsList.get(4).toString(), ids.get(2)); - assertEquals(obsList.get(5).toString(), ids.get(3)); - assertEquals(obsList.get(6).toString(), ids.get(4)); - assertEquals(obsList.get(7).toString(), ids.get(5)); - assertEquals(obsList.get(8).toString(), ids.get(6)); - assertEquals(obsList.get(9).toString(), ids.get(7)); - } - - @Test - public void testSearch_MultiCode_multiple_not_modifier() throws Exception { - - List obsList = createObs(10, true); - - String uri = ourServerBase + "/Observation?code:not=2345-3&code:not=2345-4"; - List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); - - assertEquals(7, ids.size()); - assertEquals(obsList.get(0).toString(), ids.get(0)); - assertEquals(obsList.get(1).toString(), ids.get(1)); - assertEquals(obsList.get(5).toString(), ids.get(2)); - assertEquals(obsList.get(6).toString(), ids.get(3)); - assertEquals(obsList.get(7).toString(), ids.get(4)); - assertEquals(obsList.get(8).toString(), ids.get(5)); - assertEquals(obsList.get(9).toString(), ids.get(6)); - } - - @Test - public void testSearch_MultiCode_mix_modifier() throws Exception { - - List obsList = createObs(10, true); - - String uri = ourServerBase + "/Observation?code:not=2345-3&code=2345-7&code:not=2345-9"; - List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); - - assertEquals(2, ids.size()); - assertEquals(obsList.get(6).toString(), ids.get(0)); - assertEquals(obsList.get(7).toString(), ids.get(1)); - } - - @Test - public void testSearch_MultiCode_or_not_modifier() throws Exception { - - List obsList = createObs(10, true); - - String uri = ourServerBase + "/Observation?code:not=2345-3,2345-7,2345-9"; - List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); - - assertEquals(4, ids.size()); - assertEquals(obsList.get(0).toString(), ids.get(0)); - assertEquals(obsList.get(1).toString(), ids.get(1)); - assertEquals(obsList.get(4).toString(), ids.get(2)); - assertEquals(obsList.get(5).toString(), ids.get(3)); - } - - - private List searchAndReturnUnqualifiedVersionlessIdValues(String uri) throws IOException { - List ids; - HttpGet get = new HttpGet(uri); - - try (CloseableHttpResponse response = ourHttpClient.execute(get)) { - String resp = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); - ourLog.info("Response was: {}", resp); - Bundle bundle = myFhirCtx.newXmlParser().parseResource(Bundle.class, resp); - ourLog.info("Bundle: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); - ids = toUnqualifiedVersionlessIdValues(bundle); - } - return ids; - } - - private List createObs(int obsNum, boolean isMultiple) { - - Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue("001"); - patient.addName().setFamily("Tester").addGiven("Joe"); - IIdType pid = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); - - List obsIds = new ArrayList<>(); - IIdType obsId = null; - for (int i=0; i Date: Thu, 2 Sep 2021 14:38:30 -0400 Subject: [PATCH 051/143] fixed the double chain with contained resource second case --- .../fhir/jpa/search/builder/QueryStack.java | 114 +++++++++++++++++- .../ResourceLinkPredicateBuilder.java | 39 +++--- .../dao/r4/ChainedContainedR4SearchTest.java | 4 +- 3 files changed, 136 insertions(+), 21 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java index 73f6efacf81..496de303185 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java @@ -729,10 +729,10 @@ public class QueryStack { return predicateBuilder.createPredicate(theRequest, theResourceName, theParamName, theList, theOperation, theRequestPartitionId); } - private Condition createPredicateReferenceForContainedResource(@Nullable DbColumn theSourceJoinColumn, - String theResourceName, String theParamName, RuntimeSearchParam theSearchParam, - List theList, SearchFilterParser.CompareOperation theOperation, - RequestDetails theRequest, RequestPartitionId theRequestPartitionId) { + public Condition createPredicateReferenceForContainedResource(@Nullable DbColumn theSourceJoinColumn, + String theResourceName, String theParamName, RuntimeSearchParam theSearchParam, + List theList, SearchFilterParser.CompareOperation theOperation, + RequestDetails theRequest, RequestPartitionId theRequestPartitionId) { String spnamePrefix = theParamName; @@ -832,6 +832,112 @@ public class QueryStack { return containedCondition; } + public Condition createPredicateReferenceForContainedResourceNew(@Nullable DbColumn theSourceJoinColumn, + String theResourceName, String theParamName, RuntimeSearchParam theSearchParam, + List theList, SearchFilterParser.CompareOperation theOperation, + RequestDetails theRequest, RequestPartitionId theRequestPartitionId) { + + String spnamePrefix = theParamName; + + String targetChain = null; + String targetParamName = null; + String targetQualifier = null; + String targetValue = null; + + RuntimeSearchParam targetParamDefinition = null; + + List orValues = Lists.newArrayList(); + IQueryParameterType qp = null; + + for (int orIdx = 0; orIdx < theList.size(); orIdx++) { + + IQueryParameterType nextOr = theList.get(orIdx); + + if (nextOr instanceof ReferenceParam) { + + ReferenceParam referenceParam = (ReferenceParam) nextOr; + + // 1. Find out the parameter, qualifier and the value + targetChain = referenceParam.getChain(); + targetParamName = targetChain; + targetValue = nextOr.getValueAsQueryToken(myFhirContext); + + int qualifierIndex = targetChain.indexOf(':'); + if (qualifierIndex != -1) { + targetParamName = targetChain.substring(0, qualifierIndex); + targetQualifier = targetChain.substring(qualifierIndex); + } + + // 2. find out the data type + if (targetParamDefinition == null) { + Iterator it = theSearchParam.getTargets().iterator(); + while (it.hasNext()) { + targetParamDefinition = mySearchParamRegistry.getActiveSearchParam(it.next(), targetParamName); + // TODO Is it safe to stop as soon as we find one? Is it possible that, if we kept going, we would uncover different types? + if (targetParamDefinition != null) + break; + } + } + + if (targetParamDefinition == null) { + throw new InvalidRequestException("Unknown search parameter name: " + targetParamName + "."); + } + + qp = toParameterType(targetParamDefinition); + qp.setValueAsQueryToken(myFhirContext, targetParamName, targetQualifier, targetValue); + orValues.add(qp); + } + } + + orValues = orValues.stream().distinct().collect(Collectors.toList()); + + if (targetParamDefinition == null) { + throw new InvalidRequestException("Unknown search parameter names: [" + theSearchParam.getName() + "]."); + } + + // 3. create the query + Condition containedCondition = null; + + switch (targetParamDefinition.getParamType()) { + case DATE: + containedCondition = createPredicateDate(theSourceJoinColumn, theResourceName, spnamePrefix, targetParamDefinition, + orValues, theOperation, theRequestPartitionId); + break; + case NUMBER: + containedCondition = createPredicateNumber(theSourceJoinColumn, theResourceName, spnamePrefix, targetParamDefinition, + orValues, theOperation, theRequestPartitionId); + break; + case QUANTITY: + containedCondition = createPredicateQuantity(theSourceJoinColumn, theResourceName, spnamePrefix, targetParamDefinition, + orValues, theOperation, theRequestPartitionId); + break; + case STRING: + containedCondition = createPredicateString(theSourceJoinColumn, theResourceName, spnamePrefix, targetParamDefinition, + orValues, theOperation, theRequestPartitionId); + break; + case TOKEN: + containedCondition = createPredicateToken(theSourceJoinColumn, theResourceName, spnamePrefix, targetParamDefinition, + orValues, theOperation, theRequestPartitionId); + break; + case COMPOSITE: + containedCondition = createPredicateComposite(theSourceJoinColumn, theResourceName, spnamePrefix, targetParamDefinition, + orValues, theRequestPartitionId); + break; + case URI: + containedCondition = createPredicateUri(theSourceJoinColumn, theResourceName, spnamePrefix, targetParamDefinition, + orValues, theOperation, theRequest, theRequestPartitionId); + break; + case HAS: + case REFERENCE: + case SPECIAL: + default: + throw new InvalidRequestException( + "The search type:" + targetParamDefinition.getParamType() + " is not supported."); + } + + return containedCondition; + } + @Nullable public Condition createPredicateResourceId(@Nullable DbColumn theSourceJoinColumn, List> theValues, String theResourceName, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) { ResourceIdPredicateBuilder builder = mySqlBuilder.newResourceIdBuilder(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java index aa1e6d7ea7e..a79119db334 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java @@ -80,6 +80,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Collections; +import java.util.HashSet; import java.util.List; import java.util.ListIterator; import java.util.Set; @@ -339,15 +340,26 @@ public class ResourceLinkPredicateBuilder extends BaseJoiningPredicateBuilder { List candidateTargetTypes = new ArrayList<>(); List orPredicates = new ArrayList<>(); QueryStack childQueryFactory = myQueryStack.newChildQueryFactoryWithFullBuilderReuse(); - for (String nextType : resourceTypes) { - String chain = theReferenceParam.getChain(); - String remainingChain = null; - int chainDotIndex = chain.indexOf('.'); - if (chainDotIndex != -1) { - remainingChain = chain.substring(chainDotIndex + 1); - chain = chain.substring(0, chainDotIndex); - } + String chain = theReferenceParam.getChain(); + + String remainingChain = null; + int chainDotIndex = chain.indexOf('.'); + if (chainDotIndex != -1) { + remainingChain = chain.substring(chainDotIndex + 1); + chain = chain.substring(0, chainDotIndex); + } + + int qualifierIndex = chain.indexOf(':'); + String qualifier = null; + if (qualifierIndex != -1) { + qualifier = chain.substring(qualifierIndex); + chain = chain.substring(0, qualifierIndex); + } + + boolean isMeta = ResourceMetaParams.RESOURCE_META_PARAMS.containsKey(chain); + + for (String nextType : resourceTypes) { RuntimeResourceDefinition typeDef = getFhirContext().getResourceDefinition(nextType); String subResourceName = typeDef.getName(); @@ -358,14 +370,6 @@ public class ResourceLinkPredicateBuilder extends BaseJoiningPredicateBuilder { continue; } - int qualifierIndex = chain.indexOf(':'); - String qualifier = null; - if (qualifierIndex != -1) { - qualifier = chain.substring(qualifierIndex); - chain = chain.substring(0, qualifierIndex); - } - - boolean isMeta = ResourceMetaParams.RESOURCE_META_PARAMS.containsKey(chain); RuntimeSearchParam param = null; if (!isMeta) { param = mySearchParamRegistry.getActiveSearchParam(nextType, chain); @@ -400,6 +404,9 @@ public class ResourceLinkPredicateBuilder extends BaseJoiningPredicateBuilder { orPredicates.add(toAndPredicate(andPredicates)); + if (getModelConfig().isIndexOnContainedResources() && theReferenceParam.getChain().contains(".")) { + orPredicates.add(childQueryFactory.createPredicateReferenceForContainedResourceNew(myColumnTargetResourceId, subResourceName, chain, param, orValues, null, theRequest, theRequestPartitionId)); + } } if (candidateTargetTypes.isEmpty()) { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java index 8efb1df3087..6b599f788d7 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java @@ -163,6 +163,7 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { // This is the case that is most relevant to SMILE-2899 IIdType oid1; + myCaptureQueriesListener.clear(); { Organization org = new Organization(); org.setId("org"); @@ -183,11 +184,12 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } + ourLog.info("Data setup SQL: " + myCaptureQueriesListener.getInsertQueriesForCurrentThread()); String url = "/Observation?subject.organization.name=HealthCo"; myCaptureQueriesListener.clear(); List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); - ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + ourLog.info("Data retrieval SQL: " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); assertEquals(1L, oids.size()); assertThat(oids, contains(oid1.getIdPart())); From c28f5e75b3d2a7acae062f6106d4511f5a9f482a Mon Sep 17 00:00:00 2001 From: Vadim Karantayer Date: Thu, 2 Sep 2021 15:35:40 -0400 Subject: [PATCH 052/143] update TestUtil to recursively scan down into subpackages --- .../src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java index 22676af6bf8..f878494e559 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java @@ -96,7 +96,7 @@ public class TestUtil { .collect(Collectors.toSet()); } - ImmutableSet classes = ClassPath.from(TestUtil.class.getClassLoader()).getTopLevelClasses(packageName); + ImmutableSet classes = ClassPath.from(TestUtil.class.getClassLoader()).getTopLevelClassesRecursive(packageName); Set names = new HashSet(); if (classes.size() <= 1) { From 2a60e91713ae20cd983365cdd8bdb51e3f097ecf Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Thu, 2 Sep 2021 17:41:57 -0400 Subject: [PATCH 053/143] WIP Dup Test --- .../uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java | 1 + .../fhir/jpa/mdm/interceptor/MdmEventIT.java | 190 ++++++++++++++++++ .../interceptor/MdmStorageInterceptorIT.java | 32 +-- 3 files changed, 193 insertions(+), 30 deletions(-) create mode 100644 hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmEventIT.java diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java index ce285b58bac..2c2eba5342e 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java @@ -101,6 +101,7 @@ public class MdmMatchLinkSvc { handleMdmWithSingleCandidate(theResource, firstMatch, theMdmTransactionContext); } else { log(theMdmTransactionContext, "MDM received multiple match candidates, that were linked to different Golden Resources. Setting POSSIBLE_DUPLICATES and POSSIBLE_MATCHES."); + //Set them all as POSSIBLE_MATCH List goldenResources = new ArrayList<>(); for (MatchedGoldenResourceCandidate matchedGoldenResourceCandidate : theCandidateList.getCandidates()) { diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmEventIT.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmEventIT.java new file mode 100644 index 00000000000..1bfdd0c1cb2 --- /dev/null +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmEventIT.java @@ -0,0 +1,190 @@ +package ca.uhn.fhir.jpa.mdm.interceptor; + +import ca.uhn.fhir.jpa.dao.index.IdHelperService; +import ca.uhn.fhir.jpa.entity.MdmLink; +import ca.uhn.fhir.jpa.mdm.BaseMdmR4Test; +import ca.uhn.fhir.jpa.mdm.helper.MdmHelperConfig; +import ca.uhn.fhir.jpa.mdm.helper.MdmHelperR4; +import ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer; +import ca.uhn.fhir.mdm.api.MdmLinkEvent; +import ca.uhn.fhir.mdm.model.MdmTransactionContext; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.rest.server.messaging.ResourceOperationMessage; +import org.hibernate.dialect.H2Dialect; +import org.hibernate.search.backend.lucene.cfg.LuceneBackendSettings; +import org.hibernate.search.backend.lucene.cfg.LuceneIndexSettings; +import org.hibernate.search.engine.cfg.BackendSettings; +import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Practitioner; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.RegisterExtension; +import org.slf4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Primary; +import org.springframework.data.domain.Example; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestPropertySource; + +import java.util.Properties; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.slf4j.LoggerFactory.getLogger; + +@TestPropertySource(properties = { + "mdm.prevent_multiple_eids=false" +}) +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +@ContextConfiguration(classes = {MdmHelperConfig.class}) +public class MdmEventIT extends BaseMdmR4Test { + + private static final Logger ourLog = getLogger(MdmEventIT.class); + + @RegisterExtension + @Autowired + public MdmHelperR4 myMdmHelper; + @Autowired + private IdHelperService myIdHelperService; + + @Bean + @Primary + public Properties jpaProperties() { + Properties extraProperties = new Properties(); + extraProperties.put("hibernate.format_sql", "true"); + extraProperties.put("hibernate.show_sql", "true"); + extraProperties.put("hibernate.hbm2ddl.auto", "update"); + extraProperties.put("hibernate.dialect", H2Dialect.class.getName()); + + extraProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "lucene"); + extraProperties.put(BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER), HapiLuceneAnalysisConfigurer.class.getName()); + extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), "local-heap"); + extraProperties.put(BackendSettings.backendKey(LuceneBackendSettings.LUCENE_VERSION), "LUCENE_CURRENT"); + extraProperties.put(HibernateOrmMapperSettings.ENABLED, "true"); + + return extraProperties; + } + + + @Test + public void testDuplicateLinkChangeEvent() throws InterruptedException { + Patient patient1 = buildJanePatient(); + addExternalEID(patient1, "eid-1"); + addExternalEID(patient1, "eid-11"); + patient1 = createPatientAndUpdateLinks(patient1); + + Patient patient2 = buildPaulPatient(); + addExternalEID(patient2, "eid-2"); + addExternalEID(patient2, "eid-22"); + patient2 = createPatientAndUpdateLinks(patient2); + + Patient patient3 = buildPaulPatient(); + addExternalEID(patient3, "eid-22"); + patient3 = createPatientAndUpdateLinks(patient3); + + patient2.getIdentifier().clear(); + addExternalEID(patient2, "eid-11"); + addExternalEID(patient2, "eid-22"); + + patient2 = (Patient) myPatientDao.update(patient2).getResource(); + MdmTransactionContext ctx = myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient2, createContextForUpdate(patient2.getIdElement().getResourceType())); + + MdmLinkEvent mdmLinkEvent = ctx.getMdmLinkEvent(); + assertFalse(mdmLinkEvent.getDuplicateGoldenResourceIds().isEmpty()); + } + + // @Test + public void testCreateLinkChangeEvent() throws InterruptedException { + Practitioner pr = buildPractitionerWithNameAndId("Young", "AC-DC"); + myMdmHelper.createWithLatch(pr); + + ResourceOperationMessage resourceOperationMessage = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(ResourceOperationMessage.class); + assertNotNull(resourceOperationMessage); + assertEquals(pr.getId(), resourceOperationMessage.getId()); + + MdmLink link = getLinkByTargetId(pr); + + MdmLinkEvent linkChangeEvent = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(MdmLinkEvent.class); + assertNotNull(linkChangeEvent); + assertEquals(link.getGoldenResourcePid(), new IdDt(linkChangeEvent.getGoldenResourceId()).getIdPartAsLong()); + assertEquals(link.getSourcePid(), new IdDt(linkChangeEvent.getTargetResourceId()).getIdPartAsLong()); + } + + /* + @Test + public void testDuplicateLinkChangeEvent() throws InterruptedException { + logAllLinks(); + for (IBaseResource r : myPatientDao.search(new SearchParameterMap()).getAllResources()) { + ourLog.info("Found {}", r); + } + + Patient myPatient = createPatientAndUpdateLinks(buildPaulPatient()); + StringType myPatientId = new StringType(myPatient.getIdElement().getValue()); + + Patient mySourcePatient = getGoldenResourceFromTargetResource(myPatient); + StringType mySourcePatientId = new StringType(mySourcePatient.getIdElement().getValue()); + StringType myVersionlessGodlenResourceId = new StringType(mySourcePatient.getIdElement().toVersionless().getValue()); + + MdmLink myLink = myMdmLinkDaoSvc.findMdmLinkBySource(myPatient).get(); + // Tests require our initial link to be a POSSIBLE_MATCH + myLink.setMatchResult(MdmMatchResultEnum.POSSIBLE_MATCH); + saveLink(myLink); + assertEquals(MdmLinkSourceEnum.AUTO, myLink.getLinkSource()); +// myDaoConfig.setExpungeEnabled(true); + + // Add a second patient + createPatientAndUpdateLinks(buildJanePatient()); + + // Add a possible duplicate + StringType myLinkSource = new StringType(MdmLinkSourceEnum.AUTO.name()); + Patient sourcePatient1 = createGoldenPatient(); + StringType myGoldenResource1Id = new StringType(sourcePatient1.getIdElement().toVersionless().getValue()); + Long sourcePatient1Pid = myIdHelperService.getPidOrNull(sourcePatient1); + Patient sourcePatient2 = createGoldenPatient(); + StringType myGoldenResource2Id = new StringType(sourcePatient2.getIdElement().toVersionless().getValue()); + Long sourcePatient2Pid = myIdHelperService.getPidOrNull(sourcePatient2); + + + MdmLink possibleDuplicateMdmLink = myMdmLinkDaoSvc.newMdmLink().setGoldenResourcePid(sourcePatient1Pid).setSourcePid(sourcePatient2Pid).setMatchResult(MdmMatchResultEnum.POSSIBLE_DUPLICATE).setLinkSource(MdmLinkSourceEnum.AUTO); + saveLink(possibleDuplicateMdmLink); + + logAllLinks(); + + ResourceOperationMessage resourceOperationMessage = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(ResourceOperationMessage.class); + assertNotNull(resourceOperationMessage); + assertEquals(sourcePatient2.getId(), resourceOperationMessage.getId()); + } + */ + + private MdmLink getLinkByTargetId(IBaseResource theResource) { + MdmLink example = new MdmLink(); + example.setSourcePid(theResource.getIdElement().getIdPartAsLong()); + return myMdmLinkDao.findAll(Example.of(example)).get(0); + } + + @Test + public void testUpdateLinkChangeEvent() throws InterruptedException { + Patient patient1 = addExternalEID(buildJanePatient(), "eid-1"); + myMdmHelper.createWithLatch(patient1); + + MdmTransactionContext ctx = createContextForCreate("Patient"); + myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient1, ctx); + ourLog.info(ctx.getMdmLinkEvent().toString()); + assertEquals(patient1.getIdElement().getValue(), ctx.getMdmLinkEvent().getTargetResourceId()); + assertEquals(getLinkByTargetId(patient1).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkEvent().getGoldenResourceId()).getIdPartAsLong()); + + Patient patient2 = addExternalEID(buildJanePatient(), "eid-2"); + myMdmHelper.createWithLatch(patient2); + ctx = createContextForCreate("Patient"); + myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient2, ctx); + ourLog.info(ctx.getMdmLinkEvent().toString()); + assertEquals(patient2.getIdElement().getValue(), ctx.getMdmLinkEvent().getTargetResourceId()); + assertEquals(getLinkByTargetId(patient2).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkEvent().getGoldenResourceId()).getIdPartAsLong()); + } + + +} diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java index 330e1380bef..30281f7fd90 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java @@ -6,12 +6,7 @@ import ca.uhn.fhir.jpa.entity.MdmLink; import ca.uhn.fhir.jpa.mdm.BaseMdmR4Test; import ca.uhn.fhir.jpa.mdm.helper.MdmHelperConfig; import ca.uhn.fhir.jpa.mdm.helper.MdmHelperR4; -import ca.uhn.fhir.jpa.mdm.svc.MdmLinkSvcImpl; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; -import ca.uhn.fhir.mdm.api.IMdmLinkSvc; -import ca.uhn.fhir.mdm.api.MdmLinkEvent; -import ca.uhn.fhir.mdm.api.MdmLinkSourceEnum; -import ca.uhn.fhir.mdm.api.MdmMatchOutcome; import ca.uhn.fhir.mdm.model.CanonicalEID; import ca.uhn.fhir.mdm.model.MdmTransactionContext; import ca.uhn.fhir.mdm.rules.config.MdmSettings; @@ -21,7 +16,6 @@ import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import ca.uhn.fhir.rest.param.ReferenceParam; import ca.uhn.fhir.rest.server.TransactionLogMessages; import ca.uhn.fhir.rest.server.exceptions.ForbiddenOperationException; -import ca.uhn.fhir.rest.server.messaging.ResourceOperationMessage; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; @@ -29,7 +23,6 @@ import org.hl7.fhir.r4.model.Enumerations; import org.hl7.fhir.r4.model.Medication; import org.hl7.fhir.r4.model.Organization; import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.Practitioner; import org.hl7.fhir.r4.model.SearchParameter; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -55,9 +48,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.nullValue; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import static org.slf4j.LoggerFactory.getLogger; @@ -72,8 +63,6 @@ public class MdmStorageInterceptorIT extends BaseMdmR4Test { public MdmHelperR4 myMdmHelper; @Autowired private IdHelperService myIdHelperService; - @Autowired - private IMdmLinkSvc myMdmLinkSvc; @Test public void testCreatePractitioner() throws InterruptedException { @@ -81,23 +70,6 @@ public class MdmStorageInterceptorIT extends BaseMdmR4Test { assertLinkCount(1); } - @Test - public void testCreateLinkChangeEvent() throws InterruptedException { - Practitioner pr = buildPractitionerWithNameAndId("Young", "AC-DC"); - myMdmHelper.createWithLatch(pr); - - ResourceOperationMessage resourceOperationMessage = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(ResourceOperationMessage.class); - assertNotNull(resourceOperationMessage); - assertEquals(pr.getId(), resourceOperationMessage.getId()); - - MdmLink link = getLinkByTargetId(pr); - - MdmLinkEvent linkChangeEvent = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(MdmLinkEvent.class); - assertNotNull(linkChangeEvent); - assertEquals(link.getGoldenResourcePid(), new IdDt(linkChangeEvent.getGoldenResourceId()).getIdPartAsLong()); - assertEquals(link.getSourcePid(), new IdDt(linkChangeEvent.getTargetResourceId()).getIdPartAsLong()); - } - private MdmLink getLinkByTargetId(IBaseResource theResource) { MdmLink example = new MdmLink(); example.setSourcePid(theResource.getIdElement().getIdPartAsLong()); @@ -113,7 +85,7 @@ public class MdmStorageInterceptorIT extends BaseMdmR4Test { myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient1, ctx); ourLog.info(ctx.getMdmLinkEvent().toString()); assertEquals(patient1.getIdElement().getValue(), ctx.getMdmLinkEvent().getTargetResourceId()); - assertEquals(getLinkByTargetId(patient1).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkEvent().getGoldenResourceId()).getIdPartAsLong()); + assertEquals(getLinkByTargetId(patient1).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkEvent().getGoldenResourceId()).getIdPartAsLong()); Patient patient2 = addExternalEID(buildJanePatient(), "eid-2"); myMdmHelper.createWithLatch(patient2); @@ -121,7 +93,7 @@ public class MdmStorageInterceptorIT extends BaseMdmR4Test { myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient2, ctx); ourLog.info(ctx.getMdmLinkEvent().toString()); assertEquals(patient2.getIdElement().getValue(), ctx.getMdmLinkEvent().getTargetResourceId()); - assertEquals(getLinkByTargetId(patient2).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkEvent().getGoldenResourceId()).getIdPartAsLong()); + assertEquals(getLinkByTargetId(patient2).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkEvent().getGoldenResourceId()).getIdPartAsLong()); } @Test From b81a61e465a0e4a730f951753246fc9110979a11 Mon Sep 17 00:00:00 2001 From: Frank Tao Date: Thu, 2 Sep 2021 21:52:37 -0400 Subject: [PATCH 054/143] Fixed :not modifier issue for the resource --- .../fhir/jpa/search/builder/QueryStack.java | 8 +++++++- .../ResourceLinkPredicateBuilder.java | 20 +++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java index 068c06c5fe9..68970015719 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java @@ -1044,7 +1044,13 @@ public class QueryStack { Expression subSelect = new Subquery(sql); join = mySqlBuilder.getOrCreateFirstPredicateBuilder(); - predicate = new InCondition(join.getResourceIdColumn(), subSelect).setNegate(true); + + if (theSourceJoinColumn == null) { + predicate = new InCondition(join.getResourceIdColumn(), subSelect).setNegate(true); + } else { + //-- for the resource link, need join with target_resource_id + predicate = new InCondition(theSourceJoinColumn, subSelect).setNegate(true); + } } else { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java index aa1e6d7ea7e..ffa9f7a0d8b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java @@ -62,6 +62,7 @@ import ca.uhn.fhir.rest.param.ReferenceParam; import ca.uhn.fhir.rest.param.SpecialParam; import ca.uhn.fhir.rest.param.StringParam; import ca.uhn.fhir.rest.param.TokenParam; +import ca.uhn.fhir.rest.param.TokenParamModifier; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; @@ -338,6 +339,7 @@ public class ResourceLinkPredicateBuilder extends BaseJoiningPredicateBuilder { boolean foundChainMatch = false; List candidateTargetTypes = new ArrayList<>(); List orPredicates = new ArrayList<>(); + boolean paramInverted = false; QueryStack childQueryFactory = myQueryStack.newChildQueryFactoryWithFullBuilderReuse(); for (String nextType : resourceTypes) { String chain = theReferenceParam.getChain(); @@ -383,6 +385,13 @@ public class ResourceLinkPredicateBuilder extends BaseJoiningPredicateBuilder { if (chainValue == null) { continue; } + + // For the token param, if it's a :not modifier, need switch OR to AND + if (!paramInverted) { + if (((TokenParam) chainValue).getModifier() == TokenParamModifier.NOT) { + paramInverted = true; + } + } foundChainMatch = true; orValues.add(chainValue); } @@ -410,10 +419,17 @@ public class ResourceLinkPredicateBuilder extends BaseJoiningPredicateBuilder { warnAboutPerformanceOnUnqualifiedResources(theParamName, theRequest, candidateTargetTypes); } - Condition multiTypeOrPredicate = toOrPredicate(orPredicates); + // If :not modifier for a token, switch OR with AND in the multi-type case + Condition multiTypePredicate; + if (paramInverted) { + multiTypePredicate = toAndPredicate(orPredicates); + } else { + multiTypePredicate = toOrPredicate(orPredicates); + } + List pathsToMatch = createResourceLinkPaths(theResourceName, theParamName); Condition pathPredicate = createPredicateSourcePaths(pathsToMatch); - return toAndPredicate(pathPredicate, multiTypeOrPredicate); + return toAndPredicate(pathPredicate, multiTypePredicate); } @Nonnull From 56890dba936b5893579e993016a27d0bbe83b711 Mon Sep 17 00:00:00 2001 From: Frank Tao Date: Thu, 2 Sep 2021 22:26:55 -0400 Subject: [PATCH 055/143] Reformatted the code --- .../fhir/jpa/search/builder/QueryStack.java | 54 ++++++++----------- 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java index 0e445f1d349..89bcb4d6a8d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java @@ -985,14 +985,14 @@ public class QueryStack { } public Condition createPredicateToken(@Nullable DbColumn theSourceJoinColumn, String theResourceName, - String theSpnamePrefix, RuntimeSearchParam theSearchParam, List theList, - SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) { - - List tokens = new ArrayList<>(); + String theSpnamePrefix, RuntimeSearchParam theSearchParam, List theList, + SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) { + List tokens = new ArrayList<>(); + boolean paramInverted = false; TokenParamModifier modifier = null; - + for (IQueryParameterType nextOr : theList) { if (nextOr instanceof TokenParam) { if (!((TokenParam) nextOr).isEmpty()) { @@ -1000,24 +1000,20 @@ public class QueryStack { if (id.isText()) { // Check whether the :text modifier is actually enabled here - boolean tokenTextIndexingEnabled = BaseSearchParamExtractor - .tokenTextIndexingEnabledForSearchParam(myModelConfig, theSearchParam); + boolean tokenTextIndexingEnabled = BaseSearchParamExtractor.tokenTextIndexingEnabledForSearchParam(myModelConfig, theSearchParam); if (!tokenTextIndexingEnabled) { String msg; if (myModelConfig.isSuppressStringIndexingInTokens()) { - msg = myFhirContext.getLocalizer().getMessage(PredicateBuilderToken.class, - "textModifierDisabledForServer"); + msg = myFhirContext.getLocalizer().getMessage(PredicateBuilderToken.class, "textModifierDisabledForServer"); } else { - msg = myFhirContext.getLocalizer().getMessage(PredicateBuilderToken.class, - "textModifierDisabledForSearchParam"); + msg = myFhirContext.getLocalizer().getMessage(PredicateBuilderToken.class, "textModifierDisabledForSearchParam"); } throw new MethodNotAllowedException(msg); } - return createPredicateString(theSourceJoinColumn, theResourceName, theSpnamePrefix, - theSearchParam, theList, null, theRequestPartitionId); - } - + return createPredicateString(theSourceJoinColumn, theResourceName, theSpnamePrefix, theSearchParam, theList, null, theRequestPartitionId); + } + modifier = id.getModifier(); // for :not modifier, create a token and remove the :not modifier if (modifier != null && modifier == TokenParamModifier.NOT) { @@ -1039,39 +1035,35 @@ public class QueryStack { String paramName = getParamNameWithPrefix(theSpnamePrefix, theSearchParam.getName()); Condition predicate; BaseJoiningPredicateBuilder join; - + if (paramInverted) { SearchQueryBuilder sqlBuilder = mySqlBuilder.newChildSqlBuilder(); TokenPredicateBuilder tokenSelector = sqlBuilder.addTokenPredicateBuilder(null); - sqlBuilder.addPredicate(tokenSelector.createPredicateToken(tokens, theResourceName, theSpnamePrefix, - theSearchParam, theRequestPartitionId)); + sqlBuilder.addPredicate(tokenSelector.createPredicateToken(tokens, theResourceName, theSpnamePrefix, theSearchParam, theRequestPartitionId)); SelectQuery sql = sqlBuilder.getSelect(); Expression subSelect = new Subquery(sql); - + join = mySqlBuilder.getOrCreateFirstPredicateBuilder(); - + if (theSourceJoinColumn == null) { predicate = new InCondition(join.getResourceIdColumn(), subSelect).setNegate(true); } else { //-- for the resource link, need join with target_resource_id - predicate = new InCondition(theSourceJoinColumn, subSelect).setNegate(true); + predicate = new InCondition(theSourceJoinColumn, subSelect).setNegate(true); } - + } else { - - TokenPredicateBuilder tokenJoin = createOrReusePredicateBuilder(PredicateBuilderTypeEnum.TOKEN, - theSourceJoinColumn, paramName, () -> mySqlBuilder.addTokenPredicateBuilder(theSourceJoinColumn)) - .getResult(); + + TokenPredicateBuilder tokenJoin = createOrReusePredicateBuilder(PredicateBuilderTypeEnum.TOKEN, theSourceJoinColumn, paramName, () -> mySqlBuilder.addTokenPredicateBuilder(theSourceJoinColumn)).getResult(); if (theList.get(0).getMissing() != null) { - return tokenJoin.createPredicateParamMissingForNonReference(theResourceName, paramName, - theList.get(0).getMissing(), theRequestPartitionId); + return tokenJoin.createPredicateParamMissingForNonReference(theResourceName, paramName, theList.get(0).getMissing(), theRequestPartitionId); } predicate = tokenJoin.createPredicateToken(tokens, theResourceName, theSpnamePrefix, theSearchParam, theOperation, theRequestPartitionId); - join = tokenJoin; - } - + join = tokenJoin; + } + return join.combineWithRequestPartitionIdPredicate(theRequestPartitionId, predicate); } From 8651990cacb7bd49906ce65d0ed34ac6b6d2d2f1 Mon Sep 17 00:00:00 2001 From: Frank Tao Date: Thu, 2 Sep 2021 23:04:30 -0400 Subject: [PATCH 056/143] Fixed class cast issue --- .../search/builder/predicate/ResourceLinkPredicateBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java index ffa9f7a0d8b..80a2e316767 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java @@ -387,7 +387,7 @@ public class ResourceLinkPredicateBuilder extends BaseJoiningPredicateBuilder { } // For the token param, if it's a :not modifier, need switch OR to AND - if (!paramInverted) { + if (!paramInverted && chainValue instanceof TokenParam) { if (((TokenParam) chainValue).getModifier() == TokenParamModifier.NOT) { paramInverted = true; } From dc69bfc729561235d673e0bb61e1645c32ee2ff2 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 2 Sep 2021 23:07:07 -0400 Subject: [PATCH 057/143] Add changelog --- .../2837-search-with-not-modifier-on-multiple-codes.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2837-search-with-not-modifier-on-multiple-codes.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2837-search-with-not-modifier-on-multiple-codes.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2837-search-with-not-modifier-on-multiple-codes.yaml new file mode 100644 index 00000000000..fed478a7120 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2837-search-with-not-modifier-on-multiple-codes.yaml @@ -0,0 +1,4 @@ +--- +type: fix +issue: 2837 +title: "The :not modifier does not currently work for observations with multiple codes for the search. This is fixed." From 2ed7019a6c997cd177b230a84e65b9d2ba39ddf6 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Fri, 3 Sep 2021 00:08:12 -0400 Subject: [PATCH 058/143] Add another test --- .../ResourceProviderSearchModifierDstu3Test.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderSearchModifierDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderSearchModifierDstu3Test.java index b74110c10fd..d4c25bba299 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderSearchModifierDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderSearchModifierDstu3Test.java @@ -56,13 +56,22 @@ public class ResourceProviderSearchModifierDstu3Test extends BaseResourceProvide } { - //Fails during a chain + //Works in a chain String noResultSearchString = "Observation?context.type:not=system|value"; ResourceSearch resourceSearch = myMatchUrlService.getResourceSearch(noResultSearchString); SearchParameterMap searchParameterMap = resourceSearch.getSearchParameterMap(); IBundleProvider search = myObservationDao.search(searchParameterMap); assertThat(search.size(), is(equalTo(0))); } + { + //Works in a chain with only value + String noResultSearchString = "Observation?context.type:not=value"; + ResourceSearch resourceSearch = myMatchUrlService.getResourceSearch(noResultSearchString); + SearchParameterMap searchParameterMap = resourceSearch.getSearchParameterMap(); + IBundleProvider search = myObservationDao.search(searchParameterMap); + assertThat(search.size(), is(equalTo(0))); + + } } } From fed755523fb0663810235d19608553f5d60c21b8 Mon Sep 17 00:00:00 2001 From: Kevin Dougan SmileCDR <72025369+KevinDougan-SmileCDR@users.noreply.github.com> Date: Fri, 3 Sep 2021 05:28:04 -0400 Subject: [PATCH 059/143] Resolve - Avoid JOINs on HFJ_RESOURCE Checking RES_TYPE and RES_DELETED_AT Columns (#2944) * Added the start of a new Unit Test. * Renamed the Unit Test. * Fleshed out the Unit Test with additional Resource properties. * Tweaked the Unit Test more but it is still not working as desired so more changes will be needed to replicate the specific scenario... * More Unit Test tweaks... * More Unit Test tweaks. * More tweaks... * Reproduced the problem. * Finally, a Failing Unit Test that exposes the problem. * Fixed the Unit Test by changing how SearchBuilder manipulates underscore params. * Added another test scenario. * Added a third search test. * Removed the third search example since it was not effective. * Test fix Co-authored-by: jamesagnew --- .../jpa/search/builder/SearchBuilder.java | 8 +- .../FhirResourceDaoR4SearchOptimizedTest.java | 122 ++++++++++++++++++ .../jpa/dao/r4/PartitioningSqlR4Test.java | 2 +- 3 files changed, 129 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java index 9f14b0bd4d5..d718a195e09 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java @@ -221,11 +221,15 @@ public class SearchBuilder implements ISearchBuilder { SearchContainedModeEnum searchContainedMode = theParams.getSearchContainedMode(); - // Handle _id last, since it can typically be tacked onto a different parameter - List paramNames = myParams.keySet().stream().filter(t -> !t.equals(IAnyResource.SP_RES_ID)).collect(Collectors.toList()); + // Handle _id and _tag last, since they can typically be tacked onto a different parameter + List paramNames = myParams.keySet().stream().filter(t -> !t.equals(IAnyResource.SP_RES_ID)) + .filter(t -> !t.equals(Constants.PARAM_TAG)).collect(Collectors.toList()); if (myParams.containsKey(IAnyResource.SP_RES_ID)) { paramNames.add(IAnyResource.SP_RES_ID); } + if (myParams.containsKey(Constants.PARAM_TAG)) { + paramNames.add(Constants.PARAM_TAG); + } // Handle each parameter for (String nextParamName : paramNames) { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java index a84edb5bdc9..d58e23b5675 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java @@ -21,18 +21,29 @@ import ca.uhn.fhir.rest.param.ReferenceParam; import ca.uhn.fhir.rest.param.StringParam; import ca.uhn.fhir.rest.param.TokenOrListParam; import ca.uhn.fhir.rest.param.TokenParam; +import ca.uhn.fhir.rest.param.TokenParamModifier; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.r4.model.BodyStructure; +import org.hl7.fhir.r4.model.CodeableConcept; +import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.DateTimeType; +import org.hl7.fhir.r4.model.Device; import org.hl7.fhir.r4.model.Enumerations; +import org.hl7.fhir.r4.model.Extension; import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Organization; import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Procedure; +import org.hl7.fhir.r4.model.Provenance; import org.hl7.fhir.r4.model.Reference; +import org.hl7.fhir.r4.model.SearchParameter; +import org.hl7.fhir.r4.model.StringType; +import org.hl7.fhir.r4.model.UriType; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -906,6 +917,117 @@ public class FhirResourceDaoR4SearchOptimizedTest extends BaseJpaR4Test { } + @Test + public void testSearchOnUnderscoreParams_AvoidHFJResourceJoins() { + // This Issue: https://github.com/hapifhir/hapi-fhir/issues/2942 + // See this PR for a similar type of Fix: https://github.com/hapifhir/hapi-fhir/pull/2909 + SearchParameter searchParameter = new SearchParameter(); + searchParameter.addBase("BodySite").addBase("Procedure"); + searchParameter.setCode("focalAccess"); + searchParameter.setType(Enumerations.SearchParamType.REFERENCE); + searchParameter.setExpression("Procedure.extension('Procedure#focalAccess')"); + searchParameter.setXpathUsage(SearchParameter.XPathUsageType.NORMAL); + searchParameter.setStatus(Enumerations.PublicationStatus.ACTIVE); + IIdType spId = mySearchParameterDao.create(searchParameter).getId().toUnqualifiedVersionless(); + mySearchParamRegistry.forceRefresh(); + + BodyStructure bs = new BodyStructure(); + bs.setDescription("BodyStructure in R4 replaced BodySite from DSTU4"); + IIdType bsId = myBodyStructureDao.create(bs, mySrd).getId().toUnqualifiedVersionless(); + + Patient patient = new Patient(); + patient.setId("P1"); + patient.setActive(true); + patient.addName().setFamily("FamilyName"); + Extension extParent = patient + .addExtension() + .setUrl("http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"); + extParent + .addExtension() + .setUrl("ombCategory") + .setValue(new CodeableConcept().addCoding(new Coding().setSystem("urn:oid:2.16.840.1.113883.5.50") + .setCode("2186-5") + .setDisplay("Not Hispanic or Latino"))); + extParent + .addExtension() + .setUrl("text") + .setValue(new StringType("Not Hispanic or Latino")); + myPatientDao.update(patient); + CodeableConcept categoryCodeableConcept1 = new CodeableConcept().addCoding(new Coding().setSystem("acc_proccat_fkc") + .setCode("CANN") + .setDisplay("Cannulation")); + Procedure procedure = new Procedure(); + procedure.setSubject(new Reference("Patient/P1")); + procedure.setStatus(Procedure.ProcedureStatus.COMPLETED); + procedure.setCategory(categoryCodeableConcept1); + Extension extProcedure = procedure + .addExtension() + .setUrl("Procedure#focalAccess") + .setValue(new UriType("BodyStructure/" + bsId.getIdPartAsLong())); + procedure.getMeta() + .addTag("acc_procext_fkc", "1STCANN2NDL", "First Successful Cannulation with 2 Needles"); + IIdType procedureId = myProcedureDao.create(procedure).getId().toUnqualifiedVersionless(); + + logAllResources(); + logAllResourceTags(); + logAllResourceVersions(); + + // Search example 1: + // http://FHIR_SERVER/fhir_request/Procedure + // ?status%3Anot=entered-in-error&subject=B + // &category=CANN&focalAccess=BodySite%2F3530342921&_tag=TagValue + // NOTE: This gets sorted once so the order is different once it gets executed! + { + // IMPORTANT: Keep the query param order exactly as shown below! + SearchParameterMap map = SearchParameterMap.newSynchronous(); + // _tag, category, status, subject, focalAccess + map.add("_tag", new TokenParam("TagValue")); + map.add("category", new TokenParam("CANN")); + map.add("status", new TokenParam("entered-in-error").setModifier(TokenParamModifier.NOT)); + map.add("subject", new ReferenceParam("Patient/P1")); + map.add("focalAccess", new ReferenceParam("BodyStructure/" + bsId.getIdPart())); + myCaptureQueriesListener.clear(); + IBundleProvider outcome = myProcedureDao.search(map, new SystemRequestDetails()); + ourLog.info("Search returned {} resources.", outcome.getResources(0, 999).size()); + myCaptureQueriesListener.logSelectQueriesForCurrentThread(); + + String selectQuery = myCaptureQueriesListener.getSelectQueriesForCurrentThread().get(0).getSql(true, false); + // Check for a particular WHERE CLAUSE in the generated SQL to make sure we are verifying the correct query + assertEquals(2, StringUtils.countMatches(selectQuery.toLowerCase(), " join hfj_res_link "), selectQuery); + + // Ensure that we do NOT see a couple of particular WHERE clauses + assertEquals(0, StringUtils.countMatches(selectQuery.toLowerCase(), ".res_type = 'procedure'"), selectQuery); + assertEquals(0, StringUtils.countMatches(selectQuery.toLowerCase(), ".res_deleted_at is null"), selectQuery); + } + + // Search example 2: + // http://FHIR_SERVER/fhir_request/Procedure + // ?status%3Anot=entered-in-error&category=CANN&focalAccess=3692871435 + // &_tag=1STCANN1NDL%2C1STCANN2NDL&outcome=SUCCESS&_count=1&_requestTrace=True + // NOTE: This gets sorted once so the order is different once it gets executed! + { + // IMPORTANT: Keep the query param order exactly as shown below! + // NOTE: The "outcome" SearchParameter is not being used below, but it doesn't affect the test. + SearchParameterMap map = SearchParameterMap.newSynchronous(); + // _tag, category, status, focalAccess + map.add("_tag", new TokenParam("TagValue")); + map.add("category", new TokenParam("CANN")); + map.add("status", new TokenParam("entered-in-error").setModifier(TokenParamModifier.NOT)); + map.add("focalAccess", new ReferenceParam("BodyStructure/" + bsId.getIdPart())); + myCaptureQueriesListener.clear(); + IBundleProvider outcome = myProcedureDao.search(map, new SystemRequestDetails()); + ourLog.info("Search returned {} resources.", outcome.getResources(0, 999).size()); + myCaptureQueriesListener.logSelectQueriesForCurrentThread(); + + String selectQuery = myCaptureQueriesListener.getSelectQueriesForCurrentThread().get(0).getSql(true, false); + // Check for a particular WHERE CLAUSE in the generated SQL to make sure we are verifying the correct query + assertEquals(1, StringUtils.countMatches(selectQuery.toLowerCase(), " join hfj_res_link "), selectQuery); + + // Ensure that we do NOT see a couple of particular WHERE clauses + assertEquals(0, StringUtils.countMatches(selectQuery.toLowerCase(), ".res_type = 'procedure'"), selectQuery); + assertEquals(0, StringUtils.countMatches(selectQuery.toLowerCase(), ".res_deleted_at is null"), selectQuery); + } + } @AfterEach public void afterResetDao() { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java index 44a615682f0..7b635e56f1b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java @@ -2272,7 +2272,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { ourLog.info("Search SQL:\n{}", searchSql); assertEquals(0, StringUtils.countMatches(searchSql, "PARTITION_ID"), searchSql); assertEquals(1, StringUtils.countMatches(searchSql, "TAG_SYSTEM = 'http://system'"), searchSql); - assertEquals(1, StringUtils.countMatches(searchSql, "t1.HASH_SYS_AND_VALUE ="), searchSql); + assertEquals(1, StringUtils.countMatches(searchSql, ".HASH_SYS_AND_VALUE ="), searchSql); } From 0edf77d214cc34c1516579d316557074604c1351 Mon Sep 17 00:00:00 2001 From: Jason Roberts Date: Fri, 3 Sep 2021 07:31:49 -0400 Subject: [PATCH 060/143] clean up a bit --- .../fhir/jpa/search/builder/QueryStack.java | 108 +--------- .../ResourceLinkPredicateBuilder.java | 11 +- .../dao/r4/ChainedContainedR4SearchTest.java | 3 + .../r4/ResourceProviderR4SearchTest.java | 187 ------------------ 4 files changed, 9 insertions(+), 300 deletions(-) delete mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java index 496de303185..565027be4cc 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java @@ -792,112 +792,6 @@ public class QueryStack { // 3. create the query Condition containedCondition = null; - switch (targetParamDefinition.getParamType()) { - case DATE: - containedCondition = createPredicateDate(null, theResourceName, spnamePrefix, targetParamDefinition, - orValues, theOperation, theRequestPartitionId); - break; - case NUMBER: - containedCondition = createPredicateNumber(null, theResourceName, spnamePrefix, targetParamDefinition, - orValues, theOperation, theRequestPartitionId); - break; - case QUANTITY: - containedCondition = createPredicateQuantity(null, theResourceName, spnamePrefix, targetParamDefinition, - orValues, theOperation, theRequestPartitionId); - break; - case STRING: - containedCondition = createPredicateString(null, theResourceName, spnamePrefix, targetParamDefinition, - orValues, theOperation, theRequestPartitionId); - break; - case TOKEN: - containedCondition = createPredicateToken(null, theResourceName, spnamePrefix, targetParamDefinition, - orValues, theOperation, theRequestPartitionId); - break; - case COMPOSITE: - containedCondition = createPredicateComposite(null, theResourceName, spnamePrefix, targetParamDefinition, - orValues, theRequestPartitionId); - break; - case URI: - containedCondition = createPredicateUri(null, theResourceName, spnamePrefix, targetParamDefinition, - orValues, theOperation, theRequest, theRequestPartitionId); - break; - case HAS: - case REFERENCE: - case SPECIAL: - default: - throw new InvalidRequestException( - "The search type:" + targetParamDefinition.getParamType() + " is not supported."); - } - - return containedCondition; - } - - public Condition createPredicateReferenceForContainedResourceNew(@Nullable DbColumn theSourceJoinColumn, - String theResourceName, String theParamName, RuntimeSearchParam theSearchParam, - List theList, SearchFilterParser.CompareOperation theOperation, - RequestDetails theRequest, RequestPartitionId theRequestPartitionId) { - - String spnamePrefix = theParamName; - - String targetChain = null; - String targetParamName = null; - String targetQualifier = null; - String targetValue = null; - - RuntimeSearchParam targetParamDefinition = null; - - List orValues = Lists.newArrayList(); - IQueryParameterType qp = null; - - for (int orIdx = 0; orIdx < theList.size(); orIdx++) { - - IQueryParameterType nextOr = theList.get(orIdx); - - if (nextOr instanceof ReferenceParam) { - - ReferenceParam referenceParam = (ReferenceParam) nextOr; - - // 1. Find out the parameter, qualifier and the value - targetChain = referenceParam.getChain(); - targetParamName = targetChain; - targetValue = nextOr.getValueAsQueryToken(myFhirContext); - - int qualifierIndex = targetChain.indexOf(':'); - if (qualifierIndex != -1) { - targetParamName = targetChain.substring(0, qualifierIndex); - targetQualifier = targetChain.substring(qualifierIndex); - } - - // 2. find out the data type - if (targetParamDefinition == null) { - Iterator it = theSearchParam.getTargets().iterator(); - while (it.hasNext()) { - targetParamDefinition = mySearchParamRegistry.getActiveSearchParam(it.next(), targetParamName); - // TODO Is it safe to stop as soon as we find one? Is it possible that, if we kept going, we would uncover different types? - if (targetParamDefinition != null) - break; - } - } - - if (targetParamDefinition == null) { - throw new InvalidRequestException("Unknown search parameter name: " + targetParamName + "."); - } - - qp = toParameterType(targetParamDefinition); - qp.setValueAsQueryToken(myFhirContext, targetParamName, targetQualifier, targetValue); - orValues.add(qp); - } - } - - orValues = orValues.stream().distinct().collect(Collectors.toList()); - - if (targetParamDefinition == null) { - throw new InvalidRequestException("Unknown search parameter names: [" + theSearchParam.getName() + "]."); - } - - // 3. create the query - Condition containedCondition = null; - switch (targetParamDefinition.getParamType()) { case DATE: containedCondition = createPredicateDate(theSourceJoinColumn, theResourceName, spnamePrefix, targetParamDefinition, @@ -1244,7 +1138,7 @@ public class QueryStack { // See SMILE-2898 for details. // For now, leave the incorrect implementation alone, just in case someone is relying on it, // until the complete fix is available. - andPredicates.add(createPredicateReferenceForContainedResource(theSourceJoinColumn, theResourceName, theParamName, nextParamDef, nextAnd, null, theRequest, theRequestPartitionId)); + andPredicates.add(createPredicateReferenceForContainedResource(null, theResourceName, theParamName, nextParamDef, nextAnd, null, theRequest, theRequestPartitionId)); } else { andPredicates.add(createPredicateReference(theSourceJoinColumn, theResourceName, theParamName, nextAnd, null, theRequest, theRequestPartitionId)); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java index a79119db334..0019801f5a0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java @@ -38,20 +38,18 @@ import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao; import ca.uhn.fhir.jpa.dao.index.IdHelperService; import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilderReference; import ca.uhn.fhir.jpa.dao.predicate.SearchFilterParser; -import ca.uhn.fhir.jpa.search.builder.QueryStack; import ca.uhn.fhir.jpa.model.search.StorageProcessingMessage; +import ca.uhn.fhir.jpa.search.builder.QueryStack; import ca.uhn.fhir.jpa.search.builder.sql.SearchQueryBuilder; import ca.uhn.fhir.jpa.searchparam.MatchUrlService; import ca.uhn.fhir.jpa.searchparam.ResourceMetaParams; import ca.uhn.fhir.jpa.searchparam.util.JpaParamUtil; -import ca.uhn.fhir.rest.api.SearchContainedModeEnum; -import ca.uhn.fhir.rest.server.util.ISearchParamRegistry; -import ca.uhn.fhir.rest.server.util.CompositeInterceptorBroadcaster; import ca.uhn.fhir.model.api.IQueryParameterType; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum; +import ca.uhn.fhir.rest.api.SearchContainedModeEnum; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import ca.uhn.fhir.rest.param.CompositeParam; @@ -65,6 +63,8 @@ import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; +import ca.uhn.fhir.rest.server.util.CompositeInterceptorBroadcaster; +import ca.uhn.fhir.rest.server.util.ISearchParamRegistry; import com.google.common.collect.Lists; import com.healthmarketscience.sqlbuilder.BinaryCondition; import com.healthmarketscience.sqlbuilder.ComboCondition; @@ -80,7 +80,6 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Collections; -import java.util.HashSet; import java.util.List; import java.util.ListIterator; import java.util.Set; @@ -405,7 +404,7 @@ public class ResourceLinkPredicateBuilder extends BaseJoiningPredicateBuilder { orPredicates.add(toAndPredicate(andPredicates)); if (getModelConfig().isIndexOnContainedResources() && theReferenceParam.getChain().contains(".")) { - orPredicates.add(childQueryFactory.createPredicateReferenceForContainedResourceNew(myColumnTargetResourceId, subResourceName, chain, param, orValues, null, theRequest, theRequestPartitionId)); + orPredicates.add(childQueryFactory.createPredicateReferenceForContainedResource(myColumnTargetResourceId, subResourceName, chain, param, orValues, null, theRequest, theRequestPartitionId)); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java index 6b599f788d7..f988c9f2ab7 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java @@ -14,6 +14,7 @@ import org.hl7.fhir.r4.model.Organization; import org.hl7.fhir.r4.model.Patient; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -92,6 +93,7 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { } @Test + @Disabled public void testShouldResolveATwoLinkChainWithAContainedResource() throws Exception { IIdType oid1; @@ -196,6 +198,7 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { } @Test + @Disabled public void testShouldResolveAThreeLinkChainWithAContainedResourceAtTheBeginningOfTheChain() throws Exception { // This case seems like it would be less frequent in production, but we don't want to // paint ourselves into a corner where we require the contained link to be the last diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java deleted file mode 100644 index d38c44a5097..00000000000 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4SearchTest.java +++ /dev/null @@ -1,187 +0,0 @@ -package ca.uhn.fhir.jpa.provider.r4; - -import ca.uhn.fhir.jpa.api.config.DaoConfig; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; -import ca.uhn.fhir.jpa.model.entity.ModelConfig; -import ca.uhn.fhir.parser.StrictErrorHandler; -import ca.uhn.fhir.rest.client.interceptor.CapturingInterceptor; -import org.apache.commons.io.IOUtils; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.HttpGet; -import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.r4.model.Bundle; -import org.hl7.fhir.r4.model.ClinicalImpression; -import org.hl7.fhir.r4.model.IdType; -import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Organization; -import org.hl7.fhir.r4.model.Patient; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.List; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.contains; -import static org.junit.jupiter.api.Assertions.assertEquals; - - -public class ResourceProviderR4SearchTest extends BaseResourceProviderR4Test { - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceProviderR4SearchTest.class); - @Autowired - @Qualifier("myClinicalImpressionDaoR4") - protected IFhirResourceDao myClinicalImpressionDao; - private CapturingInterceptor myCapturingInterceptor = new CapturingInterceptor(); - - @Override - @AfterEach - public void after() throws Exception { - super.after(); - - myDaoConfig.setAllowMultipleDelete(new DaoConfig().isAllowMultipleDelete()); - myDaoConfig.setAllowExternalReferences(new DaoConfig().isAllowExternalReferences()); - myDaoConfig.setReuseCachedSearchResultsForMillis(new DaoConfig().getReuseCachedSearchResultsForMillis()); - myDaoConfig.setCountSearchResultsUpTo(new DaoConfig().getCountSearchResultsUpTo()); - myDaoConfig.setSearchPreFetchThresholds(new DaoConfig().getSearchPreFetchThresholds()); - myDaoConfig.setAllowContainsSearches(new DaoConfig().isAllowContainsSearches()); - myDaoConfig.setIndexMissingFields(new DaoConfig().getIndexMissingFields()); - - myClient.unregisterInterceptor(myCapturingInterceptor); - myModelConfig.setIndexOnContainedResources(false); - myModelConfig.setIndexOnContainedResources(new ModelConfig().isIndexOnContainedResources()); - } - - @BeforeEach - @Override - public void before() throws Exception { - super.before(); - myFhirCtx.setParserErrorHandler(new StrictErrorHandler()); - - myDaoConfig.setAllowMultipleDelete(true); - myClient.registerInterceptor(myCapturingInterceptor); - myDaoConfig.setSearchPreFetchThresholds(new DaoConfig().getSearchPreFetchThresholds()); - myModelConfig.setIndexOnContainedResources(true); - myDaoConfig.setReuseCachedSearchResultsForMillis(null); - } - - @Test - public void testAllResourcesStandAlone() throws Exception { - - IIdType oid1; - - { - Organization org = new Organization(); - org.setId(IdType.newRandomUuid()); - org.setName("HealthCo"); - myOrganizationDao.create(org, mySrd); - - Patient p = new Patient(); - p.setId(IdType.newRandomUuid()); - p.addName().setFamily("Smith").addGiven("John"); - p.getManagingOrganization().setReference(org.getId()); - myPatientDao.create(p, mySrd); - - Observation obs = new Observation(); - obs.getCode().setText("Observation 1"); - obs.getSubject().setReference(p.getId()); - - oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - - ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); - } - - String uri = ourServerBase + "/Observation?subject.organization.name=HealthCo"; - List oids = searchAndReturnUnqualifiedVersionlessIdValues(uri); - - assertEquals(1L, oids.size()); - assertThat(oids, contains(oid1.getValue())); - } - - @Test - public void testContainedResourceAtTheEndOfTheChain() throws Exception { - // This is the case that is most relevant to SMILE-2899 - IIdType oid1; - - { - Organization org = new Organization(); - org.setId("org"); - org.setName("HealthCo"); - - Patient p = new Patient(); - p.setId(IdType.newRandomUuid()); - p.getContained().add(org); - p.addName().setFamily("Smith").addGiven("John"); - p.getManagingOrganization().setReference("#org"); - myPatientDao.create(p, mySrd); - - Observation obs = new Observation(); - obs.getCode().setText("Observation 1"); - obs.getSubject().setReference(p.getId()); - - oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - - ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); - } - - String uri = ourServerBase + "/Observation?subject.organization.name=HealthCo"; - List oids = searchAndReturnUnqualifiedVersionlessIdValues(uri); - - assertEquals(1L, oids.size()); - assertThat(oids, contains(oid1.getValue())); - } - - @Test - public void testContainedResourceAtTheBeginningOfTheChain() throws Exception { - // This case seems like it would be less frequent in production, but we don't want to - // paint ourselves into a corner where we require the contained link to be the last - // one in the chain - - IIdType oid1; - - { - Organization org = new Organization(); - org.setId(IdType.newRandomUuid()); - org.setName("HealthCo"); - myOrganizationDao.create(org, mySrd); - - Patient p = new Patient(); - p.setId("pat"); - p.addName().setFamily("Smith").addGiven("John"); - p.getManagingOrganization().setReference(org.getId()); - - Observation obs = new Observation(); - obs.getContained().add(p); - obs.getCode().setText("Observation 1"); - obs.getSubject().setReference("#pat"); - - oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - - ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); - } - - String uri = ourServerBase + "/Observation?subject.organization.name=HealthCo"; - List oids = searchAndReturnUnqualifiedVersionlessIdValues(uri); - - assertEquals(1L, oids.size()); - assertThat(oids, contains(oid1.getValue())); - } - - private List searchAndReturnUnqualifiedVersionlessIdValues(String uri) throws IOException { - List ids; - HttpGet get = new HttpGet(uri); - - try (CloseableHttpResponse response = ourHttpClient.execute(get)) { - String resp = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); - ourLog.info(resp); - Bundle bundle = myFhirCtx.newXmlParser().parseResource(Bundle.class, resp); - ids = toUnqualifiedVersionlessIdValues(bundle); - } - return ids; - } - -} From 5604cabbe8f1d72f7189cb5323bece9dac90f52d Mon Sep 17 00:00:00 2001 From: Jason Roberts Date: Fri, 3 Sep 2021 07:45:57 -0400 Subject: [PATCH 061/143] add tests for qualifiers --- .../dao/r4/ChainedContainedR4SearchTest.java | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java index f988c9f2ab7..78f156df1fa 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java @@ -236,6 +236,82 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { assertThat(oids, contains(oid1.getIdPart())); } + @Test + public void testShouldResolveAThreeLinkChainWithQualifiersWhereAllResourcesStandAlone() throws Exception { + + // setup + IIdType oid1; + + { + Organization org = new Organization(); + org.setId(IdType.newRandomUuid()); + org.setName("HealthCo"); + myOrganizationDao.create(org, mySrd); + + Patient p = new Patient(); + p.setId(IdType.newRandomUuid()); + p.addName().setFamily("Smith").addGiven("John"); + p.getManagingOrganization().setReference(org.getId()); + myPatientDao.create(p, mySrd); + + Observation obs = new Observation(); + obs.getCode().setText("Observation 1"); + obs.getSubject().setReference(p.getId()); + + oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); + + ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); + } + + String url = "/Observation?subject:Patient.organization:Organization.name=HealthCo"; + + // execute + myCaptureQueriesListener.clear(); + List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); + ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + + // validate + assertEquals(1L, oids.size()); + assertThat(oids, contains(oid1.getIdPart())); + } + + @Test + public void testShouldResolveAThreeLinkChainWithQualifiersWithAContainedResourceAtTheEndOfTheChain() throws Exception { + // This is the case that is most relevant to SMILE-2899 + IIdType oid1; + + myCaptureQueriesListener.clear(); + { + Organization org = new Organization(); + org.setId("org"); + org.setName("HealthCo"); + + Patient p = new Patient(); + p.setId(IdType.newRandomUuid()); + p.getContained().add(org); + p.addName().setFamily("Smith").addGiven("John"); + p.getManagingOrganization().setReference("#org"); + myPatientDao.create(p, mySrd); + + Observation obs = new Observation(); + obs.getCode().setText("Observation 1"); + obs.getSubject().setReference(p.getId()); + + oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); + + ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); + } + ourLog.info("Data setup SQL: " + myCaptureQueriesListener.getInsertQueriesForCurrentThread()); + + String url = "/Observation?subject:Patient.organization:Organization.name=HealthCo"; + myCaptureQueriesListener.clear(); + List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); + ourLog.info("Data retrieval SQL: " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + + assertEquals(1L, oids.size()); + assertThat(oids, contains(oid1.getIdPart())); + } + private List searchAndReturnUnqualifiedVersionlessIdValues(String theUrl) throws IOException { List ids = new ArrayList<>(); From 78c71ce761cf5468e17c30ca8e7ad5ff1ed525ba Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Fri, 3 Sep 2021 08:38:19 -0400 Subject: [PATCH 062/143] issue-2901 fix tests --- .../java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java | 2 ++ .../test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java index 0bace079a8f..907650ba59b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java @@ -70,6 +70,8 @@ public class TransactionProcessorTest { private MatchUrlService myMatchUrlService; @MockBean private IRequestPartitionHelperSvc myRequestPartitionHelperSvc; + @MockBean + private IAutoVersioningService myAutoVersioningService; @MockBean(answer = Answers.RETURNS_DEEP_STUBS) private SessionImpl mySession; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java index d5428cc9fd1..cc081ca421d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java @@ -3,6 +3,7 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao; +import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.model.entity.NormalizedQuantitySearchLevel; import ca.uhn.fhir.jpa.model.entity.ResourceEncodingEnum; import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable; @@ -119,6 +120,8 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest { myModelConfig.setNormalizedQuantitySearchLevel(NormalizedQuantitySearchLevel.NORMALIZED_QUANTITY_SEARCH_NOT_SUPPORTED); myDaoConfig.setBundleBatchPoolSize(new DaoConfig().getBundleBatchPoolSize()); myDaoConfig.setBundleBatchMaxPoolSize(new DaoConfig().getBundleBatchMaxPoolSize()); + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(new DaoConfig().isAutoCreatePlaceholderReferenceTargets()); + myModelConfig.setAutoVersionReferenceAtPaths(new ModelConfig().getAutoVersionReferenceAtPaths()); } @BeforeEach From b29a61df4096bd49a1eb9432e742970e44a6bfd9 Mon Sep 17 00:00:00 2001 From: Vadim Karantayer Date: Fri, 3 Sep 2021 10:40:54 -0400 Subject: [PATCH 063/143] update TestUtil to test Embeddable classes, not just Entity classes --- .../src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java index f878494e559..3b1ed6553fd 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java @@ -35,6 +35,7 @@ import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.model.InstantType; import javax.persistence.Column; +import javax.persistence.Embeddable; import javax.persistence.Embedded; import javax.persistence.EmbeddedId; import javax.persistence.Entity; @@ -106,7 +107,8 @@ public class TestUtil { for (ClassInfo classInfo : classes) { Class clazz = Class.forName(classInfo.getName()); Entity entity = clazz.getAnnotation(Entity.class); - if (entity == null) { + Embeddable embeddable = clazz.getAnnotation(Embeddable.class); + if (entity == null && embeddable == null) { continue; } From 8a9e4e4328c9a1734ea542c11e9a8318e086b38b Mon Sep 17 00:00:00 2001 From: Jason Roberts Date: Fri, 3 Sep 2021 11:26:46 -0400 Subject: [PATCH 064/143] force the resource table to be the root of the query if we might be traversing a contained reference --- .../java/ca/uhn/fhir/jpa/search/builder/QueryStack.java | 8 +++++++- .../ca/uhn/fhir/jpa/search/builder/SearchBuilder.java | 9 ++++++++- .../builder/predicate/ResourceLinkPredicateBuilder.java | 4 ---- .../fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java | 6 +++--- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java index 565027be4cc..42de4a119e0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java @@ -1139,8 +1139,14 @@ public class QueryStack { // For now, leave the incorrect implementation alone, just in case someone is relying on it, // until the complete fix is available. andPredicates.add(createPredicateReferenceForContainedResource(null, theResourceName, theParamName, nextParamDef, nextAnd, null, theRequest, theRequestPartitionId)); + } else if (nextAnd.stream().filter(t -> t instanceof ReferenceParam).map(t -> (ReferenceParam) t).anyMatch(t -> t.getChain().contains("."))) { + // FIXME for now, restrict contained reference traversal to the last reference in the chain + andPredicates.add(createPredicateReference(theSourceJoinColumn, theResourceName, theParamName, nextAnd, null, theRequest, theRequestPartitionId)); } else { - andPredicates.add(createPredicateReference(theSourceJoinColumn, theResourceName, theParamName, nextAnd, null, theRequest, theRequestPartitionId)); + andPredicates.add(toOrPredicate( + createPredicateReference(theSourceJoinColumn, theResourceName, theParamName, nextAnd, null, theRequest, theRequestPartitionId), + createPredicateReferenceForContainedResource(theSourceJoinColumn, theResourceName, theParamName, nextParamDef, nextAnd, null, theRequest, theRequestPartitionId) + )); } } break; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java index 9f14b0bd4d5..5152973bfff 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java @@ -373,7 +373,7 @@ public class SearchBuilder implements ISearchBuilder { SearchQueryBuilder sqlBuilder = new SearchQueryBuilder(myContext, myDaoConfig.getModelConfig(), myPartitionSettings, myRequestPartitionId, sqlBuilderResourceName, mySqlBuilderFactory, myDialectProvider, theCount); QueryStack queryStack3 = new QueryStack(theParams, myDaoConfig, myDaoConfig.getModelConfig(), myContext, sqlBuilder, mySearchParamRegistry, myPartitionSettings); - if (theParams.keySet().size() > 1 || theParams.getSort() != null || theParams.keySet().contains(Constants.PARAM_HAS)) { + if (theParams.keySet().size() > 1 || theParams.getSort() != null || theParams.keySet().contains(Constants.PARAM_HAS) || isTraverseContainedReferenceAtRoot(theParams)) { List activeComboParams = mySearchParamRegistry.getActiveComboSearchParams(myResourceName, theParams.keySet()); if (activeComboParams.isEmpty()) { sqlBuilder.setNeedResourceTableRoot(true); @@ -483,6 +483,13 @@ public class SearchBuilder implements ISearchBuilder { return Optional.of(executor); } + private boolean isTraverseContainedReferenceAtRoot(SearchParameterMap theParams) { + return myModelConfig.isIndexOnContainedResources() && theParams.values().stream() + .flatMap(Collection::stream) + .flatMap(Collection::stream) + .anyMatch(t -> t instanceof ReferenceParam); + } + private List normalizeIdListForLastNInClause(List lastnResourceIds) { /* The following is a workaround to a known issue involving Hibernate. If queries are used with "in" clauses with large and varying diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java index 0019801f5a0..9ff5581d3af 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/ResourceLinkPredicateBuilder.java @@ -402,10 +402,6 @@ public class ResourceLinkPredicateBuilder extends BaseJoiningPredicateBuilder { andPredicates.add(childQueryFactory.searchForIdsWithAndOr(myColumnTargetResourceId, subResourceName, chain, chainParamValues, theRequest, theRequestPartitionId, SearchContainedModeEnum.FALSE)); orPredicates.add(toAndPredicate(andPredicates)); - - if (getModelConfig().isIndexOnContainedResources() && theReferenceParam.getChain().contains(".")) { - orPredicates.add(childQueryFactory.createPredicateReferenceForContainedResource(myColumnTargetResourceId, subResourceName, chain, param, orValues, null, theRequest, theRequestPartitionId)); - } } if (candidateTargetTypes.isEmpty()) { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java index 78f156df1fa..3a52940a811 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java @@ -12,9 +12,9 @@ import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Organization; import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.StringType; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -93,7 +93,6 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { } @Test - @Disabled public void testShouldResolveATwoLinkChainWithAContainedResource() throws Exception { IIdType oid1; @@ -105,6 +104,7 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { Observation obs = new Observation(); obs.getContained().add(p); obs.getCode().setText("Observation 1"); + obs.setValue(new StringType("Test")); obs.getSubject().setReference("#pat"); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); @@ -113,6 +113,7 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { } String url = "/Observation?subject.name=Smith"; +// String url = "/Observation?subject.name=Smith&value-string=Test"; myCaptureQueriesListener.clear(); List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); @@ -198,7 +199,6 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { } @Test - @Disabled public void testShouldResolveAThreeLinkChainWithAContainedResourceAtTheBeginningOfTheChain() throws Exception { // This case seems like it would be less frequent in production, but we don't want to // paint ourselves into a corner where we require the contained link to be the last From 346e29920ac52458747597a87aa19571679b7cdd Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Fri, 3 Sep 2021 14:58:19 -0400 Subject: [PATCH 065/143] Issue 2927 convert mdm clear to spring batch (#2929) * initial roughout of mdm clear batch job * still roughing out classes * finished first draft of reader * most tests passing now * all tests pass. now FIXMEs * FIXMEs done. Time for regression. * fix test * changelog and docs * fix test * pre-review cleanup * version bump * move spring autowire deps for cdr * move spring autowire deps for cdr * finally got beans working phew * rearrange method calls so persistence module can perform clear operation on its own * Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa_mdm/mdm_operations.md Co-authored-by: Tadgh * review feedback * review feedback * Remove inheritance * fix beans Co-authored-by: Tadgh Co-authored-by: Tadgh --- hapi-deployable-pom/pom.xml | 2 +- hapi-fhir-android/pom.xml | 2 +- hapi-fhir-base/pom.xml | 2 +- hapi-fhir-bom/pom.xml | 4 +- hapi-fhir-cli/hapi-fhir-cli-api/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-app/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml | 2 +- hapi-fhir-cli/pom.xml | 2 +- hapi-fhir-client-okhttp/pom.xml | 2 +- hapi-fhir-client/pom.xml | 2 +- hapi-fhir-converter/pom.xml | 2 +- hapi-fhir-dist/pom.xml | 2 +- hapi-fhir-docs/pom.xml | 2 +- .../5_6_0/2927-mdm-clear-spring-batch.yaml | 3 + .../docs/server_jpa_mdm/mdm_operations.md | 54 +++-- hapi-fhir-jacoco/pom.xml | 2 +- hapi-fhir-jaxrsserver-base/pom.xml | 2 +- hapi-fhir-jpaserver-api/pom.xml | 2 +- hapi-fhir-jpaserver-base/pom.xml | 2 +- .../uhn/fhir/jpa/batch/BatchJobsConfig.java | 9 +- .../fhir/jpa/batch/CommonBatchJobConfig.java | 31 +++ .../batch/job/MultiUrlProcessorJobConfig.java | 57 ----- .../batch/job/PartitionedUrlValidator.java | 3 + .../mdm/MdmBatchJobSubmitterFactoryImpl.java | 15 ++ .../batch/mdm/MdmClearJobSubmitterImpl.java | 84 ++++++++ .../jpa/batch/mdm/job/MdmClearJobConfig.java | 125 +++++++++++ .../jpa/batch/mdm/job/MdmLinkDeleter.java | 85 ++++++++ ...erseCronologicalBatchMdmLinkPidReader.java | 52 +++++ ...BaseReverseCronologicalBatchPidReader.java | 193 +++++++++++++++++ ...CronologicalBatchAllResourcePidReader.java | 4 +- ...rseCronologicalBatchResourcePidReader.java | 183 ++-------------- .../ca/uhn/fhir/jpa/config/BaseConfig.java | 22 +- .../ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java | 7 +- .../jpa/dao/expunge/DeleteExpungeService.java | 201 ------------------ .../fhir/jpa/dao/mdm/MdmLinkExpandSvc.java | 7 +- .../delete/job/DeleteExpungeJobConfig.java | 27 ++- .../job/ReindexEverythingJobConfig.java | 10 +- .../jpa/reindex/job/ReindexJobConfig.java | 25 ++- .../jpa/bulk/BulkDataExportSvcImplR4Test.java | 3 +- .../fhir/jpa/delete/job/ReindexJobTest.java | 4 +- .../r4/MultitenantBatchOperationR4Test.java | 4 +- .../jpa/provider/r4/SystemProviderR4Test.java | 4 +- hapi-fhir-jpaserver-batch/pom.xml | 2 +- hapi-fhir-jpaserver-cql/pom.xml | 2 +- hapi-fhir-jpaserver-mdm/pom.xml | 2 +- .../jpa/mdm/config/MdmConsumerConfig.java | 10 +- .../jpa/mdm/config/MdmSubmitterConfig.java | 15 +- .../uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvc.java | 43 ---- .../uhn/fhir/jpa/mdm/svc/MdmClearSvcImpl.java | 84 -------- .../jpa/mdm/svc/MdmControllerSvcImpl.java | 21 ++ .../mdm/svc/MdmGoldenResourceDeletingSvc.java | 57 ----- .../fhir/jpa/mdm/svc/MdmSubmitSvcImpl.java | 11 +- .../jpa/mdm/config/BaseTestMdmConfig.java | 11 +- .../fhir/jpa/mdm/provider/BaseLinkR4Test.java | 6 +- .../jpa/mdm/provider/BaseProviderR4Test.java | 36 +++- .../mdm/provider/MdmProviderBatchR4Test.java | 26 +-- .../provider/MdmProviderClearLinkR4Test.java | 22 +- hapi-fhir-jpaserver-migrate/pom.xml | 2 +- hapi-fhir-jpaserver-model/pom.xml | 2 +- hapi-fhir-jpaserver-searchparam/pom.xml | 2 +- hapi-fhir-jpaserver-subscription/pom.xml | 2 +- hapi-fhir-jpaserver-test-utilities/pom.xml | 2 +- hapi-fhir-jpaserver-uhnfhirtest/pom.xml | 2 +- hapi-fhir-server-mdm/pom.xml | 2 +- .../mdm/api/IMdmBatchJobSubmitterFactory.java | 5 + ...ngeSvc.java => IMdmClearJobSubmitter.java} | 24 +-- .../uhn/fhir/mdm/api/IMdmControllerSvc.java | 7 + .../mdm/provider/MdmProviderDstu3Plus.java | 62 +++--- .../fhir/mdm/provider/MdmProviderLoader.java | 11 +- hapi-fhir-server-openapi/pom.xml | 2 +- hapi-fhir-server/pom.xml | 2 +- .../provider/DeleteExpungeProvider.java | 9 +- ...lProcessor.java => MultiUrlProcessor.java} | 12 +- .../server/provider/ProviderConstants.java | 14 +- .../rest/server/provider/ReindexProvider.java | 13 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../hapi-fhir-spring-boot-samples/pom.xml | 2 +- .../hapi-fhir-spring-boot-starter/pom.xml | 2 +- hapi-fhir-spring-boot/pom.xml | 2 +- hapi-fhir-structures-dstu2.1/pom.xml | 2 +- hapi-fhir-structures-dstu2/pom.xml | 2 +- hapi-fhir-structures-dstu3/pom.xml | 2 +- hapi-fhir-structures-hl7org-dstu2/pom.xml | 2 +- hapi-fhir-structures-r4/pom.xml | 2 +- .../rest/server/helper/BatchHelperR4.java | 16 ++ .../server/provider/BatchProviderTest.java | 4 +- hapi-fhir-structures-r5/pom.xml | 2 +- hapi-fhir-test-utilities/pom.xml | 2 +- hapi-fhir-testpage-overlay/pom.xml | 2 +- .../pom.xml | 2 +- hapi-fhir-validation-resources-dstu2/pom.xml | 2 +- hapi-fhir-validation-resources-dstu3/pom.xml | 2 +- hapi-fhir-validation-resources-r4/pom.xml | 2 +- hapi-fhir-validation-resources-r5/pom.xml | 2 +- hapi-fhir-validation/pom.xml | 2 +- hapi-tinder-plugin/pom.xml | 16 +- hapi-tinder-test/pom.xml | 2 +- pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- 104 files changed, 990 insertions(+), 869 deletions(-) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2927-mdm-clear-spring-batch.yaml delete mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/job/MultiUrlProcessorJobConfig.java create mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/MdmBatchJobSubmitterFactoryImpl.java create mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/MdmClearJobSubmitterImpl.java create mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/MdmClearJobConfig.java create mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/MdmLinkDeleter.java create mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/ReverseCronologicalBatchMdmLinkPidReader.java create mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/BaseReverseCronologicalBatchPidReader.java delete mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/DeleteExpungeService.java delete mode 100644 hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmClearSvcImpl.java delete mode 100644 hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmGoldenResourceDeletingSvc.java create mode 100644 hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmBatchJobSubmitterFactory.java rename hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/{IMdmExpungeSvc.java => IMdmClearJobSubmitter.java} (51%) rename hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/{BaseMultiUrlProcessor.java => MultiUrlProcessor.java} (80%) create mode 100644 hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/rest/server/helper/BatchHelperR4.java diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index 97a7f698966..266c65a230b 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index 3fb74827f93..f6390a03ab5 100644 --- a/hapi-fhir-android/pom.xml +++ b/hapi-fhir-android/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index a7ac0302705..311fd519e79 100644 --- a/hapi-fhir-base/pom.xml +++ b/hapi-fhir-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml index 8299f632b49..0ee5d85b77e 100644 --- a/hapi-fhir-bom/pom.xml +++ b/hapi-fhir-bom/pom.xml @@ -3,14 +3,14 @@ 4.0.0 ca.uhn.hapi.fhir hapi-fhir-bom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT pom HAPI FHIR BOM ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml index d758c2fa826..05da3e3fee3 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml index 6754bf399d6..acc6ac71323 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir-cli - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml index a7c0c5300e3..2b8034bb414 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../../hapi-deployable-pom diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml index 87195288afe..86dc09e7364 100644 --- a/hapi-fhir-cli/pom.xml +++ b/hapi-fhir-cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml index 13c7f7af8bd..7b1c2cabc2a 100644 --- a/hapi-fhir-client-okhttp/pom.xml +++ b/hapi-fhir-client-okhttp/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml index 7ac45a8c943..10ac2018c17 100644 --- a/hapi-fhir-client/pom.xml +++ b/hapi-fhir-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml index 10f8d934c02..df4e808eaff 100644 --- a/hapi-fhir-converter/pom.xml +++ b/hapi-fhir-converter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml index 3c20dd131b9..bca1b836071 100644 --- a/hapi-fhir-dist/pom.xml +++ b/hapi-fhir-dist/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml index 8057f47b1cc..3d086916574 100644 --- a/hapi-fhir-docs/pom.xml +++ b/hapi-fhir-docs/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2927-mdm-clear-spring-batch.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2927-mdm-clear-spring-batch.yaml new file mode 100644 index 00000000000..518e39472ac --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2927-mdm-clear-spring-batch.yaml @@ -0,0 +1,3 @@ +--- +type: change +title: "The $mdm-clear operation has been changed to use Spring Batch." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa_mdm/mdm_operations.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa_mdm/mdm_operations.md index b946438ebcb..7679c532977 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa_mdm/mdm_operations.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa_mdm/mdm_operations.md @@ -567,11 +567,15 @@ Note that the request goes to the root of the FHIR server, and not the `Organiza ## Clearing MDM Links -The `$mdm-clear` operation is used to batch-delete MDM links and related Golden Resources from the database. This operation is meant to be used during the rules-tuning phase of the MDM implementation so that you can quickly test your ruleset. It permits the user to reset the state of their MDM system without manual deletion of all related links and Golden Resources. +The `$mdm-clear` operation is used to batch-delete MDM links and related Golden Resources from the database. This +operation is intended to be used during the rules-tuning phase of the MDM implementation so that you can quickly test +your ruleset. It permits the user to reset the state of their MDM system without manual deletion of all related links +and Golden Resources. -After the operation is complete, all targeted MDM links are removed from the system, and their related Golden Resources are deleted and expunged from the server. +After the operation is complete, all targeted MDM links are removed from the system, and their related Golden Resources +are deleted and expunged from the server. -This operation takes a single optional Parameter. +This operation takes two optional Parameters. @@ -584,11 +588,21 @@ This operation takes a single optional Parameter. - + + + + + + + @@ -598,33 +612,27 @@ This operation takes a single optional Parameter. Use an HTTP POST to the following URL to invoke this operation: -```url -http://example.com/$mdm-clear -``` +```http +POST /$mdm-clear +Content-Type: application/fhir+json -The following request body could be used: - -```json { "resourceType": "Parameters", "parameter": [ { - "name": "sourceType", + "name": "resourceType", "valueString": "Patient" + }, { + "name": "resourceType", + "valueString": "Practitioner" + }, { + "name": "batchSize", + "valueDecimal": 1000 } ] } ``` -This operation returns the number of MDM links that were cleared. The following is a sample response: - -```json -{ - "resourceType": "Parameters", - "parameter": [ { - "name": "reset", - "valueDecimal": 5 - } ] -} -``` +This operation returns the job execution id of the Spring Batch job that will be run to remove all the links and their +golden resources. ## Batch-creating MDM Links diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml index ba7399f2148..3001c607337 100644 --- a/hapi-fhir-jacoco/pom.xml +++ b/hapi-fhir-jacoco/pom.xml @@ -11,7 +11,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml index 9a6548cb58a..ed82d9af335 100644 --- a/hapi-fhir-jaxrsserver-base/pom.xml +++ b/hapi-fhir-jaxrsserver-base/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-api/pom.xml b/hapi-fhir-jpaserver-api/pom.xml index 7e5767c9039..f763646e3f4 100644 --- a/hapi-fhir-jpaserver-api/pom.xml +++ b/hapi-fhir-jpaserver-api/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index 9a5909c79de..8fb7260401d 100644 --- a/hapi-fhir-jpaserver-base/pom.xml +++ b/hapi-fhir-jpaserver-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/BatchJobsConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/BatchJobsConfig.java index 4314a68c8b5..9e96243d45c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/BatchJobsConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/BatchJobsConfig.java @@ -20,6 +20,7 @@ package ca.uhn.fhir.jpa.batch; * #L% */ +import ca.uhn.fhir.jpa.batch.mdm.job.MdmClearJobConfig; import ca.uhn.fhir.jpa.bulk.export.job.BulkExportJobConfig; import ca.uhn.fhir.jpa.bulk.imprt.job.BulkImportJobConfig; import ca.uhn.fhir.jpa.delete.job.DeleteExpungeJobConfig; @@ -40,7 +41,8 @@ import java.util.Set; BulkImportJobConfig.class, DeleteExpungeJobConfig.class, ReindexJobConfig.class, - ReindexEverythingJobConfig.class + ReindexEverythingJobConfig.class, + MdmClearJobConfig.class }) public class BatchJobsConfig { @@ -94,4 +96,9 @@ public class BatchJobsConfig { */ public static final String REINDEX_EVERYTHING_JOB_NAME = "reindexEverythingJob"; + /** + * MDM Clear + */ + public static final String MDM_CLEAR_JOB_NAME = "mdmClearJob"; + } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/CommonBatchJobConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/CommonBatchJobConfig.java index a681e7e6bbb..e4eaf574d52 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/CommonBatchJobConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/CommonBatchJobConfig.java @@ -20,15 +20,46 @@ package ca.uhn.fhir.jpa.batch; * #L% */ +import ca.uhn.fhir.jpa.api.dao.DaoRegistry; +import ca.uhn.fhir.jpa.batch.job.MultiUrlJobParameterValidator; +import ca.uhn.fhir.jpa.batch.listener.PidReaderCounterListener; import ca.uhn.fhir.jpa.batch.processor.GoldenResourceAnnotatingProcessor; import ca.uhn.fhir.jpa.batch.processor.PidToIBaseResourceProcessor; +import ca.uhn.fhir.jpa.batch.reader.ReverseCronologicalBatchResourcePidReader; +import ca.uhn.fhir.jpa.batch.writer.SqlExecutorWriter; import ca.uhn.fhir.jpa.reindex.job.ReindexWriter; +import ca.uhn.fhir.jpa.searchparam.MatchUrlService; +import org.springframework.batch.core.JobParametersValidator; import org.springframework.batch.core.configuration.annotation.StepScope; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration public class CommonBatchJobConfig { + public static final int MINUTES_IN_FUTURE_TO_PROCESS_FROM = 1; + + @Bean + public MultiUrlJobParameterValidator multiUrlProcessorParameterValidator(MatchUrlService theMatchUrlService, DaoRegistry theDaoRegistry) { + return new MultiUrlJobParameterValidator(theMatchUrlService, theDaoRegistry); + } + + @Bean + @StepScope + public SqlExecutorWriter sqlExecutorWriter() { + return new SqlExecutorWriter(); + } + + @Bean + @StepScope + public PidReaderCounterListener pidCountRecorderListener() { + return new PidReaderCounterListener(); + } + + @Bean + @StepScope + public ReverseCronologicalBatchResourcePidReader reverseCronologicalBatchResourcePidReader() { + return new ReverseCronologicalBatchResourcePidReader(); + } @Bean @StepScope diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/job/MultiUrlProcessorJobConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/job/MultiUrlProcessorJobConfig.java deleted file mode 100644 index c47f01b59d1..00000000000 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/job/MultiUrlProcessorJobConfig.java +++ /dev/null @@ -1,57 +0,0 @@ -package ca.uhn.fhir.jpa.batch.job; - -/*- - * #%L - * HAPI FHIR JPA Server - * %% - * Copyright (C) 2014 - 2021 Smile CDR, Inc. - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.jpa.api.dao.DaoRegistry; -import ca.uhn.fhir.jpa.batch.listener.PidReaderCounterListener; -import ca.uhn.fhir.jpa.batch.reader.ReverseCronologicalBatchResourcePidReader; -import ca.uhn.fhir.jpa.batch.writer.SqlExecutorWriter; -import ca.uhn.fhir.jpa.searchparam.MatchUrlService; -import org.springframework.batch.core.JobParametersValidator; -import org.springframework.batch.core.configuration.annotation.StepScope; -import org.springframework.context.annotation.Bean; - -public class MultiUrlProcessorJobConfig { - public static final int MINUTES_IN_FUTURE_TO_PROCESS_FROM = 1; - - @Bean - public JobParametersValidator multiUrlProcessorParameterValidator(MatchUrlService theMatchUrlService, DaoRegistry theDaoRegistry) { - return new MultiUrlJobParameterValidator(theMatchUrlService, theDaoRegistry); - } - - @Bean - @StepScope - public SqlExecutorWriter sqlExecutorWriter() { - return new SqlExecutorWriter(); - } - - @Bean - @StepScope - public PidReaderCounterListener pidCountRecorderListener() { - return new PidReaderCounterListener(); - } - - @Bean - @StepScope - public ReverseCronologicalBatchResourcePidReader reverseCronologicalBatchResourcePidReader() { - return new ReverseCronologicalBatchResourcePidReader(); - } -} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/job/PartitionedUrlValidator.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/job/PartitionedUrlValidator.java index 80f69936f3e..0620b296e71 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/job/PartitionedUrlValidator.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/job/PartitionedUrlValidator.java @@ -43,6 +43,9 @@ public class PartitionedUrlValidator { @Autowired FhirContext myFhirContext; + public PartitionedUrlValidator() { + } + /** * This method will throw an exception if the user is not allowed to access the requested resource type on the partition determined by the request */ diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/MdmBatchJobSubmitterFactoryImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/MdmBatchJobSubmitterFactoryImpl.java new file mode 100644 index 00000000000..e31df97cc3c --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/MdmBatchJobSubmitterFactoryImpl.java @@ -0,0 +1,15 @@ +package ca.uhn.fhir.jpa.batch.mdm; + +import ca.uhn.fhir.mdm.api.IMdmBatchJobSubmitterFactory; +import ca.uhn.fhir.mdm.api.IMdmClearJobSubmitter; +import org.springframework.beans.factory.annotation.Autowired; + +public class MdmBatchJobSubmitterFactoryImpl implements IMdmBatchJobSubmitterFactory { + @Autowired + IMdmClearJobSubmitter myMdmClearJobSubmitter; + + @Override + public IMdmClearJobSubmitter getClearJobSubmitter() { + return myMdmClearJobSubmitter; + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/MdmClearJobSubmitterImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/MdmClearJobSubmitterImpl.java new file mode 100644 index 00000000000..90bee86b963 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/MdmClearJobSubmitterImpl.java @@ -0,0 +1,84 @@ +package ca.uhn.fhir.jpa.batch.mdm; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.interceptor.api.HookParams; +import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; +import ca.uhn.fhir.interceptor.api.Pointcut; +import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.batch.BatchJobsConfig; +import ca.uhn.fhir.jpa.batch.api.IBatchJobSubmitter; +import ca.uhn.fhir.jpa.batch.job.PartitionedUrlValidator; +import ca.uhn.fhir.jpa.batch.job.model.RequestListJson; +import ca.uhn.fhir.jpa.batch.mdm.job.ReverseCronologicalBatchMdmLinkPidReader; +import ca.uhn.fhir.mdm.api.IMdmClearJobSubmitter; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import ca.uhn.fhir.rest.server.exceptions.ForbiddenOperationException; +import ca.uhn.fhir.rest.server.provider.ProviderConstants; +import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; +import ca.uhn.fhir.rest.server.util.CompositeInterceptorBroadcaster; +import org.springframework.batch.core.Job; +import org.springframework.batch.core.JobExecution; +import org.springframework.batch.core.JobParameters; +import org.springframework.batch.core.JobParametersInvalidException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +import javax.transaction.Transactional; +import java.util.List; + +public class MdmClearJobSubmitterImpl implements IMdmClearJobSubmitter { + @Autowired + DaoConfig myDaoConfig; + @Autowired + PartitionedUrlValidator myPartitionedUrlValidator; + @Autowired + IInterceptorBroadcaster myInterceptorBroadcaster; + @Autowired + private IBatchJobSubmitter myBatchJobSubmitter; + @Autowired + @Qualifier(BatchJobsConfig.MDM_CLEAR_JOB_NAME) + private Job myMdmClearJob; + + @Override + @Transactional(Transactional.TxType.NEVER) + public JobExecution submitJob(Integer theBatchSize, List theUrls, RequestDetails theRequest) throws JobParametersInvalidException { + if (theBatchSize == null) { + theBatchSize = myDaoConfig.getExpungeBatchSize(); + } + if (!myDaoConfig.canDeleteExpunge()) { + throw new ForbiddenOperationException("Delete Expunge not allowed: " + myDaoConfig.cannotDeleteExpungeReason()); + } + + RequestListJson requestListJson = myPartitionedUrlValidator.buildRequestListJson(theRequest, theUrls); + + for (String url : theUrls) { + HookParams params = new HookParams() + .add(RequestDetails.class, theRequest) + .addIfMatchesType(ServletRequestDetails.class, theRequest) + .add(String.class, url); + CompositeInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequest, Pointcut.STORAGE_PRE_DELETE_EXPUNGE, params); + } + + JobParameters jobParameters = ReverseCronologicalBatchMdmLinkPidReader.buildJobParameters(ProviderConstants.OPERATION_MDM_CLEAR, theBatchSize, requestListJson); + return myBatchJobSubmitter.runJob(myMdmClearJob, jobParameters); + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/MdmClearJobConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/MdmClearJobConfig.java new file mode 100644 index 00000000000..b2786f7cc84 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/MdmClearJobConfig.java @@ -0,0 +1,125 @@ +package ca.uhn.fhir.jpa.batch.mdm.job; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.batch.job.MultiUrlJobParameterValidator; +import ca.uhn.fhir.jpa.batch.listener.PidReaderCounterListener; +import ca.uhn.fhir.jpa.batch.writer.SqlExecutorWriter; +import ca.uhn.fhir.jpa.delete.job.DeleteExpungeProcessor; +import org.springframework.batch.core.Job; +import org.springframework.batch.core.Step; +import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; +import org.springframework.batch.core.configuration.annotation.StepBuilderFactory; +import org.springframework.batch.core.configuration.annotation.StepScope; +import org.springframework.batch.core.listener.ExecutionContextPromotionListener; +import org.springframework.batch.item.ItemProcessor; +import org.springframework.batch.item.support.CompositeItemProcessor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; + +import java.util.ArrayList; +import java.util.List; + +import static ca.uhn.fhir.jpa.batch.BatchJobsConfig.MDM_CLEAR_JOB_NAME; + +/** + * Spring batch Job configuration file. Contains all necessary plumbing to run a + * $mdm-clear job. + */ +@Configuration +public class MdmClearJobConfig { + public static final String MDM_CLEAR_RESOURCE_LIST_STEP_NAME = "mdm-clear-resource-list-step"; + + @Autowired + private StepBuilderFactory myStepBuilderFactory; + @Autowired + private JobBuilderFactory myJobBuilderFactory; + @Autowired + private DeleteExpungeProcessor myDeleteExpungeProcessor; + + @Autowired + @Qualifier("deleteExpungePromotionListener") + private ExecutionContextPromotionListener myDeleteExpungePromotionListener; + + @Autowired + private MultiUrlJobParameterValidator myMultiUrlProcessorParameterValidator; + + @Autowired + private PidReaderCounterListener myPidCountRecorderListener; + + @Autowired + private SqlExecutorWriter mySqlExecutorWriter; + + @Bean(name = MDM_CLEAR_JOB_NAME) + @Lazy + public Job mdmClearJob() { + return myJobBuilderFactory.get(MDM_CLEAR_JOB_NAME) + .validator(myMultiUrlProcessorParameterValidator) + .start(mdmClearUrlListStep()) + .build(); + } + + @Bean + public Step mdmClearUrlListStep() { + return myStepBuilderFactory.get(MDM_CLEAR_RESOURCE_LIST_STEP_NAME) + ., List>chunk(1) + .reader(reverseCronologicalBatchMdmLinkPidReader()) + .processor(deleteThenExpungeCompositeProcessor()) + .writer(mySqlExecutorWriter) + .listener(myPidCountRecorderListener) + .listener(myDeleteExpungePromotionListener) + .build(); + } + + @Bean + @StepScope + public ItemProcessor, List> deleteThenExpungeCompositeProcessor() { + CompositeItemProcessor, List> compositeProcessor = new CompositeItemProcessor<>(); + List itemProcessors = new ArrayList<>(); + itemProcessors.add(mdmLinkDeleter()); + itemProcessors.add(myDeleteExpungeProcessor); + compositeProcessor.setDelegates(itemProcessors); + return compositeProcessor; + } + + @Bean + @StepScope + public ReverseCronologicalBatchMdmLinkPidReader reverseCronologicalBatchMdmLinkPidReader() { + return new ReverseCronologicalBatchMdmLinkPidReader(); + } + + @Bean + public MdmLinkDeleter mdmLinkDeleter() { + return new MdmLinkDeleter(); + } + + @Bean + public ExecutionContextPromotionListener mdmClearPromotionListener() { + ExecutionContextPromotionListener listener = new ExecutionContextPromotionListener(); + + listener.setKeys(new String[]{PidReaderCounterListener.RESOURCE_TOTAL_PROCESSED}); + + return listener; + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/MdmLinkDeleter.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/MdmLinkDeleter.java new file mode 100644 index 00000000000..e43cc5b07a4 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/MdmLinkDeleter.java @@ -0,0 +1,85 @@ +package ca.uhn.fhir.jpa.batch.mdm.job; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.dao.data.IMdmLinkDao; +import ca.uhn.fhir.jpa.dao.expunge.PartitionRunner; +import ca.uhn.fhir.jpa.entity.MdmLink; +import ca.uhn.fhir.mdm.api.MdmMatchResultEnum; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.batch.item.ItemProcessor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.SliceImpl; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.support.TransactionTemplate; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.stream.Collectors; + +/** + * Take MdmLink pids in and output golden resource pids out + */ + +public class MdmLinkDeleter implements ItemProcessor, List> { + public static final String PROCESS_NAME = "MdmClear"; + public static final String THREAD_PREFIX = "mdmClear"; + private static final Logger ourLog = LoggerFactory.getLogger(MdmLinkDeleter.class); + @Autowired + protected PlatformTransactionManager myTxManager; + @Autowired + IMdmLinkDao myMdmLinkDao; + @Autowired + DaoConfig myDaoConfig; + + @Override + public List process(List thePidList) throws Exception { + ConcurrentLinkedQueue goldenPidAggregator = new ConcurrentLinkedQueue<>(); + PartitionRunner partitionRunner = new PartitionRunner(PROCESS_NAME, THREAD_PREFIX, myDaoConfig.getReindexBatchSize(), myDaoConfig.getReindexThreadCount()); + partitionRunner.runInPartitionedThreads(new SliceImpl<>(thePidList), pids -> removeLinks(thePidList, goldenPidAggregator)); + return new ArrayList<>(goldenPidAggregator); + } + + private void removeLinks(List pidList, ConcurrentLinkedQueue theGoldenPidAggregator) { + TransactionTemplate txTemplate = new TransactionTemplate(myTxManager); + + txTemplate.executeWithoutResult(t -> theGoldenPidAggregator.addAll(deleteMdmLinksAndReturnGoldenResourcePids(pidList))); + } + + public List deleteMdmLinksAndReturnGoldenResourcePids(List thePids) { + List links = myMdmLinkDao.findAllById(thePids); + Set goldenResources = links.stream().map(MdmLink::getGoldenResourcePid).collect(Collectors.toSet()); + //TODO GGG this is probably invalid... we are essentially looking for GOLDEN -> GOLDEN links, which are either POSSIBLE_DUPLICATE + //and REDIRECT + goldenResources.addAll(links.stream() + .filter(link -> link.getMatchResult().equals(MdmMatchResultEnum.REDIRECT) + || link.getMatchResult().equals(MdmMatchResultEnum.POSSIBLE_DUPLICATE)) + .map(MdmLink::getSourcePid).collect(Collectors.toSet())); + ourLog.info("Deleting {} MDM link records...", links.size()); + myMdmLinkDao.deleteAll(links); + ourLog.info("{} MDM link records deleted", links.size()); + return new ArrayList<>(goldenResources); + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/ReverseCronologicalBatchMdmLinkPidReader.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/ReverseCronologicalBatchMdmLinkPidReader.java new file mode 100644 index 00000000000..8ad752f96fe --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/ReverseCronologicalBatchMdmLinkPidReader.java @@ -0,0 +1,52 @@ +package ca.uhn.fhir.jpa.batch.mdm.job; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.batch.reader.BaseReverseCronologicalBatchPidReader; +import ca.uhn.fhir.jpa.dao.data.IMdmLinkDao; +import ca.uhn.fhir.jpa.searchparam.ResourceSearch; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; + +import java.util.HashSet; +import java.util.Set; + +/** + * This is the same as the parent class, except it operates on MdmLink entities instead of resource entities + */ +public class ReverseCronologicalBatchMdmLinkPidReader extends BaseReverseCronologicalBatchPidReader { + @Autowired + IMdmLinkDao myMdmLinkDao; + + @Override + protected Set getNextPidBatch(ResourceSearch resourceSearch) { + String resourceName = resourceSearch.getResourceName(); + Pageable pageable = PageRequest.of(0, getBatchSize()); + //Expand out the list to handle the REDIRECT/POSSIBLE DUPLICATE ones. + return new HashSet<>(myMdmLinkDao.findPidByResourceNameAndThreshold(resourceName, getCurrentHighThreshold(), pageable)); + } + + @Override + protected void setDateFromPidFunction(ResourceSearch resourceSearch) { + setDateExtractorFunction(pid -> myMdmLinkDao.findById(pid).get().getCreated()); + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/BaseReverseCronologicalBatchPidReader.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/BaseReverseCronologicalBatchPidReader.java new file mode 100644 index 00000000000..d682728119c --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/BaseReverseCronologicalBatchPidReader.java @@ -0,0 +1,193 @@ +package ca.uhn.fhir.jpa.batch.reader; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.interceptor.model.RequestPartitionId; +import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.batch.CommonBatchJobConfig; +import ca.uhn.fhir.jpa.batch.job.MultiUrlJobParameterValidator; +import ca.uhn.fhir.jpa.batch.job.model.PartitionedUrl; +import ca.uhn.fhir.jpa.batch.job.model.RequestListJson; +import ca.uhn.fhir.jpa.searchparam.MatchUrlService; +import ca.uhn.fhir.jpa.searchparam.ResourceSearch; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.rest.api.SortOrderEnum; +import ca.uhn.fhir.rest.api.SortSpec; +import ca.uhn.fhir.rest.param.DateRangeParam; +import org.apache.commons.lang3.time.DateUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.batch.core.JobParameter; +import org.springframework.batch.core.JobParameters; +import org.springframework.batch.item.ExecutionContext; +import org.springframework.batch.item.ItemReader; +import org.springframework.batch.item.ItemStream; +import org.springframework.batch.item.ItemStreamException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; + +import javax.annotation.Nonnull; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Function; + +/** + * This Spring Batch reader takes 4 parameters: + * {@link #JOB_PARAM_REQUEST_LIST}: A list of URLs to search for along with the partitions those searches should be performed on + * {@link #JOB_PARAM_BATCH_SIZE}: The number of resources to return with each search. If ommitted, {@link DaoConfig#getExpungeBatchSize} will be used. + * {@link #JOB_PARAM_START_TIME}: The latest timestamp of entities to search for + *

+ * The reader will return at most {@link #JOB_PARAM_BATCH_SIZE} pids every time it is called, or null + * once no more matching entities are available. It returns the resources in reverse chronological order + * and stores where it's at in the Spring Batch execution context with the key {@link #CURRENT_THRESHOLD_HIGH} + * appended with "." and the index number of the url list item it has gotten up to. This is to permit + * restarting jobs that use this reader so it can pick up where it left off. + */ +public abstract class BaseReverseCronologicalBatchPidReader implements ItemReader>, ItemStream { + public static final String JOB_PARAM_REQUEST_LIST = "url-list"; + public static final String JOB_PARAM_BATCH_SIZE = "batch-size"; + public static final String JOB_PARAM_START_TIME = "start-time"; + public static final String CURRENT_URL_INDEX = "current.url-index"; + public static final String CURRENT_THRESHOLD_HIGH = "current.threshold-high"; + private static final Logger ourLog = LoggerFactory.getLogger(ReverseCronologicalBatchResourcePidReader.class); + private final BatchDateThresholdUpdater myBatchDateThresholdUpdater = new BatchDateThresholdUpdater(); + private final Map myThresholdHighByUrlIndex = new HashMap<>(); + private final Map> myAlreadyProcessedPidsWithHighDate = new HashMap<>(); + @Autowired + private FhirContext myFhirContext; + @Autowired + private MatchUrlService myMatchUrlService; + private List myPartitionedUrls; + private Integer myBatchSize; + private int myUrlIndex = 0; + private Date myStartTime; + + private static String highKey(int theIndex) { + return CURRENT_THRESHOLD_HIGH + "." + theIndex; + } + + @Nonnull + public static JobParameters buildJobParameters(String theOperationName, Integer theBatchSize, RequestListJson theRequestListJson) { + Map map = new HashMap<>(); + map.put(MultiUrlJobParameterValidator.JOB_PARAM_OPERATION_NAME, new JobParameter(theOperationName)); + map.put(ReverseCronologicalBatchResourcePidReader.JOB_PARAM_REQUEST_LIST, new JobParameter(theRequestListJson.toJson())); + map.put(ReverseCronologicalBatchResourcePidReader.JOB_PARAM_START_TIME, new JobParameter(DateUtils.addMinutes(new Date(), CommonBatchJobConfig.MINUTES_IN_FUTURE_TO_PROCESS_FROM))); + if (theBatchSize != null) { + map.put(ReverseCronologicalBatchResourcePidReader.JOB_PARAM_BATCH_SIZE, new JobParameter(theBatchSize.longValue())); + } + JobParameters parameters = new JobParameters(map); + return parameters; + } + + @Autowired + public void setRequestListJson(@Value("#{jobParameters['" + JOB_PARAM_REQUEST_LIST + "']}") String theRequestListJson) { + RequestListJson requestListJson = RequestListJson.fromJson(theRequestListJson); + myPartitionedUrls = requestListJson.getPartitionedUrls(); + } + + @Autowired + public void setStartTime(@Value("#{jobParameters['" + JOB_PARAM_START_TIME + "']}") Date theStartTime) { + myStartTime = theStartTime; + } + + @Override + public List read() throws Exception { + while (myUrlIndex < myPartitionedUrls.size()) { + List nextBatch = getNextBatch(); + if (nextBatch.isEmpty()) { + ++myUrlIndex; + continue; + } + + return nextBatch; + } + return null; + } + + protected List getNextBatch() { + RequestPartitionId requestPartitionId = myPartitionedUrls.get(myUrlIndex).getRequestPartitionId(); + ResourceSearch resourceSearch = myMatchUrlService.getResourceSearch(myPartitionedUrls.get(myUrlIndex).getUrl(), requestPartitionId); + myAlreadyProcessedPidsWithHighDate.putIfAbsent(myUrlIndex, new HashSet<>()); + Set newPids = getNextPidBatch(resourceSearch); + + if (ourLog.isDebugEnabled()) { + ourLog.debug("Search for {}{} returned {} results", resourceSearch.getResourceName(), resourceSearch.getSearchParameterMap().toNormalizedQueryString(myFhirContext), newPids.size()); + ourLog.debug("Results: {}", newPids); + } + + setDateFromPidFunction(resourceSearch); + + List retval = new ArrayList<>(newPids); + Date newThreshold = myBatchDateThresholdUpdater.updateThresholdAndCache(getCurrentHighThreshold(), myAlreadyProcessedPidsWithHighDate.get(myUrlIndex), retval); + myThresholdHighByUrlIndex.put(myUrlIndex, newThreshold); + + return retval; + } + + protected Date getCurrentHighThreshold() { + return myThresholdHighByUrlIndex.get(myUrlIndex); + } + + protected void setDateExtractorFunction(Function theDateExtractorFunction) { + myBatchDateThresholdUpdater.setDateFromPid(theDateExtractorFunction); + } + + protected void addDateCountAndSortToSearch(ResourceSearch resourceSearch) { + SearchParameterMap map = resourceSearch.getSearchParameterMap(); + map.setLastUpdated(new DateRangeParam().setUpperBoundInclusive(getCurrentHighThreshold())); + map.setLoadSynchronousUpTo(myBatchSize); + map.setSort(new SortSpec(Constants.PARAM_LASTUPDATED, SortOrderEnum.DESC)); + } + + @Override + public void open(ExecutionContext executionContext) throws ItemStreamException { + if (executionContext.containsKey(CURRENT_URL_INDEX)) { + myUrlIndex = new Long(executionContext.getLong(CURRENT_URL_INDEX)).intValue(); + } + for (int index = 0; index < myPartitionedUrls.size(); ++index) { + String key = highKey(index); + if (executionContext.containsKey(key)) { + myThresholdHighByUrlIndex.put(index, new Date(executionContext.getLong(key))); + } else { + myThresholdHighByUrlIndex.put(index, myStartTime); + } + } + } + + @Override + public void update(ExecutionContext executionContext) throws ItemStreamException { + executionContext.putLong(CURRENT_URL_INDEX, myUrlIndex); + for (int index = 0; index < myPartitionedUrls.size(); ++index) { + Date date = myThresholdHighByUrlIndex.get(index); + if (date != null) { + executionContext.putLong(highKey(index), date.getTime()); + } + } + } + + @Override + public void close() throws ItemStreamException { + } + + protected Integer getBatchSize() { + return myBatchSize; + } + + @Autowired + public void setBatchSize(@Value("#{jobParameters['" + JOB_PARAM_BATCH_SIZE + "']}") Integer theBatchSize) { + myBatchSize = theBatchSize; + } + + protected Set getAlreadySeenPids() { + return myAlreadyProcessedPidsWithHighDate.get(myUrlIndex); + } + + protected abstract Set getNextPidBatch(ResourceSearch resourceSearch); + + protected abstract void setDateFromPidFunction(ResourceSearch resourceSearch); +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/CronologicalBatchAllResourcePidReader.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/CronologicalBatchAllResourcePidReader.java index 6eeed5db0f6..a704d59e2ea 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/CronologicalBatchAllResourcePidReader.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/CronologicalBatchAllResourcePidReader.java @@ -22,7 +22,7 @@ package ca.uhn.fhir.jpa.batch.reader; import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.config.DaoConfig; -import ca.uhn.fhir.jpa.batch.job.MultiUrlProcessorJobConfig; +import ca.uhn.fhir.jpa.batch.CommonBatchJobConfig; import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import com.fasterxml.jackson.core.JsonProcessingException; @@ -93,7 +93,7 @@ public class CronologicalBatchAllResourcePidReader implements ItemReader map = new HashMap<>(); map.put(CronologicalBatchAllResourcePidReader.JOB_PARAM_REQUEST_PARTITION, new JobParameter(theRequestPartitionId.toJson())); - map.put(CronologicalBatchAllResourcePidReader.JOB_PARAM_START_TIME, new JobParameter(DateUtils.addMinutes(new Date(), MultiUrlProcessorJobConfig.MINUTES_IN_FUTURE_TO_PROCESS_FROM))); + map.put(CronologicalBatchAllResourcePidReader.JOB_PARAM_START_TIME, new JobParameter(DateUtils.addMinutes(new Date(), CommonBatchJobConfig.MINUTES_IN_FUTURE_TO_PROCESS_FROM))); if (theBatchSize != null) { map.put(CronologicalBatchAllResourcePidReader.JOB_PARAM_BATCH_SIZE, new JobParameter(theBatchSize.longValue())); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/ReverseCronologicalBatchResourcePidReader.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/ReverseCronologicalBatchResourcePidReader.java index c27e2089b4f..ba840600337 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/ReverseCronologicalBatchResourcePidReader.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/ReverseCronologicalBatchResourcePidReader.java @@ -20,209 +20,52 @@ package ca.uhn.fhir.jpa.batch.reader; * #L% */ -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.interceptor.model.RequestPartitionId; -import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; -import ca.uhn.fhir.jpa.batch.job.MultiUrlJobParameterValidator; -import ca.uhn.fhir.jpa.batch.job.MultiUrlProcessorJobConfig; -import ca.uhn.fhir.jpa.batch.job.model.PartitionedUrl; -import ca.uhn.fhir.jpa.batch.job.model.RequestListJson; import ca.uhn.fhir.jpa.dao.IResultIterator; -import ca.uhn.fhir.jpa.searchparam.MatchUrlService; import ca.uhn.fhir.jpa.searchparam.ResourceSearch; -import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.api.SortOrderEnum; -import ca.uhn.fhir.rest.api.SortSpec; import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; -import ca.uhn.fhir.rest.param.DateRangeParam; -import org.apache.commons.lang3.time.DateUtils; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.batch.core.JobParameter; -import org.springframework.batch.core.JobParameters; -import org.springframework.batch.item.ExecutionContext; -import org.springframework.batch.item.ItemReader; -import org.springframework.batch.item.ItemStream; -import org.springframework.batch.item.ItemStreamException; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import javax.annotation.Nonnull; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; -import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -/** - * This Spring Batch reader takes 4 parameters: - * {@link #JOB_PARAM_REQUEST_LIST}: A list of URLs to search for along with the partitions those searches should be performed on - * {@link #JOB_PARAM_BATCH_SIZE}: The number of resources to return with each search. If ommitted, {@link DaoConfig#getExpungeBatchSize} will be used. - * {@link #JOB_PARAM_START_TIME}: The latest timestamp of resources to search for - *

- * The reader will return at most {@link #JOB_PARAM_BATCH_SIZE} pids every time it is called, or null - * once no more matching resources are available. It returns the resources in reverse chronological order - * and stores where it's at in the Spring Batch execution context with the key {@link #CURRENT_THRESHOLD_HIGH} - * appended with "." and the index number of the url list item it has gotten up to. This is to permit - * restarting jobs that use this reader so it can pick up where it left off. - */ -public class ReverseCronologicalBatchResourcePidReader implements ItemReader>, ItemStream { - private static final Logger ourLog = LoggerFactory.getLogger(ReverseCronologicalBatchResourcePidReader.class); - public static final String JOB_PARAM_REQUEST_LIST = "url-list"; - public static final String JOB_PARAM_BATCH_SIZE = "batch-size"; - public static final String JOB_PARAM_START_TIME = "start-time"; - - public static final String CURRENT_URL_INDEX = "current.url-index"; - public static final String CURRENT_THRESHOLD_HIGH = "current.threshold-high"; - - @Autowired - private FhirContext myFhirContext; - @Autowired - private MatchUrlService myMatchUrlService; +public class ReverseCronologicalBatchResourcePidReader extends BaseReverseCronologicalBatchPidReader { @Autowired private DaoRegistry myDaoRegistry; @Autowired private BatchResourceSearcher myBatchResourceSearcher; - private final BatchDateThresholdUpdater myBatchDateThresholdUpdater = new BatchDateThresholdUpdater(); - - private List myPartitionedUrls; - private Integer myBatchSize; - private final Map myThresholdHighByUrlIndex = new HashMap<>(); - private final Map> myAlreadyProcessedPidsWithHighDate = new HashMap<>(); - - private int myUrlIndex = 0; - private Date myStartTime; - - @Autowired - public void setRequestListJson(@Value("#{jobParameters['" + JOB_PARAM_REQUEST_LIST + "']}") String theRequestListJson) { - RequestListJson requestListJson = RequestListJson.fromJson(theRequestListJson); - myPartitionedUrls = requestListJson.getPartitionedUrls(); - } - - @Autowired - public void setBatchSize(@Value("#{jobParameters['" + JOB_PARAM_BATCH_SIZE + "']}") Integer theBatchSize) { - myBatchSize = theBatchSize; - } - - @Autowired - public void setStartTime(@Value("#{jobParameters['" + JOB_PARAM_START_TIME + "']}") Date theStartTime) { - myStartTime = theStartTime; - } - @Override - public List read() throws Exception { - while (myUrlIndex < myPartitionedUrls.size()) { - List nextBatch = getNextBatch(); - if (nextBatch.isEmpty()) { - ++myUrlIndex; - continue; - } - - return nextBatch; - } - return null; - } - - private List getNextBatch() { - RequestPartitionId requestPartitionId = myPartitionedUrls.get(myUrlIndex).getRequestPartitionId(); - ResourceSearch resourceSearch = myMatchUrlService.getResourceSearch(myPartitionedUrls.get(myUrlIndex).getUrl(), requestPartitionId); + protected Set getNextPidBatch(ResourceSearch resourceSearch) { + Set retval = new LinkedHashSet<>(); addDateCountAndSortToSearch(resourceSearch); // Perform the search - IResultIterator resultIter = myBatchResourceSearcher.performSearch(resourceSearch, myBatchSize); - Set newPids = new LinkedHashSet<>(); - Set alreadySeenPids = myAlreadyProcessedPidsWithHighDate.computeIfAbsent(myUrlIndex, i -> new HashSet<>()); + Integer batchSize = getBatchSize(); + IResultIterator resultIter = myBatchResourceSearcher.performSearch(resourceSearch, batchSize); + Set alreadySeenPids = getAlreadySeenPids(); do { - List pids = resultIter.getNextResultBatch(myBatchSize).stream().map(ResourcePersistentId::getIdAsLong).collect(Collectors.toList()); - newPids.addAll(pids); - newPids.removeAll(alreadySeenPids); - } while (newPids.size() < myBatchSize && resultIter.hasNext()); - - if (ourLog.isDebugEnabled()) { - ourLog.debug("Search for {}{} returned {} results", resourceSearch.getResourceName(), resourceSearch.getSearchParameterMap().toNormalizedQueryString(myFhirContext), newPids.size()); - ourLog.debug("Results: {}", newPids); - } - - setDateFromPidFunction(resourceSearch); - - List retval = new ArrayList<>(newPids); - Date newThreshold = myBatchDateThresholdUpdater.updateThresholdAndCache(myThresholdHighByUrlIndex.get(myUrlIndex), myAlreadyProcessedPidsWithHighDate.get(myUrlIndex), retval); - myThresholdHighByUrlIndex.put(myUrlIndex, newThreshold); + List pids = resultIter.getNextResultBatch(batchSize).stream().map(ResourcePersistentId::getIdAsLong).collect(Collectors.toList()); + retval.addAll(pids); + retval.removeAll(alreadySeenPids); + } while (retval.size() < batchSize && resultIter.hasNext()); return retval; } - private void setDateFromPidFunction(ResourceSearch resourceSearch) { + @Override + protected void setDateFromPidFunction(ResourceSearch resourceSearch) { final IFhirResourceDao dao = myDaoRegistry.getResourceDao(resourceSearch.getResourceName()); - myBatchDateThresholdUpdater.setDateFromPid(pid -> { + setDateExtractorFunction(pid -> { IBaseResource oldestResource = dao.readByPid(new ResourcePersistentId(pid)); return oldestResource.getMeta().getLastUpdated(); }); } - - private void addDateCountAndSortToSearch(ResourceSearch resourceSearch) { - SearchParameterMap map = resourceSearch.getSearchParameterMap(); - map.setLastUpdated(new DateRangeParam().setUpperBoundInclusive(myThresholdHighByUrlIndex.get(myUrlIndex))); - map.setLoadSynchronousUpTo(myBatchSize); - map.setSort(new SortSpec(Constants.PARAM_LASTUPDATED, SortOrderEnum.DESC)); - } - - @Override - public void open(ExecutionContext executionContext) throws ItemStreamException { - if (executionContext.containsKey(CURRENT_URL_INDEX)) { - myUrlIndex = new Long(executionContext.getLong(CURRENT_URL_INDEX)).intValue(); - } - for (int index = 0; index < myPartitionedUrls.size(); ++index) { - String key = highKey(index); - if (executionContext.containsKey(key)) { - myThresholdHighByUrlIndex.put(index, new Date(executionContext.getLong(key))); - } else { - myThresholdHighByUrlIndex.put(index, myStartTime); - } - } - } - - private static String highKey(int theIndex) { - return CURRENT_THRESHOLD_HIGH + "." + theIndex; - } - - @Override - public void update(ExecutionContext executionContext) throws ItemStreamException { - executionContext.putLong(CURRENT_URL_INDEX, myUrlIndex); - for (int index = 0; index < myPartitionedUrls.size(); ++index) { - Date date = myThresholdHighByUrlIndex.get(index); - if (date != null) { - executionContext.putLong(highKey(index), date.getTime()); - } - } - } - - @Override - public void close() throws ItemStreamException { - } - - @Nonnull - public static JobParameters buildJobParameters(String theOperationName, Integer theBatchSize, RequestListJson theRequestListJson) { - Map map = new HashMap<>(); - map.put(MultiUrlJobParameterValidator.JOB_PARAM_OPERATION_NAME, new JobParameter(theOperationName)); - map.put(ReverseCronologicalBatchResourcePidReader.JOB_PARAM_REQUEST_LIST, new JobParameter(theRequestListJson.toJson())); - map.put(ReverseCronologicalBatchResourcePidReader.JOB_PARAM_START_TIME, new JobParameter(DateUtils.addMinutes(new Date(), MultiUrlProcessorJobConfig.MINUTES_IN_FUTURE_TO_PROCESS_FROM))); - if (theBatchSize != null) { - map.put(ReverseCronologicalBatchResourcePidReader.JOB_PARAM_BATCH_SIZE, new JobParameter(theBatchSize.longValue())); - } - JobParameters parameters = new JobParameters(map); - return parameters; - } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java index 2aebff2b539..dfc424f2a77 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java @@ -16,6 +16,8 @@ import ca.uhn.fhir.jpa.batch.BatchJobsConfig; import ca.uhn.fhir.jpa.batch.api.IBatchJobSubmitter; import ca.uhn.fhir.jpa.batch.config.NonPersistedBatchConfigurer; import ca.uhn.fhir.jpa.batch.job.PartitionedUrlValidator; +import ca.uhn.fhir.jpa.batch.mdm.MdmBatchJobSubmitterFactoryImpl; +import ca.uhn.fhir.jpa.batch.mdm.MdmClearJobSubmitterImpl; import ca.uhn.fhir.jpa.batch.reader.BatchResourceSearcher; import ca.uhn.fhir.jpa.batch.svc.BatchJobSubmitterImpl; import ca.uhn.fhir.jpa.binstore.BinaryAccessProvider; @@ -35,7 +37,6 @@ import ca.uhn.fhir.jpa.dao.LegacySearchBuilder; import ca.uhn.fhir.jpa.dao.MatchResourceUrlService; import ca.uhn.fhir.jpa.dao.SearchBuilderFactory; import ca.uhn.fhir.jpa.dao.TransactionProcessor; -import ca.uhn.fhir.jpa.dao.expunge.DeleteExpungeService; import ca.uhn.fhir.jpa.dao.expunge.ExpungeEverythingService; import ca.uhn.fhir.jpa.dao.expunge.ExpungeOperation; import ca.uhn.fhir.jpa.dao.expunge.ExpungeService; @@ -136,6 +137,8 @@ import ca.uhn.fhir.jpa.term.api.ITermConceptMappingSvc; import ca.uhn.fhir.jpa.util.MemoryCacheService; import ca.uhn.fhir.jpa.validation.JpaResourceLoader; import ca.uhn.fhir.jpa.validation.ValidationSettings; +import ca.uhn.fhir.mdm.api.IMdmBatchJobSubmitterFactory; +import ca.uhn.fhir.mdm.api.IMdmClearJobSubmitter; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.api.server.storage.IDeleteExpungeJobSubmitter; import ca.uhn.fhir.rest.api.server.storage.IReindexJobSubmitter; @@ -515,10 +518,20 @@ public abstract class BaseConfig { } @Bean - public MdmLinkExpandSvc myMdmLinkExpandSvc() { + public MdmLinkExpandSvc mdmLinkExpandSvc() { return new MdmLinkExpandSvc(); } + @Bean + IMdmBatchJobSubmitterFactory mdmBatchJobSubmitterFactory() { + return new MdmBatchJobSubmitterFactoryImpl(); + } + + @Bean + IMdmClearJobSubmitter mdmClearJobSubmitter() { + return new MdmClearJobSubmitterImpl(); + } + @Bean @Lazy public TerminologyUploaderProvider terminologyUploaderProvider() { @@ -891,11 +904,6 @@ public abstract class BaseConfig { return new DaoSearchParamSynchronizer(); } - @Bean - public DeleteExpungeService deleteExpungeService() { - return new DeleteExpungeService(); - } - @Bean public ResourceTableFKProvider resourceTableFKProvider() { return new ResourceTableFKProvider(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java index 969ea3926ca..468dbbec24e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java @@ -20,15 +20,16 @@ package ca.uhn.fhir.jpa.dao.data; * #L% */ -import ca.uhn.fhir.mdm.api.MdmMatchResultEnum; import ca.uhn.fhir.jpa.entity.MdmLink; -import org.springframework.beans.factory.annotation.Value; +import ca.uhn.fhir.mdm.api.MdmMatchResultEnum; +import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; +import java.util.Date; import java.util.List; @Repository @@ -70,4 +71,6 @@ public interface IMdmLinkDao extends JpaRepository { @Query("SELECT ml.myGoldenResourcePid as goldenPid, ml.mySourcePid as sourcePid FROM MdmLink ml WHERE ml.myGoldenResourcePid = :goldenPid and ml.myMatchResult = :matchResult") List expandPidsByGoldenResourcePidAndMatchResult(@Param("goldenPid") Long theSourcePid, @Param("matchResult") MdmMatchResultEnum theMdmMatchResultEnum); + @Query("SELECT ml.myId FROM MdmLink ml WHERE ml.myMdmSourceType = :resourceName AND ml.myCreated <= :highThreshold ORDER BY ml.myCreated DESC") + List findPidByResourceNameAndThreshold(@Param("resourceName") String theResourceName, @Param("highThreshold") Date theHighThreshold, Pageable thePageable); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/DeleteExpungeService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/DeleteExpungeService.java deleted file mode 100644 index 21bcd2cddbb..00000000000 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/DeleteExpungeService.java +++ /dev/null @@ -1,201 +0,0 @@ -package ca.uhn.fhir.jpa.dao.expunge; - -/*- - * #%L - * HAPI FHIR JPA Server - * %% - * Copyright (C) 2014 - 2021 Smile CDR, Inc. - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.interceptor.api.HookParams; -import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; -import ca.uhn.fhir.interceptor.api.Pointcut; -import ca.uhn.fhir.jpa.api.config.DaoConfig; -import ca.uhn.fhir.jpa.api.model.DeleteMethodOutcome; -import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao; -import ca.uhn.fhir.jpa.dao.data.IResourceLinkDao; -import ca.uhn.fhir.jpa.dao.index.IdHelperService; -import ca.uhn.fhir.jpa.delete.job.DeleteExpungeProcessor; -import ca.uhn.fhir.jpa.model.entity.ResourceLink; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; -import ca.uhn.fhir.rest.server.util.CompositeInterceptorBroadcaster; -import ca.uhn.fhir.util.OperationOutcomeUtil; -import ca.uhn.fhir.util.StopWatch; -import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.Slice; -import org.springframework.stereotype.Service; -import org.springframework.transaction.PlatformTransactionManager; -import org.springframework.transaction.support.TransactionTemplate; - -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; -import javax.persistence.PersistenceContextType; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.atomic.AtomicLong; -import java.util.stream.Collectors; - -@Service -/** - * DeleteExpunge is now performed using the {@link ca.uhn.fhir.jpa.delete.DeleteExpungeJobSubmitterImpl} Spring Batch job. - */ -@Deprecated -public class DeleteExpungeService { - private static final Logger ourLog = LoggerFactory.getLogger(DeleteExpungeService.class); - - @Autowired - protected PlatformTransactionManager myPlatformTransactionManager; - @PersistenceContext(type = PersistenceContextType.TRANSACTION) - private EntityManager myEntityManager; - @Autowired - private FhirContext myFhirContext; - @Autowired - private ResourceTableFKProvider myResourceTableFKProvider; - @Autowired - private IResourceLinkDao myResourceLinkDao; - @Autowired - private IInterceptorBroadcaster myInterceptorBroadcaster; - @Autowired - private DaoConfig myDaoConfig; - @Autowired - private IdHelperService myIdHelper; - - public DeleteMethodOutcome expungeByResourcePids(String theUrl, String theResourceName, Slice thePids, RequestDetails theRequest) { - StopWatch w = new StopWatch(); - if (thePids.isEmpty()) { - return new DeleteMethodOutcome(); - } - - HookParams params = new HookParams() - .add(RequestDetails.class, theRequest) - .addIfMatchesType(ServletRequestDetails.class, theRequest) - .add(String.class, theUrl); - CompositeInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequest, Pointcut.STORAGE_PRE_DELETE_EXPUNGE, params); - - TransactionTemplate txTemplate = new TransactionTemplate(myPlatformTransactionManager); - txTemplate.executeWithoutResult(t -> validateOkToDeleteAndExpunge(thePids)); - - ourLog.info("Expunging all records linking to {} resources...", thePids.getNumber()); - AtomicLong expungedEntitiesCount = new AtomicLong(); - AtomicLong expungedResourcesCount = new AtomicLong(); - PartitionRunner partitionRunner = new PartitionRunner(DeleteExpungeProcessor.PROCESS_NAME, DeleteExpungeProcessor.THREAD_PREFIX, myDaoConfig.getExpungeBatchSize(), myDaoConfig.getExpungeThreadCount()); - partitionRunner.runInPartitionedThreads(thePids, pidChunk -> deleteInTransaction(theResourceName, pidChunk, expungedResourcesCount, expungedEntitiesCount, theRequest)); - ourLog.info("Expunged a total of {} records", expungedEntitiesCount); - - IBaseOperationOutcome oo; - if (expungedResourcesCount.get() == 0) { - oo = OperationOutcomeUtil.newInstance(myFhirContext); - String message = myFhirContext.getLocalizer().getMessageSanitized(BaseHapiFhirResourceDao.class, "unableToDeleteNotFound", theUrl); - String severity = "warning"; - String code = "not-found"; - OperationOutcomeUtil.addIssue(myFhirContext, oo, severity, message, null, code); - } else { - oo = OperationOutcomeUtil.newInstance(myFhirContext); - String message = myFhirContext.getLocalizer().getMessage(BaseHapiFhirResourceDao.class, "successfulDeletes", expungedResourcesCount.get(), w.getMillis()); - String severity = "information"; - String code = "informational"; - OperationOutcomeUtil.addIssue(myFhirContext, oo, severity, message, null, code); - } - - DeleteMethodOutcome retval = new DeleteMethodOutcome(); - retval.setExpungedResourcesCount(expungedResourcesCount.get()); - retval.setExpungedEntitiesCount(expungedEntitiesCount.get()); - retval.setOperationOutcome(oo); - return retval; - } - - public void validateOkToDeleteAndExpunge(Slice theAllTargetPids) { - if (!myDaoConfig.isEnforceReferentialIntegrityOnDelete()) { - ourLog.info("Referential integrity on delete disabled. Skipping referential integrity check."); - return; - } - - List conflictResourceLinks = Collections.synchronizedList(new ArrayList<>()); - PartitionRunner partitionRunner = new PartitionRunner(DeleteExpungeProcessor.PROCESS_NAME, DeleteExpungeProcessor.THREAD_PREFIX, myDaoConfig.getExpungeBatchSize(), myDaoConfig.getExpungeThreadCount()); - partitionRunner.runInPartitionedThreads(theAllTargetPids, someTargetPids -> findResourceLinksWithTargetPidIn(theAllTargetPids.getContent(), someTargetPids, conflictResourceLinks)); - - if (conflictResourceLinks.isEmpty()) { - return; - } - - ResourceLink firstConflict = conflictResourceLinks.get(0); - - //NB-GGG: We previously instantiated these ID values from firstConflict.getSourceResource().getIdDt(), but in a situation where we - //actually had to run delete conflict checks in multiple partitions, the executor service starts its own sessions on a per thread basis, and by the time - //we arrive here, those sessions are closed. So instead, we resolve them from PIDs, which are eagerly loaded. - String sourceResourceId = myIdHelper.resourceIdFromPidOrThrowException(firstConflict.getSourceResourcePid()).toVersionless().getValue(); - String targetResourceId = myIdHelper.resourceIdFromPidOrThrowException(firstConflict.getTargetResourcePid()).toVersionless().getValue(); - - throw new InvalidRequestException("DELETE with _expunge=true failed. Unable to delete " + - targetResourceId + " because " + sourceResourceId + " refers to it via the path " + firstConflict.getSourcePath()); - } - - public void findResourceLinksWithTargetPidIn(List theAllTargetPids, List theSomeTargetPids, List theConflictResourceLinks) { - // We only need to find one conflict, so if we found one already in an earlier partition run, we can skip the rest of the searches - if (theConflictResourceLinks.isEmpty()) { - List conflictResourceLinks = myResourceLinkDao.findWithTargetPidIn(theSomeTargetPids).stream() - // Filter out resource links for which we are planning to delete the source. - // theAllTargetPids contains a list of all the pids we are planning to delete. So we only want - // to consider a link to be a conflict if the source of that link is not in theAllTargetPids. - .filter(link -> !theAllTargetPids.contains(link.getSourceResourcePid())) - .collect(Collectors.toList()); - - // We do this in two steps to avoid lock contention on this synchronized list - theConflictResourceLinks.addAll(conflictResourceLinks); - } - } - - private void deleteInTransaction(String theResourceName, List thePidChunk, AtomicLong theExpungedResourcesCount, AtomicLong theExpungedEntitiesCount, RequestDetails theRequest) { - TransactionTemplate txTemplate = new TransactionTemplate(myPlatformTransactionManager); - txTemplate.executeWithoutResult(t -> deleteAllRecordsLinkingTo(theResourceName, thePidChunk, theExpungedResourcesCount, theExpungedEntitiesCount, theRequest)); - } - - private void deleteAllRecordsLinkingTo(String theResourceName, List thePids, AtomicLong theExpungedResourcesCount, AtomicLong theExpungedEntitiesCount, RequestDetails theRequest) { - HookParams params = new HookParams() - .add(String.class, theResourceName) - .add(List.class, thePids) - .add(AtomicLong.class, theExpungedEntitiesCount) - .add(RequestDetails.class, theRequest) - .addIfMatchesType(ServletRequestDetails.class, theRequest); - CompositeInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequest, Pointcut.STORAGE_PRE_DELETE_EXPUNGE_PID_LIST, params); - - String pidListString = thePids.toString().replace("[", "(").replace("]", ")"); - List resourceForeignKeys = myResourceTableFKProvider.getResourceForeignKeys(); - - for (ResourceForeignKey resourceForeignKey : resourceForeignKeys) { - deleteRecordsByColumn(pidListString, resourceForeignKey, theExpungedEntitiesCount); - } - - // Lastly we need to delete records from the resource table all of these other tables link to: - ResourceForeignKey resourceTablePk = new ResourceForeignKey("HFJ_RESOURCE", "RES_ID"); - int entitiesDeleted = deleteRecordsByColumn(pidListString, resourceTablePk, theExpungedEntitiesCount); - theExpungedResourcesCount.addAndGet(entitiesDeleted); - } - - private int deleteRecordsByColumn(String thePidListString, ResourceForeignKey theResourceForeignKey, AtomicLong theExpungedEntitiesCount) { - int entitesDeleted = myEntityManager.createNativeQuery("DELETE FROM " + theResourceForeignKey.table + " WHERE " + theResourceForeignKey.key + " IN " + thePidListString).executeUpdate(); - ourLog.info("Expunged {} records from {}", entitesDeleted, theResourceForeignKey.table); - theExpungedEntitiesCount.addAndGet(entitesDeleted); - return entitesDeleted; - } -} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmLinkExpandSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmLinkExpandSvc.java index 4a28be40c5a..145b6be175f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmLinkExpandSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmLinkExpandSvc.java @@ -45,9 +45,12 @@ public class MdmLinkExpandSvc { @Autowired private IdHelperService myIdHelperService; + public MdmLinkExpandSvc() { + } + /** - * Given a source resource, perform MDM expansion and return all the resource IDs of all resources that are - * MDM-Matched to this resource. + * Given a source resource, perform MDM expansion and return all the resource IDs of all resources that are + * MDM-Matched to this resource. * * @param theResource The resource to MDM-Expand * @return A set of strings representing the FHIR IDs of the expanded resources. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/job/DeleteExpungeJobConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/job/DeleteExpungeJobConfig.java index 340be4372bc..756aab743e4 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/job/DeleteExpungeJobConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/job/DeleteExpungeJobConfig.java @@ -21,8 +21,9 @@ package ca.uhn.fhir.jpa.delete.job; */ import ca.uhn.fhir.jpa.api.dao.DaoRegistry; -import ca.uhn.fhir.jpa.batch.job.MultiUrlProcessorJobConfig; +import ca.uhn.fhir.jpa.batch.job.MultiUrlJobParameterValidator; import ca.uhn.fhir.jpa.batch.listener.PidReaderCounterListener; +import ca.uhn.fhir.jpa.batch.reader.ReverseCronologicalBatchResourcePidReader; import ca.uhn.fhir.jpa.batch.writer.SqlExecutorWriter; import ca.uhn.fhir.jpa.searchparam.MatchUrlService; import org.springframework.batch.core.Job; @@ -45,7 +46,7 @@ import static ca.uhn.fhir.jpa.batch.BatchJobsConfig.DELETE_EXPUNGE_JOB_NAME; * Delete Expunge job. */ @Configuration -public class DeleteExpungeJobConfig extends MultiUrlProcessorJobConfig { +public class DeleteExpungeJobConfig { public static final String DELETE_EXPUNGE_URL_LIST_STEP_NAME = "delete-expunge-url-list-step"; @Autowired @@ -53,11 +54,23 @@ public class DeleteExpungeJobConfig extends MultiUrlProcessorJobConfig { @Autowired private JobBuilderFactory myJobBuilderFactory; + @Autowired + private MultiUrlJobParameterValidator myMultiUrlProcessorParameterValidator; + + @Autowired + private PidReaderCounterListener myPidCountRecorderListener; + + @Autowired + private ReverseCronologicalBatchResourcePidReader myReverseCronologicalBatchResourcePidReader; + + @Autowired + private SqlExecutorWriter mySqlExecutorWriter; + @Bean(name = DELETE_EXPUNGE_JOB_NAME) @Lazy - public Job deleteExpungeJob(MatchUrlService theMatchUrlService, DaoRegistry theDaoRegistry) { + public Job deleteExpungeJob() { return myJobBuilderFactory.get(DELETE_EXPUNGE_JOB_NAME) - .validator(multiUrlProcessorParameterValidator(theMatchUrlService, theDaoRegistry)) + .validator(myMultiUrlProcessorParameterValidator) .start(deleteExpungeUrlListStep()) .build(); } @@ -66,10 +79,10 @@ public class DeleteExpungeJobConfig extends MultiUrlProcessorJobConfig { public Step deleteExpungeUrlListStep() { return myStepBuilderFactory.get(DELETE_EXPUNGE_URL_LIST_STEP_NAME) ., List>chunk(1) - .reader(reverseCronologicalBatchResourcePidReader()) + .reader(myReverseCronologicalBatchResourcePidReader) .processor(deleteExpungeProcessor()) - .writer(sqlExecutorWriter()) - .listener(pidCountRecorderListener()) + .writer(mySqlExecutorWriter) + .listener(myPidCountRecorderListener) .listener(deleteExpungePromotionListener()) .build(); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/reindex/job/ReindexEverythingJobConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/reindex/job/ReindexEverythingJobConfig.java index ec66e2a3e0d..33fdfaf8ece 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/reindex/job/ReindexEverythingJobConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/reindex/job/ReindexEverythingJobConfig.java @@ -51,6 +51,8 @@ public class ReindexEverythingJobConfig { private JobBuilderFactory myJobBuilderFactory; @Autowired private ReindexWriter myReindexWriter; + @Autowired + private PidReaderCounterListener myPidCountRecorderListener; @Bean(name = REINDEX_EVERYTHING_JOB_NAME) @Lazy @@ -66,7 +68,7 @@ public class ReindexEverythingJobConfig { ., List>chunk(1) .reader(cronologicalBatchAllResourcePidReader()) .writer(myReindexWriter) - .listener(reindexEverythingPidCountRecorderListener()) + .listener(myPidCountRecorderListener) .listener(reindexEverythingPromotionListener()) .build(); } @@ -77,12 +79,6 @@ public class ReindexEverythingJobConfig { return new CronologicalBatchAllResourcePidReader(); } - @Bean - @StepScope - public PidReaderCounterListener reindexEverythingPidCountRecorderListener() { - return new PidReaderCounterListener(); - } - @Bean public ExecutionContextPromotionListener reindexEverythingPromotionListener() { ExecutionContextPromotionListener listener = new ExecutionContextPromotionListener(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/reindex/job/ReindexJobConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/reindex/job/ReindexJobConfig.java index ee62e9a0d93..c5465ec3533 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/reindex/job/ReindexJobConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/reindex/job/ReindexJobConfig.java @@ -21,15 +21,17 @@ package ca.uhn.fhir.jpa.reindex.job; */ import ca.uhn.fhir.jpa.api.dao.DaoRegistry; -import ca.uhn.fhir.jpa.batch.job.MultiUrlProcessorJobConfig; +import ca.uhn.fhir.jpa.batch.job.MultiUrlJobParameterValidator; import ca.uhn.fhir.jpa.batch.listener.PidReaderCounterListener; +import ca.uhn.fhir.jpa.batch.reader.ReverseCronologicalBatchResourcePidReader; +import ca.uhn.fhir.jpa.batch.writer.SqlExecutorWriter; import ca.uhn.fhir.jpa.searchparam.MatchUrlService; import org.springframework.batch.core.Job; import org.springframework.batch.core.Step; import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; import org.springframework.batch.core.configuration.annotation.StepBuilderFactory; -import org.springframework.batch.core.configuration.annotation.StepScope; import org.springframework.batch.core.listener.ExecutionContextPromotionListener; +import org.springframework.batch.item.ItemReader; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -44,7 +46,7 @@ import static ca.uhn.fhir.jpa.batch.BatchJobsConfig.REINDEX_JOB_NAME; * Reindex job. */ @Configuration -public class ReindexJobConfig extends MultiUrlProcessorJobConfig { +public class ReindexJobConfig { public static final String REINDEX_URL_LIST_STEP_NAME = "reindex-url-list-step"; @Autowired @@ -54,11 +56,20 @@ public class ReindexJobConfig extends MultiUrlProcessorJobConfig { @Autowired private ReindexWriter myReindexWriter; + @Autowired + private MultiUrlJobParameterValidator myMultiUrlProcessorParameterValidator; + + @Autowired + private PidReaderCounterListener myPidCountRecorderListener; + + @Autowired + private ReverseCronologicalBatchResourcePidReader myReverseCronologicalBatchResourcePidReader; + @Bean(name = REINDEX_JOB_NAME) @Lazy - public Job reindexJob(MatchUrlService theMatchUrlService, DaoRegistry theDaoRegistry) { + public Job reindexJob() { return myJobBuilderFactory.get(REINDEX_JOB_NAME) - .validator(multiUrlProcessorParameterValidator(theMatchUrlService, theDaoRegistry)) + .validator(myMultiUrlProcessorParameterValidator) .start(reindexUrlListStep()) .build(); } @@ -67,9 +78,9 @@ public class ReindexJobConfig extends MultiUrlProcessorJobConfig { public Step reindexUrlListStep() { return myStepBuilderFactory.get(REINDEX_URL_LIST_STEP_NAME) ., List>chunk(1) - .reader(reverseCronologicalBatchResourcePidReader()) + .reader(myReverseCronologicalBatchResourcePidReader) .writer(myReindexWriter) - .listener(pidCountRecorderListener()) + .listener(myPidCountRecorderListener) .listener(reindexPromotionListener()) .build(); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImplR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImplR4Test.java index ab74d2c3c0d..019e799e760 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImplR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImplR4Test.java @@ -331,7 +331,8 @@ public class BulkDataExportSvcImplR4Test extends BaseJpaR4Test { BatchJobsConfig.BULK_EXPORT_JOB_NAME, BatchJobsConfig.PATIENT_BULK_EXPORT_JOB_NAME, BatchJobsConfig.GROUP_BULK_EXPORT_JOB_NAME, - BatchJobsConfig.DELETE_EXPUNGE_JOB_NAME + BatchJobsConfig.DELETE_EXPUNGE_JOB_NAME, + BatchJobsConfig.MDM_CLEAR_JOB_NAME ); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/delete/job/ReindexJobTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/delete/job/ReindexJobTest.java index 6c1b52518bc..61018ef82b1 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/delete/job/ReindexJobTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/delete/job/ReindexJobTest.java @@ -1,9 +1,9 @@ package ca.uhn.fhir.jpa.delete.job; import ca.uhn.fhir.jpa.batch.BatchJobsConfig; +import ca.uhn.fhir.jpa.batch.CommonBatchJobConfig; import ca.uhn.fhir.jpa.batch.api.IBatchJobSubmitter; import ca.uhn.fhir.jpa.batch.job.MultiUrlJobParameterUtil; -import ca.uhn.fhir.jpa.batch.job.MultiUrlProcessorJobConfig; import ca.uhn.fhir.jpa.batch.reader.CronologicalBatchAllResourcePidReader; import ca.uhn.fhir.jpa.dao.r4.BaseJpaR4Test; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; @@ -111,7 +111,7 @@ public class ReindexJobTest extends BaseJpaR4Test { private JobParameters buildEverythingJobParameters(Long theBatchSize) { Map map = new HashMap<>(); - map.put(CronologicalBatchAllResourcePidReader.JOB_PARAM_START_TIME, new JobParameter(DateUtils.addMinutes(new Date(), MultiUrlProcessorJobConfig.MINUTES_IN_FUTURE_TO_PROCESS_FROM))); + map.put(CronologicalBatchAllResourcePidReader.JOB_PARAM_START_TIME, new JobParameter(DateUtils.addMinutes(new Date(), CommonBatchJobConfig.MINUTES_IN_FUTURE_TO_PROCESS_FROM))); map.put(CronologicalBatchAllResourcePidReader.JOB_PARAM_BATCH_SIZE, new JobParameter(theBatchSize.longValue())); JobParameters parameters = new JobParameters(map); return parameters; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/MultitenantBatchOperationR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/MultitenantBatchOperationR4Test.java index 994ad38f17f..652ceff7947 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/MultitenantBatchOperationR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/MultitenantBatchOperationR4Test.java @@ -15,6 +15,7 @@ import ca.uhn.fhir.rest.server.provider.ProviderConstants; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; import ca.uhn.fhir.test.utilities.BatchJobHelper; import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.r4.hapi.rest.server.helper.BatchHelperR4; import org.hl7.fhir.r4.model.BooleanType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.DecimalType; @@ -99,8 +100,7 @@ public class MultitenantBatchOperationR4Test extends BaseMultitenantResourceProv assertEquals("Patient", interceptor.resourceDefs.get(0).getName()); myInterceptorRegistry.unregisterInterceptor(interceptor); - DecimalType jobIdPrimitive = (DecimalType) response.getParameter(ProviderConstants.OPERATION_DELETE_EXPUNGE_RESPONSE_JOB_ID); - Long jobId = jobIdPrimitive.getValue().longValue(); + Long jobId = BatchHelperR4.jobIdFromParameters(response); assertEquals(1, myBatchJobHelper.getReadCount(jobId)); assertEquals(1, myBatchJobHelper.getWriteCount(jobId)); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderR4Test.java index 691ddc1319d..7b8a3bf32b8 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderR4Test.java @@ -55,6 +55,7 @@ import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.r4.hapi.rest.server.helper.BatchHelperR4; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Bundle.BundleType; import org.hl7.fhir.r4.model.Bundle.HTTPVerb; @@ -817,8 +818,7 @@ public class SystemProviderR4Test extends BaseJpaR4Test { ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); myBatchJobHelper.awaitAllBulkJobCompletions(BatchJobsConfig.DELETE_EXPUNGE_JOB_NAME); - DecimalType jobIdPrimitive = (DecimalType) response.getParameter(ProviderConstants.OPERATION_DELETE_EXPUNGE_RESPONSE_JOB_ID); - Long jobId = jobIdPrimitive.getValue().longValue(); + Long jobId = BatchHelperR4.jobIdFromParameters(response); // validate diff --git a/hapi-fhir-jpaserver-batch/pom.xml b/hapi-fhir-jpaserver-batch/pom.xml index 660fdb5320a..7d7c41e39ce 100644 --- a/hapi-fhir-jpaserver-batch/pom.xml +++ b/hapi-fhir-jpaserver-batch/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-cql/pom.xml b/hapi-fhir-jpaserver-cql/pom.xml index 5e7a38e555b..37991c7f946 100644 --- a/hapi-fhir-jpaserver-cql/pom.xml +++ b/hapi-fhir-jpaserver-cql/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml index 8970e99afbf..ecb9bee6d63 100644 --- a/hapi-fhir-jpaserver-mdm/pom.xml +++ b/hapi-fhir-jpaserver-mdm/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/config/MdmConsumerConfig.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/config/MdmConsumerConfig.java index 51981cdecaa..3005c2d5735 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/config/MdmConsumerConfig.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/config/MdmConsumerConfig.java @@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.mdm.config; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; +import ca.uhn.fhir.jpa.batch.mdm.MdmBatchJobSubmitterFactoryImpl; import ca.uhn.fhir.jpa.dao.mdm.MdmLinkDeleteSvc; import ca.uhn.fhir.jpa.interceptor.MdmSearchExpandingInterceptor; import ca.uhn.fhir.jpa.mdm.broker.MdmMessageHandler; @@ -31,10 +32,8 @@ import ca.uhn.fhir.jpa.mdm.dao.MdmLinkFactory; import ca.uhn.fhir.jpa.mdm.interceptor.IMdmStorageInterceptor; import ca.uhn.fhir.jpa.mdm.interceptor.MdmStorageInterceptor; import ca.uhn.fhir.jpa.mdm.svc.GoldenResourceMergerSvcImpl; -import ca.uhn.fhir.jpa.mdm.svc.MdmClearSvcImpl; import ca.uhn.fhir.jpa.mdm.svc.MdmControllerSvcImpl; import ca.uhn.fhir.jpa.mdm.svc.MdmEidUpdateService; -import ca.uhn.fhir.jpa.mdm.svc.MdmGoldenResourceDeletingSvc; import ca.uhn.fhir.jpa.mdm.svc.MdmLinkQuerySvcImpl; import ca.uhn.fhir.jpa.mdm.svc.MdmLinkSvcImpl; import ca.uhn.fhir.jpa.mdm.svc.MdmLinkUpdaterSvcImpl; @@ -52,8 +51,8 @@ import ca.uhn.fhir.jpa.mdm.svc.candidate.MdmCandidateSearchCriteriaBuilderSvc; import ca.uhn.fhir.jpa.mdm.svc.candidate.MdmCandidateSearchSvc; import ca.uhn.fhir.jpa.mdm.svc.candidate.MdmGoldenResourceFindingSvc; import ca.uhn.fhir.mdm.api.IGoldenResourceMergerSvc; +import ca.uhn.fhir.mdm.api.IMdmBatchJobSubmitterFactory; import ca.uhn.fhir.mdm.api.IMdmControllerSvc; -import ca.uhn.fhir.mdm.api.IMdmExpungeSvc; import ca.uhn.fhir.mdm.api.IMdmLinkQuerySvc; import ca.uhn.fhir.mdm.api.IMdmLinkSvc; import ca.uhn.fhir.mdm.api.IMdmLinkUpdaterSvc; @@ -183,8 +182,8 @@ public class MdmConsumerConfig { } @Bean - IMdmExpungeSvc mdmResetSvc(MdmLinkDaoSvc theMdmLinkDaoSvc, MdmGoldenResourceDeletingSvc theDeletingSvc, IMdmSettings theIMdmSettings) { - return new MdmClearSvcImpl(theMdmLinkDaoSvc, theDeletingSvc, theIMdmSettings); + IMdmBatchJobSubmitterFactory mdmBatchJobSubmitterFactory() { + return new MdmBatchJobSubmitterFactoryImpl(); } @Bean @@ -251,4 +250,5 @@ public class MdmConsumerConfig { IMdmControllerSvc mdmControllerSvc() { return new MdmControllerSvcImpl(); } + } diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/config/MdmSubmitterConfig.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/config/MdmSubmitterConfig.java index be9bb320ecd..e007b080081 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/config/MdmSubmitterConfig.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/config/MdmSubmitterConfig.java @@ -21,17 +21,15 @@ package ca.uhn.fhir.jpa.mdm.config; */ import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.mdm.api.IMdmChannelSubmitterSvc; -import ca.uhn.fhir.mdm.api.IMdmSettings; -import ca.uhn.fhir.mdm.api.IMdmSubmitSvc; -import ca.uhn.fhir.mdm.rules.config.MdmRuleValidator; import ca.uhn.fhir.jpa.dao.mdm.MdmLinkDeleteSvc; import ca.uhn.fhir.jpa.mdm.interceptor.MdmSubmitterInterceptorLoader; import ca.uhn.fhir.jpa.mdm.svc.MdmChannelSubmitterSvcImpl; -import ca.uhn.fhir.jpa.mdm.svc.MdmGoldenResourceDeletingSvc; import ca.uhn.fhir.jpa.mdm.svc.MdmSearchParamSvc; import ca.uhn.fhir.jpa.mdm.svc.MdmSubmitSvcImpl; import ca.uhn.fhir.jpa.subscription.channel.api.IChannelFactory; +import ca.uhn.fhir.mdm.api.IMdmChannelSubmitterSvc; +import ca.uhn.fhir.mdm.api.IMdmSubmitSvc; +import ca.uhn.fhir.mdm.rules.config.MdmRuleValidator; import ca.uhn.fhir.rest.server.util.ISearchParamRegistry; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -60,11 +58,6 @@ public class MdmSubmitterConfig { return new MdmLinkDeleteSvc(); } - @Bean - MdmGoldenResourceDeletingSvc mdmGoldenResourceDeletingSvc() { - return new MdmGoldenResourceDeletingSvc(); - } - @Bean @Lazy IMdmChannelSubmitterSvc mdmChannelSubmitterSvc(FhirContext theFhirContext, IChannelFactory theChannelFactory) { @@ -72,7 +65,7 @@ public class MdmSubmitterConfig { } @Bean - IMdmSubmitSvc mdmBatchService(IMdmSettings theMdmSetting) { + IMdmSubmitSvc mdmSubmitService() { return new MdmSubmitSvcImpl(); } } diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvc.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvc.java index 45df193ddeb..8f72e867bc7 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvc.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvc.java @@ -40,13 +40,10 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; public class MdmLinkDaoSvc { @@ -227,46 +224,6 @@ public class MdmLinkDaoSvc { return myMdmLinkDao.findAll(example); } - /** - * Delete all {@link MdmLink} entities, and return all resource PIDs from the source of the relationship. - * - * @return A list of Long representing the related Golden Resource Pids. - */ - @Transactional - public List deleteAllMdmLinksAndReturnGoldenResourcePids() { - List all = myMdmLinkDao.findAll(); - return deleteMdmLinksAndReturnGoldenResourcePids(all); - } - - private List deleteMdmLinksAndReturnGoldenResourcePids(List theLinks) { - Set goldenResources = theLinks.stream().map(MdmLink::getGoldenResourcePid).collect(Collectors.toSet()); - //TODO GGG this is probably invalid... we are essentially looking for GOLDEN -> GOLDEN links, which are either POSSIBLE_DUPLICATE - //and REDIRECT - goldenResources.addAll(theLinks.stream() - .filter(link -> link.getMatchResult().equals(MdmMatchResultEnum.REDIRECT) - || link.getMatchResult().equals(MdmMatchResultEnum.POSSIBLE_DUPLICATE)) - .map(MdmLink::getSourcePid).collect(Collectors.toSet())); - ourLog.info("Deleting {} MDM link records...", theLinks.size()); - myMdmLinkDao.deleteAll(theLinks); - ourLog.info("{} MDM link records deleted", theLinks.size()); - return new ArrayList<>(goldenResources); - } - - /** - * Given a valid {@link String}, delete all {@link MdmLink} entities for that type, and get the Pids - * for the Golden Resources which were the sources of the links. - * - * @param theSourceType the type of relationship you would like to delete. - * @return A list of longs representing the Pids of the Golden Resources resources used as the sources of the relationships that were deleted. - */ - public List deleteAllMdmLinksOfTypeAndReturnGoldenResourcePids(String theSourceType) { - MdmLink link = new MdmLink(); - link.setMdmSourceType(theSourceType); - Example exampleLink = Example.of(link); - List allOfType = myMdmLinkDao.findAll(exampleLink); - return deleteMdmLinksAndReturnGoldenResourcePids(allOfType); - } - /** * Persist an MDM link to the database. * diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmClearSvcImpl.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmClearSvcImpl.java deleted file mode 100644 index 44bfb9fd476..00000000000 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmClearSvcImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -package ca.uhn.fhir.jpa.mdm.svc; - -/*- - * #%L - * HAPI FHIR JPA Server - Master Data Management - * %% - * Copyright (C) 2014 - 2021 Smile CDR, Inc. - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.mdm.api.IMdmExpungeSvc; -import ca.uhn.fhir.mdm.api.IMdmSettings; -import ca.uhn.fhir.mdm.log.Logs; -import ca.uhn.fhir.jpa.api.model.DeleteMethodOutcome; -import ca.uhn.fhir.jpa.mdm.dao.MdmLinkDaoSvc; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import ca.uhn.fhir.rest.server.provider.ProviderConstants; -import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; -import org.slf4j.Logger; -import org.springframework.beans.factory.annotation.Autowired; - -import java.util.List; - -/** - * This class is responsible for clearing out existing MDM links, as well as deleting all Golden Resources related to those MDM Links. - */ -public class MdmClearSvcImpl implements IMdmExpungeSvc { - private static final Logger ourLog = Logs.getMdmTroubleshootingLog(); - - final MdmLinkDaoSvc myMdmLinkDaoSvc; - final MdmGoldenResourceDeletingSvc myMdmGoldenResourceDeletingSvcImpl; - final IMdmSettings myMdmSettings; - - @Autowired - public MdmClearSvcImpl(MdmLinkDaoSvc theMdmLinkDaoSvc, MdmGoldenResourceDeletingSvc theMdmGoldenResourceDeletingSvcImpl, IMdmSettings theIMdmSettings) { - myMdmLinkDaoSvc = theMdmLinkDaoSvc; - myMdmGoldenResourceDeletingSvcImpl = theMdmGoldenResourceDeletingSvcImpl; - myMdmSettings = theIMdmSettings; - } - - @Override - public long expungeAllMdmLinksOfSourceType(String theSourceResourceType, ServletRequestDetails theRequestDetails) { - throwExceptionIfInvalidSourceResourceType(theSourceResourceType); - ourLog.info("Clearing all MDM Links for resource type {}...", theSourceResourceType); - List goldenResourcePids = myMdmLinkDaoSvc.deleteAllMdmLinksOfTypeAndReturnGoldenResourcePids(theSourceResourceType); - DeleteMethodOutcome deleteOutcome = myMdmGoldenResourceDeletingSvcImpl.expungeGoldenResourcePids(goldenResourcePids, theSourceResourceType, theRequestDetails); - ourLog.info("MDM clear operation complete. Removed {} MDM links and {} Golden Resources.", goldenResourcePids.size(), deleteOutcome.getExpungedResourcesCount()); - return goldenResourcePids.size(); - } - - private void throwExceptionIfInvalidSourceResourceType(String theResourceType) { - if (!myMdmSettings.isSupportedMdmType(theResourceType)) { - throw new InvalidRequestException(ProviderConstants.MDM_CLEAR + " does not support resource type: " + theResourceType); - } - } - - @Override - public long expungeAllMdmLinks(ServletRequestDetails theRequestDetails) { - ourLog.info("Clearing all MDM Links..."); - long retVal = 0; - - for(String mdmType : myMdmSettings.getMdmRules().getMdmTypes()) { - List goldenResourcePids = myMdmLinkDaoSvc.deleteAllMdmLinksAndReturnGoldenResourcePids(); - DeleteMethodOutcome deleteOutcome = myMdmGoldenResourceDeletingSvcImpl.expungeGoldenResourcePids(goldenResourcePids, null, theRequestDetails); - ourLog.info("MDM clear operation on type {} complete. Removed {} MDM links and expunged {} Golden resources.", mdmType, goldenResourcePids.size(), deleteOutcome.getExpungedResourcesCount()); - retVal += goldenResourcePids.size(); - } - ourLog.info("MDM clear completed expunged with a total of {} golden resources cleared.", retVal); - return retVal; - } -} - diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmControllerSvcImpl.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmControllerSvcImpl.java index 9c7a149b261..d6eaab73eaf 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmControllerSvcImpl.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmControllerSvcImpl.java @@ -20,7 +20,9 @@ package ca.uhn.fhir.jpa.mdm.svc; * #L% */ +import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.mdm.api.IGoldenResourceMergerSvc; +import ca.uhn.fhir.mdm.api.IMdmBatchJobSubmitterFactory; import ca.uhn.fhir.mdm.api.IMdmControllerSvc; import ca.uhn.fhir.mdm.api.IMdmLinkQuerySvc; import ca.uhn.fhir.mdm.api.IMdmLinkUpdaterSvc; @@ -31,14 +33,20 @@ import ca.uhn.fhir.mdm.api.paging.MdmPageRequest; import ca.uhn.fhir.mdm.model.MdmTransactionContext; import ca.uhn.fhir.mdm.provider.MdmControllerHelper; import ca.uhn.fhir.mdm.provider.MdmControllerUtil; +import ca.uhn.fhir.rest.server.provider.MultiUrlProcessor; import ca.uhn.fhir.rest.server.provider.ProviderConstants; +import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.stereotype.Service; import javax.annotation.Nullable; +import java.math.BigDecimal; +import java.util.List; /** * This class acts as a layer between MdmProviders and MDM services to support a REST API that's not a FHIR Operation API. @@ -46,6 +54,8 @@ import javax.annotation.Nullable; @Service public class MdmControllerSvcImpl implements IMdmControllerSvc { + @Autowired + FhirContext myFhirContext; @Autowired MdmControllerHelper myMdmControllerHelper; @Autowired @@ -54,6 +64,11 @@ public class MdmControllerSvcImpl implements IMdmControllerSvc { IMdmLinkQuerySvc myMdmLinkQuerySvc; @Autowired IMdmLinkUpdaterSvc myIMdmLinkUpdaterSvc; + @Autowired + IMdmBatchJobSubmitterFactory myMdmBatchJobSubmitterFactory; + + public MdmControllerSvcImpl() { + } @Override public IAnyResource mergeGoldenResources(String theFromGoldenResourceId, String theToGoldenResourceId, IAnyResource theManuallyMergedGoldenResource, MdmTransactionContext theMdmTransactionContext) { @@ -91,6 +106,12 @@ public class MdmControllerSvcImpl implements IMdmControllerSvc { return myIMdmLinkUpdaterSvc.updateLink(goldenResource, source, matchResult, theMdmTransactionContext); } + @Override + public IBaseParameters submitMdmClearJob(List theUrls, IPrimitiveType theBatchSize, ServletRequestDetails theRequestDetails) { + MultiUrlProcessor multiUrlProcessor = new MultiUrlProcessor(myFhirContext, myMdmBatchJobSubmitterFactory.getClearJobSubmitter()); + return multiUrlProcessor.processUrls(theUrls, multiUrlProcessor.getBatchSize(theBatchSize), theRequestDetails); + } + @Override public void notDuplicateGoldenResource(String theGoldenResourceId, String theTargetGoldenResourceId, MdmTransactionContext theMdmTransactionContext) { IAnyResource goldenResource = myMdmControllerHelper.getLatestGoldenResourceFromIdOrThrowException(ProviderConstants.MDM_UPDATE_LINK_GOLDEN_RESOURCE_ID, theGoldenResourceId); diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmGoldenResourceDeletingSvc.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmGoldenResourceDeletingSvc.java deleted file mode 100644 index 9b53ce9bce6..00000000000 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmGoldenResourceDeletingSvc.java +++ /dev/null @@ -1,57 +0,0 @@ -package ca.uhn.fhir.jpa.mdm.svc; - -/*- - * #%L - * HAPI FHIR JPA Server - Master Data Management - * %% - * Copyright (C) 2014 - 2021 Smile CDR, Inc. - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.mdm.log.Logs; -import ca.uhn.fhir.jpa.api.dao.DaoRegistry; -import ca.uhn.fhir.jpa.api.model.DeleteMethodOutcome; -import ca.uhn.fhir.jpa.dao.expunge.DeleteExpungeService; -import ca.uhn.fhir.jpa.dao.expunge.ExpungeService; -import ca.uhn.fhir.rest.server.provider.ProviderConstants; -import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; -import org.slf4j.Logger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.SliceImpl; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Service -public class MdmGoldenResourceDeletingSvc { - - private static final Logger ourLog = Logs.getMdmTroubleshootingLog(); - - /** - * This is here for the case of possible infinite loops. Technically batch conflict deletion should handle this, but this is an escape hatch. - */ - private static final int MAXIMUM_DELETE_ATTEMPTS = 100000; - - @Autowired - private DaoRegistry myDaoRegistry; - @Autowired - private ExpungeService myExpungeService; - @Autowired - DeleteExpungeService myDeleteExpungeService; - - public DeleteMethodOutcome expungeGoldenResourcePids(List theGoldenResourcePids, String theResourceType, ServletRequestDetails theRequestDetails) { - return myDeleteExpungeService.expungeByResourcePids(ProviderConstants.MDM_CLEAR, theResourceType, new SliceImpl<>(theGoldenResourcePids), theRequestDetails); - } -} diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmSubmitSvcImpl.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmSubmitSvcImpl.java index 075b6088780..83a0d542b3c 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmSubmitSvcImpl.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmSubmitSvcImpl.java @@ -20,10 +20,6 @@ package ca.uhn.fhir.jpa.mdm.svc; * #L% */ -import ca.uhn.fhir.mdm.api.IMdmChannelSubmitterSvc; -import ca.uhn.fhir.mdm.api.IMdmSettings; -import ca.uhn.fhir.mdm.api.IMdmSubmitSvc; -import ca.uhn.fhir.mdm.log.Logs; import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; @@ -31,6 +27,10 @@ import ca.uhn.fhir.jpa.dao.IResultIterator; import ca.uhn.fhir.jpa.dao.ISearchBuilder; import ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.mdm.api.IMdmChannelSubmitterSvc; +import ca.uhn.fhir.mdm.api.IMdmSettings; +import ca.uhn.fhir.mdm.api.IMdmSubmitSvc; +import ca.uhn.fhir.mdm.log.Logs; import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; @@ -69,6 +69,9 @@ public class MdmSubmitSvcImpl implements IMdmSubmitSvc { private int myBufferSize = DEFAULT_BUFFER_SIZE; + public MdmSubmitSvcImpl() { + } + @Override @Transactional public long submitAllSourceTypesToMdm(@Nullable String theCriteria) { diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/config/BaseTestMdmConfig.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/config/BaseTestMdmConfig.java index 0af4ba1aba7..51577a8d2d7 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/config/BaseTestMdmConfig.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/config/BaseTestMdmConfig.java @@ -1,13 +1,13 @@ package ca.uhn.fhir.jpa.mdm.config; +import ca.uhn.fhir.jpa.mdm.helper.MdmLinkHelper; import ca.uhn.fhir.mdm.api.IMdmSettings; import ca.uhn.fhir.mdm.rules.config.MdmRuleValidator; import ca.uhn.fhir.mdm.rules.config.MdmSettings; -import ca.uhn.fhir.jpa.mdm.helper.MdmLinkHelper; -import ca.uhn.fhir.rest.server.FifoMemoryPagingProvider; -import ca.uhn.fhir.rest.server.IPagingProvider; +import ca.uhn.fhir.test.utilities.BatchJobHelper; import com.google.common.base.Charsets; import org.apache.commons.io.IOUtils; +import org.springframework.batch.core.explore.JobExplorer; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -41,4 +41,9 @@ public abstract class BaseTestMdmConfig { MdmLinkHelper mdmLinkHelper() { return new MdmLinkHelper(); } + + @Bean + BatchJobHelper batchJobHelper(JobExplorer theJobExplorer) { + return new BatchJobHelper(theJobExplorer); + } } diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/BaseLinkR4Test.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/BaseLinkR4Test.java index d44a313340d..9f1092a941a 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/BaseLinkR4Test.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/BaseLinkR4Test.java @@ -1,9 +1,9 @@ package ca.uhn.fhir.jpa.mdm.provider; -import ca.uhn.fhir.mdm.api.MdmLinkSourceEnum; -import ca.uhn.fhir.mdm.api.MdmMatchResultEnum; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.entity.MdmLink; +import ca.uhn.fhir.mdm.api.MdmLinkSourceEnum; +import ca.uhn.fhir.mdm.api.MdmMatchResultEnum; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.StringType; @@ -51,6 +51,8 @@ public abstract class BaseLinkR4Test extends BaseProviderR4Test { saveLink(myLink); assertEquals(MdmLinkSourceEnum.AUTO, myLink.getLinkSource()); myDaoConfig.setExpungeEnabled(true); + myDaoConfig.setAllowMultipleDelete(true); + myDaoConfig.setDeleteExpungeEnabled(true); } @AfterEach diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/BaseProviderR4Test.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/BaseProviderR4Test.java index 5cbec2e45af..09fc013195c 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/BaseProviderR4Test.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/BaseProviderR4Test.java @@ -1,23 +1,29 @@ package ca.uhn.fhir.jpa.mdm.provider; import ca.uhn.fhir.jpa.mdm.BaseMdmR4Test; +import ca.uhn.fhir.mdm.api.IMdmClearJobSubmitter; import ca.uhn.fhir.mdm.api.IMdmControllerSvc; -import ca.uhn.fhir.mdm.api.IMdmExpungeSvc; import ca.uhn.fhir.mdm.api.IMdmMatchFinderSvc; import ca.uhn.fhir.mdm.api.IMdmSubmitSvc; import ca.uhn.fhir.mdm.provider.MdmProviderDstu3Plus; import ca.uhn.fhir.mdm.rules.config.MdmSettings; -import ca.uhn.fhir.rest.server.IPagingProvider; -import ca.uhn.fhir.rest.server.IRestfulServerDefaults; +import ca.uhn.fhir.test.utilities.BatchJobHelper; import com.google.common.base.Charsets; import org.apache.commons.io.IOUtils; +import org.hl7.fhir.instance.model.api.IPrimitiveType; +import org.hl7.fhir.r4.hapi.rest.server.helper.BatchHelperR4; +import org.hl7.fhir.r4.model.Parameters; +import org.hl7.fhir.r4.model.StringType; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.io.Resource; +import javax.annotation.Nonnull; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; public abstract class BaseProviderR4Test extends BaseMdmR4Test { MdmProviderDstu3Plus myMdmProvider; @@ -26,11 +32,13 @@ public abstract class BaseProviderR4Test extends BaseMdmR4Test { @Autowired private IMdmControllerSvc myMdmControllerSvc; @Autowired - private IMdmExpungeSvc myMdmExpungeSvc; + private IMdmClearJobSubmitter myMdmClearJobSubmitter; @Autowired private IMdmSubmitSvc myMdmSubmitSvc; @Autowired private MdmSettings myMdmSettings; + @Autowired + BatchJobHelper myBatchJobHelper; private String defaultScript; @@ -44,13 +52,31 @@ public abstract class BaseProviderR4Test extends BaseMdmR4Test { @BeforeEach public void before() { - myMdmProvider = new MdmProviderDstu3Plus(myFhirContext, myMdmControllerSvc, myMdmMatchFinderSvc, myMdmExpungeSvc, myMdmSubmitSvc); + myMdmProvider = new MdmProviderDstu3Plus(myFhirContext, myMdmControllerSvc, myMdmMatchFinderSvc, myMdmSubmitSvc, myMdmSettings); defaultScript = myMdmSettings.getScriptText(); } + @AfterEach public void after() throws IOException { super.after(); myMdmSettings.setScriptText(defaultScript); myMdmResourceMatcherSvc.init();// This bugger creates new objects from the beans and then ignores them. } + + protected void clearMdmLinks() { + Parameters result = (Parameters) myMdmProvider.clearMdmLinks(null, null, myRequestDetails); + myBatchJobHelper.awaitJobExecution(BatchHelperR4.jobIdFromParameters(result)); + } + + protected void clearMdmLinks(String theResourceName) { + Parameters result = (Parameters) myMdmProvider.clearMdmLinks(getResourceNames(theResourceName), null, myRequestDetails); + myBatchJobHelper.awaitJobExecution(BatchHelperR4.jobIdFromParameters(result)); + } + + @Nonnull + protected List> getResourceNames(String theResourceName) { + List> resourceNames = new ArrayList<>(); + resourceNames.add(new StringType(theResourceName)); + return resourceNames; + } } diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/MdmProviderBatchR4Test.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/MdmProviderBatchR4Test.java index ca168bd378b..db593713c0c 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/MdmProviderBatchR4Test.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/MdmProviderBatchR4Test.java @@ -68,7 +68,7 @@ public class MdmProviderBatchR4Test extends BaseLinkR4Test { @Test public void testBatchRunOnAllMedications() throws InterruptedException { StringType criteria = null; - myMdmProvider.clearMdmLinks(null, myRequestDetails); + clearMdmLinks(); afterMdmLatch.runWithExpectedCount(1, () -> myMdmProvider.mdmBatchOnAllSourceResources(new StringType("Medication"), criteria, null)); assertLinkCount(1); @@ -77,32 +77,33 @@ public class MdmProviderBatchR4Test extends BaseLinkR4Test { @Test public void testBatchRunOnAllPractitioners() throws InterruptedException { StringType criteria = null; - myMdmProvider.clearMdmLinks(null, myRequestDetails); + clearMdmLinks(); afterMdmLatch.runWithExpectedCount(1, () -> myMdmProvider.mdmBatchPractitionerType(criteria, null)); assertLinkCount(1); } @Test public void testBatchRunOnSpecificPractitioner() throws InterruptedException { - myMdmProvider.clearMdmLinks(null, myRequestDetails); + clearMdmLinks(); afterMdmLatch.runWithExpectedCount(1, () -> myMdmProvider.mdmBatchPractitionerInstance(myPractitioner.getIdElement(), null)); assertLinkCount(1); } @Test public void testBatchRunOnNonExistentSpecificPractitioner() { - myMdmProvider.clearMdmLinks(null, myRequestDetails); + clearMdmLinks(); try { myMdmProvider.mdmBatchPractitionerInstance(new IdType("Practitioner/999"), null); fail(); - } catch (ResourceNotFoundException e){} + } catch (ResourceNotFoundException e) { + } } @Test public void testBatchRunOnAllPatients() throws InterruptedException { assertLinkCount(3); StringType criteria = null; - myMdmProvider.clearMdmLinks(null, myRequestDetails); + clearMdmLinks(); afterMdmLatch.runWithExpectedCount(1, () -> myMdmProvider.mdmBatchPatientType(criteria, null)); assertLinkCount(1); } @@ -110,7 +111,7 @@ public class MdmProviderBatchR4Test extends BaseLinkR4Test { @Test public void testBatchRunOnSpecificPatient() throws InterruptedException { assertLinkCount(3); - myMdmProvider.clearMdmLinks(null, myRequestDetails); + clearMdmLinks(); afterMdmLatch.runWithExpectedCount(1, () -> myMdmProvider.mdmBatchPatientInstance(myPatient.getIdElement(), null)); assertLinkCount(1); } @@ -118,18 +119,19 @@ public class MdmProviderBatchR4Test extends BaseLinkR4Test { @Test public void testBatchRunOnNonExistentSpecificPatient() { assertLinkCount(3); - myMdmProvider.clearMdmLinks(null, myRequestDetails); + clearMdmLinks(); try { myMdmProvider.mdmBatchPatientInstance(new IdType("Patient/999"), null); fail(); - } catch (ResourceNotFoundException e){} + } catch (ResourceNotFoundException e) { + } } @Test public void testBatchRunOnAllTypes() throws InterruptedException { assertLinkCount(3); StringType criteria = new StringType(""); - myMdmProvider.clearMdmLinks(null, myRequestDetails); + clearMdmLinks(); afterMdmLatch.runWithExpectedCount(3, () -> { myMdmProvider.mdmBatchOnAllSourceResources(null, criteria, null); }); @@ -140,12 +142,12 @@ public class MdmProviderBatchR4Test extends BaseLinkR4Test { public void testBatchRunOnAllTypesWithInvalidCriteria() { assertLinkCount(3); StringType criteria = new StringType("death-date=2020-06-01"); - myMdmProvider.clearMdmLinks(null, myRequestDetails); + clearMdmLinks(); try { myMdmProvider.mdmBatchPractitionerType(criteria, null); fail(); - } catch(InvalidRequestException e) { + } catch (InvalidRequestException e) { assertThat(e.getMessage(), is(equalTo("Failed to parse match URL[death-date=2020-06-01] - Resource type Practitioner does not have a parameter with name: death-date"))); } } diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/MdmProviderClearLinkR4Test.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/MdmProviderClearLinkR4Test.java index e399b867e62..2ba25cf2952 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/MdmProviderClearLinkR4Test.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/MdmProviderClearLinkR4Test.java @@ -10,7 +10,6 @@ import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import org.hl7.fhir.instance.model.api.IAnyResource; -import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Practitioner; import org.hl7.fhir.r4.model.StringType; @@ -30,7 +29,6 @@ import static org.hamcrest.Matchers.nullValue; import static org.junit.jupiter.api.Assertions.fail; public class MdmProviderClearLinkR4Test extends BaseLinkR4Test { - protected Practitioner myPractitioner; protected StringType myPractitionerId; protected IAnyResource myPractitionerGoldenResource; @@ -48,7 +46,7 @@ public class MdmProviderClearLinkR4Test extends BaseLinkR4Test { @Test public void testClearAllLinks() { assertLinkCount(2); - myMdmProvider.clearMdmLinks(null, myRequestDetails); + clearMdmLinks(); assertNoLinksExist(); } @@ -70,12 +68,13 @@ public class MdmProviderClearLinkR4Test extends BaseLinkR4Test { assertLinkCount(2); Patient read = myPatientDao.read(new IdDt(mySourcePatientId.getValueAsString()).toVersionless()); assertThat(read, is(notNullValue())); - myMdmProvider.clearMdmLinks(new StringType("Patient"), myRequestDetails); + clearMdmLinks("Patient"); assertNoPatientLinksExist(); try { myPatientDao.read(new IdDt(mySourcePatientId.getValueAsString()).toVersionless()); fail(); - } catch (ResourceNotFoundException e) {} + } catch (ResourceNotFoundException e) { + } } @Test @@ -87,7 +86,7 @@ public class MdmProviderClearLinkR4Test extends BaseLinkR4Test { Patient patientAndUpdateLinks = createPatientAndUpdateLinks(buildJanePatient()); IAnyResource goldenResource = getGoldenResourceFromTargetResource(patientAndUpdateLinks); assertThat(goldenResource, is(notNullValue())); - myMdmProvider.clearMdmLinks(null, myRequestDetails); + clearMdmLinks(); assertNoPatientLinksExist(); goldenResource = getGoldenResourceFromTargetResource(patientAndUpdateLinks); assertThat(goldenResource, is(nullValue())); @@ -104,7 +103,7 @@ public class MdmProviderClearLinkR4Test extends BaseLinkR4Test { linkGoldenResources(goldenResourceFromTarget, goldenResourceFromTarget2); //SUT - myMdmProvider.clearMdmLinks(null, myRequestDetails); + clearMdmLinks(); assertNoPatientLinksExist(); IBundleProvider search = myPatientDao.search(buildGoldenResourceParameterMap()); @@ -135,7 +134,7 @@ public class MdmProviderClearLinkR4Test extends BaseLinkR4Test { linkGoldenResources(goldenResourceFromTarget2, goldenResourceFromTarget); //SUT - IBaseParameters parameters = myMdmProvider.clearMdmLinks(null, myRequestDetails); + clearMdmLinks(); printLinks(); @@ -157,18 +156,19 @@ public class MdmProviderClearLinkR4Test extends BaseLinkR4Test { assertLinkCount(2); Practitioner read = myPractitionerDao.read(new IdDt(myPractitionerGoldenResourceId.getValueAsString()).toVersionless()); assertThat(read, is(notNullValue())); - myMdmProvider.clearMdmLinks(new StringType("Practitioner"), myRequestDetails); + clearMdmLinks("Practitioner"); assertNoPractitionerLinksExist(); try { myPractitionerDao.read(new IdDt(myPractitionerGoldenResourceId.getValueAsString()).toVersionless()); fail(); - } catch (ResourceNotFoundException e) {} + } catch (ResourceNotFoundException e) { + } } @Test public void testClearInvalidTargetType() { try { - myMdmProvider.clearMdmLinks(new StringType("Observation"), myRequestDetails); + myMdmProvider.clearMdmLinks(getResourceNames("Observation"), null, myRequestDetails); fail(); } catch (InvalidRequestException e) { assertThat(e.getMessage(), is(equalTo("$mdm-clear does not support resource type: Observation"))); diff --git a/hapi-fhir-jpaserver-migrate/pom.xml b/hapi-fhir-jpaserver-migrate/pom.xml index 549dda66e65..583bb43b316 100644 --- a/hapi-fhir-jpaserver-migrate/pom.xml +++ b/hapi-fhir-jpaserver-migrate/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml index 2329c0873f6..4c1f86a37fc 100644 --- a/hapi-fhir-jpaserver-model/pom.xml +++ b/hapi-fhir-jpaserver-model/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml index 1e10aec0e32..85e78caf1ba 100755 --- a/hapi-fhir-jpaserver-searchparam/pom.xml +++ b/hapi-fhir-jpaserver-searchparam/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml index 97181675c03..e3609e6f624 100644 --- a/hapi-fhir-jpaserver-subscription/pom.xml +++ b/hapi-fhir-jpaserver-subscription/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml index c1f8822b95b..c0fa455be9b 100644 --- a/hapi-fhir-jpaserver-test-utilities/pom.xml +++ b/hapi-fhir-jpaserver-test-utilities/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index 51f3502fe96..9ef24cb24a2 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml index fcfdafec802..8a7136ac721 100644 --- a/hapi-fhir-server-mdm/pom.xml +++ b/hapi-fhir-server-mdm/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmBatchJobSubmitterFactory.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmBatchJobSubmitterFactory.java new file mode 100644 index 00000000000..6291d89d99a --- /dev/null +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmBatchJobSubmitterFactory.java @@ -0,0 +1,5 @@ +package ca.uhn.fhir.mdm.api; + +public interface IMdmBatchJobSubmitterFactory { + IMdmClearJobSubmitter getClearJobSubmitter(); +} diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmExpungeSvc.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmClearJobSubmitter.java similarity index 51% rename from hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmExpungeSvc.java rename to hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmClearJobSubmitter.java index be7766b3244..33f6ad83e8e 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmExpungeSvc.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmClearJobSubmitter.java @@ -20,24 +20,10 @@ package ca.uhn.fhir.mdm.api; * #L% */ -import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; +import ca.uhn.fhir.rest.api.server.storage.IMultiUrlJobSubmitter; -public interface IMdmExpungeSvc { - - /** - * Given a resource type, delete the underlying MDM links, and their related golden resource objects. - * - * @param theSourceResourceType The type of resources - * @param theRequestDetails - * @return the count of deleted MDM links - */ - long expungeAllMdmLinksOfSourceType(String theSourceResourceType, ServletRequestDetails theRequestDetails); - - /** - * Delete all MDM links, and their related golden resource objects. - * - * @return the count of deleted MDM links - * @param theRequestDetails - */ - long expungeAllMdmLinks(ServletRequestDetails theRequestDetails); +/** + * Tag interface for Spring autowiring + */ +public interface IMdmClearJobSubmitter extends IMultiUrlJobSubmitter { } diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmControllerSvc.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmControllerSvc.java index 67a3dc64a53..fd2dd82e65d 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmControllerSvc.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmControllerSvc.java @@ -22,10 +22,15 @@ package ca.uhn.fhir.mdm.api; import ca.uhn.fhir.mdm.api.paging.MdmPageRequest; import ca.uhn.fhir.mdm.model.MdmTransactionContext; +import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.instance.model.api.IBaseParameters; +import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.springframework.data.domain.Page; import javax.annotation.Nullable; +import java.math.BigDecimal; +import java.util.List; public interface IMdmControllerSvc { @@ -38,4 +43,6 @@ public interface IMdmControllerSvc { IAnyResource mergeGoldenResources(String theFromGoldenResourceId, String theToGoldenResourceId, IAnyResource theManuallyMergedGoldenResource, MdmTransactionContext theMdmTransactionContext); IAnyResource updateLink(String theGoldenResourceId, String theSourceResourceId, String theMatchResult, MdmTransactionContext theMdmTransactionContext); + + IBaseParameters submitMdmClearJob(List theUrls, IPrimitiveType theBatchSize, ServletRequestDetails theRequestDetails); } diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/provider/MdmProviderDstu3Plus.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/provider/MdmProviderDstu3Plus.java index 28aa52c69b5..b65427eedee 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/provider/MdmProviderDstu3Plus.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/provider/MdmProviderDstu3Plus.java @@ -22,8 +22,8 @@ package ca.uhn.fhir.mdm.provider; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.mdm.api.IMdmControllerSvc; -import ca.uhn.fhir.mdm.api.IMdmExpungeSvc; import ca.uhn.fhir.mdm.api.IMdmMatchFinderSvc; +import ca.uhn.fhir.mdm.api.IMdmSettings; import ca.uhn.fhir.mdm.api.IMdmSubmitSvc; import ca.uhn.fhir.mdm.api.MatchedTarget; import ca.uhn.fhir.mdm.api.MdmConstants; @@ -31,7 +31,6 @@ import ca.uhn.fhir.mdm.api.MdmLinkJson; import ca.uhn.fhir.mdm.api.paging.MdmPageRequest; import ca.uhn.fhir.mdm.model.MdmTransactionContext; import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.rest.annotation.IdParam; import ca.uhn.fhir.rest.annotation.Operation; import ca.uhn.fhir.rest.annotation.OperationParam; @@ -58,10 +57,12 @@ import org.springframework.data.domain.Page; import javax.annotation.Nonnull; import java.math.BigDecimal; +import java.util.ArrayList; import java.util.Comparator; import java.util.Date; import java.util.List; import java.util.UUID; +import java.util.stream.Collectors; import static ca.uhn.fhir.rest.api.Constants.PARAM_OFFSET; import static org.slf4j.LoggerFactory.getLogger; @@ -69,11 +70,10 @@ import static org.slf4j.LoggerFactory.getLogger; public class MdmProviderDstu3Plus extends BaseMdmProvider { private static final Logger ourLog = getLogger(MdmProviderDstu3Plus.class); - private final IMdmControllerSvc myMdmControllerSvc; private final IMdmMatchFinderSvc myMdmMatchFinderSvc; - private final IMdmExpungeSvc myMdmExpungeSvc; private final IMdmSubmitSvc myMdmSubmitSvc; + private final IMdmSettings myMdmSettings; public static final int DEFAULT_PAGE_SIZE = 20; public static final int MAX_PAGE_SIZE = 100; @@ -84,12 +84,12 @@ public class MdmProviderDstu3Plus extends BaseMdmProvider { * Note that this is not a spring bean. Any necessary injections should * happen in the constructor */ - public MdmProviderDstu3Plus(FhirContext theFhirContext, IMdmControllerSvc theMdmControllerSvc, IMdmMatchFinderSvc theMdmMatchFinderSvc, IMdmExpungeSvc theMdmExpungeSvc, IMdmSubmitSvc theMdmSubmitSvc) { + public MdmProviderDstu3Plus(FhirContext theFhirContext, IMdmControllerSvc theMdmControllerSvc, IMdmMatchFinderSvc theMdmMatchFinderSvc, IMdmSubmitSvc theMdmSubmitSvc, IMdmSettings theIMdmSettings) { super(theFhirContext); myMdmControllerSvc = theMdmControllerSvc; myMdmMatchFinderSvc = theMdmMatchFinderSvc; - myMdmExpungeSvc = theMdmExpungeSvc; myMdmSubmitSvc = theMdmSubmitSvc; + myMdmSettings = theIMdmSettings; } @Operation(name = ProviderConstants.EMPI_MATCH, typeName = "Patient") @@ -180,21 +180,33 @@ public class MdmProviderDstu3Plus extends BaseMdmProvider { ); } - @Operation(name = ProviderConstants.MDM_CLEAR, returnParameters = { - @OperationParam(name = ProviderConstants.OPERATION_MDM_BATCH_RUN_OUT_PARAM_SUBMIT_COUNT, typeName = "decimal") + @Operation(name = ProviderConstants.OPERATION_MDM_CLEAR, returnParameters = { + @OperationParam(name = ProviderConstants.OPERATION_BATCH_RESPONSE_JOB_ID, typeName = "decimal") }) - public IBaseParameters clearMdmLinks(@OperationParam(name = ProviderConstants.MDM_CLEAR_SOURCE_TYPE, min = 0, max = 1, typeName = "string") IPrimitiveType theSourceType, + public IBaseParameters clearMdmLinks(@OperationParam(name = ProviderConstants.OPERATION_MDM_CLEAR_RESOURCE_NAME, min = 0, max = OperationParam.MAX_UNLIMITED, typeName = "string") List> theResourceNames, + @OperationParam(name = ProviderConstants.OPERATION_MDM_CLEAR_BATCH_SIZE, typeName = "decimal", min = 0, max = 1) IPrimitiveType theBatchSize, ServletRequestDetails theRequestDetails) { - long resetCount; - if (theSourceType == null || StringUtils.isBlank(theSourceType.getValue())) { - resetCount = myMdmExpungeSvc.expungeAllMdmLinks(theRequestDetails); + + List resourceNames = new ArrayList<>(); + + + if (theResourceNames != null) { + resourceNames.addAll(theResourceNames.stream().map(IPrimitiveType::getValue).collect(Collectors.toList())); + validateResourceNames(resourceNames); } else { - resetCount = myMdmExpungeSvc.expungeAllMdmLinksOfSourceType(theSourceType.getValueAsString(), theRequestDetails); + resourceNames.addAll(myMdmSettings.getMdmRules().getMdmTypes()); } - IBaseParameters retval = ParametersUtil.newInstance(myFhirContext); - ParametersUtil.addParameterToParametersLong(myFhirContext, retval, ProviderConstants.OPERATION_MDM_CLEAR_OUT_PARAM_DELETED_COUNT, resetCount); - return retval; + List urls = resourceNames.stream().map(s -> s + "?").collect(Collectors.toList()); + return myMdmControllerSvc.submitMdmClearJob(urls, theBatchSize, theRequestDetails); + } + + private void validateResourceNames(List theResourceNames) { + for (String resourceName : theResourceNames) { + if (!myMdmSettings.isSupportedMdmType(resourceName)) { + throw new InvalidRequestException(ProviderConstants.OPERATION_MDM_CLEAR + " does not support resource type: " + resourceName); + } + } } @Operation(name = ProviderConstants.MDM_QUERY_LINKS, idempotent = true) @@ -202,9 +214,9 @@ public class MdmProviderDstu3Plus extends BaseMdmProvider { @OperationParam(name = ProviderConstants.MDM_QUERY_LINKS_RESOURCE_ID, min = 0, max = 1, typeName = "string") IPrimitiveType theResourceId, @OperationParam(name = ProviderConstants.MDM_QUERY_LINKS_MATCH_RESULT, min = 0, max = 1, typeName = "string") IPrimitiveType theMatchResult, @OperationParam(name = ProviderConstants.MDM_QUERY_LINKS_LINK_SOURCE, min = 0, max = 1, typeName = "string") - IPrimitiveType theLinkSource, + IPrimitiveType theLinkSource, - @Description(formalDefinition="Results from this method are returned across multiple pages. This parameter controls the offset when fetching a page.") + @Description(formalDefinition = "Results from this method are returned across multiple pages. This parameter controls the offset when fetching a page.") @OperationParam(name = PARAM_OFFSET, min = 0, max = 1, typeName = "integer") IPrimitiveType theOffset, @Description(formalDefinition = "Results from this method are returned across multiple pages. This parameter controls the size of those pages.") @@ -233,7 +245,7 @@ public class MdmProviderDstu3Plus extends BaseMdmProvider { MdmPageRequest mdmPageRequest = new MdmPageRequest(theOffset, theCount, DEFAULT_PAGE_SIZE, MAX_PAGE_SIZE); - Page possibleDuplicates = myMdmControllerSvc.getDuplicateGoldenResources(createMdmContext(theRequestDetails, MdmTransactionContext.OperationType.DUPLICATE_GOLDEN_RESOURCES, (String) null), mdmPageRequest); + Page possibleDuplicates = myMdmControllerSvc.getDuplicateGoldenResources(createMdmContext(theRequestDetails, MdmTransactionContext.OperationType.DUPLICATE_GOLDEN_RESOURCES, null), mdmPageRequest); return parametersFromMdmLinks(possibleDuplicates, false, theRequestDetails, mdmPageRequest); } @@ -255,7 +267,7 @@ public class MdmProviderDstu3Plus extends BaseMdmProvider { } @Operation(name = ProviderConstants.OPERATION_MDM_SUBMIT, idempotent = false, returnParameters = { - @OperationParam(name = ProviderConstants.OPERATION_MDM_BATCH_RUN_OUT_PARAM_SUBMIT_COUNT, typeName = "integer") + @OperationParam(name = ProviderConstants.OPERATION_BATCH_RESPONSE_JOB_ID, typeName = "integer") }) public IBaseParameters mdmBatchOnAllSourceResources( @OperationParam(name = ProviderConstants.MDM_BATCH_RUN_RESOURCE_TYPE, min = 0, max = 1, typeName = "string") IPrimitiveType theResourceType, @@ -278,7 +290,7 @@ public class MdmProviderDstu3Plus extends BaseMdmProvider { @Operation(name = ProviderConstants.OPERATION_MDM_SUBMIT, idempotent = false, typeName = "Patient", returnParameters = { - @OperationParam(name = ProviderConstants.OPERATION_MDM_BATCH_RUN_OUT_PARAM_SUBMIT_COUNT, typeName = "integer") + @OperationParam(name = ProviderConstants.OPERATION_BATCH_RESPONSE_JOB_ID, typeName = "integer") }) public IBaseParameters mdmBatchPatientInstance( @IdParam IIdType theIdParam, @@ -288,7 +300,7 @@ public class MdmProviderDstu3Plus extends BaseMdmProvider { } @Operation(name = ProviderConstants.OPERATION_MDM_SUBMIT, idempotent = false, typeName = "Patient", returnParameters = { - @OperationParam(name = ProviderConstants.OPERATION_MDM_BATCH_RUN_OUT_PARAM_SUBMIT_COUNT, typeName = "integer") + @OperationParam(name = ProviderConstants.OPERATION_BATCH_RESPONSE_JOB_ID, typeName = "integer") }) public IBaseParameters mdmBatchPatientType( @OperationParam(name = ProviderConstants.MDM_BATCH_RUN_CRITERIA, typeName = "string") IPrimitiveType theCriteria, @@ -299,7 +311,7 @@ public class MdmProviderDstu3Plus extends BaseMdmProvider { } @Operation(name = ProviderConstants.OPERATION_MDM_SUBMIT, idempotent = false, typeName = "Practitioner", returnParameters = { - @OperationParam(name = ProviderConstants.OPERATION_MDM_BATCH_RUN_OUT_PARAM_SUBMIT_COUNT, typeName = "integer") + @OperationParam(name = ProviderConstants.OPERATION_BATCH_RESPONSE_JOB_ID, typeName = "integer") }) public IBaseParameters mdmBatchPractitionerInstance( @IdParam IIdType theIdParam, @@ -309,7 +321,7 @@ public class MdmProviderDstu3Plus extends BaseMdmProvider { } @Operation(name = ProviderConstants.OPERATION_MDM_SUBMIT, idempotent = false, typeName = "Practitioner", returnParameters = { - @OperationParam(name = ProviderConstants.OPERATION_MDM_BATCH_RUN_OUT_PARAM_SUBMIT_COUNT, typeName = "integer") + @OperationParam(name = ProviderConstants.OPERATION_BATCH_RESPONSE_JOB_ID, typeName = "integer") }) public IBaseParameters mdmBatchPractitionerType( @OperationParam(name = ProviderConstants.MDM_BATCH_RUN_CRITERIA, typeName = "string") IPrimitiveType theCriteria, @@ -324,7 +336,7 @@ public class MdmProviderDstu3Plus extends BaseMdmProvider { */ public IBaseParameters buildMdmOutParametersWithCount(long theCount) { IBaseParameters retval = ParametersUtil.newInstance(myFhirContext); - ParametersUtil.addParameterToParametersLong(myFhirContext, retval, ProviderConstants.OPERATION_MDM_BATCH_RUN_OUT_PARAM_SUBMIT_COUNT, theCount); + ParametersUtil.addParameterToParametersLong(myFhirContext, retval, ProviderConstants.OPERATION_BATCH_RESPONSE_JOB_ID, theCount); return retval; } diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/provider/MdmProviderLoader.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/provider/MdmProviderLoader.java index e63e6b17d50..4765f045ea6 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/provider/MdmProviderLoader.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/provider/MdmProviderLoader.java @@ -23,12 +23,9 @@ package ca.uhn.fhir.mdm.provider; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.mdm.api.IMdmControllerSvc; -import ca.uhn.fhir.mdm.api.IMdmExpungeSvc; import ca.uhn.fhir.mdm.api.IMdmMatchFinderSvc; +import ca.uhn.fhir.mdm.api.IMdmSettings; import ca.uhn.fhir.mdm.api.IMdmSubmitSvc; -import ca.uhn.fhir.rest.server.IPagingProvider; -import ca.uhn.fhir.rest.server.IRestfulServerDefaults; -import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.provider.ResourceProviderFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -46,9 +43,9 @@ public class MdmProviderLoader { @Autowired private IMdmControllerSvc myMdmControllerSvc; @Autowired - private IMdmExpungeSvc myMdmExpungeSvc; - @Autowired private IMdmSubmitSvc myMdmSubmitSvc; + @Autowired + private IMdmSettings myMdmSettings; private BaseMdmProvider myMdmProvider; @@ -57,7 +54,7 @@ public class MdmProviderLoader { case DSTU3: case R4: myResourceProviderFactory.addSupplier(() -> { - myMdmProvider = new MdmProviderDstu3Plus(myFhirContext, myMdmControllerSvc, myMdmMatchFinderSvc, myMdmExpungeSvc, myMdmSubmitSvc); + myMdmProvider = new MdmProviderDstu3Plus(myFhirContext, myMdmControllerSvc, myMdmMatchFinderSvc, myMdmSubmitSvc, myMdmSettings); return myMdmProvider; }); break; diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml index f2ad8061c43..ac3f9f6c8cc 100644 --- a/hapi-fhir-server-openapi/pom.xml +++ b/hapi-fhir-server-openapi/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml index a559df05560..da732fe7ec6 100644 --- a/hapi-fhir-server/pom.xml +++ b/hapi-fhir-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/DeleteExpungeProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/DeleteExpungeProvider.java index ee2feaee91d..faf7b7ef1b7 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/DeleteExpungeProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/DeleteExpungeProvider.java @@ -32,9 +32,11 @@ import java.math.BigDecimal; import java.util.List; import java.util.stream.Collectors; -public class DeleteExpungeProvider extends BaseMultiUrlProcessor { +public class DeleteExpungeProvider { + private final MultiUrlProcessor myMultiUrlProcessor; + public DeleteExpungeProvider(FhirContext theFhirContext, IDeleteExpungeJobSubmitter theDeleteExpungeJobSubmitter) { - super(theFhirContext, theDeleteExpungeJobSubmitter); + myMultiUrlProcessor = new MultiUrlProcessor(theFhirContext, theDeleteExpungeJobSubmitter); } @Operation(name = ProviderConstants.OPERATION_DELETE_EXPUNGE, idempotent = false) @@ -44,6 +46,7 @@ public class DeleteExpungeProvider extends BaseMultiUrlProcessor { RequestDetails theRequestDetails ) { List urls = theUrlsToDeleteExpunge.stream().map(IPrimitiveType::getValue).collect(Collectors.toList()); - return super.processUrls(urls, getBatchSize(theBatchSize), theRequestDetails); + Integer batchSize = myMultiUrlProcessor.getBatchSize(theBatchSize); + return myMultiUrlProcessor.processUrls(urls, batchSize, theRequestDetails); } } diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/BaseMultiUrlProcessor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/MultiUrlProcessor.java similarity index 80% rename from hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/BaseMultiUrlProcessor.java rename to hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/MultiUrlProcessor.java index ea54a3ca693..6c55631f2c3 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/BaseMultiUrlProcessor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/MultiUrlProcessor.java @@ -34,20 +34,20 @@ import javax.annotation.Nullable; import java.math.BigDecimal; import java.util.List; -public class BaseMultiUrlProcessor { - protected final FhirContext myFhirContext; +public class MultiUrlProcessor { + private final FhirContext myFhirContext; private final IMultiUrlJobSubmitter myMultiUrlProcessorJobSubmitter; - public BaseMultiUrlProcessor(FhirContext theFhirContext, IMultiUrlJobSubmitter theMultiUrlProcessorJobSubmitter) { + public MultiUrlProcessor(FhirContext theFhirContext, IMultiUrlJobSubmitter theMultiUrlProcessorJobSubmitter) { myMultiUrlProcessorJobSubmitter = theMultiUrlProcessorJobSubmitter; myFhirContext = theFhirContext; } - protected IBaseParameters processUrls(List theUrlsToProcess, Integer theBatchSize, RequestDetails theRequestDetails) { + public IBaseParameters processUrls(List theUrlsToProcess, Integer theBatchSize, RequestDetails theRequestDetails) { try { JobExecution jobExecution = myMultiUrlProcessorJobSubmitter.submitJob(theBatchSize, theUrlsToProcess, theRequestDetails); IBaseParameters retval = ParametersUtil.newInstance(myFhirContext); - ParametersUtil.addParameterToParametersLong(myFhirContext, retval, ProviderConstants.OPERATION_DELETE_EXPUNGE_RESPONSE_JOB_ID, jobExecution.getJobId()); + ParametersUtil.addParameterToParametersLong(myFhirContext, retval, ProviderConstants.OPERATION_BATCH_RESPONSE_JOB_ID, jobExecution.getJobId()); return retval; } catch (JobParametersInvalidException e) { throw new InvalidRequestException("Invalid job parameters: " + e.getMessage(), e); @@ -55,7 +55,7 @@ public class BaseMultiUrlProcessor { } @Nullable - protected Integer getBatchSize(IPrimitiveType theBatchSize) { + public Integer getBatchSize(IPrimitiveType theBatchSize) { Integer batchSize = null; if (theBatchSize != null && !theBatchSize.isEmpty()) { batchSize = theBatchSize.getValue().intValue(); diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ProviderConstants.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ProviderConstants.java index ffbe7d04e64..f9296160b36 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ProviderConstants.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ProviderConstants.java @@ -84,21 +84,19 @@ public class ProviderConstants { public static final String MDM_DUPLICATE_GOLDEN_RESOURCES = "$mdm-duplicate-golden-resources"; public static final String MDM_NOT_DUPLICATE = "$mdm-not-duplicate"; - public static final String MDM_CLEAR = "$mdm-clear"; - public static final String MDM_CLEAR_SOURCE_TYPE = "sourceType"; + public static final String OPERATION_MDM_CLEAR = "$mdm-clear"; + public static final String OPERATION_MDM_CLEAR_RESOURCE_NAME = "resourceType"; + public static final String OPERATION_MDM_CLEAR_BATCH_SIZE = "batchSize"; public static final String OPERATION_MDM_SUBMIT = "$mdm-submit"; - public static final String MDM_BATCH_RUN_CRITERIA = "criteria" ; - public static final String OPERATION_MDM_BATCH_RUN_OUT_PARAM_SUBMIT_COUNT = "submitted" ; - public static final String OPERATION_MDM_CLEAR_OUT_PARAM_DELETED_COUNT = "deleted"; + public static final String MDM_BATCH_RUN_CRITERIA = "criteria"; public static final String MDM_BATCH_RUN_RESOURCE_TYPE = "resourceType"; - /** * CQL Operations */ public static final String CQL_EVALUATE_MEASURE = "$evaluate-measure"; /** - * Operation name for the $meta operation + * Operation name for the $meta operation */ public static final String OPERATION_META = "$meta"; @@ -146,7 +144,7 @@ public class ProviderConstants { /** * The Spring Batch job id of the delete expunge job created by a $delete-expunge operation */ - public static final String OPERATION_DELETE_EXPUNGE_RESPONSE_JOB_ID = "jobId"; + public static final String OPERATION_BATCH_RESPONSE_JOB_ID = "jobId"; /** * Operation name for the $delete-expunge operation diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ReindexProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ReindexProvider.java index 23c57be0b3a..6d6919f889c 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ReindexProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ReindexProvider.java @@ -37,11 +37,14 @@ import java.math.BigDecimal; import java.util.List; import java.util.stream.Collectors; -public class ReindexProvider extends BaseMultiUrlProcessor { +public class ReindexProvider { + private final FhirContext myFhirContext; private final IReindexJobSubmitter myReindexJobSubmitter; + private final MultiUrlProcessor myMultiUrlProcessor; public ReindexProvider(FhirContext theFhirContext, IReindexJobSubmitter theReindexJobSubmitter) { - super(theFhirContext, theReindexJobSubmitter); + myFhirContext = theFhirContext; + myMultiUrlProcessor = new MultiUrlProcessor(theFhirContext, theReindexJobSubmitter); myReindexJobSubmitter = theReindexJobSubmitter; } @@ -53,12 +56,12 @@ public class ReindexProvider extends BaseMultiUrlProcessor { RequestDetails theRequestDetails ) { Boolean everything = theEverything != null && theEverything.getValue(); - @Nullable Integer batchSize = getBatchSize(theBatchSize); + @Nullable Integer batchSize = myMultiUrlProcessor.getBatchSize(theBatchSize); if (everything) { return processEverything(batchSize, theRequestDetails); } else if (theUrlsToReindex != null && !theUrlsToReindex.isEmpty()) { List urls = theUrlsToReindex.stream().map(IPrimitiveType::getValue).collect(Collectors.toList()); - return super.processUrls(urls, batchSize, theRequestDetails); + return myMultiUrlProcessor.processUrls(urls, batchSize, theRequestDetails); } else { throw new InvalidRequestException(ProviderConstants.OPERATION_REINDEX + " must specify either everything=true or provide at least one value for " + ProviderConstants.OPERATION_REINDEX_PARAM_URL); } @@ -68,7 +71,7 @@ public class ReindexProvider extends BaseMultiUrlProcessor { try { JobExecution jobExecution = myReindexJobSubmitter.submitEverythingJob(theBatchSize, theRequestDetails); IBaseParameters retval = ParametersUtil.newInstance(myFhirContext); - ParametersUtil.addParameterToParametersLong(myFhirContext, retval, ProviderConstants.OPERATION_DELETE_EXPUNGE_RESPONSE_JOB_ID, jobExecution.getJobId()); + ParametersUtil.addParameterToParametersLong(myFhirContext, retval, ProviderConstants.OPERATION_BATCH_RESPONSE_JOB_ID, jobExecution.getJobId()); return retval; } catch (JobParametersInvalidException e) { throw new InvalidRequestException("Invalid job parameters: " + e.getMessage(), e); diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml index 9e99e253301..5a9a9c59259 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml index add47835990..3094d404947 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT hapi-fhir-spring-boot-sample-client-apache diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml index c447df7668e..92f24d8e8b2 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT hapi-fhir-spring-boot-sample-client-okhttp diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml index 526933dc09e..62d7edf17ed 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT hapi-fhir-spring-boot-sample-server-jersey diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml index 6bcafa300e8..d98baa42dc8 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT hapi-fhir-spring-boot-samples diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml index 93232ddab59..b8e4c3aedce 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml index a04306dfeb6..fb7d126c0e1 100644 --- a/hapi-fhir-spring-boot/pom.xml +++ b/hapi-fhir-spring-boot/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml index f0f14d0d96e..d231b68390e 100644 --- a/hapi-fhir-structures-dstu2.1/pom.xml +++ b/hapi-fhir-structures-dstu2.1/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml index b007972e5e4..fb145734f63 100644 --- a/hapi-fhir-structures-dstu2/pom.xml +++ b/hapi-fhir-structures-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml index b96f7bb77eb..4bedefad1aa 100644 --- a/hapi-fhir-structures-dstu3/pom.xml +++ b/hapi-fhir-structures-dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml index 4530c889d95..6130d8e82ac 100644 --- a/hapi-fhir-structures-hl7org-dstu2/pom.xml +++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml index 547c81b936a..2c5394bf890 100644 --- a/hapi-fhir-structures-r4/pom.xml +++ b/hapi-fhir-structures-r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/rest/server/helper/BatchHelperR4.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/rest/server/helper/BatchHelperR4.java new file mode 100644 index 00000000000..f13bb01f8ca --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/rest/server/helper/BatchHelperR4.java @@ -0,0 +1,16 @@ +package org.hl7.fhir.r4.hapi.rest.server.helper; + +import ca.uhn.fhir.rest.server.provider.ProviderConstants; +import org.hl7.fhir.r4.model.DecimalType; +import org.hl7.fhir.r4.model.Parameters; + +import javax.annotation.Nonnull; + +public class BatchHelperR4 { + + @Nonnull + public static Long jobIdFromParameters(Parameters response) { + DecimalType jobIdDecimal = (DecimalType) response.getParameter(ProviderConstants.OPERATION_BATCH_RESPONSE_JOB_ID); + return jobIdDecimal.getValue().longValue(); + } +} diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/provider/BatchProviderTest.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/provider/BatchProviderTest.java index a5730264c75..df7d54d23e0 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/provider/BatchProviderTest.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/provider/BatchProviderTest.java @@ -5,6 +5,7 @@ import ca.uhn.fhir.rest.api.server.storage.IDeleteExpungeJobSubmitter; import ca.uhn.fhir.rest.api.server.storage.IReindexJobSubmitter; import ca.uhn.fhir.rest.server.BaseR4ServerTest; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import org.hl7.fhir.r4.hapi.rest.server.helper.BatchHelperR4; import org.hl7.fhir.r4.model.BooleanType; import org.hl7.fhir.r4.model.DecimalType; import org.hl7.fhir.r4.model.Parameters; @@ -69,8 +70,7 @@ public class BatchProviderTest extends BaseR4ServerTest { .execute(); ourLog.info(myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); - DecimalType jobId = (DecimalType) response.getParameter(ProviderConstants.OPERATION_DELETE_EXPUNGE_RESPONSE_JOB_ID); - assertEquals(TEST_JOB_ID, jobId.getValue().longValue()); + assertEquals(TEST_JOB_ID, BatchHelperR4.jobIdFromParameters(response)); assertThat(myDeleteExpungeJobSubmitter.calledWithUrls, hasSize(2)); assertEquals(url1, myDeleteExpungeJobSubmitter.calledWithUrls.get(0)); assertEquals(url2, myDeleteExpungeJobSubmitter.calledWithUrls.get(1)); diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml index 4400f91fe15..f2eca4d974b 100644 --- a/hapi-fhir-structures-r5/pom.xml +++ b/hapi-fhir-structures-r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml index a7004891daf..d0f8df7fe7d 100644 --- a/hapi-fhir-test-utilities/pom.xml +++ b/hapi-fhir-test-utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml index 3d4ecc1f4e4..b38c453f4f7 100644 --- a/hapi-fhir-testpage-overlay/pom.xml +++ b/hapi-fhir-testpage-overlay/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml index 972e01c812c..0fe4837d110 100644 --- a/hapi-fhir-validation-resources-dstu2.1/pom.xml +++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml index a0956c5ddb3..1fcaa23f8d6 100644 --- a/hapi-fhir-validation-resources-dstu2/pom.xml +++ b/hapi-fhir-validation-resources-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml index c7a59822801..16a4b8587a3 100644 --- a/hapi-fhir-validation-resources-dstu3/pom.xml +++ b/hapi-fhir-validation-resources-dstu3/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml index 8457e1aebf8..ff9a3a78873 100644 --- a/hapi-fhir-validation-resources-r4/pom.xml +++ b/hapi-fhir-validation-resources-r4/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml index 3467c240d86..9c17f5a0166 100644 --- a/hapi-fhir-validation-resources-r5/pom.xml +++ b/hapi-fhir-validation-resources-r5/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml index 50945ea7032..e4b063f26f2 100644 --- a/hapi-fhir-validation/pom.xml +++ b/hapi-fhir-validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml index 51bffb211be..b9efe893439 100644 --- a/hapi-tinder-plugin/pom.xml +++ b/hapi-tinder-plugin/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../pom.xml @@ -58,37 +58,37 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu3 - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-hl7org-dstu2 - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-r4 - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-r5 - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu2 - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu3 - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-r4 - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT org.apache.velocity diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml index 86353fff4ab..6db23c691f5 100644 --- a/hapi-tinder-test/pom.xml +++ b/hapi-tinder-test/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 5c72a01da01..9f3e86e83f0 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir pom - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT HAPI-FHIR An open-source implementation of the FHIR specification in Java. https://hapifhir.io diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml index 7bc3167aba0..a8d1bc42c51 100644 --- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml +++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml index baf9d3f29a7..157a22a3da7 100644 --- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml index aa020297fb3..be74e99f134 100644 --- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE2-SNAPSHOT + 5.6.0-PRE3-SNAPSHOT ../../pom.xml From 0dad28fb3371e17e3938b8c1eb09a2f73eeb27b2 Mon Sep 17 00:00:00 2001 From: Jason Roberts Date: Fri, 3 Sep 2021 15:02:19 -0400 Subject: [PATCH 066/143] tidy up --- .../fhir/jpa/search/builder/QueryStack.java | 19 +++++++++++++++---- .../dao/r4/ChainedContainedR4SearchTest.java | 6 +++--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java index 42de4a119e0..b1f35f8ad21 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java @@ -1139,14 +1139,17 @@ public class QueryStack { // For now, leave the incorrect implementation alone, just in case someone is relying on it, // until the complete fix is available. andPredicates.add(createPredicateReferenceForContainedResource(null, theResourceName, theParamName, nextParamDef, nextAnd, null, theRequest, theRequestPartitionId)); - } else if (nextAnd.stream().filter(t -> t instanceof ReferenceParam).map(t -> (ReferenceParam) t).anyMatch(t -> t.getChain().contains("."))) { - // FIXME for now, restrict contained reference traversal to the last reference in the chain - andPredicates.add(createPredicateReference(theSourceJoinColumn, theResourceName, theParamName, nextAnd, null, theRequest, theRequestPartitionId)); - } else { + } else if (isEligibleForContainedResourceSearch(nextAnd)) { + // TODO for now, restrict contained reference traversal to the last reference in the chain + // We don't seem to be indexing the outbound references of a contained resource, so we can't + // include them in search chains. + // It would be nice to eventually relax this constraint, but no client seems to be asking for it. andPredicates.add(toOrPredicate( createPredicateReference(theSourceJoinColumn, theResourceName, theParamName, nextAnd, null, theRequest, theRequestPartitionId), createPredicateReferenceForContainedResource(theSourceJoinColumn, theResourceName, theParamName, nextParamDef, nextAnd, null, theRequest, theRequestPartitionId) )); + } else { + andPredicates.add(createPredicateReference(theSourceJoinColumn, theResourceName, theParamName, nextAnd, null, theRequest, theRequestPartitionId)); } } break; @@ -1225,6 +1228,14 @@ public class QueryStack { return toAndPredicate(andPredicates); } + private boolean isEligibleForContainedResourceSearch(List nextAnd) { + return myModelConfig.isIndexOnContainedResources() && + nextAnd.stream() + .filter(t -> t instanceof ReferenceParam) + .map(t -> (ReferenceParam) t) + .noneMatch(t -> t.getChain().contains(".")); + } + public void addPredicateCompositeUnique(String theIndexString, RequestPartitionId theRequestPartitionId) { ComboUniqueSearchParameterPredicateBuilder predicateBuilder = mySqlBuilder.addComboUniquePredicateBuilder(); Condition predicate = predicateBuilder.createPredicateIndexString(theRequestPartitionId, theIndexString); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java index 3a52940a811..79475214145 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java @@ -15,6 +15,7 @@ import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.StringType; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -199,10 +200,9 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { } @Test + @Disabled public void testShouldResolveAThreeLinkChainWithAContainedResourceAtTheBeginningOfTheChain() throws Exception { - // This case seems like it would be less frequent in production, but we don't want to - // paint ourselves into a corner where we require the contained link to be the last - // one in the chain + // We do not currently support this case - we may not be indexing the references of contained resources IIdType oid1; From 64270a51e00f91ce084ccfa28ecd903b2f88845a Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Fri, 3 Sep 2021 15:36:42 -0400 Subject: [PATCH 067/143] issue-2901 review fixes --- .../fhir/jpa/api/dao/IFhirResourceDao.java | 3 +- .../jpa/dao/AutoVersioningServiceImpl.java | 6 +- .../fhir/jpa/dao/BaseHapiFhirResourceDao.java | 54 +++++++---- .../ca/uhn/fhir/jpa/dao/BaseStorageDao.java | 5 +- .../jpa/dao/BaseTransactionProcessor.java | 5 +- .../fhir/jpa/dao/IAutoVersioningService.java | 4 +- .../uhn/fhir/jpa/dao/data/IForcedIdDao.java | 17 ---- .../fhir/jpa/dao/data/IResourceTableDao.java | 10 ++ .../dao/AutoVersioningServiceImplTests.java | 16 +++- .../jpa/dao/BaseHapiFhirResourceDaoTest.java | 91 ++++++++++++------- ...irResourceDaoCreatePlaceholdersR4Test.java | 45 ++++++++- 11 files changed, 171 insertions(+), 85 deletions(-) diff --git a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java index 69d0716fd4c..065149eef76 100644 --- a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java +++ b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java @@ -21,6 +21,7 @@ package ca.uhn.fhir.jpa.api.dao; */ import ca.uhn.fhir.context.RuntimeResourceDefinition; +import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.api.model.DeleteConflictList; import ca.uhn.fhir.jpa.api.model.DeleteMethodOutcome; @@ -168,7 +169,7 @@ public interface IFhirResourceDao extends IDao { * @param theIds - list of IIdType ids (for the same resource) * @return */ - Map getIdsOfExistingResources(Collection theIds); + Map getIdsOfExistingResources(RequestPartitionId partitionId, Collection theIds); /** * Read a resource by its internal PID diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java index 0df25f61e27..151c9eb1191 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java @@ -1,5 +1,6 @@ package ca.uhn.fhir.jpa.dao; +import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; @@ -18,7 +19,7 @@ public class AutoVersioningServiceImpl implements IAutoVersioningService { private DaoRegistry myDaoRegistry; @Override - public Map getExistingAutoversionsForIds(Collection theIds) { + public Map getExistingAutoversionsForIds(RequestPartitionId theRequestPartitionId, Collection theIds) { HashMap idToPID = new HashMap<>(); HashMap> resourceTypeToIds = new HashMap<>(); @@ -33,7 +34,8 @@ public class AutoVersioningServiceImpl implements IAutoVersioningService { for (String resourceType : resourceTypeToIds.keySet()) { IFhirResourceDao dao = myDaoRegistry.getResourceDao(resourceType); - Map idAndPID = dao.getIdsOfExistingResources(resourceTypeToIds.get(resourceType)); + Map idAndPID = dao.getIdsOfExistingResources(theRequestPartitionId, + resourceTypeToIds.get(resourceType)); idToPID.putAll(idAndPID); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java index 667cb450d71..8a19b774710 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java @@ -37,7 +37,6 @@ import ca.uhn.fhir.jpa.api.model.LazyDaoMethodOutcome; import ca.uhn.fhir.jpa.dao.index.IdHelperService; import ca.uhn.fhir.jpa.dao.tx.HapiTransactionService; import ca.uhn.fhir.jpa.delete.DeleteConflictService; -import ca.uhn.fhir.jpa.model.cross.IResourceLookup; import ca.uhn.fhir.jpa.model.entity.BaseHasResource; import ca.uhn.fhir.jpa.model.entity.BaseTag; import ca.uhn.fhir.jpa.model.entity.ForcedId; @@ -52,7 +51,6 @@ import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.jpa.patch.FhirPatch; import ca.uhn.fhir.jpa.patch.JsonPatchUtils; import ca.uhn.fhir.jpa.patch.XmlPatchUtils; -import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider; import ca.uhn.fhir.jpa.search.PersistedJpaBundleProvider; import ca.uhn.fhir.jpa.search.cache.SearchCacheStatusEnum; import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc; @@ -141,6 +139,7 @@ import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Optional; @@ -1160,7 +1159,8 @@ public abstract class BaseHapiFhirResourceDao extends B } @Override - public Map getIdsOfExistingResources(Collection theIds) { + public Map getIdsOfExistingResources(RequestPartitionId thePartitionId, + Collection theIds) { // these are the found Ids that were in the db HashMap collected = new HashMap<>(); @@ -1168,26 +1168,40 @@ public abstract class BaseHapiFhirResourceDao extends B return collected; } - List idPortions = theIds - .stream() - .map(IIdType::getIdPart) - .collect(Collectors.toList()); + List resourcePersistentIds = myIdHelperService.resolveResourcePersistentIdsWithCache(thePartitionId, + theIds.stream().collect(Collectors.toList())); - Collection matches = myForcedIdDao.findResourcesByForcedId(getResourceName(), - idPortions); + // we'll use this map to fetch pids that require versions + HashMap pidsToVersionToResourcePid = new HashMap<>(); - for (Object[] match : matches) { - String resourceType = (String) match[0]; - String forcedId = (String) match[1]; - Long pid = (Long) match[2]; - Long versionId = (Long) match[3]; - IIdType id = new IdDt(resourceType, forcedId); - // we won't put the version on the IIdType - // so callers can use this as a lookup to match to - ResourcePersistentId persistentId = new ResourcePersistentId(pid); - persistentId.setVersion(versionId); + // fill in our map + for (ResourcePersistentId pid : resourcePersistentIds) { + if (pid.getVersion() == null) { + pidsToVersionToResourcePid.put(pid.getIdAsLong(), pid); + } + Optional idOp = theIds.stream() + .filter(i -> i.getIdPart().equals(pid.getAssociatedResourceId().getIdPart())) + .findFirst(); + // this should always be present + // since it was passed in. + // but land of optionals... + idOp.ifPresent(id -> { + collected.put(id, pid); + }); + } - collected.put(id, persistentId); + // set any versions we don't already have + if (!pidsToVersionToResourcePid.isEmpty()) { + Collection resourceEntries = myResourceTableDao + .getResourceVersionsForPid(new ArrayList<>(pidsToVersionToResourcePid.keySet())); + + for (Object[] record : resourceEntries) { + // order matters! + Long retPid = (Long)record[0]; + String resType = (String)record[1]; + Long version = (Long)record[2]; + pidsToVersionToResourcePid.get(retPid).setVersion(version); + } } return collected; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java index b56f0547dd2..6df1d8fe44d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java @@ -25,6 +25,7 @@ import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.interceptor.api.HookParams; import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.interceptor.api.Pointcut; +import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; @@ -209,7 +210,7 @@ public abstract class BaseStorageDao { IIdType referenceElement = nextReference.getReferenceElement(); if (!referenceElement.hasBaseUrl()) { - Map idToPID = myAutoVersioningService.getExistingAutoversionsForIds( + Map idToPID = myAutoVersioningService.getExistingAutoversionsForIds(RequestPartitionId.allPartitions(), Collections.singletonList(referenceElement) ); @@ -220,7 +221,7 @@ public abstract class BaseStorageDao { Long version; if (idToPID.containsKey(referenceElement)) { // the resource exists... latest id - // will bbe the value in the ResourcePersistentId + // will be the value in the ResourcePersistentId version = idToPID.get(referenceElement).getVersion(); } else if (myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index bf9bbf779ac..f8db7e92b11 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -25,6 +25,7 @@ import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.interceptor.api.HookParams; import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.interceptor.api.Pointcut; +import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.interceptor.model.TransactionWriteOperationsDetails; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; @@ -1268,7 +1269,9 @@ public abstract class BaseTransactionProcessor { } else { // get a map of // existing ids -> PID (for resources that exist in the DB) - Map idToPID = myAutoVersioningService.getExistingAutoversionsForIds(theReferencesToAutoVersion.stream() + // should this be allPartitions? + Map idToPID = myAutoVersioningService.getExistingAutoversionsForIds(RequestPartitionId.allPartitions(), + theReferencesToAutoVersion.stream() .map(ref -> ref.getReferenceElement()).collect(Collectors.toList())); for (IBaseReference baseRef : theReferencesToAutoVersion) { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java index 312c6902a9f..80d327eb2d0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java @@ -1,5 +1,6 @@ package ca.uhn.fhir.jpa.dao; +import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import org.hl7.fhir.instance.model.api.IIdType; @@ -17,7 +18,8 @@ public interface IAutoVersioningService { * If the returned map does not return an IIdType -> ResourcePersistentId * then it means that it is a non-existing resource in the DB * @param theIds + * @param thePartitionId - the partition id * @return */ - Map getExistingAutoversionsForIds(Collection theIds); + Map getExistingAutoversionsForIds(RequestPartitionId thePartitionId, Collection theIds); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java index 4854fe421e1..3a10f6be0d5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java @@ -111,23 +111,6 @@ public interface IForcedIdDao extends JpaRepository { "WHERE f.myResourceType = :resource_type AND f.myForcedId IN ( :forced_id )") Collection findAndResolveByForcedIdWithNoType(@Param("resource_type") String theResourceType, @Param("forced_id") Collection theForcedIds); - /** - * This method returns a collection where eah row is an element in the collection. - * Each element in the collection is an object array where order matters. - * The returned order of each object array element is: - * ResourceType (Patient, etc - String), ForcedId (String), ResourcePID (Long), Version (Long) - * @param theResourceType - * @param theForcedIds - * @return - */ - @Query("" + - "SELECT " + - " f.myResourceType, f.myForcedId, f.myResourcePid, t.myVersion " + - "FROM ForcedId f " + - "JOIN ResourceTable t ON t.myId = f.myResourcePid " + - "WHERE f.myResourceType = :resource_type AND f.myForcedId IN ( :forced_id )") - Collection findResourcesByForcedId(@Param("resource_type") String theResourceType, @Param("forced_id") Collection theForcedIds); - /** * This method returns a Collection where each row is an element in the collection. Each element in the collection * is an object array, where the order matters (the array represents columns returned by the query). Be careful if you change this query in any way. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTableDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTableDao.java index 25a3e3d9e1d..6ee6a307187 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTableDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTableDao.java @@ -100,6 +100,16 @@ public interface IResourceTableDao extends JpaRepository { @Query("SELECT t.myVersion FROM ResourceTable t WHERE t.myId = :pid") Long findCurrentVersionByPid(@Param("pid") Long thePid); + /** + * This query will return rows with the following values: + * Id (resource pid - long), ResourceType (Patient, etc), version (long) + * Order matters! + * @param pid - list of pids to get versions for + * @return + */ + @Query("SELECT t.myId, t.myResourceType, t.myVersion FROM ResourceTable t WHERE t.myId IN ( :pid )") + Collection getResourceVersionsForPid(@Param("pid") List pid); + @Query("SELECT t FROM ResourceTable t LEFT JOIN FETCH t.myForcedId WHERE t.myPartitionId.myPartitionId IS NULL AND t.myId = :pid") Optional readByPartitionIdNull(@Param("pid") Long theResourceId); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java index da32e0cbc35..206b6c968ec 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java @@ -1,5 +1,6 @@ package ca.uhn.fhir.jpa.dao; +import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; import ca.uhn.fhir.model.primitive.IdDt; @@ -36,12 +37,14 @@ public class AutoVersioningServiceImplTests { map.put(type, pid); IFhirResourceDao daoMock = Mockito.mock(IFhirResourceDao.class); - Mockito.when(daoMock.getIdsOfExistingResources(Mockito.anyList())) + Mockito.when(daoMock.getIdsOfExistingResources(Mockito.any(RequestPartitionId.class), + Mockito.anyList())) .thenReturn(map); Mockito.when(daoRegistry.getResourceDao(Mockito.anyString())) .thenReturn(daoMock); - Map retMap = myAutoversioningService.getExistingAutoversionsForIds(Collections.singletonList(type)); + Map retMap = myAutoversioningService.getExistingAutoversionsForIds(RequestPartitionId.allPartitions(), + Collections.singletonList(type)); Assertions.assertTrue(retMap.containsKey(type)); Assertions.assertEquals(pid.getVersion(), map.get(type).getVersion()); @@ -52,12 +55,14 @@ public class AutoVersioningServiceImplTests { IIdType type = new IdDt("Patient/RED"); IFhirResourceDao daoMock = Mockito.mock(IFhirResourceDao.class); - Mockito.when(daoMock.getIdsOfExistingResources(Mockito.anyList())) + Mockito.when(daoMock.getIdsOfExistingResources(Mockito.any(RequestPartitionId.class), + Mockito.anyList())) .thenReturn(new HashMap<>()); Mockito.when(daoRegistry.getResourceDao(Mockito.anyString())) .thenReturn(daoMock); - Map retMap = myAutoversioningService.getExistingAutoversionsForIds(Collections.singletonList(type)); + Map retMap = myAutoversioningService.getExistingAutoversionsForIds(RequestPartitionId.allPartitions(), + Collections.singletonList(type)); Assertions.assertTrue(retMap.isEmpty()); } @@ -73,13 +78,14 @@ public class AutoVersioningServiceImplTests { // when IFhirResourceDao daoMock = Mockito.mock(IFhirResourceDao.class); - Mockito.when(daoMock.getIdsOfExistingResources(Mockito.anyList())) + Mockito.when(daoMock.getIdsOfExistingResources(Mockito.any(RequestPartitionId.class), Mockito.anyList())) .thenReturn(map); Mockito.when(daoRegistry.getResourceDao(Mockito.anyString())) .thenReturn(daoMock); // test Map retMap = myAutoversioningService.getExistingAutoversionsForIds( + RequestPartitionId.allPartitions(), Arrays.asList(type, type2) ); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java index 951c8a97a38..dd9cff05d3a 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java @@ -2,8 +2,11 @@ package ca.uhn.fhir.jpa.dao; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; +import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.dao.data.IForcedIdDao; +import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; +import ca.uhn.fhir.jpa.dao.index.IdHelperService; import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.api.server.RequestDetails; @@ -13,12 +16,14 @@ import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Request; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; +import org.mockito.junit.MockitoTestRule; import org.mockito.junit.jupiter.MockitoExtension; import java.util.ArrayList; @@ -54,27 +59,40 @@ class BaseHapiFhirResourceDaoTest { @InjectMocks private BaseHapiFhirResourceDao myBaseHapiFhirResourceDao = new SimpleTestDao(); +// @Mock +// private IForcedIdDao myIForcedIdDao; + @Mock - private IForcedIdDao myIForcedIdDao; + private IdHelperService myIdHelperService; + + @Mock + private IResourceTableDao myResourceTableDao; //TODO - all other dependency mocks + + private ResourcePersistentId getResourcePersistentIdFromResource(IIdType theId, long thePid) { + ResourcePersistentId id = new ResourcePersistentId(thePid); + String idPortion = theId.getIdPart(); + IIdType newId = new IdDt(theId.getResourceType(), idPortion); + id.setAssociatedResourceId(newId); + return id; + } + /** - * Creates a match entry to be returned by myIForcedIdDao. - * This ordering matters (see IForcedIdDao) - * @param theId - * @param thePID - * @param theResourceVersion + * Gets a ResourceTable record for getResourceVersionsForPid + * Order matters! + * @param resourceType + * @param pid + * @param version * @return */ - private Object[] createMatchEntryForGetIdsOfExistingResources(IIdType theId, long thePID, long theResourceVersion) { - Object[] arr = new Object[] { - theId.getResourceType(), - theId.getIdPart(), - thePID, - theResourceVersion + private Object[] getResourceTableRecordForResourceTypeAndPid(String resourceType, long pid, long version) { + return new Object[] { + pid, // long + resourceType, // string + version // long }; - return arr; } @Test @@ -83,31 +101,38 @@ class BaseHapiFhirResourceDaoTest { IIdType patientIdAndType = new IdDt("Patient/RED"); long patientPID = 1L; long patientResourceVersion = 2L; + ResourcePersistentId pat1ResourcePID = getResourcePersistentIdFromResource(patientIdAndType, patientPID); IIdType patient2IdAndType = new IdDt("Patient/BLUE"); long patient2PID = 3L; long patient2ResourceVersion = 4L; + ResourcePersistentId pat2ResourcePID = getResourcePersistentIdFromResource(patient2IdAndType, patient2PID); List inputList = new ArrayList<>(); inputList.add(patientIdAndType); inputList.add(patient2IdAndType); Collection matches = Arrays.asList( - createMatchEntryForGetIdsOfExistingResources(patientIdAndType, patientPID, patientResourceVersion), - createMatchEntryForGetIdsOfExistingResources(patient2IdAndType, patient2PID, patient2ResourceVersion) + getResourceTableRecordForResourceTypeAndPid(patientIdAndType.getResourceType(), patientPID, patientResourceVersion), + getResourceTableRecordForResourceTypeAndPid(patient2IdAndType.getResourceType(), patient2PID, patient2ResourceVersion) ); // when - Mockito.when(myIForcedIdDao.findResourcesByForcedId(Mockito.anyString(), - Mockito.anyList())).thenReturn(matches); + Mockito.when(myIdHelperService.resolveResourcePersistentIdsWithCache(Mockito.any(RequestPartitionId.class), + Mockito.anyList())) + .thenReturn(Arrays.asList(pat1ResourcePID, pat2ResourcePID)); + Mockito.when(myResourceTableDao.getResourceVersionsForPid(Mockito.anyList())) + .thenReturn(matches); - Map idToPIDOfExistingResources = myBaseHapiFhirResourceDao.getIdsOfExistingResources(inputList); + Map idToPIDOfExistingResources = myBaseHapiFhirResourceDao.getIdsOfExistingResources(RequestPartitionId.allPartitions(), + inputList); Assertions.assertEquals(inputList.size(), idToPIDOfExistingResources.size()); Assertions.assertTrue(idToPIDOfExistingResources.containsKey(patientIdAndType)); Assertions.assertTrue(idToPIDOfExistingResources.containsKey(patient2IdAndType)); - Assertions.assertEquals(idToPIDOfExistingResources.get(patientIdAndType).getIdAsLong(), patientPID); - Assertions.assertEquals(idToPIDOfExistingResources.get(patient2IdAndType).getIdAsLong(), patient2PID); - Assertions.assertEquals(idToPIDOfExistingResources.get(patientIdAndType).getVersion(), patientResourceVersion); - Assertions.assertEquals(idToPIDOfExistingResources.get(patient2IdAndType).getVersion(), patient2ResourceVersion); + + Assertions.assertEquals(patientPID, idToPIDOfExistingResources.get(patientIdAndType).getIdAsLong()); + Assertions.assertEquals(patient2PID, idToPIDOfExistingResources.get(patient2IdAndType).getIdAsLong(), patient2PID); + Assertions.assertEquals(patientResourceVersion, idToPIDOfExistingResources.get(patientIdAndType).getVersion()); + Assertions.assertEquals(patient2ResourceVersion, idToPIDOfExistingResources.get(patient2IdAndType).getVersion()); } @Test @@ -116,10 +141,12 @@ class BaseHapiFhirResourceDaoTest { IIdType patient = new IdDt("Patient/RED"); // when - Mockito.when(myIForcedIdDao.findResourcesByForcedId(Mockito.anyString(), Mockito.anyList())) + Mockito.when(myIdHelperService.resolveResourcePersistentIdsWithCache(Mockito.any(RequestPartitionId.class), + Mockito.anyList())) .thenReturn(new ArrayList<>()); - Map map = myBaseHapiFhirResourceDao.getIdsOfExistingResources(Collections.singletonList(patient)); + Map map = myBaseHapiFhirResourceDao.getIdsOfExistingResources(RequestPartitionId.allPartitions(), + Collections.singletonList(patient)); Assertions.assertTrue(map.isEmpty()); } @@ -135,15 +162,17 @@ class BaseHapiFhirResourceDaoTest { inputList.add(patientIdAndType); inputList.add(patient2IdAndType); - Collection matches = Collections.singletonList( - createMatchEntryForGetIdsOfExistingResources(patientIdAndType, patientPID, patientResourceVersion) - ); - // when - Mockito.when(myIForcedIdDao.findResourcesByForcedId(Mockito.anyString(), Mockito.anyList())) - .thenReturn(matches); + Mockito.when(myIdHelperService + .resolveResourcePersistentIdsWithCache(Mockito.any(RequestPartitionId.class), + Mockito.anyList())) + .thenReturn(Collections.singletonList(getResourcePersistentIdFromResource(patientIdAndType, patientPID))); + Mockito.when(myResourceTableDao.getResourceVersionsForPid(Mockito.anyList())) + .thenReturn(Collections + .singletonList(getResourceTableRecordForResourceTypeAndPid(patientIdAndType.getResourceType(), patientPID, patientResourceVersion))); - Map map = myBaseHapiFhirResourceDao.getIdsOfExistingResources(inputList); + Map map = myBaseHapiFhirResourceDao.getIdsOfExistingResources(RequestPartitionId.allPartitions(), + inputList); // verify Assertions.assertFalse(map.isEmpty()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java index fa953bc28e6..a53a084d7c2 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java @@ -1,6 +1,7 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; @@ -538,7 +539,6 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { AuditEvent createdEvent = myAuditEventDao.read(id); ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEvent)); - } @Test @@ -558,7 +558,6 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { IIdType id = myObservationDao.create(obsToCreate, mySrd).getId(); Observation createdObs = myObservationDao.read(id); - ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); assertEquals("Patient/ABC", createdObs.getSubject().getReference()); } @@ -575,8 +574,9 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); + // verify subresource is created Patient returned = myPatientDao.read(patientRef.getReferenceElement()); - Assertions.assertTrue(returned != null); + assertNotNull(returned); } @@ -607,10 +607,45 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { Bundle transaction = mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); Patient returned = myPatientDao.read(patientRef.getReferenceElement()); - Assertions.assertTrue(returned != null); + assertNotNull(returned); Assertions.assertTrue(returned.getActive()); + Assertions.assertEquals(2, returned.getIdElement().getVersionIdPartAsLong()); Observation retObservation = myObservationDao.read(obs.getIdElement()); - Assertions.assertTrue(retObservation != null); + assertNotNull(retObservation); } + + + @Test + public void testAutocreatePlaceholderWithExistingTargetWithServerAssignedIdTest() { + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); + + // create + Patient patient = new Patient(); + patient.setIdElement(new IdType("Patient")); + DaoMethodOutcome ret = myPatientDao.create(patient); + + // update + patient.setActive(true); + myPatientDao.update(patient); + + // observation (with version 2) + Observation obs = new Observation(); + obs.setId("Observation/DEF"); + Reference patientRef = new Reference("Patient/" + ret.getId().getIdPart()); + obs.setSubject(patientRef); + BundleBuilder builder = new BundleBuilder(myFhirCtx); + builder.addTransactionUpdateEntry(obs); + + Bundle transaction = mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); + + Patient returned = myPatientDao.read(patientRef.getReferenceElement()); + assertNotNull(returned); + Assertions.assertEquals(2, returned.getIdElement().getVersionIdPartAsLong()); + + Observation retObservation = myObservationDao.read(obs.getIdElement()); + assertNotNull(retObservation); + } + } From c63a5038419e7ce6e549c28711b0f1e4b36ebcbd Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Fri, 3 Sep 2021 16:29:26 -0400 Subject: [PATCH 068/143] Updated link processing for MDM events --- .../java/ca/uhn/fhir/jpa/entity/MdmLink.java | 3 +- .../jpa/mdm/broker/MdmMessageHandler.java | 14 +- .../fhir/jpa/mdm/svc/MdmEidUpdateService.java | 2 - .../uhn/fhir/jpa/mdm/svc/MdmLinkSvcImpl.java | 10 +- .../uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java | 8 - .../jpa/mdm/svc/MdmModelConverterSvcImpl.java | 28 ++-- .../fhir/jpa/mdm/interceptor/MdmEventIT.java | 115 ++++---------- .../interceptor/MdmStorageInterceptorIT.java | 20 --- .../java/ca/uhn/fhir/mdm/api/IMdmLink.java | 24 +++ .../ca/uhn/fhir/mdm/api/MdmLinkEvent.java | 148 ++---------------- .../fhir/mdm/model/MdmTransactionContext.java | 18 ++- 11 files changed, 106 insertions(+), 284 deletions(-) create mode 100644 hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmLink.java diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/MdmLink.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/MdmLink.java index cd8cbff422d..4892ed8c1f9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/MdmLink.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/MdmLink.java @@ -20,6 +20,7 @@ package ca.uhn.fhir.jpa.entity; * #L% */ +import ca.uhn.fhir.mdm.api.IMdmLink; import ca.uhn.fhir.mdm.api.MdmLinkSourceEnum; import ca.uhn.fhir.mdm.api.MdmMatchResultEnum; import ca.uhn.fhir.jpa.model.entity.ResourceTable; @@ -47,7 +48,7 @@ import java.util.Date; @Table(name = "MPI_LINK", uniqueConstraints = { @UniqueConstraint(name = "IDX_EMPI_PERSON_TGT", columnNames = {"PERSON_PID", "TARGET_PID"}), }) -public class MdmLink { +public class MdmLink implements IMdmLink { public static final int VERSION_LENGTH = 16; private static final int MATCH_RESULT_LENGTH = 16; private static final int LINK_SOURCE_LENGTH = 16; diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java index 6589d6b41e9..7695be8f448 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmMessageHandler.java @@ -119,17 +119,17 @@ public class MdmMessageHandler implements MessageHandler { ResourceOperationMessage outgoingMsg = new ResourceOperationMessage(myFhirContext, targetResource, theMsg.getOperationType()); outgoingMsg.setTransactionId(theMsg.getTransactionId()); - MdmLinkEvent linkChangeEvent = mdmContext.getMdmLinkEvent(); - Optional mdmLinkBySource = myMdmLinkDaoSvc.findMdmLinkBySource(targetResource); - if (!mdmLinkBySource.isPresent()) { - ourLog.warn("Unable to find link by source for {}", targetResource.getIdElement()); - } + MdmLinkEvent linkChangeEvent = new MdmLinkEvent(); + mdmContext.getMdmLinks() + .stream() + .forEach(l -> { + linkChangeEvent.addMdmLink(myModelConverter.toJson((MdmLink) l)); + }); - mdmLinkBySource.ifPresent(link -> linkChangeEvent.setFromLink(myModelConverter.toJson(link))); HookParams params = new HookParams() .add(ResourceOperationMessage.class, outgoingMsg) .add(TransactionLogMessages.class, mdmContext.getTransactionLogMessages()) - .add(MdmLinkEvent.class, mdmContext.getMdmLinkEvent()); + .add(MdmLinkEvent.class, linkChangeEvent); myInterceptorBroadcaster.callHooks(Pointcut.MDM_AFTER_PERSISTED_RESOURCE_CHECKED, params); } diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java index 2e035615200..94db6849073 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java @@ -85,8 +85,6 @@ public class MdmEidUpdateService { myMdmSurvivorshipService.applySurvivorshipRulesToGoldenResource(theTargetResource, updateContext.getMatchedGoldenResource(), theMdmTransactionContext); myMdmResourceDaoSvc.upsertGoldenResource(updateContext.getMatchedGoldenResource(), theMdmTransactionContext.getResourceType()); } - - theMdmTransactionContext.getMdmLinkEvent().setGoldenResourceId(updateContext.getExistingGoldenResource()); } private void handleNoEidsInCommon(IAnyResource theResource, MatchedGoldenResourceCandidate theMatchedGoldenResourceCandidate, MdmTransactionContext theMdmTransactionContext, MdmUpdateContext theUpdateContext) { diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkSvcImpl.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkSvcImpl.java index 3d744f43d11..7e4b95dad0c 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkSvcImpl.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkSvcImpl.java @@ -53,6 +53,8 @@ public class MdmLinkSvcImpl implements IMdmLinkSvc { private MdmLinkDaoSvc myMdmLinkDaoSvc; @Autowired private IdHelperService myIdHelperService; + @Autowired + private IMdmModelConverterSvc myMdmModelConverterSvc; @Override @Transactional @@ -69,7 +71,8 @@ public class MdmLinkSvcImpl implements IMdmLinkSvc { validateRequestIsLegal(theGoldenResource, theSourceResource, matchResultEnum, theLinkSource); myMdmResourceDaoSvc.upsertGoldenResource(theGoldenResource, theMdmTransactionContext.getResourceType()); - createOrUpdateLinkEntity(theGoldenResource, theSourceResource, theMatchOutcome, theLinkSource, theMdmTransactionContext); + MdmLink link = createOrUpdateLinkEntity(theGoldenResource, theSourceResource, theMatchOutcome, theLinkSource, theMdmTransactionContext); + theMdmTransactionContext.addMdmLink(link); } private boolean goldenResourceLinkedAsNoMatch(IAnyResource theGoldenResource, IAnyResource theSourceResource) { @@ -87,6 +90,7 @@ public class MdmLinkSvcImpl implements IMdmLinkSvc { MdmLink mdmLink = optionalMdmLink.get(); log(theMdmTransactionContext, "Deleting MdmLink [" + theGoldenResource.getIdElement().toVersionless() + " -> " + theSourceResource.getIdElement().toVersionless() + "] with result: " + mdmLink.getMatchResult()); myMdmLinkDaoSvc.deleteLink(mdmLink); + theMdmTransactionContext.addMdmLink(mdmLink); } } @@ -129,8 +133,8 @@ public class MdmLinkSvcImpl implements IMdmLinkSvc { } } - private void createOrUpdateLinkEntity(IBaseResource theGoldenResource, IBaseResource theSourceResource, MdmMatchOutcome theMatchOutcome, MdmLinkSourceEnum theLinkSource, MdmTransactionContext theMdmTransactionContext) { - myMdmLinkDaoSvc.createOrUpdateLinkEntity(theGoldenResource, theSourceResource, theMatchOutcome, theLinkSource, theMdmTransactionContext); + private MdmLink createOrUpdateLinkEntity(IBaseResource theGoldenResource, IBaseResource theSourceResource, MdmMatchOutcome theMatchOutcome, MdmLinkSourceEnum theLinkSource, MdmTransactionContext theMdmTransactionContext) { + return myMdmLinkDaoSvc.createOrUpdateLinkEntity(theGoldenResource, theSourceResource, theMatchOutcome, theLinkSource, theMdmTransactionContext); } private void log(MdmTransactionContext theMdmTransactionContext, String theMessage) { diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java index 2c2eba5342e..8eda5742dd2 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java @@ -78,8 +78,6 @@ public class MdmMatchLinkSvc { private MdmTransactionContext doMdmUpdate(IAnyResource theResource, MdmTransactionContext theMdmTransactionContext) { CandidateList candidateList = myMdmGoldenResourceFindingSvc.findGoldenResourceCandidates(theResource); - theMdmTransactionContext.getMdmLinkEvent().setTargetResourceId(theResource); - if (candidateList.isEmpty()) { handleMdmWithNoCandidates(theResource, theMdmTransactionContext); } else if (candidateList.exactlyOneMatch()) { @@ -115,14 +113,12 @@ public class MdmMatchLinkSvc { //Set all GoldenResources as POSSIBLE_DUPLICATE of the last GoldenResource. IAnyResource firstGoldenResource = goldenResources.get(0); - theMdmTransactionContext.getMdmLinkEvent().setGoldenResourceId(firstGoldenResource); goldenResources.subList(1, goldenResources.size()) .forEach(possibleDuplicateGoldenResource -> { MdmMatchOutcome outcome = MdmMatchOutcome.POSSIBLE_DUPLICATE; outcome.setEidMatch(theCandidateList.isEidMatch()); myMdmLinkSvc.updateLink(firstGoldenResource, possibleDuplicateGoldenResource, outcome, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); - theMdmTransactionContext.getMdmLinkEvent().addDuplicateGoldenResourceId(possibleDuplicateGoldenResource); }); } } @@ -135,8 +131,6 @@ public class MdmMatchLinkSvc { // 2. Create source resource for the MDM source // 3. UPDATE MDM LINK TABLE myMdmLinkSvc.updateLink(newGoldenResource, theResource, MdmMatchOutcome.NEW_GOLDEN_RESOURCE_MATCH, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); - - theMdmTransactionContext.getMdmLinkEvent().setGoldenResourceId(newGoldenResource); } private void handleMdmCreate(IAnyResource theTargetResource, MatchedGoldenResourceCandidate theGoldenResourceCandidate, MdmTransactionContext theMdmTransactionContext) { @@ -146,7 +140,6 @@ public class MdmMatchLinkSvc { if (myGoldenResourceHelper.isPotentialDuplicate(goldenResource, theTargetResource)) { log(theMdmTransactionContext, "Duplicate detected based on the fact that both resources have different external EIDs."); IAnyResource newGoldenResource = myGoldenResourceHelper.createGoldenResourceFromMdmSourceResource(theTargetResource, theMdmTransactionContext); - theMdmTransactionContext.getMdmLinkEvent().setGoldenResourceId(newGoldenResource); myMdmLinkSvc.updateLink(newGoldenResource, theTargetResource, MdmMatchOutcome.NEW_GOLDEN_RESOURCE_MATCH, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); myMdmLinkSvc.updateLink(newGoldenResource, goldenResource, MdmMatchOutcome.POSSIBLE_DUPLICATE, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); @@ -156,7 +149,6 @@ public class MdmMatchLinkSvc { myEidUpdateService.applySurvivorshipRulesAndSaveGoldenResource(theTargetResource, goldenResource, theMdmTransactionContext); } - theMdmTransactionContext.getMdmLinkEvent().setGoldenResourceId(goldenResource); myMdmLinkSvc.updateLink(goldenResource, theTargetResource, theGoldenResourceCandidate.getMatchResult(), MdmLinkSourceEnum.AUTO, theMdmTransactionContext); } } diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmModelConverterSvcImpl.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmModelConverterSvcImpl.java index 195ac388e68..89a8ae5c34e 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmModelConverterSvcImpl.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmModelConverterSvcImpl.java @@ -31,22 +31,22 @@ public class MdmModelConverterSvcImpl implements IMdmModelConverterSvc { IdHelperService myIdHelperService; public MdmLinkJson toJson(MdmLink theLink) { - MdmLinkJson retval = new MdmLinkJson(); + MdmLinkJson retVal = new MdmLinkJson(); String sourceId = myIdHelperService.resourceIdFromPidOrThrowException(theLink.getSourcePid()).toVersionless().getValue(); - retval.setSourceId(sourceId); + retVal.setSourceId(sourceId); String goldenResourceId = myIdHelperService.resourceIdFromPidOrThrowException(theLink.getGoldenResourcePid()).toVersionless().getValue(); - retval.setGoldenResourceId(goldenResourceId); - retval.setCreated(theLink.getCreated()); - retval.setEidMatch(theLink.getEidMatch()); - retval.setLinkSource(theLink.getLinkSource()); - retval.setMatchResult(theLink.getMatchResult()); - retval.setLinkCreatedNewResource(theLink.getHadToCreateNewGoldenResource()); - retval.setScore(theLink.getScore()); - retval.setUpdated(theLink.getUpdated()); - retval.setVector(theLink.getVector()); - retval.setVersion(theLink.getVersion()); - retval.setRuleCount(theLink.getRuleCount()); - return retval; + retVal.setGoldenResourceId(goldenResourceId); + retVal.setCreated(theLink.getCreated()); + retVal.setEidMatch(theLink.getEidMatch()); + retVal.setLinkSource(theLink.getLinkSource()); + retVal.setMatchResult(theLink.getMatchResult()); + retVal.setLinkCreatedNewResource(theLink.getHadToCreateNewGoldenResource()); + retVal.setScore(theLink.getScore()); + retVal.setUpdated(theLink.getUpdated()); + retVal.setVector(theLink.getVector()); + retVal.setVersion(theLink.getVersion()); + retVal.setRuleCount(theLink.getRuleCount()); + return retVal; } } diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmEventIT.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmEventIT.java index 1bfdd0c1cb2..39ec89b4c7d 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmEventIT.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmEventIT.java @@ -6,7 +6,10 @@ import ca.uhn.fhir.jpa.mdm.BaseMdmR4Test; import ca.uhn.fhir.jpa.mdm.helper.MdmHelperConfig; import ca.uhn.fhir.jpa.mdm.helper.MdmHelperR4; import ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer; +import ca.uhn.fhir.mdm.api.IMdmLink; import ca.uhn.fhir.mdm.api.MdmLinkEvent; +import ca.uhn.fhir.mdm.api.MdmLinkJson; +import ca.uhn.fhir.mdm.api.MdmMatchResultEnum; import ca.uhn.fhir.mdm.model.MdmTransactionContext; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.server.messaging.ResourceOperationMessage; @@ -29,6 +32,7 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; +import java.util.List; import java.util.Properties; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -51,53 +55,38 @@ public class MdmEventIT extends BaseMdmR4Test { @Autowired private IdHelperService myIdHelperService; - @Bean - @Primary - public Properties jpaProperties() { - Properties extraProperties = new Properties(); - extraProperties.put("hibernate.format_sql", "true"); - extraProperties.put("hibernate.show_sql", "true"); - extraProperties.put("hibernate.hbm2ddl.auto", "update"); - extraProperties.put("hibernate.dialect", H2Dialect.class.getName()); - - extraProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "lucene"); - extraProperties.put(BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER), HapiLuceneAnalysisConfigurer.class.getName()); - extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), "local-heap"); - extraProperties.put(BackendSettings.backendKey(LuceneBackendSettings.LUCENE_VERSION), "LUCENE_CURRENT"); - extraProperties.put(HibernateOrmMapperSettings.ENABLED, "true"); - - return extraProperties; - } - - @Test public void testDuplicateLinkChangeEvent() throws InterruptedException { Patient patient1 = buildJanePatient(); addExternalEID(patient1, "eid-1"); addExternalEID(patient1, "eid-11"); - patient1 = createPatientAndUpdateLinks(patient1); + myMdmHelper.createWithLatch(patient1); Patient patient2 = buildPaulPatient(); addExternalEID(patient2, "eid-2"); addExternalEID(patient2, "eid-22"); - patient2 = createPatientAndUpdateLinks(patient2); + myMdmHelper.createWithLatch(patient2); Patient patient3 = buildPaulPatient(); addExternalEID(patient3, "eid-22"); - patient3 = createPatientAndUpdateLinks(patient3); + myMdmHelper.createWithLatch(patient3); patient2.getIdentifier().clear(); addExternalEID(patient2, "eid-11"); addExternalEID(patient2, "eid-22"); - patient2 = (Patient) myPatientDao.update(patient2).getResource(); - MdmTransactionContext ctx = myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient2, createContextForUpdate(patient2.getIdElement().getResourceType())); + myMdmHelper.updateWithLatch(patient2); - MdmLinkEvent mdmLinkEvent = ctx.getMdmLinkEvent(); - assertFalse(mdmLinkEvent.getDuplicateGoldenResourceIds().isEmpty()); + MdmLinkEvent linkChangeEvent = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(MdmLinkEvent.class); + assertNotNull(linkChangeEvent); + + // MdmTransactionContext ctx = myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient2, createContextForUpdate(patient2.getIdElement().getResourceType())); + + List mdmLinkEvent = linkChangeEvent.getMdmLinks(); + assertEquals(3, mdmLinkEvent.size()); } - // @Test + @Test public void testCreateLinkChangeEvent() throws InterruptedException { Practitioner pr = buildPractitionerWithNameAndId("Young", "AC-DC"); myMdmHelper.createWithLatch(pr); @@ -110,56 +99,13 @@ public class MdmEventIT extends BaseMdmR4Test { MdmLinkEvent linkChangeEvent = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(MdmLinkEvent.class); assertNotNull(linkChangeEvent); - assertEquals(link.getGoldenResourcePid(), new IdDt(linkChangeEvent.getGoldenResourceId()).getIdPartAsLong()); - assertEquals(link.getSourcePid(), new IdDt(linkChangeEvent.getTargetResourceId()).getIdPartAsLong()); + + assertEquals(1, linkChangeEvent.getMdmLinks().size()); + MdmLinkJson l = linkChangeEvent.getMdmLinks().get(0); + assertEquals(link.getGoldenResourcePid(), new IdDt(l.getGoldenResourceId()).getIdPartAsLong()); + assertEquals(link.getSourcePid(), new IdDt(l.getSourceId()).getIdPartAsLong()); } - /* - @Test - public void testDuplicateLinkChangeEvent() throws InterruptedException { - logAllLinks(); - for (IBaseResource r : myPatientDao.search(new SearchParameterMap()).getAllResources()) { - ourLog.info("Found {}", r); - } - - Patient myPatient = createPatientAndUpdateLinks(buildPaulPatient()); - StringType myPatientId = new StringType(myPatient.getIdElement().getValue()); - - Patient mySourcePatient = getGoldenResourceFromTargetResource(myPatient); - StringType mySourcePatientId = new StringType(mySourcePatient.getIdElement().getValue()); - StringType myVersionlessGodlenResourceId = new StringType(mySourcePatient.getIdElement().toVersionless().getValue()); - - MdmLink myLink = myMdmLinkDaoSvc.findMdmLinkBySource(myPatient).get(); - // Tests require our initial link to be a POSSIBLE_MATCH - myLink.setMatchResult(MdmMatchResultEnum.POSSIBLE_MATCH); - saveLink(myLink); - assertEquals(MdmLinkSourceEnum.AUTO, myLink.getLinkSource()); -// myDaoConfig.setExpungeEnabled(true); - - // Add a second patient - createPatientAndUpdateLinks(buildJanePatient()); - - // Add a possible duplicate - StringType myLinkSource = new StringType(MdmLinkSourceEnum.AUTO.name()); - Patient sourcePatient1 = createGoldenPatient(); - StringType myGoldenResource1Id = new StringType(sourcePatient1.getIdElement().toVersionless().getValue()); - Long sourcePatient1Pid = myIdHelperService.getPidOrNull(sourcePatient1); - Patient sourcePatient2 = createGoldenPatient(); - StringType myGoldenResource2Id = new StringType(sourcePatient2.getIdElement().toVersionless().getValue()); - Long sourcePatient2Pid = myIdHelperService.getPidOrNull(sourcePatient2); - - - MdmLink possibleDuplicateMdmLink = myMdmLinkDaoSvc.newMdmLink().setGoldenResourcePid(sourcePatient1Pid).setSourcePid(sourcePatient2Pid).setMatchResult(MdmMatchResultEnum.POSSIBLE_DUPLICATE).setLinkSource(MdmLinkSourceEnum.AUTO); - saveLink(possibleDuplicateMdmLink); - - logAllLinks(); - - ResourceOperationMessage resourceOperationMessage = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(ResourceOperationMessage.class); - assertNotNull(resourceOperationMessage); - assertEquals(sourcePatient2.getId(), resourceOperationMessage.getId()); - } - */ - private MdmLink getLinkByTargetId(IBaseResource theResource) { MdmLink example = new MdmLink(); example.setSourcePid(theResource.getIdElement().getIdPartAsLong()); @@ -171,19 +117,14 @@ public class MdmEventIT extends BaseMdmR4Test { Patient patient1 = addExternalEID(buildJanePatient(), "eid-1"); myMdmHelper.createWithLatch(patient1); - MdmTransactionContext ctx = createContextForCreate("Patient"); - myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient1, ctx); - ourLog.info(ctx.getMdmLinkEvent().toString()); - assertEquals(patient1.getIdElement().getValue(), ctx.getMdmLinkEvent().getTargetResourceId()); - assertEquals(getLinkByTargetId(patient1).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkEvent().getGoldenResourceId()).getIdPartAsLong()); + MdmLinkEvent linkChangeEvent = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(MdmLinkEvent.class); + assertNotNull(linkChangeEvent); + assertEquals(1, linkChangeEvent.getMdmLinks().size()); - Patient patient2 = addExternalEID(buildJanePatient(), "eid-2"); - myMdmHelper.createWithLatch(patient2); - ctx = createContextForCreate("Patient"); - myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient2, ctx); - ourLog.info(ctx.getMdmLinkEvent().toString()); - assertEquals(patient2.getIdElement().getValue(), ctx.getMdmLinkEvent().getTargetResourceId()); - assertEquals(getLinkByTargetId(patient2).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkEvent().getGoldenResourceId()).getIdPartAsLong()); + MdmLinkJson link = linkChangeEvent.getMdmLinks().get(0); + assertEquals(patient1.getResourceType() + "/" + patient1.getIdElement().getIdPart(), link.getSourceId()); + assertEquals(getLinkByTargetId(patient1).getGoldenResourcePid(), new IdDt(link.getGoldenResourceId()).getIdPartAsLong()); + assertEquals(MdmMatchResultEnum.MATCH, link.getMatchResult()); } diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java index 30281f7fd90..4509b9052da 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmStorageInterceptorIT.java @@ -76,26 +76,6 @@ public class MdmStorageInterceptorIT extends BaseMdmR4Test { return myMdmLinkDao.findAll(Example.of(example)).get(0); } - @Test - public void testUpdateLinkChangeEvent() throws InterruptedException { - Patient patient1 = addExternalEID(buildJanePatient(), "eid-1"); - myMdmHelper.createWithLatch(patient1); - - MdmTransactionContext ctx = createContextForCreate("Patient"); - myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient1, ctx); - ourLog.info(ctx.getMdmLinkEvent().toString()); - assertEquals(patient1.getIdElement().getValue(), ctx.getMdmLinkEvent().getTargetResourceId()); - assertEquals(getLinkByTargetId(patient1).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkEvent().getGoldenResourceId()).getIdPartAsLong()); - - Patient patient2 = addExternalEID(buildJanePatient(), "eid-2"); - myMdmHelper.createWithLatch(patient2); - ctx = createContextForCreate("Patient"); - myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient2, ctx); - ourLog.info(ctx.getMdmLinkEvent().toString()); - assertEquals(patient2.getIdElement().getValue(), ctx.getMdmLinkEvent().getTargetResourceId()); - assertEquals(getLinkByTargetId(patient2).getGoldenResourcePid(), new IdDt(ctx.getMdmLinkEvent().getGoldenResourceId()).getIdPartAsLong()); - } - @Test public void testSearchExpandingInterceptorWorks() { SearchParameterMap subject = new SearchParameterMap("subject", new ReferenceParam("Patient/123").setMdmExpand(true)).setLoadSynchronous(true); diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmLink.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmLink.java new file mode 100644 index 00000000000..bf87929d9bd --- /dev/null +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmLink.java @@ -0,0 +1,24 @@ +package ca.uhn.fhir.mdm.api; + +/*- + * #%L + * HAPI FHIR - Master Data Management + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +public interface IMdmLink { +} diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkEvent.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkEvent.java index 7eda6f328d8..c65ee1c9e2d 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkEvent.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkEvent.java @@ -25,158 +25,32 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; +import java.util.ArrayList; import java.util.HashSet; +import java.util.List; import java.util.Set; public class MdmLinkEvent implements IModelJson { - @JsonProperty(value = "matchResult") - private MdmMatchResultEnum myMdmMatchResult; - @JsonProperty(value = "linkSource") - private MdmLinkSourceEnum myMdmLinkSource; - @JsonProperty(value = "eidMatch") - private Boolean myEidMatch; - @JsonProperty(value = "newGoldenResource") - private Boolean myNewGoldenResource; - @JsonProperty(value = "score") - private Double myScore; - @JsonProperty(value = "ruleCount") - private Long myRuleCount; - @JsonProperty(value = "targetResourceId", required = true) - private String myTargetResourceId; - @JsonProperty(value = "goldenResourceId", required = true) - private String myGoldenResourceId; - @JsonProperty(value = "duplicateResourceIds") - private Set myDuplicateGoldenResourceIds = new HashSet<>(); + private List myMdmLinks = new ArrayList<>(); - public String getGoldenResourceId() { - return myGoldenResourceId; + public List getMdmLinks() { + return myMdmLinks; } - public void setGoldenResourceId(IBaseResource theGoldenResourceId) { - setGoldenResourceId(getIdAsString(theGoldenResourceId)); + public void setMdmLinks(List theMdmLinks) { + myMdmLinks = theMdmLinks; } - public void setGoldenResourceId(String theGoldenResourceId) { - myGoldenResourceId = theGoldenResourceId; - } - - private String getIdAsString(IBaseResource theResource) { - if (theResource == null) { - return null; - } - IIdType idElement = theResource.getIdElement(); - if (idElement == null) { - return null; - } - return idElement.getValueAsString(); - } - - public String getTargetResourceId() { - return myTargetResourceId; - } - - public void setTargetResourceId(IBaseResource theTargetResource) { - setTargetResourceId(getIdAsString(theTargetResource)); - } - - public void setTargetResourceId(String theTargetResourceId) { - myTargetResourceId = theTargetResourceId; - } - - public Set getDuplicateGoldenResourceIds() { - return myDuplicateGoldenResourceIds; - } - - public void setDuplicateGoldenResourceIds(Set theDuplicateGoldenResourceIds) { - myDuplicateGoldenResourceIds = theDuplicateGoldenResourceIds; - } - - public MdmLinkEvent addDuplicateGoldenResourceId(IBaseResource theDuplicateGoldenResourceId) { - String id = getIdAsString(theDuplicateGoldenResourceId); - if (id != null) { - getDuplicateGoldenResourceIds().add(id); - } + public MdmLinkEvent addMdmLink(MdmLinkJson theMdmLink) { + getMdmLinks().add(theMdmLink); return this; } - public MdmMatchResultEnum getMdmMatchResult() { - return myMdmMatchResult; - } - - public void setMdmMatchResult(MdmMatchResultEnum theMdmMatchResult) { - myMdmMatchResult = theMdmMatchResult; - } - - public MdmLinkSourceEnum getMdmLinkSource() { - return myMdmLinkSource; - } - - public void setMdmLinkSource(MdmLinkSourceEnum theMdmLinkSource) { - myMdmLinkSource = theMdmLinkSource; - } - - public Boolean getEidMatch() { - return myEidMatch; - } - - public void setEidMatch(Boolean theEidMatch) { - if (theEidMatch == null) { - myEidMatch = Boolean.FALSE; - return; - } - myEidMatch = theEidMatch; - } - - public Boolean getNewGoldenResource() { - return myNewGoldenResource; - } - - public void setNewGoldenResource(Boolean theNewGoldenResource) { - if (theNewGoldenResource == null) { - myNewGoldenResource = Boolean.FALSE; - return; - } - myNewGoldenResource = theNewGoldenResource; - } - - public Double getScore() { - return myScore; - } - - public void setScore(Double theScore) { - myScore = theScore; - } - - public Long getRuleCount() { - return myRuleCount; - } - - public void setRuleCount(Long theRuleCount) { - myRuleCount = theRuleCount; - } - - public void setFromLink(MdmLinkJson theMdmLinkJson) { - setMdmMatchResult(theMdmLinkJson.getMatchResult()); - setMdmLinkSource(theMdmLinkJson.getLinkSource()); - setEidMatch(theMdmLinkJson.getEidMatch()); - setNewGoldenResource(theMdmLinkJson.getLinkCreatedNewResource()); - setScore(theMdmLinkJson.getScore()); - setRuleCount(theMdmLinkJson.getRuleCount()); - } - @Override public String toString() { - return "MdmLinkChangeEvent{" + - "myMdmMatchResult=" + myMdmMatchResult + - ", myMdmLinkSource=" + myMdmLinkSource + - ", myEidMatch=" + myEidMatch + - ", myNewGoldenResource=" + myNewGoldenResource + - ", myScore=" + myScore + - ", myRuleCount=" + myRuleCount + - ", myTargetResourceId='" + myTargetResourceId + '\'' + - ", myGoldenResourceId='" + myGoldenResourceId + '\'' + - ", myDuplicateGoldenResourceIds=" + myDuplicateGoldenResourceIds + + return "MdmLinkEvent{" + + "myMdmLinks=" + myMdmLinks + '}'; } } diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java index 4f13e7ac706..9047462d50f 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/model/MdmTransactionContext.java @@ -20,9 +20,13 @@ package ca.uhn.fhir.mdm.model; * #L% */ +import ca.uhn.fhir.mdm.api.IMdmLink; import ca.uhn.fhir.mdm.api.MdmLinkEvent; import ca.uhn.fhir.rest.server.TransactionLogMessages; +import java.util.ArrayList; +import java.util.List; + public class MdmTransactionContext { public enum OperationType { @@ -46,7 +50,7 @@ public class MdmTransactionContext { private String myResourceType; - private MdmLinkEvent myMdmLinkEvent = new MdmLinkEvent(); + private List myMdmLinkEvents = new ArrayList<>(); public TransactionLogMessages getTransactionLogMessages() { return myTransactionLogMessages; @@ -96,12 +100,16 @@ public class MdmTransactionContext { this.myResourceType = myResourceType; } - public MdmLinkEvent getMdmLinkEvent() { - return myMdmLinkEvent; + public List getMdmLinks() { + return myMdmLinkEvents; } - public void setMdmLinkChangeEvent(MdmLinkEvent theMdmLinkEvent) { - myMdmLinkEvent = theMdmLinkEvent; + public MdmTransactionContext addMdmLink(IMdmLink theMdmLinkEvent) { + getMdmLinks().add(theMdmLinkEvent); + return this; } + public void setMdmLinks(List theMdmLinkEvents) { + myMdmLinkEvents = theMdmLinkEvents; + } } From cdb7ffb0d3b46731155599dadcbd71abb5d884e3 Mon Sep 17 00:00:00 2001 From: Jari Maijenburg Date: Fri, 3 Sep 2021 20:38:07 +0200 Subject: [PATCH 069/143] Fixed NPE in PidToIBaseResourceProcessor --- .../fhir/jpa/batch/processor/PidToIBaseResourceProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/processor/PidToIBaseResourceProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/processor/PidToIBaseResourceProcessor.java index 20e2825e020..837c9f06e6f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/processor/PidToIBaseResourceProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/processor/PidToIBaseResourceProcessor.java @@ -69,7 +69,7 @@ public class PidToIBaseResourceProcessor implements ItemProcessor outgoing = new ArrayList<>(); sb.loadResourcesByPid(theResourcePersistentId, Collections.emptyList(), outgoing, false, null); - ourLog.trace("Loaded resources: {}", outgoing.stream().map(t->t.getIdElement().getValue()).collect(Collectors.joining(", "))); + ourLog.trace("Loaded resources: {}", outgoing.stream().filter(t -> t != null).map(t -> t.getIdElement().getValue()).collect(Collectors.joining(", "))); return outgoing; From f0a8659653aeaa3cb34f38ae22f52cbe9dfc982e Mon Sep 17 00:00:00 2001 From: Tadgh Date: Sat, 4 Sep 2021 23:55:03 -0400 Subject: [PATCH 070/143] Fix template and setup static prefix as sample --- .../ca/uhn/fhir/jpa/api/config/DaoConfig.java | 30 +++++++- .../ca/uhn/fhir/jpa/config/BaseConfig.java | 6 ++ ...asticsearchHibernatePropertiesBuilder.java | 5 +- .../IndexNamePrefixLayoutStrategy.java | 73 +++++++++++++++++++ .../ca/uhn/fhir/jpa/config/TestJPAConfig.java | 7 ++ .../ca/uhn/fhir/jpa/config/TestR4Config.java | 6 ++ .../config/TestR4ConfigWithElasticSearch.java | 5 ++ .../TestR4WithLuceneDisabledConfig.java | 1 + .../java/ca/uhn/fhir/jpa/dao/BaseJpaTest.java | 2 - ...esourceDaoR4SearchWithElasticSearchIT.java | 1 + .../uhn/fhir/jpa/test/FhirServerConfig.java | 2 - 11 files changed, 132 insertions(+), 6 deletions(-) create mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java diff --git a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java index 5304478767d..ca9b5969021 100644 --- a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java +++ b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java @@ -258,6 +258,11 @@ public class DaoConfig { private boolean myAccountForDateIndexNulls; private boolean myTriggerSubscriptionsForNonVersioningChanges; + /** + * @since 5.6.0 + */ + private String myElasicSearchIndexPrefix; + /** * @since 5.6.0 */ @@ -269,6 +274,7 @@ public class DaoConfig { private Integer myBundleBatchPoolSize = DEFAULT_BUNDLE_BATCH_POOL_SIZE; private Integer myBundleBatchMaxPoolSize = DEFAULT_BUNDLE_BATCH_MAX_POOL_SIZE; + /** * Constructor */ @@ -2643,7 +2649,29 @@ public class DaoConfig { return retval; } - public enum StoreMetaSourceInformationEnum { + /** + * + * Sets a prefix for any indexes created when interacting with elasticsearch. This will apply to fulltext search indexes + * and terminology expansion indexes. + * + * @since 5.6.0 + */ + public String getElasticSearchIndexPrefix() { + return myElasicSearchIndexPrefix; + } + + /** + * + * Sets a prefix for any indexes created when interacting with elasticsearch. This will apply to fulltext search indexes + * and terminology expansion indexes. + * + * @since 5.6.0 + */ + public void setElasticSearchIndexPrefix(String thePrefix) { + myElasicSearchIndexPrefix = thePrefix; + } + + public enum StoreMetaSourceInformationEnum { NONE(false, false), SOURCE_URI(true, false), REQUEST_ID(false, true), diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java index 2aebff2b539..0bd2e393a4a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java @@ -121,6 +121,7 @@ import ca.uhn.fhir.jpa.search.cache.DatabaseSearchCacheSvcImpl; import ca.uhn.fhir.jpa.search.cache.DatabaseSearchResultCacheSvcImpl; import ca.uhn.fhir.jpa.search.cache.ISearchCacheSvc; import ca.uhn.fhir.jpa.search.cache.ISearchResultCacheSvc; +import ca.uhn.fhir.jpa.search.elastic.IndexNamePrefixLayoutStrategy; import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc; import ca.uhn.fhir.jpa.search.reindex.ResourceReindexer; import ca.uhn.fhir.jpa.search.reindex.ResourceReindexingSvcImpl; @@ -911,6 +912,11 @@ public abstract class BaseConfig { return new PredicateBuilderFactory(theApplicationContext); } + @Bean + public IndexNamePrefixLayoutStrategy indexNamePrefixLayoutStrategy() { + return new IndexNamePrefixLayoutStrategy(); + } + @Bean public JpaResourceLoader jpaResourceLoader() { return new JpaResourceLoader(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java index c0c75adac98..165b0478489 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java @@ -99,6 +99,9 @@ public class ElasticsearchHibernatePropertiesBuilder { theProperties.put(HibernateOrmMapperSettings.AUTOMATIC_INDEXING_SYNCHRONIZATION_STRATEGY, myDebugSyncStrategy); theProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.LOG_JSON_PRETTY_PRINTING), Boolean.toString(myDebugPrettyPrintJsonLog)); + //This tells elasticsearch to use our custom index naming strategy. + theProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.LAYOUT_STRATEGY), IndexNamePrefixLayoutStrategy.class.getName()); + injectStartupTemplate(myProtocol, myRestUrl, myUsername, myPassword); } @@ -149,7 +152,7 @@ public class ElasticsearchHibernatePropertiesBuilder { */ void injectStartupTemplate(String theProtocol, String theHostAndPort, String theUsername, String thePassword) { PutIndexTemplateRequest ngramTemplate = new PutIndexTemplateRequest("ngram-template") - .patterns(Arrays.asList("resourcetable-*", "termconcept-*")) + .patterns(Arrays.asList("*resourcetable-*", "*termconcept-*")) .settings(Settings.builder().put("index.max_ngram_diff", 50)); int colonIndex = theHostAndPort.indexOf(":"); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java new file mode 100644 index 00000000000..8a5636c21b3 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java @@ -0,0 +1,73 @@ +package ca.uhn.fhir.jpa.search.elastic; + +import ca.uhn.fhir.jpa.api.config.DaoConfig; +import org.apache.commons.lang3.StringUtils; +import org.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy; +import org.hibernate.search.backend.elasticsearch.logging.impl.Log; +import org.hibernate.search.util.common.logging.impl.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.lang.invoke.MethodHandles; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * This class instructs hibernate search on how to create index names for indexed entities. + * In our case, we use this class to add an optional prefix to all indices which are created, which can be controlled via + * {@link DaoConfig#setElasticSearchIndexPrefix(String)}. + */ +@Service +public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy { + +// @Autowired +// private DaoConfig myDaoConfig; + + static final Log log = (Log) LoggerFactory.make(Log.class, MethodHandles.lookup()); + public static final String NAME = "prefix"; + public static final Pattern UNIQUE_KEY_EXTRACTION_PATTERN = Pattern.compile("(.*)-\\d{6}"); + + public String createInitialElasticsearchIndexName(String hibernateSearchIndexName) { + return addPrefixIfNecessary(hibernateSearchIndexName + "-000001"); + } + + public String createWriteAlias(String hibernateSearchIndexName) { + return addPrefixIfNecessary(hibernateSearchIndexName +"-write"); + } + + public String createReadAlias(String hibernateSearchIndexName) { + return addPrefixIfNecessary(hibernateSearchIndexName + "-read"); + } + + private String addPrefixIfNecessary(String theCandidateName) { + String myDaoConfig = "zoop"; + if (!StringUtils.isBlank(myDaoConfig)) { + return myDaoConfig + "-" + theCandidateName; + } else { + return theCandidateName; + } + } + + public String extractUniqueKeyFromHibernateSearchIndexName(String hibernateSearchIndexName) { + return hibernateSearchIndexName; + } + + public String extractUniqueKeyFromElasticsearchIndexName(String elasticsearchIndexName) { + Matcher matcher = UNIQUE_KEY_EXTRACTION_PATTERN.matcher(elasticsearchIndexName); + if (!matcher.matches()) { + throw log.invalidIndexPrimaryName(elasticsearchIndexName, UNIQUE_KEY_EXTRACTION_PATTERN); + } else { + String candidateUniqueKey= matcher.group(1); + return removePrefixIfNecessary(candidateUniqueKey); + } + } + + private String removePrefixIfNecessary(String theCandidateUniqueKey) { + String myDaoConfig = "zoop"; + if (!StringUtils.isBlank(myDaoConfig)) { + return theCandidateUniqueKey.replace(myDaoConfig+ "-", ""); + } else { + return theCandidateUniqueKey; + } + } +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestJPAConfig.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestJPAConfig.java index 6cd511805e6..c3946a7e333 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestJPAConfig.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestJPAConfig.java @@ -3,12 +3,14 @@ package ca.uhn.fhir.jpa.config; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.model.config.PartitionSettings; import ca.uhn.fhir.jpa.model.entity.ModelConfig; +import ca.uhn.fhir.jpa.search.elastic.IndexNamePrefixLayoutStrategy; import ca.uhn.fhir.jpa.subscription.SubscriptionTestUtil; import ca.uhn.fhir.jpa.subscription.channel.config.SubscriptionChannelConfig; import ca.uhn.fhir.jpa.subscription.match.config.SubscriptionProcessorConfig; import ca.uhn.fhir.jpa.subscription.match.deliver.resthook.SubscriptionDeliveringRestHookSubscriber; import ca.uhn.fhir.jpa.subscription.submit.config.SubscriptionSubmitterConfig; import ca.uhn.fhir.test.utilities.BatchJobHelper; +import org.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy; import org.springframework.batch.core.explore.JobExplorer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -31,6 +33,11 @@ public class TestJPAConfig { return new DaoConfig(); } + @Bean + public IndexNamePrefixLayoutStrategy indexNamePrefixLayoutStrategy() { + return new IndexNamePrefixLayoutStrategy(); + } + @Bean public PartitionSettings partitionSettings() { return new PartitionSettings(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java index 8d66111219b..241d4bf7b98 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java @@ -5,6 +5,7 @@ import ca.uhn.fhir.jpa.batch.api.IBatchJobSubmitter; import ca.uhn.fhir.jpa.batch.svc.BatchJobSubmitterImpl; import ca.uhn.fhir.jpa.binstore.IBinaryStorageSvc; import ca.uhn.fhir.jpa.binstore.MemoryBinaryStorageSvcImpl; +import ca.uhn.fhir.jpa.search.elastic.IndexNamePrefixLayoutStrategy; import ca.uhn.fhir.jpa.util.CircularQueueCaptureQueriesListener; import ca.uhn.fhir.jpa.util.CurrentThreadCaptureQueriesListener; import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor; @@ -14,6 +15,7 @@ import net.ttddyy.dsproxy.listener.logging.SLF4JLogLevel; import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder; import org.apache.commons.dbcp2.BasicDataSource; import org.hibernate.dialect.H2Dialect; +import org.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -148,6 +150,10 @@ public class TestR4Config extends BaseJavaConfigR4 { return retVal; } + @Bean + public IndexLayoutStrategy indexPrefixLayout() { + return new IndexNamePrefixLayoutStrategy(); + } @Bean public Properties jpaProperties() { Properties extraProperties = new Properties(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticSearch.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticSearch.java index 81a5bc6a293..e5fbd33786b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticSearch.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticSearch.java @@ -1,11 +1,16 @@ package ca.uhn.fhir.jpa.config; +import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.search.elastic.ElasticsearchHibernatePropertiesBuilder; +import ca.uhn.fhir.jpa.search.elastic.IndexNamePrefixLayoutStrategy; import ca.uhn.fhir.jpa.search.lastn.config.TestElasticsearchContainerHelper; +import org.h2.index.Index; import org.hibernate.search.backend.elasticsearch.index.IndexStatus; +import org.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy; import org.hibernate.search.mapper.orm.schema.management.SchemaManagementStrategyName; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.testcontainers.elasticsearch.ElasticsearchContainer; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4WithLuceneDisabledConfig.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4WithLuceneDisabledConfig.java index f0e4fc6f0b3..046563d8027 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4WithLuceneDisabledConfig.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4WithLuceneDisabledConfig.java @@ -3,6 +3,7 @@ package ca.uhn.fhir.jpa.config; import java.util.Properties; import org.hibernate.dialect.H2Dialect; +import org.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy; import org.hibernate.search.backend.lucene.cfg.LuceneBackendSettings; import org.hibernate.search.engine.cfg.BackendSettings; import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseJpaTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseJpaTest.java index 03f223efa2d..3a33c57abdd 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseJpaTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseJpaTest.java @@ -721,6 +721,4 @@ public abstract class BaseJpaTest extends BaseTest { } Thread.sleep(500); } - - } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java index 79904f2d15f..263e99760fb 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java @@ -106,6 +106,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest { @BeforeEach public void beforePurgeDatabase() { purgeDatabase(myDaoConfig, mySystemDao, myResourceReindexingSvc, mySearchCoordinatorSvc, mySearchParamRegistry, myBulkDataExportSvc); + myDaoConfig.setElasticSearchIndexPrefix("ZOOP"); } @Override diff --git a/hapi-fhir-testpage-overlay/src/test/java/ca/uhn/fhir/jpa/test/FhirServerConfig.java b/hapi-fhir-testpage-overlay/src/test/java/ca/uhn/fhir/jpa/test/FhirServerConfig.java index abed389fb35..baf895604f9 100644 --- a/hapi-fhir-testpage-overlay/src/test/java/ca/uhn/fhir/jpa/test/FhirServerConfig.java +++ b/hapi-fhir-testpage-overlay/src/test/java/ca/uhn/fhir/jpa/test/FhirServerConfig.java @@ -18,6 +18,4 @@ public class FhirServerConfig { DaoConfig retVal = new DaoConfig(); return retVal; } - - } From 710fb3bd8951c0649d1f27dc1f6760b6fd8535fa Mon Sep 17 00:00:00 2001 From: Tadgh Date: Sun, 5 Sep 2021 00:04:13 -0400 Subject: [PATCH 071/143] wip --- .../java/ca/uhn/fhir/jpa/config/BaseConfig.java | 2 +- .../elastic/IndexNamePrefixLayoutStrategy.java | 15 +++++++-------- .../jpa/config/TestR4ConfigWithElasticSearch.java | 1 + 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java index 0bd2e393a4a..7416f1c564c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java @@ -913,7 +913,7 @@ public abstract class BaseConfig { } @Bean - public IndexNamePrefixLayoutStrategy indexNamePrefixLayoutStrategy() { + public IndexNamePrefixLayoutStrategy indexLayoutStrategy() { return new IndexNamePrefixLayoutStrategy(); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java index 8a5636c21b3..9f5f48f37af 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java @@ -20,8 +20,8 @@ import java.util.regex.Pattern; @Service public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy { -// @Autowired -// private DaoConfig myDaoConfig; + @Autowired + private DaoConfig myDaoConfig; static final Log log = (Log) LoggerFactory.make(Log.class, MethodHandles.lookup()); public static final String NAME = "prefix"; @@ -40,9 +40,9 @@ public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy { } private String addPrefixIfNecessary(String theCandidateName) { - String myDaoConfig = "zoop"; - if (!StringUtils.isBlank(myDaoConfig)) { - return myDaoConfig + "-" + theCandidateName; + + if (!StringUtils.isBlank(myDaoConfig.getElasticSearchIndexPrefix())) { + return myDaoConfig.getElasticSearchIndexPrefix() + "-" + theCandidateName; } else { return theCandidateName; } @@ -63,9 +63,8 @@ public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy { } private String removePrefixIfNecessary(String theCandidateUniqueKey) { - String myDaoConfig = "zoop"; - if (!StringUtils.isBlank(myDaoConfig)) { - return theCandidateUniqueKey.replace(myDaoConfig+ "-", ""); + if (!StringUtils.isBlank(myDaoConfig.getElasticSearchIndexPrefix())) { + return theCandidateUniqueKey.replace(myDaoConfig.getElasticSearchIndexPrefix() + "-", ""); } else { return theCandidateUniqueKey; } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticSearch.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticSearch.java index e5fbd33786b..2e358abe4ec 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticSearch.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticSearch.java @@ -13,6 +13,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.DependsOn; import org.testcontainers.elasticsearch.ElasticsearchContainer; import javax.annotation.PreDestroy; From ea153334fb407a658fbce7fb0da3e01490b25367 Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Mon, 6 Sep 2021 13:50:09 -0400 Subject: [PATCH 072/143] extract some methods for readability --- .../ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java | 182 +++++++++--------- .../fhir/jpa/dao/BaseHapiFhirResourceDao.java | 5 +- 2 files changed, 95 insertions(+), 92 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java index 387babd3eda..a9e44d26aec 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java @@ -618,49 +618,7 @@ public abstract class BaseHapiFhirDao extends BaseStora skipUpdatingTags |= myConfig.getTagStorageMode() == DaoConfig.TagStorageModeEnum.INLINE; if (!skipUpdatingTags) { - Set allDefs = new HashSet<>(); - Set allTagsOld = getAllTagDefinitions(theEntity); - - if (theResource instanceof IResource) { - extractTagsHapi(theTransactionDetails, (IResource) theResource, theEntity, allDefs); - } else { - extractTagsRi(theTransactionDetails, (IAnyResource) theResource, theEntity, allDefs); - } - - RuntimeResourceDefinition def = myContext.getResourceDefinition(theResource); - if (def.isStandardType() == false) { - String profile = def.getResourceProfile(""); - if (isNotBlank(profile)) { - TagDefinition profileDef = getTagOrNull(theTransactionDetails, TagTypeEnum.PROFILE, NS_JPA_PROFILE, profile, null); - - ResourceTag tag = theEntity.addTag(profileDef); - allDefs.add(tag); - theEntity.setHasTags(true); - } - } - - Set allTagsNew = getAllTagDefinitions(theEntity); - Set allDefsPresent = new HashSet<>(); - allTagsNew.forEach(tag -> { - - // Don't keep duplicate tags - if (!allDefsPresent.add(tag.getTag())) { - theEntity.getTags().remove(tag); - } - - // Drop any tags that have been removed - if (!allDefs.contains(tag)) { - if (shouldDroppedTagBeRemovedOnUpdate(theRequest, tag)) { - theEntity.getTags().remove(tag); - } - } - - }); - - if (!allTagsOld.equals(allTagsNew)) { - changed = true; - } - theEntity.setHasTags(!allTagsNew.isEmpty()); + changed |= updateTags(theTransactionDetails, theRequest, theResource, theEntity); } } else { @@ -669,7 +627,7 @@ public abstract class BaseHapiFhirDao extends BaseStora encoding = ResourceEncodingEnum.DEL; } - if (thePerformIndexing && changed == false) { + if (thePerformIndexing && !changed) { if (theEntity.getId() == null) { changed = true; } else if (myConfig.isMassIngestionMode()) { @@ -701,6 +659,51 @@ public abstract class BaseHapiFhirDao extends BaseStora return retVal; } + private boolean updateTags(TransactionDetails theTransactionDetails, RequestDetails theRequest, IBaseResource theResource, ResourceTable theEntity) { + Set allDefs = new HashSet<>(); + Set allTagsOld = getAllTagDefinitions(theEntity); + + if (theResource instanceof IResource) { + extractTagsHapi(theTransactionDetails, (IResource) theResource, theEntity, allDefs); + } else { + extractTagsRi(theTransactionDetails, (IAnyResource) theResource, theEntity, allDefs); + } + + RuntimeResourceDefinition def = myContext.getResourceDefinition(theResource); + if (def.isStandardType() == false) { + String profile = def.getResourceProfile(""); + if (isNotBlank(profile)) { + TagDefinition profileDef = getTagOrNull(theTransactionDetails, TagTypeEnum.PROFILE, NS_JPA_PROFILE, profile, null); + + ResourceTag tag = theEntity.addTag(profileDef); + allDefs.add(tag); + theEntity.setHasTags(true); + } + } + + Set allTagsNew = getAllTagDefinitions(theEntity); + Set allDefsPresent = new HashSet<>(); + allTagsNew.forEach(tag -> { + + // Don't keep duplicate tags + if (!allDefsPresent.add(tag.getTag())) { + theEntity.getTags().remove(tag); + } + + // Drop any tags that have been removed + if (!allDefs.contains(tag)) { + if (shouldDroppedTagBeRemovedOnUpdate(theRequest, tag)) { + theEntity.getTags().remove(tag); + } + } + + }); + + boolean retval = !allTagsOld.equals(allTagsNew); + theEntity.setHasTags(!allTagsNew.isEmpty()); + return retval; + } + @SuppressWarnings("unchecked") private R populateResourceMetadataHapi(Class theResourceType, IBaseResourceEntity theEntity, @Nullable Collection theTagList, boolean theForHistoryOperation, IResource res, Long theVersion) { R retVal = (R) res; @@ -1288,52 +1291,8 @@ public abstract class BaseHapiFhirDao extends BaseStora postUpdate(entity, (T) theResource); } - /* - * Create history entry - */ if (theCreateNewHistoryEntry) { - boolean versionedTags = getConfig().getTagStorageMode() == DaoConfig.TagStorageModeEnum.VERSIONED; - final ResourceHistoryTable historyEntry = entity.toHistory(versionedTags); - historyEntry.setEncoding(changed.getEncoding()); - historyEntry.setResource(changed.getResource()); - - ourLog.debug("Saving history entry {}", historyEntry.getIdDt()); - myResourceHistoryTableDao.save(historyEntry); - - // Save resource source - String source = null; - String requestId = theRequest != null ? theRequest.getRequestId() : null; - if (theResource != null) { - if (myContext.getVersion().getVersion().isEqualOrNewerThan(FhirVersionEnum.R4)) { - IBaseMetaType meta = theResource.getMeta(); - source = MetaUtil.getSource(myContext, meta); - } - if (myContext.getVersion().getVersion().equals(FhirVersionEnum.DSTU3)) { - source = ((IBaseHasExtensions) theResource.getMeta()) - .getExtension() - .stream() - .filter(t -> HapiExtensions.EXT_META_SOURCE.equals(t.getUrl())) - .filter(t -> t.getValue() instanceof IPrimitiveType) - .map(t -> ((IPrimitiveType) t.getValue()).getValueAsString()) - .findFirst() - .orElse(null); - } - } - boolean haveSource = isNotBlank(source) && myConfig.getStoreMetaSourceInformation().isStoreSourceUri(); - boolean haveRequestId = isNotBlank(requestId) && myConfig.getStoreMetaSourceInformation().isStoreRequestId(); - if (haveSource || haveRequestId) { - ResourceHistoryProvenanceEntity provenance = new ResourceHistoryProvenanceEntity(); - provenance.setResourceHistoryTable(historyEntry); - provenance.setResourceTable(entity); - provenance.setPartitionId(entity.getPartitionId()); - if (haveRequestId) { - provenance.setRequestId(left(requestId, Constants.REQUEST_ID_LENGTH)); - } - if (haveSource) { - provenance.setSourceUri(source); - } - myEntityManager.persist(provenance); - } + createHistoryEntry(theRequest, theResource, entity, changed); } /* @@ -1415,6 +1374,51 @@ public abstract class BaseHapiFhirDao extends BaseStora return entity; } + private void createHistoryEntry(RequestDetails theRequest, IBaseResource theResource, ResourceTable entity, EncodedResource changed) { + boolean versionedTags = getConfig().getTagStorageMode() == DaoConfig.TagStorageModeEnum.VERSIONED; + final ResourceHistoryTable historyEntry = entity.toHistory(versionedTags); + historyEntry.setEncoding(changed.getEncoding()); + historyEntry.setResource(changed.getResource()); + + ourLog.debug("Saving history entry {}", historyEntry.getIdDt()); + myResourceHistoryTableDao.save(historyEntry); + + // Save resource source + String source = null; + String requestId = theRequest != null ? theRequest.getRequestId() : null; + if (theResource != null) { + if (myContext.getVersion().getVersion().isEqualOrNewerThan(FhirVersionEnum.R4)) { + IBaseMetaType meta = theResource.getMeta(); + source = MetaUtil.getSource(myContext, meta); + } + if (myContext.getVersion().getVersion().equals(FhirVersionEnum.DSTU3)) { + source = ((IBaseHasExtensions) theResource.getMeta()) + .getExtension() + .stream() + .filter(t -> HapiExtensions.EXT_META_SOURCE.equals(t.getUrl())) + .filter(t -> t.getValue() instanceof IPrimitiveType) + .map(t -> ((IPrimitiveType) t.getValue()).getValueAsString()) + .findFirst() + .orElse(null); + } + } + boolean haveSource = isNotBlank(source) && myConfig.getStoreMetaSourceInformation().isStoreSourceUri(); + boolean haveRequestId = isNotBlank(requestId) && myConfig.getStoreMetaSourceInformation().isStoreRequestId(); + if (haveSource || haveRequestId) { + ResourceHistoryProvenanceEntity provenance = new ResourceHistoryProvenanceEntity(); + provenance.setResourceHistoryTable(historyEntry); + provenance.setResourceTable(entity); + provenance.setPartitionId(entity.getPartitionId()); + if (haveRequestId) { + provenance.setRequestId(left(requestId, Constants.REQUEST_ID_LENGTH)); + } + if (haveSource) { + provenance.setSourceUri(source); + } + myEntityManager.persist(provenance); + } + } + private void validateIncomingResourceTypeMatchesExisting(IBaseResource theResource, ResourceTable entity) { String resourceType = myContext.getResourceType(theResource); if (!resourceType.equals(entity.getResourceType())) { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java index 2d2911b9f92..39ef8a38ca4 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java @@ -51,7 +51,6 @@ import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.jpa.patch.FhirPatch; import ca.uhn.fhir.jpa.patch.JsonPatchUtils; import ca.uhn.fhir.jpa.patch.XmlPatchUtils; -import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider; import ca.uhn.fhir.jpa.search.PersistedJpaBundleProvider; import ca.uhn.fhir.jpa.search.cache.SearchCacheStatusEnum; import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc; @@ -1407,7 +1406,7 @@ public abstract class BaseHapiFhirResourceDao extends B } } - translateSearchParams(theParams); + translateListSearchParams(theParams); notifySearchInterceptors(theParams, theRequest); @@ -1432,7 +1431,7 @@ public abstract class BaseHapiFhirResourceDao extends B return retVal; } - private void translateSearchParams(SearchParameterMap theParams) { + private void translateListSearchParams(SearchParameterMap theParams) { Iterator keyIterator = theParams.keySet().iterator(); // Translate _list=42 to _has=List:item:_id=42 From 4281648a331a54330fce7e6acb090f52bf2e6968 Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Mon, 6 Sep 2021 13:52:10 -0400 Subject: [PATCH 073/143] extract some methods for readability --- .../src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java index a9e44d26aec..b652ac2a803 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java @@ -699,9 +699,8 @@ public abstract class BaseHapiFhirDao extends BaseStora }); - boolean retval = !allTagsOld.equals(allTagsNew); theEntity.setHasTags(!allTagsNew.isEmpty()); - return retval; + return !allTagsOld.equals(allTagsNew); } @SuppressWarnings("unchecked") From a1733ed3eb1bcdd084c68cd7477f3849e0b6dc6e Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Mon, 6 Sep 2021 13:55:19 -0400 Subject: [PATCH 074/143] cleanup --- .../java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java index b652ac2a803..2b244a6e48b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java @@ -1373,11 +1373,11 @@ public abstract class BaseHapiFhirDao extends BaseStora return entity; } - private void createHistoryEntry(RequestDetails theRequest, IBaseResource theResource, ResourceTable entity, EncodedResource changed) { + private void createHistoryEntry(RequestDetails theRequest, IBaseResource theResource, ResourceTable theEntity, EncodedResource theChanged) { boolean versionedTags = getConfig().getTagStorageMode() == DaoConfig.TagStorageModeEnum.VERSIONED; - final ResourceHistoryTable historyEntry = entity.toHistory(versionedTags); - historyEntry.setEncoding(changed.getEncoding()); - historyEntry.setResource(changed.getResource()); + final ResourceHistoryTable historyEntry = theEntity.toHistory(versionedTags); + historyEntry.setEncoding(theChanged.getEncoding()); + historyEntry.setResource(theChanged.getResource()); ourLog.debug("Saving history entry {}", historyEntry.getIdDt()); myResourceHistoryTableDao.save(historyEntry); @@ -1406,8 +1406,8 @@ public abstract class BaseHapiFhirDao extends BaseStora if (haveSource || haveRequestId) { ResourceHistoryProvenanceEntity provenance = new ResourceHistoryProvenanceEntity(); provenance.setResourceHistoryTable(historyEntry); - provenance.setResourceTable(entity); - provenance.setPartitionId(entity.getPartitionId()); + provenance.setResourceTable(theEntity); + provenance.setPartitionId(theEntity.getPartitionId()); if (haveRequestId) { provenance.setRequestId(left(requestId, Constants.REQUEST_ID_LENGTH)); } From ad5d56172a1b4bab639bdf2f08a19051d6bcf25b Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 7 Sep 2021 09:11:48 -0400 Subject: [PATCH 075/143] Return 2 unused beans --- .../src/test/java/ca/uhn/fhir/jpa/config/TestJPAConfig.java | 5 ----- .../src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java | 4 ---- 2 files changed, 9 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestJPAConfig.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestJPAConfig.java index c3946a7e333..660c76e7556 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestJPAConfig.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestJPAConfig.java @@ -33,11 +33,6 @@ public class TestJPAConfig { return new DaoConfig(); } - @Bean - public IndexNamePrefixLayoutStrategy indexNamePrefixLayoutStrategy() { - return new IndexNamePrefixLayoutStrategy(); - } - @Bean public PartitionSettings partitionSettings() { return new PartitionSettings(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java index 241d4bf7b98..12c49878415 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java @@ -150,10 +150,6 @@ public class TestR4Config extends BaseJavaConfigR4 { return retVal; } - @Bean - public IndexLayoutStrategy indexPrefixLayout() { - return new IndexNamePrefixLayoutStrategy(); - } @Bean public Properties jpaProperties() { Properties extraProperties = new Properties(); From 190ca7a2b502fd6cbd2b0dab8e0819264c820c40 Mon Sep 17 00:00:00 2001 From: Jason Roberts Date: Tue, 7 Sep 2021 09:40:49 -0400 Subject: [PATCH 076/143] tests for longer chains --- .../dao/r4/ChainedContainedR4SearchTest.java | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java index 79475214145..003f68a9555 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java @@ -312,6 +312,94 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { assertThat(oids, contains(oid1.getIdPart())); } + @Test + public void testShouldResolveAFourLinkChainWhereAllResourcesStandAlone() throws Exception { + + // setup + IIdType oid1; + + { + Organization org = new Organization(); + org.setId(IdType.newRandomUuid()); + org.setName("HealthCo"); + myOrganizationDao.create(org, mySrd); + + Organization partOfOrg = new Organization(); + partOfOrg.setId(IdType.newRandomUuid()); + partOfOrg.getPartOf().setReference(org.getId()); + myOrganizationDao.create(partOfOrg, mySrd); + + Patient p = new Patient(); + p.setId(IdType.newRandomUuid()); + p.addName().setFamily("Smith").addGiven("John"); + p.getManagingOrganization().setReference(partOfOrg.getId()); + myPatientDao.create(p, mySrd); + + Observation obs = new Observation(); + obs.getCode().setText("Observation 1"); + obs.getSubject().setReference(p.getId()); + + oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); + + ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); + } + + String url = "/Observation?subject.organization.partof.name=HealthCo"; + + // execute + myCaptureQueriesListener.clear(); + List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); + ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + + // validate + assertEquals(1L, oids.size()); + assertThat(oids, contains(oid1.getIdPart())); + } + + @Test + public void testShouldResolveAFourLinkChainWhereTheLastReferenceIsContained() throws Exception { + + // setup + IIdType oid1; + + { + Organization org = new Organization(); + org.setId("parent"); + org.setName("HealthCo"); + + Organization partOfOrg = new Organization(); + partOfOrg.setId(IdType.newRandomUuid()); + partOfOrg.getContained().add(org); + partOfOrg.getPartOf().setReference("#parent"); + myOrganizationDao.create(partOfOrg, mySrd); + + Patient p = new Patient(); + p.setId(IdType.newRandomUuid()); + p.addName().setFamily("Smith").addGiven("John"); + p.getManagingOrganization().setReference(partOfOrg.getId()); + myPatientDao.create(p, mySrd); + + Observation obs = new Observation(); + obs.getCode().setText("Observation 1"); + obs.getSubject().setReference(p.getId()); + + oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); + + ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); + } + + String url = "/Observation?subject.organization.partof.name=HealthCo"; + + // execute + myCaptureQueriesListener.clear(); + List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); + ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + + // validate + assertEquals(1L, oids.size()); + assertThat(oids, contains(oid1.getIdPart())); + } + private List searchAndReturnUnqualifiedVersionlessIdValues(String theUrl) throws IOException { List ids = new ArrayList<>(); From ca2a1ff9dfe982cac472dc13d6ea2d7528493f2f Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 7 Sep 2021 10:08:17 -0400 Subject: [PATCH 077/143] Add HsTest replicating boot failure --- .../ca/uhn/fhir/jpa/config/TestR4Config.java | 11 +- .../ca/uhn/fhir/jpa/dao/r4/DummyConfig.java | 117 ++++++++++++++++++ ...esourceDaoR4SearchWithElasticSearchIT.java | 8 +- .../java/ca/uhn/fhir/jpa/dao/r4/HsTest.java | 19 +++ 4 files changed, 150 insertions(+), 5 deletions(-) create mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/DummyConfig.java create mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/HsTest.java diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java index 12c49878415..2f70b366993 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java @@ -1,11 +1,11 @@ package ca.uhn.fhir.jpa.config; +import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.batch.BatchJobsConfig; import ca.uhn.fhir.jpa.batch.api.IBatchJobSubmitter; import ca.uhn.fhir.jpa.batch.svc.BatchJobSubmitterImpl; import ca.uhn.fhir.jpa.binstore.IBinaryStorageSvc; import ca.uhn.fhir.jpa.binstore.MemoryBinaryStorageSvcImpl; -import ca.uhn.fhir.jpa.search.elastic.IndexNamePrefixLayoutStrategy; import ca.uhn.fhir.jpa.util.CircularQueueCaptureQueriesListener; import ca.uhn.fhir.jpa.util.CurrentThreadCaptureQueriesListener; import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor; @@ -15,7 +15,7 @@ import net.ttddyy.dsproxy.listener.logging.SLF4JLogLevel; import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder; import org.apache.commons.dbcp2.BasicDataSource; import org.hibernate.dialect.H2Dialect; -import org.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy; +import org.hibernate.jpa.HibernatePersistenceProvider; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -140,10 +140,15 @@ public class TestR4Config extends BaseJavaConfigR4 { return new SingleQueryCountHolder(); } + @Override @Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + LocalContainerEntityManagerFactoryBean retVal = new HapiFhirLocalContainerEntityManagerFactoryBean(); + configureEntityManagerFactory(retVal, fhirContext()); + retVal.setJpaDialect(new HapiFhirHibernateJpaDialect(fhirContext().getLocalizer())); + retVal.setPackagesToScan("ca.uhn.fhir.jpa.model.entity", "ca.uhn.fhir.jpa.entity"); + retVal.setPersistenceProvider(new HibernatePersistenceProvider()); retVal.setPersistenceUnitName("PU_HapiFhirJpaR4"); retVal.setDataSource(dataSource()); retVal.setJpaProperties(jpaProperties()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/DummyConfig.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/DummyConfig.java new file mode 100644 index 00000000000..9bb8ae2fb7c --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/DummyConfig.java @@ -0,0 +1,117 @@ +package ca.uhn.fhir.jpa.dao.r4; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.config.BlockLargeNumbersOfParamsListener; +import ca.uhn.fhir.jpa.config.HapiFhirHibernateJpaDialect; +import ca.uhn.fhir.jpa.config.HapiFhirLocalContainerEntityManagerFactoryBean; +import ca.uhn.fhir.jpa.search.elastic.HapiElasticsearchAnalysisConfigurer; +import ca.uhn.fhir.jpa.search.elastic.IndexNamePrefixLayoutStrategy; +import ca.uhn.fhir.jpa.search.lastn.config.TestElasticsearchContainerHelper; +import ca.uhn.fhir.jpa.util.CurrentThreadCaptureQueriesListener; +import net.ttddyy.dsproxy.listener.logging.SLF4JLogLevel; +import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder; +import org.apache.commons.dbcp2.BasicDataSource; +import org.hibernate.dialect.H2Dialect; +import org.hibernate.jpa.HibernatePersistenceProvider; +import org.hibernate.search.backend.elasticsearch.cfg.ElasticsearchBackendSettings; +import org.hibernate.search.backend.elasticsearch.cfg.ElasticsearchIndexSettings; +import org.hibernate.search.backend.elasticsearch.index.IndexStatus; +import org.hibernate.search.engine.cfg.BackendSettings; +import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings; +import org.hibernate.search.mapper.orm.schema.management.SchemaManagementStrategyName; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; +import org.testcontainers.elasticsearch.ElasticsearchContainer; + +import javax.sql.DataSource; +import java.util.Properties; +import java.util.concurrent.TimeUnit; + +@Configuration +public class DummyConfig { + + @Bean + public DaoConfig daoConfig() { + return new DaoConfig(); + } + + @Bean + public IndexNamePrefixLayoutStrategy indexNamePrefixLayoutStrategy() { + return new IndexNamePrefixLayoutStrategy(); + } + @Bean + public FhirContext fhirContext() { + return FhirContext.forR4(); + } + + @Bean + public LocalContainerEntityManagerFactoryBean entityManagerFactory() { + LocalContainerEntityManagerFactoryBean retVal = new HapiFhirLocalContainerEntityManagerFactoryBean(); + retVal.setJpaDialect(new HapiFhirHibernateJpaDialect(fhirContext().getLocalizer())); + retVal.setPackagesToScan("ca.uhn.fhir.jpa.model.entity", "ca.uhn.fhir.jpa.entity"); + retVal.setPersistenceProvider(new HibernatePersistenceProvider()); + retVal.setPersistenceUnitName("PU_HapiFhirJpaR4"); + retVal.setDataSource(dataSource()); + retVal.setJpaProperties(jpaProperties()); + return retVal; + } + @Bean + public DataSource dataSource() { + BasicDataSource retVal = new BasicDataSource(); + retVal.setDriver(new org.h2.Driver()); + retVal.setUrl("jdbc:h2:mem:testdb_r4"); + retVal.setMaxWaitMillis(30000); + retVal.setUsername(""); + retVal.setPassword(""); + retVal.setMaxTotal(5); + + SLF4JLogLevel level = SLF4JLogLevel.INFO; + DataSource dataSource = ProxyDataSourceBuilder + .create(retVal) + .logSlowQueryBySlf4j(10, TimeUnit.SECONDS, level) + .beforeQuery(new BlockLargeNumbersOfParamsListener()) + .afterQuery(new CurrentThreadCaptureQueriesListener()) + .build(); + + return dataSource; + } + + @Bean + public Properties jpaProperties() { + Properties extraProperties = new Properties(); + extraProperties.put("hibernate.format_sql", "false"); + extraProperties.put("hibernate.show_sql", "false"); + extraProperties.put("hibernate.hbm2ddl.auto", "update"); + extraProperties.put("hibernate.dialect", H2Dialect.class.getName()); + //Override default lucene settings + // Force elasticsearch to start first + int httpPort = elasticContainer().getMappedPort(9200);//9200 is the HTTP port + String host = elasticContainer().getHost(); + // the below properties are used for ElasticSearch integration + extraProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "elasticsearch"); + extraProperties.put(BackendSettings.backendKey(ElasticsearchIndexSettings.ANALYSIS_CONFIGURER), HapiElasticsearchAnalysisConfigurer.class.getName()); + extraProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.HOSTS), host + ":" + httpPort); + extraProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.PROTOCOL), "http"); + extraProperties.put(HibernateOrmMapperSettings.SCHEMA_MANAGEMENT_STRATEGY, SchemaManagementStrategyName.CREATE.externalRepresentation()); + extraProperties.put(BackendSettings.backendKey(ElasticsearchIndexSettings.SCHEMA_MANAGEMENT_MINIMAL_REQUIRED_STATUS_WAIT_TIMEOUT), Long.toString(10000)); + extraProperties.put(BackendSettings.backendKey(ElasticsearchIndexSettings.SCHEMA_MANAGEMENT_MINIMAL_REQUIRED_STATUS), IndexStatus.YELLOW.externalRepresentation()); + // Need the mapping to be dynamic because of terminology indexes. + extraProperties.put(BackendSettings.backendKey(ElasticsearchIndexSettings.DYNAMIC_MAPPING), "true"); + // Only for unit tests + extraProperties.put(HibernateOrmMapperSettings.AUTOMATIC_INDEXING_SYNCHRONIZATION_STRATEGY, "read-sync"); + extraProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.LOG_JSON_PRETTY_PRINTING), Boolean.toString(true)); + + //This tells elasticsearch to use our custom index naming strategy. + extraProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.LAYOUT_STRATEGY), IndexNamePrefixLayoutStrategy.class.getName()); + return extraProperties; + } + + @Bean + public ElasticsearchContainer elasticContainer() { + ElasticsearchContainer embeddedElasticSearch = TestElasticsearchContainerHelper.getEmbeddedElasticSearch(); + embeddedElasticSearch.start(); + return embeddedElasticSearch; + } +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java index 263e99760fb..32bf359a0d6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java @@ -9,11 +9,15 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.Properties; import java.util.stream.Collectors; import ca.uhn.fhir.context.support.ValueSetExpansionOptions; +import ca.uhn.fhir.jpa.search.elastic.ElasticsearchHibernatePropertiesBuilder; import ca.uhn.fhir.test.utilities.docker.RequiresDocker; import org.hamcrest.Matchers; +import org.hibernate.search.backend.elasticsearch.index.IndexStatus; +import org.hibernate.search.mapper.orm.schema.management.SchemaManagementStrategyName; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.CodeSystem; @@ -28,6 +32,8 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -342,6 +348,4 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest { } - - } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/HsTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/HsTest.java new file mode 100644 index 00000000000..23fffb8a252 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/HsTest.java @@ -0,0 +1,19 @@ +package ca.uhn.fhir.jpa.dao.r4; + +import ca.uhn.fhir.test.utilities.docker.RequiresDocker; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit.jupiter.SpringExtension; + +@RequiresDocker +@ExtendWith(SpringExtension.class) +@ContextConfiguration(classes = {DummyConfig.class}) +public class HsTest { + + @Test + public void test() { + System.out.println("zoop"); + } + +} From 010628fa86094000f3bda8b166d212bbd29ef31b Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Tue, 7 Sep 2021 11:24:37 -0400 Subject: [PATCH 078/143] Added asserts --- .../fhir/jpa/mdm/interceptor/MdmEventIT.java | 17 ++++++++++++++--- .../java/ca/uhn/fhir/mdm/api/MdmLinkJson.java | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmEventIT.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmEventIT.java index 39ec89b4c7d..cafbdebbff2 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmEventIT.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/interceptor/MdmEventIT.java @@ -80,7 +80,19 @@ public class MdmEventIT extends BaseMdmR4Test { MdmLinkEvent linkChangeEvent = myMdmHelper.getAfterMdmLatch().getLatchInvocationParameterOfType(MdmLinkEvent.class); assertNotNull(linkChangeEvent); - // MdmTransactionContext ctx = myMdmMatchLinkSvc.updateMdmLinksForMdmSource(patient2, createContextForUpdate(patient2.getIdElement().getResourceType())); + ourLog.info("Got event: {}", linkChangeEvent); + + long expectTwoPossibleMatchesForPatientTwo = linkChangeEvent.getMdmLinks() + .stream() + .filter(l -> l.getSourceId().equals(patient2.getIdElement().toVersionless().getValueAsString()) && l.getMatchResult() == MdmMatchResultEnum.POSSIBLE_MATCH) + .count(); + assertEquals(2, expectTwoPossibleMatchesForPatientTwo); + + long expectOnePossibleDuplicate = linkChangeEvent.getMdmLinks() + .stream() + .filter(l -> l.getMatchResult() == MdmMatchResultEnum.POSSIBLE_DUPLICATE) + .count(); + assertEquals(1, expectOnePossibleDuplicate); List mdmLinkEvent = linkChangeEvent.getMdmLinks(); assertEquals(3, mdmLinkEvent.size()); @@ -122,10 +134,9 @@ public class MdmEventIT extends BaseMdmR4Test { assertEquals(1, linkChangeEvent.getMdmLinks().size()); MdmLinkJson link = linkChangeEvent.getMdmLinks().get(0); - assertEquals(patient1.getResourceType() + "/" + patient1.getIdElement().getIdPart(), link.getSourceId()); + assertEquals(patient1.getIdElement().toVersionless().getValueAsString(), link.getSourceId()); assertEquals(getLinkByTargetId(patient1).getGoldenResourcePid(), new IdDt(link.getGoldenResourceId()).getIdPartAsLong()); assertEquals(MdmMatchResultEnum.MATCH, link.getMatchResult()); } - } diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkJson.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkJson.java index 424298418b4..d21f8deada6 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkJson.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmLinkJson.java @@ -175,4 +175,22 @@ public class MdmLinkJson implements IModelJson { public void setRuleCount(Long theRuleCount) { myRuleCount = theRuleCount; } + + @Override + public String toString() { + return "MdmLinkJson{" + + "myGoldenResourceId='" + myGoldenResourceId + '\'' + + ", mySourceId='" + mySourceId + '\'' + + ", myMatchResult=" + myMatchResult + + ", myLinkSource=" + myLinkSource + + ", myCreated=" + myCreated + + ", myUpdated=" + myUpdated + + ", myVersion='" + myVersion + '\'' + + ", myEidMatch=" + myEidMatch + + ", myLinkCreatedNewResource=" + myLinkCreatedNewResource + + ", myVector=" + myVector + + ", myScore=" + myScore + + ", myRuleCount=" + myRuleCount + + '}'; + } } From 69287b6bc3d9307ac8201e9cfcdb762f387412c3 Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Tue, 7 Sep 2021 11:52:11 -0400 Subject: [PATCH 079/143] issue-2901 review fixes - moving methods to idhelperservice --- .../fhir/jpa/api/dao/IFhirResourceDao.java | 9 - .../ca/uhn/fhir/jpa/config/BaseConfig.java | 7 - .../jpa/dao/AutoVersioningServiceImpl.java | 44 ---- .../fhir/jpa/dao/BaseHapiFhirResourceDao.java | 49 ----- .../ca/uhn/fhir/jpa/dao/BaseStorageDao.java | 5 +- .../jpa/dao/BaseTransactionProcessor.java | 9 +- .../fhir/jpa/dao/IAutoVersioningService.java | 25 --- .../fhir/jpa/dao/index/IdHelperService.java | 89 ++++++++ .../dao/AutoVersioningServiceImplTests.java | 97 --------- .../jpa/dao/BaseHapiFhirResourceDaoTest.java | 166 -------------- .../jpa/dao/TransactionProcessorTest.java | 2 - .../jpa/dao/index/IdHelperServiceTest.java | 204 +++++++++++++++++- .../ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java | 3 - 13 files changed, 300 insertions(+), 409 deletions(-) delete mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java delete mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java delete mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java diff --git a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java index 065149eef76..577faa0aee5 100644 --- a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java +++ b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java @@ -162,15 +162,6 @@ public interface IFhirResourceDao extends IDao { */ T read(IIdType theId); - /** - * Helper method to determine if some resources exist in the DB (without throwing). - * Returns a set that contains the IIdType for every resource found. - * If it's not found, it won't be included in the set. - * @param theIds - list of IIdType ids (for the same resource) - * @return - */ - Map getIdsOfExistingResources(RequestPartitionId partitionId, Collection theIds); - /** * Read a resource by its internal PID */ diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java index fb58b1912e0..2aebff2b539 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java @@ -27,11 +27,9 @@ import ca.uhn.fhir.jpa.bulk.imprt.api.IBulkDataImportSvc; import ca.uhn.fhir.jpa.bulk.imprt.svc.BulkDataImportSvcImpl; import ca.uhn.fhir.jpa.cache.IResourceVersionSvc; import ca.uhn.fhir.jpa.cache.ResourceVersionSvcDaoImpl; -import ca.uhn.fhir.jpa.dao.AutoVersioningServiceImpl; import ca.uhn.fhir.jpa.dao.DaoSearchParamProvider; import ca.uhn.fhir.jpa.dao.HistoryBuilder; import ca.uhn.fhir.jpa.dao.HistoryBuilderFactory; -import ca.uhn.fhir.jpa.dao.IAutoVersioningService; import ca.uhn.fhir.jpa.dao.ISearchBuilder; import ca.uhn.fhir.jpa.dao.LegacySearchBuilder; import ca.uhn.fhir.jpa.dao.MatchResourceUrlService; @@ -232,11 +230,6 @@ public abstract class BaseConfig { public void initSettings() { } - @Bean - public IAutoVersioningService autoVersioningService() { - return new AutoVersioningServiceImpl(); - } - public void setSearchCoordCorePoolSize(Integer searchCoordCorePoolSize) { this.searchCoordCorePoolSize = searchCoordCorePoolSize; } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java deleted file mode 100644 index 151c9eb1191..00000000000 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -package ca.uhn.fhir.jpa.dao; - -import ca.uhn.fhir.interceptor.model.RequestPartitionId; -import ca.uhn.fhir.jpa.api.dao.DaoRegistry; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; -import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; -import org.hl7.fhir.instance.model.api.IIdType; -import org.springframework.beans.factory.annotation.Autowired; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class AutoVersioningServiceImpl implements IAutoVersioningService { - - @Autowired - private DaoRegistry myDaoRegistry; - - @Override - public Map getExistingAutoversionsForIds(RequestPartitionId theRequestPartitionId, Collection theIds) { - HashMap idToPID = new HashMap<>(); - HashMap> resourceTypeToIds = new HashMap<>(); - - for (IIdType id : theIds) { - String resourceType = id.getResourceType(); - if (!resourceTypeToIds.containsKey(resourceType)) { - resourceTypeToIds.put(resourceType, new ArrayList<>()); - } - resourceTypeToIds.get(resourceType).add(id); - } - - for (String resourceType : resourceTypeToIds.keySet()) { - IFhirResourceDao dao = myDaoRegistry.getResourceDao(resourceType); - - Map idAndPID = dao.getIdsOfExistingResources(theRequestPartitionId, - resourceTypeToIds.get(resourceType)); - idToPID.putAll(idAndPID); - } - - return idToPID; - } -} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java index 8a19b774710..458c728c62e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java @@ -1158,55 +1158,6 @@ public abstract class BaseHapiFhirResourceDao extends B return myTransactionService.execute(theRequest, transactionDetails, tx -> doRead(theId, theRequest, theDeletedOk)); } - @Override - public Map getIdsOfExistingResources(RequestPartitionId thePartitionId, - Collection theIds) { - // these are the found Ids that were in the db - HashMap collected = new HashMap<>(); - - if (theIds == null || theIds.isEmpty()) { - return collected; - } - - List resourcePersistentIds = myIdHelperService.resolveResourcePersistentIdsWithCache(thePartitionId, - theIds.stream().collect(Collectors.toList())); - - // we'll use this map to fetch pids that require versions - HashMap pidsToVersionToResourcePid = new HashMap<>(); - - // fill in our map - for (ResourcePersistentId pid : resourcePersistentIds) { - if (pid.getVersion() == null) { - pidsToVersionToResourcePid.put(pid.getIdAsLong(), pid); - } - Optional idOp = theIds.stream() - .filter(i -> i.getIdPart().equals(pid.getAssociatedResourceId().getIdPart())) - .findFirst(); - // this should always be present - // since it was passed in. - // but land of optionals... - idOp.ifPresent(id -> { - collected.put(id, pid); - }); - } - - // set any versions we don't already have - if (!pidsToVersionToResourcePid.isEmpty()) { - Collection resourceEntries = myResourceTableDao - .getResourceVersionsForPid(new ArrayList<>(pidsToVersionToResourcePid.keySet())); - - for (Object[] record : resourceEntries) { - // order matters! - Long retPid = (Long)record[0]; - String resType = (String)record[1]; - Long version = (Long)record[2]; - pidsToVersionToResourcePid.get(retPid).setVersion(version); - } - } - - return collected; - } - public T doRead(IIdType theId, RequestDetails theRequest, boolean theDeletedOk) { assert TransactionSynchronizationManager.isActualTransactionActive(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java index 6df1d8fe44d..58aeae432ca 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java @@ -30,6 +30,7 @@ import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.api.model.LazyDaoMethodOutcome; +import ca.uhn.fhir.jpa.dao.index.IdHelperService; import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.model.entity.ResourceTable; @@ -93,7 +94,7 @@ public abstract class BaseStorageDao { @Autowired protected ModelConfig myModelConfig; @Autowired - protected IAutoVersioningService myAutoVersioningService; + protected IdHelperService myIdHelperService; @Autowired protected DaoConfig myDaoConfig; @@ -210,7 +211,7 @@ public abstract class BaseStorageDao { IIdType referenceElement = nextReference.getReferenceElement(); if (!referenceElement.hasBaseUrl()) { - Map idToPID = myAutoVersioningService.getExistingAutoversionsForIds(RequestPartitionId.allPartitions(), + Map idToPID = myIdHelperService.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), Collections.singletonList(referenceElement) ); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index f8db7e92b11..d554b645514 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -35,6 +35,7 @@ import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.api.model.DeleteConflict; import ca.uhn.fhir.jpa.api.model.DeleteConflictList; import ca.uhn.fhir.jpa.api.model.DeleteMethodOutcome; +import ca.uhn.fhir.jpa.dao.index.IdHelperService; import ca.uhn.fhir.jpa.dao.tx.HapiTransactionService; import ca.uhn.fhir.jpa.delete.DeleteConflictService; import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; @@ -159,7 +160,7 @@ public abstract class BaseTransactionProcessor { private TaskExecutor myExecutor ; @Autowired - private IAutoVersioningService myAutoVersioningService; + private IdHelperService myIdHelperService; @VisibleForTesting public void setDaoConfig(DaoConfig theDaoConfig) { @@ -696,7 +697,7 @@ public abstract class BaseTransactionProcessor { * * @param theEntries */ - private void consolidateDuplicateConditionalCreates(List theEntries) { + private void consolidateDuplicateConditionals(List theEntries) { final HashMap keyToUuid = new HashMap<>(); for (int index = 0, originalIndex = 0; index < theEntries.size(); index++, originalIndex++) { IBase nextReqEntry = theEntries.get(index); @@ -832,7 +833,7 @@ public abstract class BaseTransactionProcessor { /* * Look for duplicate conditional creates and consolidate them */ - consolidateDuplicateConditionalCreates(theEntries); + consolidateDuplicateConditionals(theEntries); /* * Loop through the request and process any entries of type @@ -1270,7 +1271,7 @@ public abstract class BaseTransactionProcessor { // get a map of // existing ids -> PID (for resources that exist in the DB) // should this be allPartitions? - Map idToPID = myAutoVersioningService.getExistingAutoversionsForIds(RequestPartitionId.allPartitions(), + Map idToPID = myIdHelperService.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), theReferencesToAutoVersion.stream() .map(ref -> ref.getReferenceElement()).collect(Collectors.toList())); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java deleted file mode 100644 index 80d327eb2d0..00000000000 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IAutoVersioningService.java +++ /dev/null @@ -1,25 +0,0 @@ -package ca.uhn.fhir.jpa.dao; - -import ca.uhn.fhir.interceptor.model.RequestPartitionId; -import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; -import org.hl7.fhir.instance.model.api.IIdType; - -import java.util.Collection; -import java.util.Map; - -public interface IAutoVersioningService { - /** - * Takes in a list of IIdType and returns a map of - * IIdType -> ResourcePersistentId. - * ResourcePersistentId will contain the history version - * but the returned IIdType will not (this is to allow consumers - * to use their passed in IIdType as a lookup value). - * - * If the returned map does not return an IIdType -> ResourcePersistentId - * then it means that it is a non-existing resource in the DB - * @param theIds - * @param thePartitionId - the partition id - * @return - */ - Map getExistingAutoversionsForIds(RequestPartitionId thePartitionId, Collection theIds); -} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java index b667e3a1375..03763d40a0f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java @@ -530,6 +530,95 @@ public class IdHelperService { return retVal; } + /** + * Helper method to determine if some resources exist in the DB (without throwing). + * Returns a set that contains the IIdType for every resource found. + * If it's not found, it won't be included in the set. + * @param theIds - list of IIdType ids (for the same resource) + * @return + */ + private Map getIdsOfExistingResources(RequestPartitionId thePartitionId, + Collection theIds) { + // these are the found Ids that were in the db + HashMap collected = new HashMap<>(); + + if (theIds == null || theIds.isEmpty()) { + return collected; + } + + List resourcePersistentIds = resolveResourcePersistentIdsWithCache(thePartitionId, + theIds.stream().collect(Collectors.toList())); + + // we'll use this map to fetch pids that require versions + HashMap pidsToVersionToResourcePid = new HashMap<>(); + + // fill in our map + for (ResourcePersistentId pid : resourcePersistentIds) { + if (pid.getVersion() == null) { + pidsToVersionToResourcePid.put(pid.getIdAsLong(), pid); + } + Optional idOp = theIds.stream() + .filter(i -> i.getIdPart().equals(pid.getAssociatedResourceId().getIdPart())) + .findFirst(); + // this should always be present + // since it was passed in. + // but land of optionals... + idOp.ifPresent(id -> { + collected.put(id, pid); + }); + } + + // set any versions we don't already have + if (!pidsToVersionToResourcePid.isEmpty()) { + Collection resourceEntries = myResourceTableDao + .getResourceVersionsForPid(new ArrayList<>(pidsToVersionToResourcePid.keySet())); + + for (Object[] record : resourceEntries) { + // order matters! + Long retPid = (Long)record[0]; + String resType = (String)record[1]; + Long version = (Long)record[2]; + pidsToVersionToResourcePid.get(retPid).setVersion(version); + } + } + + return collected; + } + + /** + * Retrieves the latest versions for any resourceid that are found. + * If they are not found, they will not be contained in the returned map. + * The key should be the same value that was passed in to allow + * consumer to look up the value using the id they already have. + * + * This method should not throw, so it can safely be consumed in + * transactions. + * + * @param theRequestPartitionId - request partition id + * @param theIds - list of IIdTypes for resources of interest. + * @return + */ + public Map getLatestVersionIdsForResourceIds(RequestPartitionId theRequestPartitionId, Collection theIds) { + HashMap idToPID = new HashMap<>(); + HashMap> resourceTypeToIds = new HashMap<>(); + + for (IIdType id : theIds) { + String resourceType = id.getResourceType(); + if (!resourceTypeToIds.containsKey(resourceType)) { + resourceTypeToIds.put(resourceType, new ArrayList<>()); + } + resourceTypeToIds.get(resourceType).add(id); + } + + for (String resourceType : resourceTypeToIds.keySet()) { + Map idAndPID = getIdsOfExistingResources(theRequestPartitionId, + resourceTypeToIds.get(resourceType)); + idToPID.putAll(idAndPID); + } + + return idToPID; + } + /** * @deprecated This method doesn't take a partition ID as input, so it is unsafe. It * should be reworked to include the partition ID before any new use is incorporated diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java deleted file mode 100644 index 206b6c968ec..00000000000 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/AutoVersioningServiceImplTests.java +++ /dev/null @@ -1,97 +0,0 @@ -package ca.uhn.fhir.jpa.dao; - -import ca.uhn.fhir.interceptor.model.RequestPartitionId; -import ca.uhn.fhir.jpa.api.dao.DaoRegistry; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; -import org.hl7.fhir.instance.model.api.IIdType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.junit.jupiter.MockitoExtension; - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -@ExtendWith(MockitoExtension.class) -public class AutoVersioningServiceImplTests { - - @Mock - private DaoRegistry daoRegistry; - - @InjectMocks - private AutoVersioningServiceImpl myAutoversioningService; - - @Test - public void getAutoversionsForIds_whenResourceExists_returnsMapWithPIDAndVersion() { - IIdType type = new IdDt("Patient/RED"); - ResourcePersistentId pid = new ResourcePersistentId(1); - pid.setVersion(2L); - HashMap map = new HashMap<>(); - map.put(type, pid); - - IFhirResourceDao daoMock = Mockito.mock(IFhirResourceDao.class); - Mockito.when(daoMock.getIdsOfExistingResources(Mockito.any(RequestPartitionId.class), - Mockito.anyList())) - .thenReturn(map); - Mockito.when(daoRegistry.getResourceDao(Mockito.anyString())) - .thenReturn(daoMock); - - Map retMap = myAutoversioningService.getExistingAutoversionsForIds(RequestPartitionId.allPartitions(), - Collections.singletonList(type)); - - Assertions.assertTrue(retMap.containsKey(type)); - Assertions.assertEquals(pid.getVersion(), map.get(type).getVersion()); - } - - @Test - public void getAutoversionsForIds_whenResourceDoesNotExist_returnsEmptyMap() { - IIdType type = new IdDt("Patient/RED"); - - IFhirResourceDao daoMock = Mockito.mock(IFhirResourceDao.class); - Mockito.when(daoMock.getIdsOfExistingResources(Mockito.any(RequestPartitionId.class), - Mockito.anyList())) - .thenReturn(new HashMap<>()); - Mockito.when(daoRegistry.getResourceDao(Mockito.anyString())) - .thenReturn(daoMock); - - Map retMap = myAutoversioningService.getExistingAutoversionsForIds(RequestPartitionId.allPartitions(), - Collections.singletonList(type)); - - Assertions.assertTrue(retMap.isEmpty()); - } - - @Test - public void getAutoversionsForIds_whenSomeResourcesDoNotExist_returnsOnlyExistingElements() { - IIdType type = new IdDt("Patient/RED"); - ResourcePersistentId pid = new ResourcePersistentId(1); - pid.setVersion(2L); - HashMap map = new HashMap<>(); - map.put(type, pid); - IIdType type2 = new IdDt("Patient/BLUE"); - - // when - IFhirResourceDao daoMock = Mockito.mock(IFhirResourceDao.class); - Mockito.when(daoMock.getIdsOfExistingResources(Mockito.any(RequestPartitionId.class), Mockito.anyList())) - .thenReturn(map); - Mockito.when(daoRegistry.getResourceDao(Mockito.anyString())) - .thenReturn(daoMock); - - // test - Map retMap = myAutoversioningService.getExistingAutoversionsForIds( - RequestPartitionId.allPartitions(), - Arrays.asList(type, type2) - ); - - // verify - Assertions.assertEquals(map.size(), retMap.size()); - Assertions.assertTrue(retMap.containsKey(type)); - Assertions.assertFalse(retMap.containsKey(type2)); - } -} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java index dd9cff05d3a..4936631f818 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java @@ -1,188 +1,22 @@ package ca.uhn.fhir.jpa.dao; -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.config.DaoConfig; -import ca.uhn.fhir.jpa.dao.data.IForcedIdDao; -import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; -import ca.uhn.fhir.jpa.dao.index.IdHelperService; import ca.uhn.fhir.jpa.partition.SystemRequestDetails; -import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; -import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.Request; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.junit.MockitoTestRule; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; - import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; @ExtendWith(MockitoExtension.class) class BaseHapiFhirResourceDaoTest { - // our simple concrete test class for BaseHapiFhirResourceDao - private class SimpleTestDao extends BaseHapiFhirResourceDao { - public SimpleTestDao() { - super(); - // post inject hooks - setResourceType(Patient.class); - RuntimeResourceDefinition resourceDefinition = Mockito.mock(RuntimeResourceDefinition.class); - Mockito.when(resourceDefinition.getName()).thenReturn("Patient"); - FhirContext myFhirContextMock = Mockito.mock(FhirContext.class); - Mockito.when(myFhirContextMock.getResourceDefinition(Mockito.any(Class.class))) - .thenReturn(resourceDefinition); - setContext(myFhirContextMock); - postConstruct(); - } - - } - - @InjectMocks - private BaseHapiFhirResourceDao myBaseHapiFhirResourceDao = new SimpleTestDao(); - -// @Mock -// private IForcedIdDao myIForcedIdDao; - - @Mock - private IdHelperService myIdHelperService; - - @Mock - private IResourceTableDao myResourceTableDao; - - //TODO - all other dependency mocks - - - private ResourcePersistentId getResourcePersistentIdFromResource(IIdType theId, long thePid) { - ResourcePersistentId id = new ResourcePersistentId(thePid); - String idPortion = theId.getIdPart(); - IIdType newId = new IdDt(theId.getResourceType(), idPortion); - id.setAssociatedResourceId(newId); - return id; - } - - /** - * Gets a ResourceTable record for getResourceVersionsForPid - * Order matters! - * @param resourceType - * @param pid - * @param version - * @return - */ - private Object[] getResourceTableRecordForResourceTypeAndPid(String resourceType, long pid, long version) { - return new Object[] { - pid, // long - resourceType, // string - version // long - }; - } - - @Test - public void getIdsOfExistingResources_forExistingResources_returnsMapOfIdToPIDWithVersion() { - // setup - IIdType patientIdAndType = new IdDt("Patient/RED"); - long patientPID = 1L; - long patientResourceVersion = 2L; - ResourcePersistentId pat1ResourcePID = getResourcePersistentIdFromResource(patientIdAndType, patientPID); - IIdType patient2IdAndType = new IdDt("Patient/BLUE"); - long patient2PID = 3L; - long patient2ResourceVersion = 4L; - ResourcePersistentId pat2ResourcePID = getResourcePersistentIdFromResource(patient2IdAndType, patient2PID); - List inputList = new ArrayList<>(); - inputList.add(patientIdAndType); - inputList.add(patient2IdAndType); - - Collection matches = Arrays.asList( - getResourceTableRecordForResourceTypeAndPid(patientIdAndType.getResourceType(), patientPID, patientResourceVersion), - getResourceTableRecordForResourceTypeAndPid(patient2IdAndType.getResourceType(), patient2PID, patient2ResourceVersion) - ); - - // when - Mockito.when(myIdHelperService.resolveResourcePersistentIdsWithCache(Mockito.any(RequestPartitionId.class), - Mockito.anyList())) - .thenReturn(Arrays.asList(pat1ResourcePID, pat2ResourcePID)); - Mockito.when(myResourceTableDao.getResourceVersionsForPid(Mockito.anyList())) - .thenReturn(matches); - - Map idToPIDOfExistingResources = myBaseHapiFhirResourceDao.getIdsOfExistingResources(RequestPartitionId.allPartitions(), - inputList); - - Assertions.assertEquals(inputList.size(), idToPIDOfExistingResources.size()); - Assertions.assertTrue(idToPIDOfExistingResources.containsKey(patientIdAndType)); - Assertions.assertTrue(idToPIDOfExistingResources.containsKey(patient2IdAndType)); - - Assertions.assertEquals(patientPID, idToPIDOfExistingResources.get(patientIdAndType).getIdAsLong()); - Assertions.assertEquals(patient2PID, idToPIDOfExistingResources.get(patient2IdAndType).getIdAsLong(), patient2PID); - Assertions.assertEquals(patientResourceVersion, idToPIDOfExistingResources.get(patientIdAndType).getVersion()); - Assertions.assertEquals(patient2ResourceVersion, idToPIDOfExistingResources.get(patient2IdAndType).getVersion()); - } - - @Test - public void getIdsOfExistingResources_forNonExistentResources_returnsEmptyMap() { - //setup - IIdType patient = new IdDt("Patient/RED"); - - // when - Mockito.when(myIdHelperService.resolveResourcePersistentIdsWithCache(Mockito.any(RequestPartitionId.class), - Mockito.anyList())) - .thenReturn(new ArrayList<>()); - - Map map = myBaseHapiFhirResourceDao.getIdsOfExistingResources(RequestPartitionId.allPartitions(), - Collections.singletonList(patient)); - - Assertions.assertTrue(map.isEmpty()); - } - - @Test - public void getIdsOfExistingResources_whenSomeResourcesExist_returnsOnlyExistingResourcesInMap() { - // setup - IIdType patientIdAndType = new IdDt("Patient/RED"); - long patientPID = 1L; - long patientResourceVersion = 2L; - IIdType patient2IdAndType = new IdDt("Patient/BLUE"); - List inputList = new ArrayList<>(); - inputList.add(patientIdAndType); - inputList.add(patient2IdAndType); - - // when - Mockito.when(myIdHelperService - .resolveResourcePersistentIdsWithCache(Mockito.any(RequestPartitionId.class), - Mockito.anyList())) - .thenReturn(Collections.singletonList(getResourcePersistentIdFromResource(patientIdAndType, patientPID))); - Mockito.when(myResourceTableDao.getResourceVersionsForPid(Mockito.anyList())) - .thenReturn(Collections - .singletonList(getResourceTableRecordForResourceTypeAndPid(patientIdAndType.getResourceType(), patientPID, patientResourceVersion))); - - Map map = myBaseHapiFhirResourceDao.getIdsOfExistingResources(RequestPartitionId.allPartitions(), - inputList); - - // verify - Assertions.assertFalse(map.isEmpty()); - Assertions.assertEquals(inputList.size() - 1, map.size()); - Assertions.assertTrue(map.containsKey(patientIdAndType)); - Assertions.assertFalse(map.containsKey(patient2IdAndType)); - } - - /*******************/ - TestResourceDao mySvc = new TestResourceDao(); @Test diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java index 907650ba59b..0bace079a8f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java @@ -70,8 +70,6 @@ public class TransactionProcessorTest { private MatchUrlService myMatchUrlService; @MockBean private IRequestPartitionHelperSvc myRequestPartitionHelperSvc; - @MockBean - private IAutoVersioningService myAutoVersioningService; @MockBean(answer = Answers.RETURNS_DEEP_STUBS) private SessionImpl mySession; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/IdHelperServiceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/IdHelperServiceTest.java index 20e100065f1..ad9fbc78c44 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/IdHelperServiceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/IdHelperServiceTest.java @@ -1,13 +1,215 @@ package ca.uhn.fhir.jpa.dao.index; import ca.uhn.fhir.interceptor.model.RequestPartitionId; +import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; import ca.uhn.fhir.jpa.model.config.PartitionSettings; +import ca.uhn.fhir.jpa.model.entity.ForcedId; +import ca.uhn.fhir.jpa.util.MemoryCacheService; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; +import org.hl7.fhir.instance.model.api.IIdType; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; -import static org.junit.jupiter.api.Assertions.*; +import javax.persistence.EntityManager; +import javax.persistence.TypedQuery; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Path; +import javax.persistence.criteria.Root; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertSame; + +@ExtendWith(MockitoExtension.class) public class IdHelperServiceTest { + // helper class to package up data for helper methods + private class ResourceIdPackage { + public IIdType MyResourceId; + public ResourcePersistentId MyPid; + public Long MyVersion; + + public ResourceIdPackage(IIdType id, + ResourcePersistentId pid, + Long version) { + MyResourceId = id; + MyPid = pid; + MyVersion = version; + } + } + + @Mock + private IResourceTableDao myResourceTableDao; + + @Mock + private DaoConfig myDaoConfig; + + @Mock + private MemoryCacheService myMemoryCacheService; + + @Mock + private EntityManager myEntityManager; + + @InjectMocks + private IdHelperService myIdHelperService; + + private ResourcePersistentId getResourcePersistentIdFromResource(IIdType theId, long thePid) { + ResourcePersistentId id = new ResourcePersistentId(thePid); + String idPortion = theId.getIdPart(); + IIdType newId = new IdDt(theId.getResourceType(), idPortion); + id.setAssociatedResourceId(newId); + return id; + } + + /** + * Gets a ResourceTable record for getResourceVersionsForPid + * Order matters! + * @param resourceType + * @param pid + * @param version + * @return + */ + private Object[] getResourceTableRecordForResourceTypeAndPid(String resourceType, long pid, long version) { + return new Object[] { + pid, // long + resourceType, // string + version // long + }; + } + + /** + * Helper function to mock out resolveResourcePersistentIdsWithCache + * to return empty lists (as if no resources were found). + */ + private void mock_resolveResourcePersistentIdsWithCache_toReturnNothing() { + CriteriaBuilder cb = Mockito.mock(CriteriaBuilder.class); + CriteriaQuery criteriaQuery = Mockito.mock(CriteriaQuery.class); + Root from = Mockito.mock(Root.class); + Path path = Mockito.mock(Path.class); + + Mockito.when(cb.createQuery(Mockito.any(Class.class))) + .thenReturn(criteriaQuery); + Mockito.when(criteriaQuery.from(Mockito.any(Class.class))) + .thenReturn(from); + Mockito.when(from.get(Mockito.anyString())) + .thenReturn(path); + + TypedQuery queryMock = Mockito.mock(TypedQuery.class); + Mockito.when(queryMock.getResultList()).thenReturn(new ArrayList<>()); // not found + + Mockito.when(myEntityManager.getCriteriaBuilder()) + .thenReturn(cb); + Mockito.when(myEntityManager.createQuery(Mockito.any(CriteriaQuery.class))) + .thenReturn(queryMock); + } + + /** + * Helper function to mock out getIdsOfExistingResources + * to return the matches and resources matching those provided + * by parameters. + * @param theResourcePacks + */ + private void mockReturnsFor_getIdsOfExistingResources(ResourceIdPackage... theResourcePacks) { + List resourcePersistentIds = new ArrayList<>(); + List matches = new ArrayList<>(); + + for (ResourceIdPackage pack : theResourcePacks) { + resourcePersistentIds.add(pack.MyPid); + + matches.add(getResourceTableRecordForResourceTypeAndPid( + pack.MyResourceId.getResourceType(), + pack.MyPid.getIdAsLong(), + pack.MyVersion + )); + } + + ResourcePersistentId first = resourcePersistentIds.remove(0); + if (resourcePersistentIds.isEmpty()) { + Mockito.when(myMemoryCacheService.getIfPresent(Mockito.any(MemoryCacheService.CacheEnum.class), Mockito.anyString())) + .thenReturn(first).thenReturn(null); + } + else { + Mockito.when(myMemoryCacheService.getIfPresent(Mockito.any(MemoryCacheService.CacheEnum.class), Mockito.anyString())) + .thenReturn(first, resourcePersistentIds.toArray()); + } + Mockito.when(myResourceTableDao.getResourceVersionsForPid(Mockito.anyList())) + .thenReturn(matches); + } + + @Test + public void getLatestVersionIdsForResourceIds_whenResourceExists_returnsMapWithPIDAndVersion() { + IIdType type = new IdDt("Patient/RED"); + ResourcePersistentId pid = new ResourcePersistentId(1L); + pid.setAssociatedResourceId(type); + HashMap map = new HashMap<>(); + map.put(type, pid); + ResourceIdPackage pack = new ResourceIdPackage(type, pid, 2L); + + // when + mockReturnsFor_getIdsOfExistingResources(pack); + + // test + Map retMap = myIdHelperService.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), + Collections.singletonList(type)); + + Assertions.assertTrue(retMap.containsKey(type)); + Assertions.assertEquals(pid.getVersion(), map.get(type).getVersion()); + } + + @Test + public void getLatestVersionIdsForResourceIds_whenResourceDoesNotExist_returnsEmptyMap() { + IIdType type = new IdDt("Patient/RED"); + + // when + mock_resolveResourcePersistentIdsWithCache_toReturnNothing(); + + // test + Map retMap = myIdHelperService.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), + Collections.singletonList(type)); + + Assertions.assertTrue(retMap.isEmpty()); + } + + @Test + public void getLatestVersionIdsForResourceIds_whenSomeResourcesDoNotExist_returnsOnlyExistingElements() { + // resource to be found + IIdType type = new IdDt("Patient/RED"); + ResourcePersistentId pid = new ResourcePersistentId(1L); + pid.setAssociatedResourceId(type); + ResourceIdPackage pack = new ResourceIdPackage(type, pid, 2L); + + // resource that won't be found + IIdType type2 = new IdDt("Patient/BLUE"); + + // when + mock_resolveResourcePersistentIdsWithCache_toReturnNothing(); + mockReturnsFor_getIdsOfExistingResources(pack); + + // test + Map retMap = myIdHelperService.getLatestVersionIdsForResourceIds( + RequestPartitionId.allPartitions(), + Arrays.asList(type, type2) + ); + + // verify + Assertions.assertEquals(1, retMap.size()); + Assertions.assertTrue(retMap.containsKey(type)); + Assertions.assertFalse(retMap.containsKey(type2)); + } + @Test public void testReplaceDefault_AllPartitions() { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java index 39660fe7399..95a9732fed5 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java @@ -20,7 +20,6 @@ import ca.uhn.fhir.jpa.binstore.BinaryStorageInterceptor; import ca.uhn.fhir.jpa.bulk.export.api.IBulkDataExportSvc; import ca.uhn.fhir.jpa.config.TestR4Config; import ca.uhn.fhir.jpa.dao.BaseJpaTest; -import ca.uhn.fhir.jpa.dao.IAutoVersioningService; import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc; import ca.uhn.fhir.jpa.dao.data.IForcedIdDao; import ca.uhn.fhir.jpa.dao.data.IMdmLinkDao; @@ -499,8 +498,6 @@ public abstract class BaseJpaR4Test extends BaseJpaTest implements ITestDataBuil protected ValidationSettings myValidationSettings; @Autowired protected IMdmLinkDao myMdmLinkDao; - @Autowired - protected IAutoVersioningService myAutoVersioningService; @AfterEach() public void afterCleanupDao() { From 4d7f53851cdbe2f52336b3ab69f019ae50c7cd51 Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Tue, 7 Sep 2021 12:08:32 -0400 Subject: [PATCH 080/143] issue-2901 cleanup of code/imports --- .../java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java | 1 - .../java/ca/uhn/fhir/jpa/api/dao/IFhirSystemDao.java | 1 - .../uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java | 3 --- .../ca/uhn/fhir/jpa/dao/index/IdHelperServiceTest.java | 8 -------- .../r4/FhirResourceDaoCreatePlaceholdersR4Test.java | 10 ++++++---- .../ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java | 1 - 6 files changed, 6 insertions(+), 18 deletions(-) diff --git a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java index 577faa0aee5..ff8fa2a2303 100644 --- a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java +++ b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java @@ -21,7 +21,6 @@ package ca.uhn.fhir.jpa.api.dao; */ import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.api.model.DeleteConflictList; import ca.uhn.fhir.jpa.api.model.DeleteMethodOutcome; diff --git a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirSystemDao.java b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirSystemDao.java index 049e460294b..ff3a34fc4eb 100644 --- a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirSystemDao.java +++ b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirSystemDao.java @@ -22,7 +22,6 @@ package ca.uhn.fhir.jpa.api.dao; import ca.uhn.fhir.jpa.api.model.ExpungeOptions; import ca.uhn.fhir.jpa.api.model.ExpungeOutcome; -import ca.uhn.fhir.rest.annotation.Offset; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.api.server.RequestDetails; import org.hl7.fhir.instance.model.api.IBaseBundle; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java index 4936631f818..67badec3ad5 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java @@ -8,13 +8,10 @@ import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; import org.hl7.fhir.r4.model.Patient; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.junit.jupiter.MockitoExtension; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; -@ExtendWith(MockitoExtension.class) class BaseHapiFhirResourceDaoTest { TestResourceDao mySvc = new TestResourceDao(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/IdHelperServiceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/IdHelperServiceTest.java index ad9fbc78c44..2ca8fea957c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/IdHelperServiceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/IdHelperServiceTest.java @@ -66,14 +66,6 @@ public class IdHelperServiceTest { @InjectMocks private IdHelperService myIdHelperService; - private ResourcePersistentId getResourcePersistentIdFromResource(IIdType theId, long thePid) { - ResourcePersistentId id = new ResourcePersistentId(thePid); - String idPortion = theId.getIdPart(); - IIdType newId = new IdDt(theId.getResourceType(), idPortion); - id.setAssociatedResourceId(newId); - return id; - } - /** * Gets a ResourceTable record for getResourceVersionsForPid * Order matters! diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java index a53a084d7c2..1588c81ba80 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java @@ -590,7 +590,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { // create Patient patient = new Patient(); patient.setIdElement(new IdType(patientId)); - myPatientDao.update(patient); + myPatientDao.update(patient); // use update to use forcedid // update patient.setActive(true); @@ -615,7 +615,9 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { assertNotNull(retObservation); } - + /** + * This test is the same as above, except it uses the serverid (instead of forcedid) + */ @Test public void testAutocreatePlaceholderWithExistingTargetWithServerAssignedIdTest() { myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); @@ -624,9 +626,9 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { // create Patient patient = new Patient(); patient.setIdElement(new IdType("Patient")); - DaoMethodOutcome ret = myPatientDao.create(patient); + DaoMethodOutcome ret = myPatientDao.create(patient); // use create to use server id - // update + // update - to update our version patient.setActive(true); myPatientDao.update(patient); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java index cc081ca421d..b9257a30e0b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.jpa.api.config.DaoConfig; -import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.model.entity.NormalizedQuantitySearchLevel; From 16752f393c5927f988332d825d676286f3c626e7 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 7 Sep 2021 13:33:03 -0400 Subject: [PATCH 081/143] Finalize implementation --- .../uhn/fhir/jpa/demo/FhirServerConfig.java | 5 +- .../fhir/jpa/demo/FhirServerConfigDstu3.java | 5 +- .../uhn/fhir/jpa/demo/FhirServerConfigR4.java | 5 +- .../ca/uhn/fhir/jpa/config/BaseConfig.java | 5 +- ...ocalContainerEntityManagerFactoryBean.java | 16 ++++++ .../ElasticsearchWithPrefixConfig.java} | 40 +++++++++++++-- .../uhn/fhir/jpa/config/TestDstu2Config.java | 5 +- .../uhn/fhir/jpa/config/TestDstu3Config.java | 5 +- .../ca/uhn/fhir/jpa/config/TestR4Config.java | 5 +- .../TestR4WithLuceneDisabledConfig.java | 5 +- .../ca/uhn/fhir/jpa/config/TestR5Config.java | 5 +- .../jpa/dao/r4/ElasticsearchPrefixTest.java | 49 +++++++++++++++++++ ...esourceDaoR4SearchWithElasticSearchIT.java | 1 - .../java/ca/uhn/fhir/jpa/dao/r4/HsTest.java | 19 ------- .../fhir/jpa/config/TestJpaDstu3Config.java | 5 +- .../uhn/fhir/jpa/config/TestJpaR4Config.java | 5 +- .../uhn/fhirtest/config/TestDstu2Config.java | 5 +- .../uhn/fhirtest/config/TestDstu3Config.java | 5 +- .../ca/uhn/fhirtest/config/TestR4Config.java | 5 +- .../ca/uhn/fhirtest/config/TestR5Config.java | 5 +- 20 files changed, 145 insertions(+), 55 deletions(-) rename hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/{dao/r4/DummyConfig.java => config/ElasticsearchWithPrefixConfig.java} (73%) create mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ElasticsearchPrefixTest.java delete mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/HsTest.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java index ee145f02902..82f2c161c13 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java @@ -30,6 +30,7 @@ import org.apache.commons.lang3.time.DateUtils; import org.springframework.beans.factory.annotation.Autowire; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -65,8 +66,8 @@ public class FhirServerConfig extends BaseJavaConfigDstu2 { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(theConfigurableListableBeanFactory); retVal.setPersistenceUnitName("HAPI_PU"); retVal.setDataSource(myDataSource); retVal.setJpaProperties(myJpaProperties); diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigDstu3.java b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigDstu3.java index e27f4742efc..23eec567a44 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigDstu3.java +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigDstu3.java @@ -30,6 +30,7 @@ import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor; import org.springframework.beans.factory.annotation.Autowire; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -62,8 +63,8 @@ public class FhirServerConfigDstu3 extends BaseJavaConfigDstu3 { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(theConfigurableListableBeanFactory); retVal.setPersistenceUnitName("HAPI_PU"); retVal.setDataSource(myDataSource); retVal.setJpaProperties(myJpaProperties); diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigR4.java b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigR4.java index 657cd97b347..701c9e9aa2a 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigR4.java +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigR4.java @@ -28,6 +28,7 @@ import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor; import org.springframework.beans.factory.annotation.Autowire; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -60,8 +61,8 @@ public class FhirServerConfigR4 extends BaseJavaConfigR4 { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(theConfigurableListableBeanFactory); retVal.setPersistenceUnitName("HAPI_PU"); retVal.setDataSource(myDataSource); retVal.setJpaProperties(myJpaProperties); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java index 7416f1c564c..34ab8f2212f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java @@ -153,6 +153,7 @@ import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager; import org.springframework.batch.core.configuration.annotation.BatchConfigurer; import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -286,8 +287,8 @@ public abstract class BaseConfig { * bean, but it provides a partially completed entity manager * factory with HAPI FHIR customizations */ - protected LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = new HapiFhirLocalContainerEntityManagerFactoryBean(); + protected LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory myConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = new HapiFhirLocalContainerEntityManagerFactoryBean(myConfigurableListableBeanFactory); configureEntityManagerFactory(retVal, fhirContext()); return retVal; } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java index 56512d2dd4b..e9140c55d66 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java @@ -23,6 +23,9 @@ package ca.uhn.fhir.jpa.config; import org.hibernate.cfg.AvailableSettings; import org.hibernate.query.criteria.LiteralHandlingMode; import org.hibernate.resource.jdbc.spi.PhysicalConnectionHandlingMode; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; +import org.springframework.orm.hibernate5.SpringBeanContainer; import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; import java.util.Map; @@ -32,6 +35,14 @@ import java.util.Map; * that sets some sensible default property values */ public class HapiFhirLocalContainerEntityManagerFactoryBean extends LocalContainerEntityManagerFactoryBean { + + //Weeeeee : https://stackoverflow.com/questions/57902388/how-to-inject-spring-beans-into-the-hibernate-envers-revisionlistener + ConfigurableListableBeanFactory myConfigurableListableBeanFactory; + + public HapiFhirLocalContainerEntityManagerFactoryBean(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + myConfigurableListableBeanFactory = theConfigurableListableBeanFactory; + } + @Override public Map getJpaPropertyMap() { Map retVal = super.getJpaPropertyMap(); @@ -63,6 +74,11 @@ public class HapiFhirLocalContainerEntityManagerFactoryBean extends LocalContain if (!retVal.containsKey(AvailableSettings.BATCH_VERSIONED_DATA)) { retVal.put(AvailableSettings.BATCH_VERSIONED_DATA, "true"); } + //Why is this here, you ask? LocalContainerEntityManagerFactoryBean actually clobbers the setting hibernate needs + //in order to be able to resolve beans, so we add it back in manually here: + if (!retVal.containsKey(AvailableSettings.BEAN_CONTAINER)) { + retVal.put(AvailableSettings.BEAN_CONTAINER, new SpringBeanContainer(myConfigurableListableBeanFactory)); + } return retVal; } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/DummyConfig.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/ElasticsearchWithPrefixConfig.java similarity index 73% rename from hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/DummyConfig.java rename to hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/ElasticsearchWithPrefixConfig.java index 9bb8ae2fb7c..5789ee204dc 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/DummyConfig.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/ElasticsearchWithPrefixConfig.java @@ -1,17 +1,25 @@ -package ca.uhn.fhir.jpa.dao.r4; +package ca.uhn.fhir.jpa.config; +import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.config.BlockLargeNumbersOfParamsListener; import ca.uhn.fhir.jpa.config.HapiFhirHibernateJpaDialect; import ca.uhn.fhir.jpa.config.HapiFhirLocalContainerEntityManagerFactoryBean; +import ca.uhn.fhir.jpa.dao.r4.ElasticsearchPrefixTest; import ca.uhn.fhir.jpa.search.elastic.HapiElasticsearchAnalysisConfigurer; import ca.uhn.fhir.jpa.search.elastic.IndexNamePrefixLayoutStrategy; +import ca.uhn.fhir.jpa.search.lastn.ElasticsearchRestClientFactory; import ca.uhn.fhir.jpa.search.lastn.config.TestElasticsearchContainerHelper; import ca.uhn.fhir.jpa.util.CurrentThreadCaptureQueriesListener; import net.ttddyy.dsproxy.listener.logging.SLF4JLogLevel; import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder; import org.apache.commons.dbcp2.BasicDataSource; +import org.elasticsearch.action.support.master.AcknowledgedResponse; +import org.elasticsearch.client.RequestOptions; +import org.elasticsearch.client.RestHighLevelClient; +import org.elasticsearch.client.indices.PutIndexTemplateRequest; +import org.elasticsearch.common.settings.Settings; import org.hibernate.dialect.H2Dialect; import org.hibernate.jpa.HibernatePersistenceProvider; import org.hibernate.search.backend.elasticsearch.cfg.ElasticsearchBackendSettings; @@ -20,21 +28,30 @@ import org.hibernate.search.backend.elasticsearch.index.IndexStatus; import org.hibernate.search.engine.cfg.BackendSettings; import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings; import org.hibernate.search.mapper.orm.schema.management.SchemaManagementStrategyName; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; import org.testcontainers.elasticsearch.ElasticsearchContainer; import javax.sql.DataSource; +import java.io.IOException; +import java.util.Arrays; import java.util.Properties; import java.util.concurrent.TimeUnit; +/** + * The only reason this is its own class is so that we can set a dao config setting before the whole test framework comes online. + * We need to do this as it is during bean creation that HS bootstrapping occurs. + */ @Configuration -public class DummyConfig { +public class ElasticsearchWithPrefixConfig { @Bean public DaoConfig daoConfig() { - return new DaoConfig(); + DaoConfig daoConfig = new DaoConfig(); + daoConfig.setElasticSearchIndexPrefix(ElasticsearchPrefixTest.ELASTIC_PREFIX); + return daoConfig; } @Bean @@ -47,8 +64,8 @@ public class DummyConfig { } @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = new HapiFhirLocalContainerEntityManagerFactoryBean(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = new HapiFhirLocalContainerEntityManagerFactoryBean(theConfigurableListableBeanFactory); retVal.setJpaDialect(new HapiFhirHibernateJpaDialect(fhirContext().getLocalizer())); retVal.setPackagesToScan("ca.uhn.fhir.jpa.model.entity", "ca.uhn.fhir.jpa.entity"); retVal.setPersistenceProvider(new HibernatePersistenceProvider()); @@ -105,6 +122,19 @@ public class DummyConfig { //This tells elasticsearch to use our custom index naming strategy. extraProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.LAYOUT_STRATEGY), IndexNamePrefixLayoutStrategy.class.getName()); + + PutIndexTemplateRequest ngramTemplate = new PutIndexTemplateRequest("ngram-template") + .patterns(Arrays.asList("*resourcetable-*", "*termconcept-*")) + .settings(Settings.builder().put("index.max_ngram_diff", 50)); + + try { + RestHighLevelClient elasticsearchHighLevelRestClient = ElasticsearchRestClientFactory.createElasticsearchHighLevelRestClient("http://" + host, httpPort, "", ""); + AcknowledgedResponse acknowledgedResponse = elasticsearchHighLevelRestClient.indices().putTemplate(ngramTemplate, RequestOptions.DEFAULT); + assert acknowledgedResponse.isAcknowledged(); + } catch (IOException theE) { + theE.printStackTrace(); + throw new ConfigurationException("Couldn't connect to the elasticsearch server to create necessary templates. Ensure the Elasticsearch user has permissions to create templates."); + } return extraProperties; } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu2Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu2Config.java index 5eac45f795a..945e5511554 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu2Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu2Config.java @@ -16,6 +16,7 @@ import org.hibernate.search.engine.cfg.BackendSettings; import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -134,8 +135,8 @@ public class TestDstu2Config extends BaseJavaConfigDstu2 { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(theConfigurableListableBeanFactory); retVal.setPersistenceUnitName("PU_HapiFhirJpaDstu2"); retVal.setDataSource(dataSource()); retVal.setJpaProperties(jpaProperties()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java index a31d6638cb3..22fe68d67ce 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java @@ -15,6 +15,7 @@ import org.hibernate.search.backend.lucene.cfg.LuceneBackendSettings; import org.hibernate.search.backend.lucene.cfg.LuceneIndexSettings; import org.hibernate.search.engine.cfg.BackendSettings; import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -138,8 +139,8 @@ public class TestDstu3Config extends BaseJavaConfigDstu3 { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(theConfigurableListableBeanFactory); retVal.setPersistenceUnitName("PU_HapiFhirJpaDstu3"); retVal.setDataSource(dataSource()); retVal.setJpaProperties(jpaProperties()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java index 2f70b366993..96256b04097 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java @@ -16,6 +16,7 @@ import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder; import org.apache.commons.dbcp2.BasicDataSource; import org.hibernate.dialect.H2Dialect; import org.hibernate.jpa.HibernatePersistenceProvider; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -143,8 +144,8 @@ public class TestR4Config extends BaseJavaConfigR4 { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = new HapiFhirLocalContainerEntityManagerFactoryBean(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = new HapiFhirLocalContainerEntityManagerFactoryBean(theConfigurableListableBeanFactory); configureEntityManagerFactory(retVal, fhirContext()); retVal.setJpaDialect(new HapiFhirHibernateJpaDialect(fhirContext().getLocalizer())); retVal.setPackagesToScan("ca.uhn.fhir.jpa.model.entity", "ca.uhn.fhir.jpa.entity"); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4WithLuceneDisabledConfig.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4WithLuceneDisabledConfig.java index 046563d8027..8786552e85c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4WithLuceneDisabledConfig.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4WithLuceneDisabledConfig.java @@ -7,6 +7,7 @@ import org.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrate import org.hibernate.search.backend.lucene.cfg.LuceneBackendSettings; import org.hibernate.search.engine.cfg.BackendSettings; import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; @@ -28,8 +29,8 @@ public class TestR4WithLuceneDisabledConfig extends TestR4Config { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(theConfigurableListableBeanFactory); retVal.setDataSource(dataSource()); retVal.setJpaProperties(jpaProperties()); return retVal; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR5Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR5Config.java index 254c0c8a357..bdecf0f28e6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR5Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR5Config.java @@ -16,6 +16,7 @@ import org.hibernate.search.backend.lucene.cfg.LuceneIndexSettings; import org.hibernate.search.engine.cfg.BackendSettings; import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -138,8 +139,8 @@ public class TestR5Config extends BaseJavaConfigR5 { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(theConfigurableListableBeanFactory); retVal.setPersistenceUnitName("PU_HapiFhirJpaR5"); retVal.setDataSource(dataSource()); retVal.setJpaProperties(jpaProperties()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ElasticsearchPrefixTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ElasticsearchPrefixTest.java new file mode 100644 index 00000000000..239eadda9e0 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ElasticsearchPrefixTest.java @@ -0,0 +1,49 @@ +package ca.uhn.fhir.jpa.dao.r4; + +import ca.uhn.fhir.jpa.config.ElasticsearchWithPrefixConfig; +import ca.uhn.fhir.jpa.search.lastn.ElasticsearchRestClientFactory; +import ca.uhn.fhir.test.utilities.docker.RequiresDocker; +import org.apache.http.util.EntityUtils; +import org.elasticsearch.client.Request; +import org.elasticsearch.client.Response; +import org.elasticsearch.client.RestClient; +import org.elasticsearch.client.RestHighLevelClient; +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.ContextConfiguration; +import org.springframework.test.context.junit.jupiter.SpringExtension; +import org.testcontainers.elasticsearch.ElasticsearchContainer; + +import java.io.IOException; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; + +@RequiresDocker +@ExtendWith(SpringExtension.class) +@ContextConfiguration(classes = {ElasticsearchWithPrefixConfig.class}) +public class ElasticsearchPrefixTest { + + @Autowired + ElasticsearchContainer elasticsearchContainer; + + public static String ELASTIC_PREFIX = "hapi-fhir"; + @Test + public void test() throws IOException { + //Given + RestHighLevelClient elasticsearchHighLevelRestClient = ElasticsearchRestClientFactory.createElasticsearchHighLevelRestClient( + "http://" + elasticsearchContainer.getHost(), elasticsearchContainer.getMappedPort(9200), "", ""); + + //When + RestClient lowLevelClient = elasticsearchHighLevelRestClient.getLowLevelClient(); + Response get = lowLevelClient.performRequest(new Request("GET", "/_cat/indices")); + String catIndexes = EntityUtils.toString(get.getEntity()); + + //Then + assertThat(catIndexes, containsString(ELASTIC_PREFIX + "-resourcetable-000001")); + assertThat(catIndexes, containsString(ELASTIC_PREFIX + "-termconcept-000001")); + + } + +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java index 32bf359a0d6..d17dac8d803 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java @@ -112,7 +112,6 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest { @BeforeEach public void beforePurgeDatabase() { purgeDatabase(myDaoConfig, mySystemDao, myResourceReindexingSvc, mySearchCoordinatorSvc, mySearchParamRegistry, myBulkDataExportSvc); - myDaoConfig.setElasticSearchIndexPrefix("ZOOP"); } @Override diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/HsTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/HsTest.java deleted file mode 100644 index 23fffb8a252..00000000000 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/HsTest.java +++ /dev/null @@ -1,19 +0,0 @@ -package ca.uhn.fhir.jpa.dao.r4; - -import ca.uhn.fhir.test.utilities.docker.RequiresDocker; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit.jupiter.SpringExtension; - -@RequiresDocker -@ExtendWith(SpringExtension.class) -@ContextConfiguration(classes = {DummyConfig.class}) -public class HsTest { - - @Test - public void test() { - System.out.println("zoop"); - } - -} diff --git a/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/config/TestJpaDstu3Config.java b/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/config/TestJpaDstu3Config.java index 08420e8727a..3ca64e792b3 100644 --- a/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/config/TestJpaDstu3Config.java +++ b/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/config/TestJpaDstu3Config.java @@ -41,6 +41,7 @@ import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Lazy; @@ -94,8 +95,8 @@ public class TestJpaDstu3Config extends BaseJavaConfigDstu3 { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(theConfigurableListableBeanFactory); retVal.setPersistenceUnitName("PU_HapiFhirJpaDstu3"); retVal.setDataSource(dataSource()); retVal.setJpaProperties(jpaProperties()); diff --git a/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/config/TestJpaR4Config.java b/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/config/TestJpaR4Config.java index 1716e099cad..988cea91c3a 100644 --- a/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/config/TestJpaR4Config.java +++ b/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/config/TestJpaR4Config.java @@ -41,6 +41,7 @@ import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Lazy; @@ -94,8 +95,8 @@ public class TestJpaR4Config extends BaseJavaConfigR4 { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(theConfigurableListableBeanFactory); retVal.setPersistenceUnitName("PU_HapiFhirJpaR4"); retVal.setDataSource(dataSource()); retVal.setJpaProperties(jpaProperties()); diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java index e0485484db4..3ebafd453f3 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java @@ -23,6 +23,7 @@ import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings; import org.hl7.fhir.dstu2.model.Subscription; import org.hl7.fhir.r5.utils.IResourceValidator; import org.springframework.beans.factory.annotation.Value; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -134,8 +135,8 @@ public class TestDstu2Config extends BaseJavaConfigDstu2 { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(theConfigurableListableBeanFactory); retVal.setPersistenceUnitName("PU_HapiFhirJpaDstu2"); retVal.setDataSource(dataSource()); retVal.setJpaProperties(jpaProperties()); diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java index a8d454a92e2..c9c6f3ae8b5 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java @@ -23,6 +23,7 @@ import org.hl7.fhir.dstu2.model.Subscription; import org.hl7.fhir.r5.utils.IResourceValidator; import org.springframework.beans.factory.annotation.Autowire; import org.springframework.beans.factory.annotation.Value; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -140,8 +141,8 @@ public class TestDstu3Config extends BaseJavaConfigDstu3 { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(theConfigurableListableBeanFactory); retVal.setPersistenceUnitName("PU_HapiFhirJpaDstu3"); retVal.setDataSource(dataSource()); retVal.setJpaProperties(jpaProperties()); diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4Config.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4Config.java index e0db7abf4a9..1e7d96c49ca 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4Config.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4Config.java @@ -24,6 +24,7 @@ import org.hl7.fhir.dstu2.model.Subscription; import org.hl7.fhir.r5.utils.IResourceValidator; import org.springframework.beans.factory.annotation.Autowire; import org.springframework.beans.factory.annotation.Value; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -133,8 +134,8 @@ public class TestR4Config extends BaseJavaConfigR4 { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(theConfigurableListableBeanFactory); retVal.setPersistenceUnitName("PU_HapiFhirJpaR4"); retVal.setDataSource(dataSource()); retVal.setJpaProperties(jpaProperties()); diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR5Config.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR5Config.java index 5fc6e03cde4..4eca9abdf2c 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR5Config.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR5Config.java @@ -23,6 +23,7 @@ import org.hl7.fhir.dstu2.model.Subscription; import org.hl7.fhir.r5.utils.IResourceValidator; import org.springframework.beans.factory.annotation.Autowire; import org.springframework.beans.factory.annotation.Value; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -133,8 +134,8 @@ public class TestR5Config extends BaseJavaConfigR5 { @Override @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(); + public LocalContainerEntityManagerFactoryBean entityManagerFactory(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { + LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(theConfigurableListableBeanFactory); retVal.setPersistenceUnitName("PU_HapiFhirJpaR5"); retVal.setDataSource(dataSource()); retVal.setJpaProperties(jpaProperties()); From ecd93c9e8a9ffb461953a26c07067fac983eae46 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 7 Sep 2021 13:54:28 -0400 Subject: [PATCH 082/143] Add changelog --- .../fhir/changelog/5_6_0/2962-custom-elastic-prefixes.yaml | 5 +++++ .../HapiFhirLocalContainerEntityManagerFactoryBean.java | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2962-custom-elastic-prefixes.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2962-custom-elastic-prefixes.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2962-custom-elastic-prefixes.yaml new file mode 100644 index 00000000000..111873ad87a --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2962-custom-elastic-prefixes.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 2962 +jira: SMILE-720 +title: "Added a new DaoConfig setting called `setElasticSearchIndexPrefix(String prefix)` which will cause Hibernate search to prefix all of its tables with the provided value." diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java index e9140c55d66..5c6e44a0b02 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java @@ -36,7 +36,7 @@ import java.util.Map; */ public class HapiFhirLocalContainerEntityManagerFactoryBean extends LocalContainerEntityManagerFactoryBean { - //Weeeeee : https://stackoverflow.com/questions/57902388/how-to-inject-spring-beans-into-the-hibernate-envers-revisionlistener + //https://stackoverflow.com/questions/57902388/how-to-inject-spring-beans-into-the-hibernate-envers-revisionlistener ConfigurableListableBeanFactory myConfigurableListableBeanFactory; public HapiFhirLocalContainerEntityManagerFactoryBean(ConfigurableListableBeanFactory theConfigurableListableBeanFactory) { @@ -75,7 +75,7 @@ public class HapiFhirLocalContainerEntityManagerFactoryBean extends LocalContain retVal.put(AvailableSettings.BATCH_VERSIONED_DATA, "true"); } //Why is this here, you ask? LocalContainerEntityManagerFactoryBean actually clobbers the setting hibernate needs - //in order to be able to resolve beans, so we add it back in manually here: + //in order to be able to resolve beans, so we add it back in manually here if (!retVal.containsKey(AvailableSettings.BEAN_CONTAINER)) { retVal.put(AvailableSettings.BEAN_CONTAINER, new SpringBeanContainer(myConfigurableListableBeanFactory)); } From 3ec47cb0bae5937dd76d398112c2d520cb13d49e Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 7 Sep 2021 13:58:22 -0400 Subject: [PATCH 083/143] Bump version as we break the localcontainerentitymanagerfactory bean constructors args --- hapi-deployable-pom/pom.xml | 2 +- hapi-fhir-android/pom.xml | 2 +- hapi-fhir-base/pom.xml | 2 +- hapi-fhir-bom/pom.xml | 4 ++-- hapi-fhir-cli/hapi-fhir-cli-api/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-app/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml | 2 +- hapi-fhir-cli/pom.xml | 2 +- hapi-fhir-client-okhttp/pom.xml | 2 +- hapi-fhir-client/pom.xml | 2 +- hapi-fhir-converter/pom.xml | 2 +- hapi-fhir-dist/pom.xml | 2 +- hapi-fhir-docs/pom.xml | 2 +- hapi-fhir-jacoco/pom.xml | 2 +- hapi-fhir-jaxrsserver-base/pom.xml | 2 +- hapi-fhir-jpaserver-api/pom.xml | 2 +- hapi-fhir-jpaserver-base/pom.xml | 2 +- hapi-fhir-jpaserver-batch/pom.xml | 2 +- hapi-fhir-jpaserver-cql/pom.xml | 2 +- hapi-fhir-jpaserver-mdm/pom.xml | 2 +- hapi-fhir-jpaserver-migrate/pom.xml | 2 +- hapi-fhir-jpaserver-model/pom.xml | 2 +- hapi-fhir-jpaserver-searchparam/pom.xml | 2 +- hapi-fhir-jpaserver-subscription/pom.xml | 2 +- hapi-fhir-jpaserver-test-utilities/pom.xml | 2 +- hapi-fhir-jpaserver-uhnfhirtest/pom.xml | 2 +- hapi-fhir-server-mdm/pom.xml | 2 +- hapi-fhir-server-openapi/pom.xml | 2 +- hapi-fhir-server/pom.xml | 2 +- .../hapi-fhir-spring-boot-autoconfigure/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../hapi-fhir-spring-boot-samples/pom.xml | 2 +- .../hapi-fhir-spring-boot-starter/pom.xml | 2 +- hapi-fhir-spring-boot/pom.xml | 2 +- hapi-fhir-structures-dstu2.1/pom.xml | 2 +- hapi-fhir-structures-dstu2/pom.xml | 2 +- hapi-fhir-structures-dstu3/pom.xml | 2 +- hapi-fhir-structures-hl7org-dstu2/pom.xml | 2 +- hapi-fhir-structures-r4/pom.xml | 2 +- hapi-fhir-structures-r5/pom.xml | 2 +- hapi-fhir-test-utilities/pom.xml | 2 +- hapi-fhir-testpage-overlay/pom.xml | 2 +- hapi-fhir-validation-resources-dstu2.1/pom.xml | 2 +- hapi-fhir-validation-resources-dstu2/pom.xml | 2 +- hapi-fhir-validation-resources-dstu3/pom.xml | 2 +- hapi-fhir-validation-resources-r4/pom.xml | 2 +- hapi-fhir-validation-resources-r5/pom.xml | 2 +- hapi-fhir-validation/pom.xml | 2 +- hapi-tinder-plugin/pom.xml | 16 ++++++++-------- hapi-tinder-test/pom.xml | 2 +- pom.xml | 2 +- .../pom.xml | 2 +- tests/hapi-fhir-base-test-mindeps-client/pom.xml | 2 +- tests/hapi-fhir-base-test-mindeps-server/pom.xml | 2 +- 56 files changed, 64 insertions(+), 64 deletions(-) diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index 266c65a230b..e7b4678dcaf 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index f6390a03ab5..5080a741de5 100644 --- a/hapi-fhir-android/pom.xml +++ b/hapi-fhir-android/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index 311fd519e79..cf2f5a9d5c8 100644 --- a/hapi-fhir-base/pom.xml +++ b/hapi-fhir-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml index 0ee5d85b77e..5b83473d8bd 100644 --- a/hapi-fhir-bom/pom.xml +++ b/hapi-fhir-bom/pom.xml @@ -3,14 +3,14 @@ 4.0.0 ca.uhn.hapi.fhir hapi-fhir-bom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT pom HAPI FHIR BOM ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml index 05da3e3fee3..e75639496f0 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml index acc6ac71323..da95c8249b7 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir-cli - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml index 2b8034bb414..39a65d2c304 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../../hapi-deployable-pom diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml index 86dc09e7364..918a356bcce 100644 --- a/hapi-fhir-cli/pom.xml +++ b/hapi-fhir-cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml index 7b1c2cabc2a..fc1ff968610 100644 --- a/hapi-fhir-client-okhttp/pom.xml +++ b/hapi-fhir-client-okhttp/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml index 10ac2018c17..22095a8b31e 100644 --- a/hapi-fhir-client/pom.xml +++ b/hapi-fhir-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml index df4e808eaff..3edd8134ceb 100644 --- a/hapi-fhir-converter/pom.xml +++ b/hapi-fhir-converter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml index bca1b836071..507cc110724 100644 --- a/hapi-fhir-dist/pom.xml +++ b/hapi-fhir-dist/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml index 3d086916574..9203c8fa4d2 100644 --- a/hapi-fhir-docs/pom.xml +++ b/hapi-fhir-docs/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml index 3001c607337..8a4adc9ac2a 100644 --- a/hapi-fhir-jacoco/pom.xml +++ b/hapi-fhir-jacoco/pom.xml @@ -11,7 +11,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml index ed82d9af335..9679ed049c5 100644 --- a/hapi-fhir-jaxrsserver-base/pom.xml +++ b/hapi-fhir-jaxrsserver-base/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-api/pom.xml b/hapi-fhir-jpaserver-api/pom.xml index f763646e3f4..4da1a0f45ee 100644 --- a/hapi-fhir-jpaserver-api/pom.xml +++ b/hapi-fhir-jpaserver-api/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index 8fb7260401d..de3950d1860 100644 --- a/hapi-fhir-jpaserver-base/pom.xml +++ b/hapi-fhir-jpaserver-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-batch/pom.xml b/hapi-fhir-jpaserver-batch/pom.xml index 7d7c41e39ce..537dbf63a6d 100644 --- a/hapi-fhir-jpaserver-batch/pom.xml +++ b/hapi-fhir-jpaserver-batch/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-cql/pom.xml b/hapi-fhir-jpaserver-cql/pom.xml index 37991c7f946..d35fc53d840 100644 --- a/hapi-fhir-jpaserver-cql/pom.xml +++ b/hapi-fhir-jpaserver-cql/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml index ecb9bee6d63..b107b05524d 100644 --- a/hapi-fhir-jpaserver-mdm/pom.xml +++ b/hapi-fhir-jpaserver-mdm/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-migrate/pom.xml b/hapi-fhir-jpaserver-migrate/pom.xml index 583bb43b316..51ad10f5afd 100644 --- a/hapi-fhir-jpaserver-migrate/pom.xml +++ b/hapi-fhir-jpaserver-migrate/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml index 4c1f86a37fc..99858b3966c 100644 --- a/hapi-fhir-jpaserver-model/pom.xml +++ b/hapi-fhir-jpaserver-model/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml index 85e78caf1ba..a3057b5f43b 100755 --- a/hapi-fhir-jpaserver-searchparam/pom.xml +++ b/hapi-fhir-jpaserver-searchparam/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml index e3609e6f624..ec5d4f3dbfb 100644 --- a/hapi-fhir-jpaserver-subscription/pom.xml +++ b/hapi-fhir-jpaserver-subscription/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml index c0fa455be9b..cd6c3fadfcc 100644 --- a/hapi-fhir-jpaserver-test-utilities/pom.xml +++ b/hapi-fhir-jpaserver-test-utilities/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index 9ef24cb24a2..b044e150afd 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml index 8a7136ac721..6bce8a8a03a 100644 --- a/hapi-fhir-server-mdm/pom.xml +++ b/hapi-fhir-server-mdm/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml index ac3f9f6c8cc..fa6e5acf538 100644 --- a/hapi-fhir-server-openapi/pom.xml +++ b/hapi-fhir-server-openapi/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml index da732fe7ec6..df1d48956cb 100644 --- a/hapi-fhir-server/pom.xml +++ b/hapi-fhir-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml index 5a9a9c59259..806c163b4a0 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml index 3094d404947..20d4de90f0b 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT hapi-fhir-spring-boot-sample-client-apache diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml index 92f24d8e8b2..42703201b87 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT hapi-fhir-spring-boot-sample-client-okhttp diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml index 62d7edf17ed..da89e1a588e 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT hapi-fhir-spring-boot-sample-server-jersey diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml index d98baa42dc8..eed71fc788b 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT hapi-fhir-spring-boot-samples diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml index b8e4c3aedce..c85465c39c1 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml index fb7d126c0e1..3153f3339c5 100644 --- a/hapi-fhir-spring-boot/pom.xml +++ b/hapi-fhir-spring-boot/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml index d231b68390e..985c794b0b0 100644 --- a/hapi-fhir-structures-dstu2.1/pom.xml +++ b/hapi-fhir-structures-dstu2.1/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml index fb145734f63..bea02731f16 100644 --- a/hapi-fhir-structures-dstu2/pom.xml +++ b/hapi-fhir-structures-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml index 4bedefad1aa..75e68f16c5b 100644 --- a/hapi-fhir-structures-dstu3/pom.xml +++ b/hapi-fhir-structures-dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml index 6130d8e82ac..ce80fb38faa 100644 --- a/hapi-fhir-structures-hl7org-dstu2/pom.xml +++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml index 2c5394bf890..6c7ed34d4a1 100644 --- a/hapi-fhir-structures-r4/pom.xml +++ b/hapi-fhir-structures-r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml index f2eca4d974b..318e07cdd9d 100644 --- a/hapi-fhir-structures-r5/pom.xml +++ b/hapi-fhir-structures-r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml index d0f8df7fe7d..a542bb6ed6b 100644 --- a/hapi-fhir-test-utilities/pom.xml +++ b/hapi-fhir-test-utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml index b38c453f4f7..6b85577acd9 100644 --- a/hapi-fhir-testpage-overlay/pom.xml +++ b/hapi-fhir-testpage-overlay/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml index 0fe4837d110..51d1172c750 100644 --- a/hapi-fhir-validation-resources-dstu2.1/pom.xml +++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml index 1fcaa23f8d6..b65d94a559c 100644 --- a/hapi-fhir-validation-resources-dstu2/pom.xml +++ b/hapi-fhir-validation-resources-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml index 16a4b8587a3..c2c456377c7 100644 --- a/hapi-fhir-validation-resources-dstu3/pom.xml +++ b/hapi-fhir-validation-resources-dstu3/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml index ff9a3a78873..48f48396833 100644 --- a/hapi-fhir-validation-resources-r4/pom.xml +++ b/hapi-fhir-validation-resources-r4/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml index 9c17f5a0166..303087ec902 100644 --- a/hapi-fhir-validation-resources-r5/pom.xml +++ b/hapi-fhir-validation-resources-r5/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml index e4b063f26f2..f354d0d585d 100644 --- a/hapi-fhir-validation/pom.xml +++ b/hapi-fhir-validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml index b9efe893439..efd54036104 100644 --- a/hapi-tinder-plugin/pom.xml +++ b/hapi-tinder-plugin/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../pom.xml @@ -58,37 +58,37 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu3 - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-hl7org-dstu2 - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-r4 - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-r5 - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu2 - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu3 - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-r4 - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT org.apache.velocity diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml index 6db23c691f5..9395f743979 100644 --- a/hapi-tinder-test/pom.xml +++ b/hapi-tinder-test/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 9f3e86e83f0..a4ce1a7c719 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir pom - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT HAPI-FHIR An open-source implementation of the FHIR specification in Java. https://hapifhir.io diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml index a8d1bc42c51..f095488f4f4 100644 --- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml +++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml index 157a22a3da7..dbfadbe9543 100644 --- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml index be74e99f134..8b8aa95b196 100644 --- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE3-SNAPSHOT + 5.6.0-PRE4-SNAPSHOT ../../pom.xml From a3743fbcca5b1f046816a1f3d9a458a0e2cb8b6a Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Tue, 7 Sep 2021 14:21:36 -0400 Subject: [PATCH 084/143] Add utility method --- .../mdm/MdmBatchJobSubmitterFactoryImpl.java | 20 +++++++++++++++++++ ...BaseReverseCronologicalBatchPidReader.java | 20 +++++++++++++++++++ .../uhn/fhir/jpa/util/MemoryCacheService.java | 4 ++++ 3 files changed, 44 insertions(+) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/MdmBatchJobSubmitterFactoryImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/MdmBatchJobSubmitterFactoryImpl.java index e31df97cc3c..d03b9935b7c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/MdmBatchJobSubmitterFactoryImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/MdmBatchJobSubmitterFactoryImpl.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.jpa.batch.mdm; +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import ca.uhn.fhir.mdm.api.IMdmBatchJobSubmitterFactory; import ca.uhn.fhir.mdm.api.IMdmClearJobSubmitter; import org.springframework.beans.factory.annotation.Autowired; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/BaseReverseCronologicalBatchPidReader.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/BaseReverseCronologicalBatchPidReader.java index d682728119c..46c5e91c22f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/BaseReverseCronologicalBatchPidReader.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/reader/BaseReverseCronologicalBatchPidReader.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.jpa.batch.reader; +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.config.DaoConfig; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/MemoryCacheService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/MemoryCacheService.java index 98cbd6cc6d8..e8968aac543 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/MemoryCacheService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/MemoryCacheService.java @@ -172,6 +172,10 @@ public class MemoryCacheService { return (Cache) myCaches.get(theCache); } + public long getEstimatedSize(CacheEnum theCache) { + return getCache(theCache).estimatedSize(); + } + public enum CacheEnum { TAG_DEFINITION(TagDefinitionCacheKey.class), From d02e7e004186dac41a28e9eff5f6201d3acc6743 Mon Sep 17 00:00:00 2001 From: Jason Roberts Date: Tue, 7 Sep 2021 14:25:06 -0400 Subject: [PATCH 085/143] changelog --- .../fhir/changelog/5_6_0/2967-hybrid-search-chain.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2967-hybrid-search-chain.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2967-hybrid-search-chain.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2967-hybrid-search-chain.yaml new file mode 100644 index 00000000000..95e7ef41412 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2967-hybrid-search-chain.yaml @@ -0,0 +1,7 @@ +--- +type: fix +issue: 2967 +jira: SMILE-2899 +title: "Previously, the system would only traverse references to discrete resources while performing a chained search. +This fix adds support for traversing references to contained resources as well, with the limitation that the reference +to the contained resource must be the last reference in the chain." From 2dcc4f534f164d496cbbafc679b82fd85edc6bec Mon Sep 17 00:00:00 2001 From: Kevin Dougan SmileCDR <72025369+KevinDougan-SmileCDR@users.noreply.github.com> Date: Tue, 7 Sep 2021 15:38:08 -0400 Subject: [PATCH 086/143] Resolve Search Causing JOINs on HFJ_RESOURCE Checking RES_TYPE and RES_DELETED_AT Columns (#2964) --- .../builder/sql/SearchQueryBuilder.java | 2 +- .../FhirResourceDaoR4SearchOptimizedTest.java | 92 +++++++++++++++++-- 2 files changed, 85 insertions(+), 9 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryBuilder.java index ca3314c0c2e..7b3faedb77f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryBuilder.java @@ -549,7 +549,7 @@ public class SearchQueryBuilder { } public ComboCondition addPredicateLastUpdated(DateRangeParam theDateRange) { - ResourceTablePredicateBuilder resourceTableRoot = getOrCreateResourceTablePredicateBuilder(); + ResourceTablePredicateBuilder resourceTableRoot = getOrCreateResourceTablePredicateBuilder(false); List conditions = new ArrayList<>(2); if (theDateRange.getLowerBoundAsInstant() != null) { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java index d58e23b5675..e726c5254da 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java @@ -16,6 +16,7 @@ import ca.uhn.fhir.rest.api.SearchTotalModeEnum; import ca.uhn.fhir.rest.api.SortSpec; import ca.uhn.fhir.rest.api.SummaryEnum; import ca.uhn.fhir.rest.api.server.IBundleProvider; +import ca.uhn.fhir.rest.param.DateRangeParam; import ca.uhn.fhir.rest.param.ReferenceOrListParam; import ca.uhn.fhir.rest.param.ReferenceParam; import ca.uhn.fhir.rest.param.StringParam; @@ -917,18 +918,60 @@ public class FhirResourceDaoR4SearchOptimizedTest extends BaseJpaR4Test { } + /** + * Make sure that if we're performing a query where the ONLY param is _lastUpdated, + * we include a selector for the resource type + */ + @Test + public void testSearchByLastUpdatedOnly() { + Patient p = new Patient(); + p.setId("B"); + myPatientDao.update(p); + + Observation obs = new Observation(); + obs.setId("A"); + obs.setSubject(new Reference("Patient/B")); + obs.setStatus(Observation.ObservationStatus.FINAL); + myObservationDao.update(obs); + + // Search using only a _lastUpdated param + { + SearchParameterMap map = SearchParameterMap.newSynchronous(); + map.setLastUpdated(new DateRangeParam("ge2021-01-01", null)); + myCaptureQueriesListener.clear(); + IBundleProvider outcome = myObservationDao.search(map, new SystemRequestDetails()); + assertEquals(1, outcome.getResources(0, 999).size()); + myCaptureQueriesListener.logSelectQueriesForCurrentThread(); + + String selectQuery = myCaptureQueriesListener.getSelectQueriesForCurrentThread().get(0).getSql(true, false); + assertEquals(1, StringUtils.countMatches(selectQuery.toLowerCase(), "select t0.res_id from hfj_resource t0"), selectQuery); + assertEquals(1, StringUtils.countMatches(selectQuery.toLowerCase(), "t0.res_type = 'observation'"), selectQuery); + assertEquals(1, StringUtils.countMatches(selectQuery.toLowerCase(), "t0.res_deleted_at is null"), selectQuery); + } + } + @Test public void testSearchOnUnderscoreParams_AvoidHFJResourceJoins() { // This Issue: https://github.com/hapifhir/hapi-fhir/issues/2942 // See this PR for a similar type of Fix: https://github.com/hapifhir/hapi-fhir/pull/2909 - SearchParameter searchParameter = new SearchParameter(); - searchParameter.addBase("BodySite").addBase("Procedure"); - searchParameter.setCode("focalAccess"); - searchParameter.setType(Enumerations.SearchParamType.REFERENCE); - searchParameter.setExpression("Procedure.extension('Procedure#focalAccess')"); - searchParameter.setXpathUsage(SearchParameter.XPathUsageType.NORMAL); - searchParameter.setStatus(Enumerations.PublicationStatus.ACTIVE); - IIdType spId = mySearchParameterDao.create(searchParameter).getId().toUnqualifiedVersionless(); + // SearchParam - focalAccess + SearchParameter searchParameter1 = new SearchParameter(); + searchParameter1.addBase("BodySite").addBase("Procedure"); + searchParameter1.setCode("focalAccess"); + searchParameter1.setType(Enumerations.SearchParamType.REFERENCE); + searchParameter1.setExpression("Procedure.extension('Procedure#focalAccess')"); + searchParameter1.setXpathUsage(SearchParameter.XPathUsageType.NORMAL); + searchParameter1.setStatus(Enumerations.PublicationStatus.ACTIVE); + IIdType sp1Id = mySearchParameterDao.create(searchParameter1).getId().toUnqualifiedVersionless(); + // SearchParam - focalAccess + SearchParameter searchParameter2 = new SearchParameter(); + searchParameter2.addBase("Provenance"); + searchParameter2.setCode("activity"); + searchParameter2.setType(Enumerations.SearchParamType.TOKEN); + searchParameter2.setExpression("Provenance.extension('Provenance#activity')"); + searchParameter2.setXpathUsage(SearchParameter.XPathUsageType.NORMAL); + searchParameter2.setStatus(Enumerations.PublicationStatus.ACTIVE); + IIdType sp2Id = mySearchParameterDao.create(searchParameter2).getId().toUnqualifiedVersionless(); mySearchParamRegistry.forceRefresh(); BodyStructure bs = new BodyStructure(); @@ -968,6 +1011,15 @@ public class FhirResourceDaoR4SearchOptimizedTest extends BaseJpaR4Test { .addTag("acc_procext_fkc", "1STCANN2NDL", "First Successful Cannulation with 2 Needles"); IIdType procedureId = myProcedureDao.create(procedure).getId().toUnqualifiedVersionless(); + Device device = new Device(); + device.setManufacturer("Acme"); + IIdType deviceId = myDeviceDao.create(device).getId().toUnqualifiedVersionless(); + + Provenance provenance = new Provenance(); + provenance.setActivity(new CodeableConcept().addCoding(new Coding().setSystem("http://hl7.org/fhir/v3/DocumentCompletion").setCode("PA"))); + provenance.addAgent().setWho(new Reference(deviceId)); + IIdType provenanceId = myProvenanceDao.create(provenance).getId().toUnqualifiedVersionless(); + logAllResources(); logAllResourceTags(); logAllResourceVersions(); @@ -1027,6 +1079,30 @@ public class FhirResourceDaoR4SearchOptimizedTest extends BaseJpaR4Test { assertEquals(0, StringUtils.countMatches(selectQuery.toLowerCase(), ".res_type = 'procedure'"), selectQuery); assertEquals(0, StringUtils.countMatches(selectQuery.toLowerCase(), ".res_deleted_at is null"), selectQuery); } + + // Search example 3: + // http://FHIR_SERVER/fhir_request/Provenance + // ?agent=Acme&activity=PA&_lastUpdated=ge2021-01-01&_requestTrace=True + // NOTE: This gets sorted once so the order is different once it gets executed! + { + // IMPORTANT: Keep the query param order exactly as shown below! + // NOTE: The "outcome" SearchParameter is not being used below, but it doesn't affect the test. + SearchParameterMap map = SearchParameterMap.newSynchronous(); + map.add("agent", new ReferenceParam("Device/" + deviceId.getIdPart())); + map.add("activity", new TokenParam("PA")); + DateRangeParam dateRangeParam = new DateRangeParam("ge2021-01-01", null); + map.setLastUpdated(dateRangeParam); + myCaptureQueriesListener.clear(); + IBundleProvider outcome = myProvenanceDao.search(map, new SystemRequestDetails()); + ourLog.info("Search returned {} resources.", outcome.getResources(0, 999).size()); + //assertEquals(1, outcome.getResources(0, 999).size()); + myCaptureQueriesListener.logSelectQueriesForCurrentThread(); + + String selectQuery = myCaptureQueriesListener.getSelectQueriesForCurrentThread().get(0).getSql(true, false); + // Ensure that we do NOT see a couple of particular WHERE clauses + assertEquals(0, StringUtils.countMatches(selectQuery.toLowerCase(), ".res_type = 'provenance'"), selectQuery); + assertEquals(0, StringUtils.countMatches(selectQuery.toLowerCase(), ".res_deleted_at is null"), selectQuery); + } } @AfterEach From 207558dba3dc9ad6f500fd52ff899e05b479720a Mon Sep 17 00:00:00 2001 From: Jason Roberts Date: Tue, 7 Sep 2021 17:27:22 -0400 Subject: [PATCH 087/143] code review feedback --- .../jpa/search/builder/SearchBuilder.java | 4 +- ...rchTest.java => ChainingR4SearchTest.java} | 71 ++++++------------- .../r4/FhirResourceDaoR4ContainedTest.java | 4 +- 3 files changed, 27 insertions(+), 52 deletions(-) rename hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/{ChainedContainedR4SearchTest.java => ChainingR4SearchTest.java} (81%) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java index 5152973bfff..02414ae822d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java @@ -373,7 +373,7 @@ public class SearchBuilder implements ISearchBuilder { SearchQueryBuilder sqlBuilder = new SearchQueryBuilder(myContext, myDaoConfig.getModelConfig(), myPartitionSettings, myRequestPartitionId, sqlBuilderResourceName, mySqlBuilderFactory, myDialectProvider, theCount); QueryStack queryStack3 = new QueryStack(theParams, myDaoConfig, myDaoConfig.getModelConfig(), myContext, sqlBuilder, mySearchParamRegistry, myPartitionSettings); - if (theParams.keySet().size() > 1 || theParams.getSort() != null || theParams.keySet().contains(Constants.PARAM_HAS) || isTraverseContainedReferenceAtRoot(theParams)) { + if (theParams.keySet().size() > 1 || theParams.getSort() != null || theParams.keySet().contains(Constants.PARAM_HAS) || isPotentiallyContainedReferenceParameterExistsAtRoot(theParams)) { List activeComboParams = mySearchParamRegistry.getActiveComboSearchParams(myResourceName, theParams.keySet()); if (activeComboParams.isEmpty()) { sqlBuilder.setNeedResourceTableRoot(true); @@ -483,7 +483,7 @@ public class SearchBuilder implements ISearchBuilder { return Optional.of(executor); } - private boolean isTraverseContainedReferenceAtRoot(SearchParameterMap theParams) { + private boolean isPotentiallyContainedReferenceParameterExistsAtRoot(SearchParameterMap theParams) { return myModelConfig.isIndexOnContainedResources() && theParams.values().stream() .flatMap(Collection::stream) .flatMap(Collection::stream) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainingR4SearchTest.java similarity index 81% rename from hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java rename to hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainingR4SearchTest.java index 003f68a9555..6c96220eb19 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainedContainedR4SearchTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ChainingR4SearchTest.java @@ -28,9 +28,7 @@ import static org.hamcrest.Matchers.contains; import static org.junit.jupiter.api.Assertions.assertEquals; -public class ChainedContainedR4SearchTest extends BaseJpaR4Test { - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ChainedContainedR4SearchTest.class); +public class ChainingR4SearchTest extends BaseJpaR4Test { @Autowired MatchUrlService myMatchUrlService; @@ -77,16 +75,12 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { obs.getSubject().setReference(p.getId()); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - - ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } String url = "/Observation?subject.name=Smith"; // execute - myCaptureQueriesListener.clear(); List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); - ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); // validate assertEquals(1L, oids.size()); @@ -95,6 +89,7 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { @Test public void testShouldResolveATwoLinkChainWithAContainedResource() throws Exception { + // setup IIdType oid1; { @@ -109,16 +104,14 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { obs.getSubject().setReference("#pat"); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - - ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } String url = "/Observation?subject.name=Smith"; -// String url = "/Observation?subject.name=Smith&value-string=Test"; - myCaptureQueriesListener.clear(); - List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); - ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + // execute + List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); + + // validate assertEquals(1L, oids.size()); assertThat(oids, contains(oid1.getIdPart())); } @@ -146,16 +139,12 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { obs.getSubject().setReference(p.getId()); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - - ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } String url = "/Observation?subject.organization.name=HealthCo"; // execute - myCaptureQueriesListener.clear(); List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); - ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); // validate assertEquals(1L, oids.size()); @@ -165,9 +154,10 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { @Test public void testShouldResolveAThreeLinkChainWithAContainedResourceAtTheEndOfTheChain() throws Exception { // This is the case that is most relevant to SMILE-2899 + + // setup IIdType oid1; - myCaptureQueriesListener.clear(); { Organization org = new Organization(); org.setId("org"); @@ -185,16 +175,14 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { obs.getSubject().setReference(p.getId()); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - - ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } - ourLog.info("Data setup SQL: " + myCaptureQueriesListener.getInsertQueriesForCurrentThread()); String url = "/Observation?subject.organization.name=HealthCo"; - myCaptureQueriesListener.clear(); - List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); - ourLog.info("Data retrieval SQL: " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + // execute + List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); + + // validate assertEquals(1L, oids.size()); assertThat(oids, contains(oid1.getIdPart())); } @@ -204,6 +192,7 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { public void testShouldResolveAThreeLinkChainWithAContainedResourceAtTheBeginningOfTheChain() throws Exception { // We do not currently support this case - we may not be indexing the references of contained resources + // setup IIdType oid1; { @@ -223,15 +212,14 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { obs.getSubject().setReference("#pat"); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - - ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } String url = "/Observation?subject.organization.name=HealthCo"; - myCaptureQueriesListener.clear(); - List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); - ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + // execute + List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); + + // validate assertEquals(1L, oids.size()); assertThat(oids, contains(oid1.getIdPart())); } @@ -259,16 +247,12 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { obs.getSubject().setReference(p.getId()); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - - ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } String url = "/Observation?subject:Patient.organization:Organization.name=HealthCo"; // execute - myCaptureQueriesListener.clear(); List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); - ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); // validate assertEquals(1L, oids.size()); @@ -278,9 +262,10 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { @Test public void testShouldResolveAThreeLinkChainWithQualifiersWithAContainedResourceAtTheEndOfTheChain() throws Exception { // This is the case that is most relevant to SMILE-2899 + + // setup IIdType oid1; - myCaptureQueriesListener.clear(); { Organization org = new Organization(); org.setId("org"); @@ -298,16 +283,14 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { obs.getSubject().setReference(p.getId()); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - - ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } - ourLog.info("Data setup SQL: " + myCaptureQueriesListener.getInsertQueriesForCurrentThread()); String url = "/Observation?subject:Patient.organization:Organization.name=HealthCo"; - myCaptureQueriesListener.clear(); - List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); - ourLog.info("Data retrieval SQL: " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + // execute + List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); + + // validate assertEquals(1L, oids.size()); assertThat(oids, contains(oid1.getIdPart())); } @@ -340,16 +323,12 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { obs.getSubject().setReference(p.getId()); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - - ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } String url = "/Observation?subject.organization.partof.name=HealthCo"; // execute - myCaptureQueriesListener.clear(); List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); - ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); // validate assertEquals(1L, oids.size()); @@ -384,16 +363,12 @@ public class ChainedContainedR4SearchTest extends BaseJpaR4Test { obs.getSubject().setReference(p.getId()); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - - ourLog.info("Input: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } String url = "/Observation?subject.organization.partof.name=HealthCo"; // execute - myCaptureQueriesListener.clear(); List oids = searchAndReturnUnqualifiedVersionlessIdValues(url); - ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); // validate assertEquals(1L, oids.size()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ContainedTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ContainedTest.java index 2074f5ab126..a6f26615bbc 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ContainedTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ContainedTest.java @@ -114,9 +114,9 @@ public class FhirResourceDaoR4ContainedTest extends BaseJpaR4Test { map.add("subject", new ReferenceParam("name", "Smith")); map.setSearchContainedMode(SearchContainedModeEnum.TRUE); map.setLoadSynchronous(true); - myCaptureQueriesListener.clear(); + assertThat(toUnqualifiedVersionlessIdValues(myObservationDao.search(map)), containsInAnyOrder(toValues(id))); - ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread()); + } From c2414d2cae578bdddd5f69abab5a7c0dae4d8699 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 7 Sep 2021 18:35:59 -0400 Subject: [PATCH 088/143] Throw error if misconfigured --- .../search/elastic/IndexNamePrefixLayoutStrategy.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java index 9f5f48f37af..fa5721b75dc 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java @@ -1,5 +1,6 @@ package ca.uhn.fhir.jpa.search.elastic; +import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.jpa.api.config.DaoConfig; import org.apache.commons.lang3.StringUtils; import org.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy; @@ -40,7 +41,7 @@ public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy { } private String addPrefixIfNecessary(String theCandidateName) { - + validateDaoConfigIsPresent(); if (!StringUtils.isBlank(myDaoConfig.getElasticSearchIndexPrefix())) { return myDaoConfig.getElasticSearchIndexPrefix() + "-" + theCandidateName; } else { @@ -63,10 +64,16 @@ public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy { } private String removePrefixIfNecessary(String theCandidateUniqueKey) { + validateDaoConfigIsPresent(); if (!StringUtils.isBlank(myDaoConfig.getElasticSearchIndexPrefix())) { return theCandidateUniqueKey.replace(myDaoConfig.getElasticSearchIndexPrefix() + "-", ""); } else { return theCandidateUniqueKey; } } + private void validateDaoConfigIsPresent() { + if (myDaoConfig == null) { + throw new ConfigurationException("While attempting to boot HAPI FHIR, the Hibernate Search bootstrapper failed to find the DaoConfig. This probably means Hibernate Search has been recently upgraded, or somebody modified HapiFhirLocalContainerEntityManagerFactoryBean."); + } + } } From 5d5c45e3574f3416edd0d0ef3f58f2e3cda9967d Mon Sep 17 00:00:00 2001 From: Tadgh Date: Wed, 8 Sep 2021 08:49:19 -0400 Subject: [PATCH 089/143] Add whitespace --- .../HapiFhirLocalContainerEntityManagerFactoryBean.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java index 5c6e44a0b02..c0e3fcc1cf6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java @@ -74,8 +74,8 @@ public class HapiFhirLocalContainerEntityManagerFactoryBean extends LocalContain if (!retVal.containsKey(AvailableSettings.BATCH_VERSIONED_DATA)) { retVal.put(AvailableSettings.BATCH_VERSIONED_DATA, "true"); } - //Why is this here, you ask? LocalContainerEntityManagerFactoryBean actually clobbers the setting hibernate needs - //in order to be able to resolve beans, so we add it back in manually here + // Why is this here, you ask? LocalContainerEntityManagerFactoryBean actually clobbers the setting hibernate needs + // in order to be able to resolve beans, so we add it back in manually here if (!retVal.containsKey(AvailableSettings.BEAN_CONTAINER)) { retVal.put(AvailableSettings.BEAN_CONTAINER, new SpringBeanContainer(myConfigurableListableBeanFactory)); } From 519244a2ea5763e75ebb79f04a3d91b5b42bc004 Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Wed, 8 Sep 2021 19:14:50 -0400 Subject: [PATCH 090/143] unit test passes --- .../jpa/cache/ResourceVersionSvcDaoImpl.java | 17 +++- .../ca/uhn/fhir/jpa/dao/BaseStorageDao.java | 14 +-- .../jpa/dao/BaseTransactionProcessor.java | 41 ++++----- .../fhir/jpa/dao/index/IdHelperService.java | 91 +------------------ ...eTest.java => ResourceVersionSvcTest.java} | 52 ++++------- .../stresstest/GiantTransactionPerfTest.java | 8 +- .../fhir/jpa/cache/IResourceVersionSvc.java | 12 ++- .../fhir/jpa/cache/ResourceVersionMap.java | 24 ++++- 8 files changed, 100 insertions(+), 159 deletions(-) rename hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/{IdHelperServiceTest.java => ResourceVersionSvcTest.java} (77%) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java index cb82083e24e..aac577d9d85 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java @@ -24,11 +24,13 @@ import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; +import ca.uhn.fhir.jpa.dao.index.IdHelperService; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.util.QueryChunker; import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; +import org.hl7.fhir.instance.model.api.IIdType; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -52,17 +54,19 @@ public class ResourceVersionSvcDaoImpl implements IResourceVersionSvc { DaoRegistry myDaoRegistry; @Autowired IResourceTableDao myResourceTableDao; + @Autowired + IdHelperService myIdHelperService; @Override @Nonnull - public ResourceVersionMap getVersionMap(String theResourceName, SearchParameterMap theSearchParamMap) { + public ResourceVersionMap getVersionMap(RequestPartitionId theRequestPartitionId, String theResourceName, SearchParameterMap theSearchParamMap) { IFhirResourceDao dao = myDaoRegistry.getResourceDao(theResourceName); if (ourLog.isDebugEnabled()) { ourLog.debug("About to retrieve version map for resource type: {}", theResourceName); } - List matchingIds = dao.searchForIds(theSearchParamMap, new SystemRequestDetails().setRequestPartitionId(RequestPartitionId.allPartitions())).stream() + List matchingIds = dao.searchForIds(theSearchParamMap, new SystemRequestDetails().setRequestPartitionId(theRequestPartitionId)).stream() .map(ResourcePersistentId::getIdAsLong) .collect(Collectors.toList()); @@ -74,4 +78,13 @@ public class ResourceVersionSvcDaoImpl implements IResourceVersionSvc { return ResourceVersionMap.fromResourceTableEntities(allById); } + + @Override + public ResourceVersionMap getLatestVersionIdsForResourceIds(RequestPartitionId thePartitionId, List theIds) { + + List resourcePersistentIds = myIdHelperService.resolveResourcePersistentIdsWithCache(thePartitionId, + new ArrayList<>(theIds)); + + return ResourceVersionMap.fromResourcePersistentIds(resourcePersistentIds); + } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java index 58aeae432ca..afc8b324062 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java @@ -30,7 +30,8 @@ import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.api.model.LazyDaoMethodOutcome; -import ca.uhn.fhir.jpa.dao.index.IdHelperService; +import ca.uhn.fhir.jpa.cache.IResourceVersionSvc; +import ca.uhn.fhir.jpa.cache.ResourceVersionMap; import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.model.entity.ResourceTable; @@ -94,7 +95,7 @@ public abstract class BaseStorageDao { @Autowired protected ModelConfig myModelConfig; @Autowired - protected IdHelperService myIdHelperService; + protected IResourceVersionSvc myResourceVersionSvc; @Autowired protected DaoConfig myDaoConfig; @@ -211,7 +212,7 @@ public abstract class BaseStorageDao { IIdType referenceElement = nextReference.getReferenceElement(); if (!referenceElement.hasBaseUrl()) { - Map idToPID = myIdHelperService.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), + ResourceVersionMap resourceVersionMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), Collections.singletonList(referenceElement) ); @@ -220,12 +221,11 @@ public abstract class BaseStorageDao { // 2) no resource exists, but we will create one (eventually). The version is 1 // 3) no resource exists, and none will be made -> throw Long version; - if (idToPID.containsKey(referenceElement)) { + if (resourceVersionMap.containsKey(referenceElement)) { // the resource exists... latest id // will be the value in the ResourcePersistentId - version = idToPID.get(referenceElement).getVersion(); - } - else if (myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { + version = resourceVersionMap.getVersionAsLong(referenceElement); + } else if (myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { // if idToPID doesn't contain object // but autcreateplaceholders is on // then the version will be 1 (the first version) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index d554b645514..04352bc2464 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -35,7 +35,8 @@ import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.api.model.DeleteConflict; import ca.uhn.fhir.jpa.api.model.DeleteConflictList; import ca.uhn.fhir.jpa.api.model.DeleteMethodOutcome; -import ca.uhn.fhir.jpa.dao.index.IdHelperService; +import ca.uhn.fhir.jpa.cache.IResourceVersionSvc; +import ca.uhn.fhir.jpa.cache.ResourceVersionMap; import ca.uhn.fhir.jpa.dao.tx.HapiTransactionService; import ca.uhn.fhir.jpa.delete.DeleteConflictService; import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; @@ -54,7 +55,6 @@ import ca.uhn.fhir.rest.api.PreferReturnEnum; import ca.uhn.fhir.rest.api.RestOperationTypeEnum; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.api.server.storage.DeferredInterceptorBroadcasts; -import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import ca.uhn.fhir.rest.api.server.storage.TransactionDetails; import ca.uhn.fhir.rest.param.ParameterUtil; import ca.uhn.fhir.rest.server.RestfulServerUtils; @@ -160,7 +160,7 @@ public abstract class BaseTransactionProcessor { private TaskExecutor myExecutor ; @Autowired - private IdHelperService myIdHelperService; + private IResourceVersionSvc myResourceVersionSvc; @VisibleForTesting public void setDaoConfig(DaoConfig theDaoConfig) { @@ -1271,25 +1271,24 @@ public abstract class BaseTransactionProcessor { // get a map of // existing ids -> PID (for resources that exist in the DB) // should this be allPartitions? - Map idToPID = myIdHelperService.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), + ResourceVersionMap resourceVersionMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), theReferencesToAutoVersion.stream() - .map(ref -> ref.getReferenceElement()).collect(Collectors.toList())); + .map(IBaseReference::getReferenceElement).collect(Collectors.toList())); for (IBaseReference baseRef : theReferencesToAutoVersion) { IIdType id = baseRef.getReferenceElement(); - if (!idToPID.containsKey(id) - && myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { + if (!resourceVersionMap.containsKey(id) + && myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { // not in the db, but autocreateplaceholders is true // so the version we'll set is "1" (since it will be // created later) String newRef = id.withVersion("1").getValue(); id.setValue(newRef); - } - else { + } else { // we will add the looked up info to the transaction // for later theTransactionDetails.addResolvedResourceId(id, - idToPID.get(id)); + resourceVersionMap.getResourcePersistentId(id)); } } @@ -1686,19 +1685,19 @@ public abstract class BaseTransactionProcessor { public class BundleTask implements Runnable { - private CountDownLatch myCompletedLatch; - private RequestDetails myRequestDetails; - private IBase myNextReqEntry; - private Map myResponseMap; - private int myResponseOrder; - private boolean myNestedMode; - + private final CountDownLatch myCompletedLatch; + private final RequestDetails myRequestDetails; + private final IBase myNextReqEntry; + private final Map myResponseMap; + private final int myResponseOrder; + private final boolean myNestedMode; + protected BundleTask(CountDownLatch theCompletedLatch, RequestDetails theRequestDetails, Map theResponseMap, int theResponseOrder, IBase theNextReqEntry, boolean theNestedMode) { this.myCompletedLatch = theCompletedLatch; this.myRequestDetails = theRequestDetails; this.myNextReqEntry = theNextReqEntry; - this.myResponseMap = theResponseMap; - this.myResponseOrder = theResponseOrder; + this.myResponseMap = theResponseMap; + this.myResponseOrder = theResponseOrder; this.myNestedMode = theNestedMode; } @@ -1707,7 +1706,7 @@ public abstract class BaseTransactionProcessor { BaseServerResponseExceptionHolder caughtEx = new BaseServerResponseExceptionHolder(); try { IBaseBundle subRequestBundle = myVersionAdapter.createBundle(org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTION.toCode()); - myVersionAdapter.addEntry(subRequestBundle, (IBase) myNextReqEntry); + myVersionAdapter.addEntry(subRequestBundle, myNextReqEntry); IBaseBundle nextResponseBundle = processTransactionAsSubRequest(myRequestDetails, subRequestBundle, "Batch sub-request", myNestedMode); @@ -1735,7 +1734,7 @@ public abstract class BaseTransactionProcessor { } // checking for the parallelism - ourLog.debug("processing bacth for {} is completed", myVersionAdapter.getEntryRequestUrl((IBase)myNextReqEntry)); + ourLog.debug("processing bacth for {} is completed", myVersionAdapter.getEntryRequestUrl(myNextReqEntry)); myCompletedLatch.countDown(); } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java index 03763d40a0f..91c99df3972 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java @@ -303,7 +303,7 @@ public class IdHelperService { if (forcedId.isPresent()) { retVal.setValue(theResourceType + '/' + forcedId.get()); } else { - retVal.setValue(theResourceType + '/' + theId.toString()); + retVal.setValue(theResourceType + '/' + theId); } return retVal; @@ -530,95 +530,6 @@ public class IdHelperService { return retVal; } - /** - * Helper method to determine if some resources exist in the DB (without throwing). - * Returns a set that contains the IIdType for every resource found. - * If it's not found, it won't be included in the set. - * @param theIds - list of IIdType ids (for the same resource) - * @return - */ - private Map getIdsOfExistingResources(RequestPartitionId thePartitionId, - Collection theIds) { - // these are the found Ids that were in the db - HashMap collected = new HashMap<>(); - - if (theIds == null || theIds.isEmpty()) { - return collected; - } - - List resourcePersistentIds = resolveResourcePersistentIdsWithCache(thePartitionId, - theIds.stream().collect(Collectors.toList())); - - // we'll use this map to fetch pids that require versions - HashMap pidsToVersionToResourcePid = new HashMap<>(); - - // fill in our map - for (ResourcePersistentId pid : resourcePersistentIds) { - if (pid.getVersion() == null) { - pidsToVersionToResourcePid.put(pid.getIdAsLong(), pid); - } - Optional idOp = theIds.stream() - .filter(i -> i.getIdPart().equals(pid.getAssociatedResourceId().getIdPart())) - .findFirst(); - // this should always be present - // since it was passed in. - // but land of optionals... - idOp.ifPresent(id -> { - collected.put(id, pid); - }); - } - - // set any versions we don't already have - if (!pidsToVersionToResourcePid.isEmpty()) { - Collection resourceEntries = myResourceTableDao - .getResourceVersionsForPid(new ArrayList<>(pidsToVersionToResourcePid.keySet())); - - for (Object[] record : resourceEntries) { - // order matters! - Long retPid = (Long)record[0]; - String resType = (String)record[1]; - Long version = (Long)record[2]; - pidsToVersionToResourcePid.get(retPid).setVersion(version); - } - } - - return collected; - } - - /** - * Retrieves the latest versions for any resourceid that are found. - * If they are not found, they will not be contained in the returned map. - * The key should be the same value that was passed in to allow - * consumer to look up the value using the id they already have. - * - * This method should not throw, so it can safely be consumed in - * transactions. - * - * @param theRequestPartitionId - request partition id - * @param theIds - list of IIdTypes for resources of interest. - * @return - */ - public Map getLatestVersionIdsForResourceIds(RequestPartitionId theRequestPartitionId, Collection theIds) { - HashMap idToPID = new HashMap<>(); - HashMap> resourceTypeToIds = new HashMap<>(); - - for (IIdType id : theIds) { - String resourceType = id.getResourceType(); - if (!resourceTypeToIds.containsKey(resourceType)) { - resourceTypeToIds.put(resourceType, new ArrayList<>()); - } - resourceTypeToIds.get(resourceType).add(id); - } - - for (String resourceType : resourceTypeToIds.keySet()) { - Map idAndPID = getIdsOfExistingResources(theRequestPartitionId, - resourceTypeToIds.get(resourceType)); - idToPID.putAll(idAndPID); - } - - return idToPID; - } - /** * @deprecated This method doesn't take a partition ID as input, so it is unsafe. It * should be reworked to include the partition ID before any new use is incorporated diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/IdHelperServiceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/ResourceVersionSvcTest.java similarity index 77% rename from hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/IdHelperServiceTest.java rename to hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/ResourceVersionSvcTest.java index 2ca8fea957c..f6fa0f9d798 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/IdHelperServiceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/ResourceVersionSvcTest.java @@ -1,11 +1,12 @@ package ca.uhn.fhir.jpa.dao.index; import ca.uhn.fhir.interceptor.model.RequestPartitionId; -import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.api.dao.DaoRegistry; +import ca.uhn.fhir.jpa.cache.ResourceVersionMap; +import ca.uhn.fhir.jpa.cache.ResourceVersionSvcDaoImpl; import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; import ca.uhn.fhir.jpa.model.config.PartitionSettings; import ca.uhn.fhir.jpa.model.entity.ForcedId; -import ca.uhn.fhir.jpa.util.MemoryCacheService; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import org.hl7.fhir.instance.model.api.IIdType; @@ -17,7 +18,6 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import javax.persistence.EntityManager; import javax.persistence.TypedQuery; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; @@ -28,13 +28,14 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; -import java.util.Map; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertSame; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) -public class IdHelperServiceTest { +public class ResourceVersionSvcTest { // helper class to package up data for helper methods private class ResourceIdPackage { @@ -52,19 +53,15 @@ public class IdHelperServiceTest { } @Mock - private IResourceTableDao myResourceTableDao; - + DaoRegistry myDaoRegistry; @Mock - private DaoConfig myDaoConfig; - + IResourceTableDao myResourceTableDao; @Mock - private MemoryCacheService myMemoryCacheService; - - @Mock - private EntityManager myEntityManager; + IdHelperService myIdHelperService; + // TODO KHS move the methods that use this out to a separate test class @InjectMocks - private IdHelperService myIdHelperService; + private ResourceVersionSvcDaoImpl myResourceVersionSvc; /** * Gets a ResourceTable record for getResourceVersionsForPid @@ -92,20 +89,7 @@ public class IdHelperServiceTest { Root from = Mockito.mock(Root.class); Path path = Mockito.mock(Path.class); - Mockito.when(cb.createQuery(Mockito.any(Class.class))) - .thenReturn(criteriaQuery); - Mockito.when(criteriaQuery.from(Mockito.any(Class.class))) - .thenReturn(from); - Mockito.when(from.get(Mockito.anyString())) - .thenReturn(path); - TypedQuery queryMock = Mockito.mock(TypedQuery.class); - Mockito.when(queryMock.getResultList()).thenReturn(new ArrayList<>()); // not found - - Mockito.when(myEntityManager.getCriteriaBuilder()) - .thenReturn(cb); - Mockito.when(myEntityManager.createQuery(Mockito.any(CriteriaQuery.class))) - .thenReturn(queryMock); } /** @@ -130,15 +114,11 @@ public class IdHelperServiceTest { ResourcePersistentId first = resourcePersistentIds.remove(0); if (resourcePersistentIds.isEmpty()) { - Mockito.when(myMemoryCacheService.getIfPresent(Mockito.any(MemoryCacheService.CacheEnum.class), Mockito.anyString())) - .thenReturn(first).thenReturn(null); + when(myIdHelperService.resolveResourcePersistentIdsWithCache(any(), any())).thenReturn(Collections.singletonList(first)); } else { - Mockito.when(myMemoryCacheService.getIfPresent(Mockito.any(MemoryCacheService.CacheEnum.class), Mockito.anyString())) - .thenReturn(first, resourcePersistentIds.toArray()); + when(myIdHelperService.resolveResourcePersistentIdsWithCache(any(), any())).thenReturn(resourcePersistentIds); } - Mockito.when(myResourceTableDao.getResourceVersionsForPid(Mockito.anyList())) - .thenReturn(matches); } @Test @@ -154,7 +134,7 @@ public class IdHelperServiceTest { mockReturnsFor_getIdsOfExistingResources(pack); // test - Map retMap = myIdHelperService.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), + ResourceVersionMap retMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), Collections.singletonList(type)); Assertions.assertTrue(retMap.containsKey(type)); @@ -169,7 +149,7 @@ public class IdHelperServiceTest { mock_resolveResourcePersistentIdsWithCache_toReturnNothing(); // test - Map retMap = myIdHelperService.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), + ResourceVersionMap retMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), Collections.singletonList(type)); Assertions.assertTrue(retMap.isEmpty()); @@ -191,7 +171,7 @@ public class IdHelperServiceTest { mockReturnsFor_getIdsOfExistingResources(pack); // test - Map retMap = myIdHelperService.getLatestVersionIdsForResourceIds( + ResourceVersionMap retMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds( RequestPartitionId.allPartitions(), Arrays.asList(type, type2) ); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java index d9da4485295..57c5b39a76a 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java @@ -45,6 +45,7 @@ import com.google.common.collect.Lists; import org.hamcrest.Matchers; import org.hibernate.internal.SessionImpl; import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.ExplanationOfBenefit; import org.junit.jupiter.api.AfterEach; @@ -323,10 +324,15 @@ public class GiantTransactionPerfTest { @Nonnull @Override - public ResourceVersionMap getVersionMap(String theResourceName, SearchParameterMap theSearchParamMap) { + public ResourceVersionMap getVersionMap(RequestPartitionId theRequestPartitionId, String theResourceName, SearchParameterMap theSearchParamMap) { myGetVersionMap++; return ResourceVersionMap.fromResources(Lists.newArrayList()); } + + @Override + public ResourceVersionMap getLatestVersionIdsForResourceIds(RequestPartitionId thePartition, List theIds) { + return null; + } } private class MockResourceHistoryTableDao implements IResourceHistoryTableDao { diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/IResourceVersionSvc.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/IResourceVersionSvc.java index d53dc45fd94..d7566044ccd 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/IResourceVersionSvc.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/IResourceVersionSvc.java @@ -20,9 +20,12 @@ package ca.uhn.fhir.jpa.cache; * #L% */ +import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import org.hl7.fhir.instance.model.api.IIdType; import javax.annotation.Nonnull; +import java.util.List; /** * This interface is used by the {@link IResourceChangeListenerCacheRefresher} to read resources matching the provided @@ -30,5 +33,12 @@ import javax.annotation.Nonnull; */ public interface IResourceVersionSvc { @Nonnull - ResourceVersionMap getVersionMap(String theResourceName, SearchParameterMap theSearchParamMap); + ResourceVersionMap getVersionMap(RequestPartitionId theRequestPartitionId, String theResourceName, SearchParameterMap theSearchParamMap); + + @Nonnull + default ResourceVersionMap getVersionMap(String theResourceName, SearchParameterMap theSearchParamMap) { + return getVersionMap(RequestPartitionId.allPartitions(), theResourceName, theSearchParamMap); + } + + ResourceVersionMap getLatestVersionIdsForResourceIds(RequestPartitionId thePartition, List theIds); } diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java index 3b412e0546c..3760039a63d 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java @@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.cache; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; @@ -37,6 +38,7 @@ import java.util.Set; */ public class ResourceVersionMap { private final Set mySourceIds = new HashSet<>(); + // Key versionless id, value version private final Map myMap = new HashMap<>(); private ResourceVersionMap() {} @@ -56,6 +58,12 @@ public class ResourceVersionMap { return new ResourceVersionMap(); } + public static ResourceVersionMap fromResourcePersistentIds(List theResourcePersistentIds) { + ResourceVersionMap retval = new ResourceVersionMap(); + theResourcePersistentIds.forEach(resource -> retval.add(resource.getAssociatedResourceId())); + return retval; + } + private void add(IIdType theId) { IdDt id = new IdDt(theId); mySourceIds.add(id); @@ -63,7 +71,7 @@ public class ResourceVersionMap { } public String getVersion(IIdType theResourceId) { - return myMap.get(new IdDt(theResourceId.toUnqualifiedVersionless())); + return get(theResourceId); } public int size() { @@ -85,4 +93,18 @@ public class ResourceVersionMap { public boolean containsKey(IIdType theId) { return myMap.containsKey(new IdDt(theId.toUnqualifiedVersionless())); } + + public ResourcePersistentId getResourcePersistentId(IIdType theId) { + String idPart = theId.getIdPart(); + Long version = getVersionAsLong(theId); + return new ResourcePersistentId(idPart, version); + } + + public Long getVersionAsLong(IIdType theId) { + return Long.valueOf(getVersion(theId)); + } + + public boolean isEmpty() { + return myMap.isEmpty(); + } } From 81abe26cdaedf47b752fa7cde2302289352cbac0 Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Wed, 8 Sep 2021 20:08:06 -0400 Subject: [PATCH 091/143] improve api --- .../main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java | 2 +- .../fhir/rest/api/server/storage/ResourcePersistentId.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java index 3760039a63d..b01a140f8b6 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java @@ -60,7 +60,7 @@ public class ResourceVersionMap { public static ResourceVersionMap fromResourcePersistentIds(List theResourcePersistentIds) { ResourceVersionMap retval = new ResourceVersionMap(); - theResourcePersistentIds.forEach(resource -> retval.add(resource.getAssociatedResourceId())); + theResourcePersistentIds.forEach(resourcePersistentId -> retval.add(resourcePersistentId.getAssociatedResourceId())); return retval; } diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java index 1a45a9c9256..801d83b9b47 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java @@ -125,4 +125,10 @@ public class ResourcePersistentId { } return retVal; } + + public static ResourcePersistentId fromIIdType(IIdType theId) { + ResourcePersistentId retval = new ResourcePersistentId(theId); + retval.setAssociatedResourceId(theId); + return retval; + } } From 67c8216d7331bcae8c08bc258e118e032501a3a3 Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Wed, 8 Sep 2021 20:17:14 -0400 Subject: [PATCH 092/143] cleanup --- .../main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java index b01a140f8b6..3a6ab214906 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java @@ -95,9 +95,9 @@ public class ResourceVersionMap { } public ResourcePersistentId getResourcePersistentId(IIdType theId) { - String idPart = theId.getIdPart(); - Long version = getVersionAsLong(theId); - return new ResourcePersistentId(idPart, version); + ResourcePersistentId retval = ResourcePersistentId.fromIIdType(theId); + retval.setVersion(getVersionAsLong(theId)); + return retval; } public Long getVersionAsLong(IIdType theId) { From 5bc571d97d5da3137045330f563efd356d9ea977 Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Thu, 9 Sep 2021 01:00:12 -0400 Subject: [PATCH 093/143] fix test --- .../jpa/cache/ResourceVersionSvcDaoImpl.java | 4 +- .../ca/uhn/fhir/jpa/dao/BaseStorageDao.java | 6 +-- .../jpa/dao/BaseTransactionProcessor.java | 4 +- .../cache/ResourceVersionCacheSvcTest.java | 4 +- .../jpa/dao/TransactionProcessorTest.java | 3 ++ .../jpa/dao/index/ResourceVersionSvcTest.java | 8 ++-- .../stresstest/GiantTransactionPerfTest.java | 3 +- .../fhir/jpa/cache/IResourceVersionSvc.java | 2 +- ...ourceChangeListenerCacheRefresherImpl.java | 4 +- .../jpa/cache/ResourcePersistentIdMap.java | 39 +++++++++++++++++++ .../fhir/jpa/cache/ResourceVersionCache.java | 8 ++-- .../fhir/jpa/cache/ResourceVersionMap.java | 32 ++++++--------- .../server/storage/ResourcePersistentId.java | 6 --- 13 files changed, 75 insertions(+), 48 deletions(-) create mode 100644 hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourcePersistentIdMap.java diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java index aac577d9d85..c9ca8e0255a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java @@ -80,11 +80,11 @@ public class ResourceVersionSvcDaoImpl implements IResourceVersionSvc { } @Override - public ResourceVersionMap getLatestVersionIdsForResourceIds(RequestPartitionId thePartitionId, List theIds) { + public ResourcePersistentIdMap getLatestVersionIdsForResourceIds(RequestPartitionId thePartitionId, List theIds) { List resourcePersistentIds = myIdHelperService.resolveResourcePersistentIdsWithCache(thePartitionId, new ArrayList<>(theIds)); - return ResourceVersionMap.fromResourcePersistentIds(resourcePersistentIds); + return ResourcePersistentIdMap.fromResourcePersistentIds(resourcePersistentIds); } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java index afc8b324062..a8ee4cf93e7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java @@ -31,7 +31,7 @@ import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.api.model.LazyDaoMethodOutcome; import ca.uhn.fhir.jpa.cache.IResourceVersionSvc; -import ca.uhn.fhir.jpa.cache.ResourceVersionMap; +import ca.uhn.fhir.jpa.cache.ResourcePersistentIdMap; import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.model.entity.ResourceTable; @@ -212,7 +212,7 @@ public abstract class BaseStorageDao { IIdType referenceElement = nextReference.getReferenceElement(); if (!referenceElement.hasBaseUrl()) { - ResourceVersionMap resourceVersionMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), + ResourcePersistentIdMap resourceVersionMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), Collections.singletonList(referenceElement) ); @@ -224,7 +224,7 @@ public abstract class BaseStorageDao { if (resourceVersionMap.containsKey(referenceElement)) { // the resource exists... latest id // will be the value in the ResourcePersistentId - version = resourceVersionMap.getVersionAsLong(referenceElement); + version = resourceVersionMap.getResourcePersistentId(referenceElement).getVersion(); } else if (myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { // if idToPID doesn't contain object // but autcreateplaceholders is on diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index 04352bc2464..50a683e55f5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -36,7 +36,7 @@ import ca.uhn.fhir.jpa.api.model.DeleteConflict; import ca.uhn.fhir.jpa.api.model.DeleteConflictList; import ca.uhn.fhir.jpa.api.model.DeleteMethodOutcome; import ca.uhn.fhir.jpa.cache.IResourceVersionSvc; -import ca.uhn.fhir.jpa.cache.ResourceVersionMap; +import ca.uhn.fhir.jpa.cache.ResourcePersistentIdMap; import ca.uhn.fhir.jpa.dao.tx.HapiTransactionService; import ca.uhn.fhir.jpa.delete.DeleteConflictService; import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; @@ -1271,7 +1271,7 @@ public abstract class BaseTransactionProcessor { // get a map of // existing ids -> PID (for resources that exist in the DB) // should this be allPartitions? - ResourceVersionMap resourceVersionMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), + ResourcePersistentIdMap resourceVersionMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), theReferencesToAutoVersion.stream() .map(IBaseReference::getReferenceElement).collect(Collectors.toList())); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/cache/ResourceVersionCacheSvcTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/cache/ResourceVersionCacheSvcTest.java index fb3bfe4c28f..267fdbda222 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/cache/ResourceVersionCacheSvcTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/cache/ResourceVersionCacheSvcTest.java @@ -21,12 +21,12 @@ public class ResourceVersionCacheSvcTest extends BaseJpaR4Test { IIdType patientId = myPatientDao.create(patient).getId(); ResourceVersionMap versionMap = myResourceVersionCacheSvc.getVersionMap("Patient", SearchParameterMap.newSynchronous()); assertEquals(1, versionMap.size()); - assertEquals("1", versionMap.getVersion(patientId)); + assertEquals(1L, versionMap.getVersion(patientId)); patient.setGender(Enumerations.AdministrativeGender.MALE); myPatientDao.update(patient); versionMap = myResourceVersionCacheSvc.getVersionMap("Patient", SearchParameterMap.newSynchronous()); assertEquals(1, versionMap.size()); - assertEquals("2", versionMap.getVersion(patientId)); + assertEquals(2L, versionMap.getVersion(patientId)); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java index 0bace079a8f..cff84d93d99 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java @@ -5,6 +5,7 @@ import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.interceptor.executor.InterceptorService; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; +import ca.uhn.fhir.jpa.cache.IResourceVersionSvc; import ca.uhn.fhir.jpa.dao.index.IdHelperService; import ca.uhn.fhir.jpa.dao.r4.TransactionProcessorVersionAdapterR4; import ca.uhn.fhir.jpa.dao.tx.HapiTransactionService; @@ -70,6 +71,8 @@ public class TransactionProcessorTest { private MatchUrlService myMatchUrlService; @MockBean private IRequestPartitionHelperSvc myRequestPartitionHelperSvc; + @MockBean + private IResourceVersionSvc myResourceVersionSvc; @MockBean(answer = Answers.RETURNS_DEEP_STUBS) private SessionImpl mySession; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/ResourceVersionSvcTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/ResourceVersionSvcTest.java index f6fa0f9d798..d0b7764729f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/ResourceVersionSvcTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/index/ResourceVersionSvcTest.java @@ -2,7 +2,7 @@ package ca.uhn.fhir.jpa.dao.index; import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; -import ca.uhn.fhir.jpa.cache.ResourceVersionMap; +import ca.uhn.fhir.jpa.cache.ResourcePersistentIdMap; import ca.uhn.fhir.jpa.cache.ResourceVersionSvcDaoImpl; import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; import ca.uhn.fhir.jpa.model.config.PartitionSettings; @@ -134,7 +134,7 @@ public class ResourceVersionSvcTest { mockReturnsFor_getIdsOfExistingResources(pack); // test - ResourceVersionMap retMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), + ResourcePersistentIdMap retMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), Collections.singletonList(type)); Assertions.assertTrue(retMap.containsKey(type)); @@ -149,7 +149,7 @@ public class ResourceVersionSvcTest { mock_resolveResourcePersistentIdsWithCache_toReturnNothing(); // test - ResourceVersionMap retMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), + ResourcePersistentIdMap retMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds(RequestPartitionId.allPartitions(), Collections.singletonList(type)); Assertions.assertTrue(retMap.isEmpty()); @@ -171,7 +171,7 @@ public class ResourceVersionSvcTest { mockReturnsFor_getIdsOfExistingResources(pack); // test - ResourceVersionMap retMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds( + ResourcePersistentIdMap retMap = myResourceVersionSvc.getLatestVersionIdsForResourceIds( RequestPartitionId.allPartitions(), Arrays.asList(type, type2) ); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java index 57c5b39a76a..405e2302044 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java @@ -14,6 +14,7 @@ import ca.uhn.fhir.jpa.cache.ResourceChangeListenerCache; import ca.uhn.fhir.jpa.cache.ResourceChangeListenerCacheFactory; import ca.uhn.fhir.jpa.cache.ResourceChangeListenerCacheRefresherImpl; import ca.uhn.fhir.jpa.cache.ResourceChangeListenerRegistryImpl; +import ca.uhn.fhir.jpa.cache.ResourcePersistentIdMap; import ca.uhn.fhir.jpa.cache.ResourceVersionMap; import ca.uhn.fhir.jpa.dao.JpaResourceDao; import ca.uhn.fhir.jpa.dao.TransactionProcessor; @@ -330,7 +331,7 @@ public class GiantTransactionPerfTest { } @Override - public ResourceVersionMap getLatestVersionIdsForResourceIds(RequestPartitionId thePartition, List theIds) { + public ResourcePersistentIdMap getLatestVersionIdsForResourceIds(RequestPartitionId thePartition, List theIds) { return null; } } diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/IResourceVersionSvc.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/IResourceVersionSvc.java index d7566044ccd..a13d823d351 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/IResourceVersionSvc.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/IResourceVersionSvc.java @@ -40,5 +40,5 @@ public interface IResourceVersionSvc { return getVersionMap(RequestPartitionId.allPartitions(), theResourceName, theSearchParamMap); } - ResourceVersionMap getLatestVersionIdsForResourceIds(RequestPartitionId thePartition, List theIds); + ResourcePersistentIdMap getLatestVersionIdsForResourceIds(RequestPartitionId thePartition, List theIds); } diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceChangeListenerCacheRefresherImpl.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceChangeListenerCacheRefresherImpl.java index f809b02a7e4..8bf05bac0c4 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceChangeListenerCacheRefresherImpl.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceChangeListenerCacheRefresherImpl.java @@ -173,8 +173,8 @@ public class ResourceChangeListenerCacheRefresherImpl implements IResourceChange List updatedIds = new ArrayList<>(); for (IIdType id : theNewResourceVersionMap.keySet()) { - String previousValue = theOldResourceVersionCache.put(id, theNewResourceVersionMap.get(id)); - IIdType newId = id.withVersion(theNewResourceVersionMap.get(id)); + Long previousValue = theOldResourceVersionCache.put(id, theNewResourceVersionMap.get(id)); + IIdType newId = id.withVersion(theNewResourceVersionMap.get(id).toString()); if (previousValue == null) { createdIds.add(newId); } else if (!theNewResourceVersionMap.get(id).equals(previousValue)) { diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourcePersistentIdMap.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourcePersistentIdMap.java new file mode 100644 index 00000000000..6a723db0606 --- /dev/null +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourcePersistentIdMap.java @@ -0,0 +1,39 @@ +package ca.uhn.fhir.jpa.cache; + +import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; +import org.hl7.fhir.instance.model.api.IIdType; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ResourcePersistentIdMap { + private final Map myMap = new HashMap<>(); + + public static ResourcePersistentIdMap fromResourcePersistentIds(List theResourcePersistentIds) { + ResourcePersistentIdMap retval = new ResourcePersistentIdMap(); + theResourcePersistentIds.forEach(retval::add); + return retval; + } + + private void add(ResourcePersistentId theResourcePersistentId) { + IIdType id = theResourcePersistentId.getAssociatedResourceId(); + myMap.put(id.toUnqualifiedVersionless(), theResourcePersistentId); + } + + public boolean containsKey(IIdType theId) { + return myMap.containsKey(theId.toUnqualifiedVersionless()); + } + + public ResourcePersistentId getResourcePersistentId(IIdType theId) { + return myMap.get(theId.toUnqualifiedVersionless()); + } + + public boolean isEmpty() { + return myMap.isEmpty(); + } + + public int size() { + return myMap.size(); + } +} diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionCache.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionCache.java index b490e6d69a3..3b840aa0b71 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionCache.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionCache.java @@ -32,7 +32,7 @@ import java.util.Set; * detect resources that were modified on remote servers in our cluster. */ public class ResourceVersionCache { - private final Map myVersionMap = new HashMap<>(); + private final Map myVersionMap = new HashMap<>(); public void clear() { myVersionMap.clear(); @@ -43,15 +43,15 @@ public class ResourceVersionCache { * @param theVersion * @return previous value */ - public String put(IIdType theResourceId, String theVersion) { + public Long put(IIdType theResourceId, Long theVersion) { return myVersionMap.put(new IdDt(theResourceId).toVersionless(), theVersion); } - public String getVersionForResourceId(IIdType theResourceId) { + public Long getVersionForResourceId(IIdType theResourceId) { return myVersionMap.get(new IdDt(theResourceId)); } - public String removeResourceId(IIdType theResourceId) { + public Long removeResourceId(IIdType theResourceId) { return myVersionMap.remove(new IdDt(theResourceId)); } diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java index 3a6ab214906..fbb029b5afc 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionMap.java @@ -22,9 +22,10 @@ package ca.uhn.fhir.jpa.cache; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.Collections; import java.util.HashMap; @@ -37,9 +38,10 @@ import java.util.Set; * This immutable map holds a copy of current resource versions read from the repository. */ public class ResourceVersionMap { + private static final Logger ourLog = LoggerFactory.getLogger(ResourceVersionMap.class); private final Set mySourceIds = new HashSet<>(); // Key versionless id, value version - private final Map myMap = new HashMap<>(); + private final Map myMap = new HashMap<>(); private ResourceVersionMap() {} public static ResourceVersionMap fromResourceTableEntities(List theEntities) { @@ -58,19 +60,17 @@ public class ResourceVersionMap { return new ResourceVersionMap(); } - public static ResourceVersionMap fromResourcePersistentIds(List theResourcePersistentIds) { - ResourceVersionMap retval = new ResourceVersionMap(); - theResourcePersistentIds.forEach(resourcePersistentId -> retval.add(resourcePersistentId.getAssociatedResourceId())); - return retval; - } - private void add(IIdType theId) { + if (theId.getVersionIdPart() == null) { + ourLog.warn("Not storing {} in ResourceVersionMap because it does not have a version.", theId); + return; + } IdDt id = new IdDt(theId); mySourceIds.add(id); - myMap.put(id.toUnqualifiedVersionless(), id.getVersionIdPart()); + myMap.put(id.toUnqualifiedVersionless(), id.getVersionIdPartAsLong()); } - public String getVersion(IIdType theResourceId) { + public Long getVersion(IIdType theResourceId) { return get(theResourceId); } @@ -86,7 +86,7 @@ public class ResourceVersionMap { return Collections.unmodifiableSet(mySourceIds); } - public String get(IIdType theId) { + public Long get(IIdType theId) { return myMap.get(new IdDt(theId.toUnqualifiedVersionless())); } @@ -94,16 +94,6 @@ public class ResourceVersionMap { return myMap.containsKey(new IdDt(theId.toUnqualifiedVersionless())); } - public ResourcePersistentId getResourcePersistentId(IIdType theId) { - ResourcePersistentId retval = ResourcePersistentId.fromIIdType(theId); - retval.setVersion(getVersionAsLong(theId)); - return retval; - } - - public Long getVersionAsLong(IIdType theId) { - return Long.valueOf(getVersion(theId)); - } - public boolean isEmpty() { return myMap.isEmpty(); } diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java index 801d83b9b47..1a45a9c9256 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java @@ -125,10 +125,4 @@ public class ResourcePersistentId { } return retVal; } - - public static ResourcePersistentId fromIIdType(IIdType theId) { - ResourcePersistentId retval = new ResourcePersistentId(theId); - retval.setAssociatedResourceId(theId); - return retval; - } } From e77d84d008a6228fdfa3084b704dc7599ed1d679 Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Thu, 9 Sep 2021 01:35:35 -0400 Subject: [PATCH 094/143] fix test --- .../rest/api/server/storage/ResourcePersistentId.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java index 1a45a9c9256..79a622e268f 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java @@ -21,6 +21,7 @@ package ca.uhn.fhir.rest.api.server.storage; */ import ca.uhn.fhir.util.ObjectUtil; +import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; import java.util.ArrayList; @@ -125,4 +126,12 @@ public class ResourcePersistentId { } return retVal; } + + public static ResourcePersistentId fromResource(IBaseResource theResource) { + IIdType id = theResource.getIdElement(); + ResourcePersistentId retval = new ResourcePersistentId(id.getIdPart()); + retval.setAssociatedResourceId(id); + retval.setVersion(id.getVersionIdPartAsLong()); + return retval; + } } From c6aa21b915f946023a19e57d487f4dfa8a4d0cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Markovi=C4=8D?= Date: Thu, 9 Sep 2021 12:55:04 +0200 Subject: [PATCH 095/143] Enable empty username and password in ElasticsearchHibernatePropertiesBuilder --- .../lastn/ElasticsearchRestClientFactory.java | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/lastn/ElasticsearchRestClientFactory.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/lastn/ElasticsearchRestClientFactory.java index a221a754b6f..766945bbc23 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/lastn/ElasticsearchRestClientFactory.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/lastn/ElasticsearchRestClientFactory.java @@ -20,6 +20,7 @@ package ca.uhn.fhir.jpa.search.lastn; * #L% */ +import org.apache.commons.lang3.StringUtils; import org.apache.http.Header; import org.apache.http.HttpHost; import org.apache.http.auth.AuthScope; @@ -31,6 +32,8 @@ import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.client.RestHighLevelClient; +import javax.annotation.Nullable; + public class ElasticsearchRestClientFactory { @@ -52,20 +55,21 @@ public class ElasticsearchRestClientFactory { } } - static public RestHighLevelClient createElasticsearchHighLevelRestClient(String theHostname, int thePort, String theUsername, String thePassword) { - final CredentialsProvider credentialsProvider = - new BasicCredentialsProvider(); - credentialsProvider.setCredentials(AuthScope.ANY, - new UsernamePasswordCredentials(theUsername, thePassword)); - RestClientBuilder clientBuilder = RestClient.builder( - new HttpHost(stripHostOfScheme(theHostname), thePort, determineScheme(theHostname))) - .setHttpClientConfigCallback(httpClientBuilder -> httpClientBuilder - .setDefaultCredentialsProvider(credentialsProvider)); + static public RestHighLevelClient createElasticsearchHighLevelRestClient( + String theHostname, int thePort, @Nullable String theUsername, @Nullable String thePassword) { - Header[] defaultHeaders = new Header[]{new BasicHeader("Content-Type", "application/json")}; - clientBuilder.setDefaultHeaders(defaultHeaders); + RestClientBuilder clientBuilder = RestClient.builder( + new HttpHost(stripHostOfScheme(theHostname), thePort, determineScheme(theHostname))); + if (StringUtils.isNotBlank(theUsername) && StringUtils.isNotBlank(thePassword)) { + final CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); + credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(theUsername, thePassword)); + clientBuilder.setHttpClientConfigCallback(httpClientBuilder -> httpClientBuilder + .setDefaultCredentialsProvider(credentialsProvider)); + } + Header[] defaultHeaders = new Header[]{new BasicHeader("Content-Type", "application/json")}; + clientBuilder.setDefaultHeaders(defaultHeaders); - return new RestHighLevelClient(clientBuilder); + return new RestHighLevelClient(clientBuilder); - } + } } From 661ca02a6a2045a93d54e9e43534fc3d3c5ebf3c Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Thu, 9 Sep 2021 09:28:01 -0400 Subject: [PATCH 096/143] revert clobbered code --- .../jpa/cache/ResourceVersionSvcDaoImpl.java | 91 ++++++++++++++++++- .../IndexNamePrefixLayoutStrategy.java | 22 ++++- .../jpa/cache/ResourcePersistentIdMap.java | 28 ++++++ .../mdm/api/IMdmBatchJobSubmitterFactory.java | 20 ++++ .../server/storage/ResourcePersistentId.java | 7 +- 5 files changed, 161 insertions(+), 7 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java index c9ca8e0255a..3aa68936218 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java @@ -37,7 +37,10 @@ import org.springframework.stereotype.Service; import javax.annotation.Nonnull; import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; import static org.slf4j.LoggerFactory.getLogger; @@ -80,11 +83,93 @@ public class ResourceVersionSvcDaoImpl implements IResourceVersionSvc { } @Override - public ResourcePersistentIdMap getLatestVersionIdsForResourceIds(RequestPartitionId thePartitionId, List theIds) { + /** + * Retrieves the latest versions for any resourceid that are found. + * If they are not found, they will not be contained in the returned map. + * The key should be the same value that was passed in to allow + * consumer to look up the value using the id they already have. + * + * This method should not throw, so it can safely be consumed in + * transactions. + * + * @param theRequestPartitionId - request partition id + * @param theIds - list of IIdTypes for resources of interest. + * @return + */ + public ResourcePersistentIdMap getLatestVersionIdsForResourceIds(RequestPartitionId theRequestPartitionId, List theIds) { + ResourcePersistentIdMap idToPID = new ResourcePersistentIdMap(); + HashMap> resourceTypeToIds = new HashMap<>(); + + for (IIdType id : theIds) { + String resourceType = id.getResourceType(); + if (!resourceTypeToIds.containsKey(resourceType)) { + resourceTypeToIds.put(resourceType, new ArrayList<>()); + } + resourceTypeToIds.get(resourceType).add(id); + } + + for (String resourceType : resourceTypeToIds.keySet()) { + ResourcePersistentIdMap idAndPID = getIdsOfExistingResources(theRequestPartitionId, + resourceTypeToIds.get(resourceType)); + idToPID.putAll(idAndPID); + } + + return idToPID; + } + + /** + * Helper method to determine if some resources exist in the DB (without throwing). + * Returns a set that contains the IIdType for every resource found. + * If it's not found, it won't be included in the set. + * + * @param theIds - list of IIdType ids (for the same resource) + * @return + */ + private ResourcePersistentIdMap getIdsOfExistingResources(RequestPartitionId thePartitionId, + Collection theIds) { + // these are the found Ids that were in the db + ResourcePersistentIdMap retval = new ResourcePersistentIdMap(); + + if (theIds == null || theIds.isEmpty()) { + return retval; + } List resourcePersistentIds = myIdHelperService.resolveResourcePersistentIdsWithCache(thePartitionId, - new ArrayList<>(theIds)); + theIds.stream().collect(Collectors.toList())); - return ResourcePersistentIdMap.fromResourcePersistentIds(resourcePersistentIds); + // we'll use this map to fetch pids that require versions + HashMap pidsToVersionToResourcePid = new HashMap<>(); + + // fill in our map + for (ResourcePersistentId pid : resourcePersistentIds) { + if (pid.getVersion() == null) { + pidsToVersionToResourcePid.put(pid.getIdAsLong(), pid); + } + Optional idOp = theIds.stream() + .filter(i -> i.getIdPart().equals(pid.getAssociatedResourceId().getIdPart())) + .findFirst(); + // this should always be present + // since it was passed in. + // but land of optionals... + idOp.ifPresent(id -> { + retval.put(id, pid); + }); + } + + // set any versions we don't already have + if (!pidsToVersionToResourcePid.isEmpty()) { + Collection resourceEntries = myResourceTableDao + .getResourceVersionsForPid(new ArrayList<>(pidsToVersionToResourcePid.keySet())); + + for (Object[] record : resourceEntries) { + // order matters! + Long retPid = (Long) record[0]; + String resType = (String) record[1]; + Long version = (Long) record[2]; + pidsToVersionToResourcePid.get(retPid).setVersion(version); + } + } + + return retval; } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java index fa5721b75dc..f0849bd1b22 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/IndexNamePrefixLayoutStrategy.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.jpa.search.elastic; +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.jpa.api.config.DaoConfig; import org.apache.commons.lang3.StringUtils; @@ -24,7 +44,7 @@ public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy { @Autowired private DaoConfig myDaoConfig; - static final Log log = (Log) LoggerFactory.make(Log.class, MethodHandles.lookup()); + static final Log log = LoggerFactory.make(Log.class, MethodHandles.lookup()); public static final String NAME = "prefix"; public static final Pattern UNIQUE_KEY_EXTRACTION_PATTERN = Pattern.compile("(.*)-\\d{6}"); diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourcePersistentIdMap.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourcePersistentIdMap.java index 6a723db0606..6594bc723b2 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourcePersistentIdMap.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourcePersistentIdMap.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.jpa.cache; +/*- + * #%L + * HAPI FHIR Search Parameters + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import org.hl7.fhir.instance.model.api.IIdType; @@ -36,4 +56,12 @@ public class ResourcePersistentIdMap { public int size() { return myMap.size(); } + + public void put(IIdType theId, ResourcePersistentId thePid) { + myMap.put(theId, thePid); + } + + public void putAll(ResourcePersistentIdMap theIdAndPID) { + myMap.putAll(theIdAndPID.myMap); + } } diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmBatchJobSubmitterFactory.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmBatchJobSubmitterFactory.java index 6291d89d99a..6dc629d0f05 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmBatchJobSubmitterFactory.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/IMdmBatchJobSubmitterFactory.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.mdm.api; +/*- + * #%L + * HAPI FHIR - Master Data Management + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + public interface IMdmBatchJobSubmitterFactory { IMdmClearJobSubmitter getClearJobSubmitter(); } diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java index 79a622e268f..020c043d866 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java @@ -21,7 +21,7 @@ package ca.uhn.fhir.rest.api.server.storage; */ import ca.uhn.fhir.util.ObjectUtil; -import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IIdType; import java.util.ArrayList; @@ -34,6 +34,7 @@ import java.util.Optional; * a Long, a String, or something else. */ public class ResourcePersistentId { + private static final String RESOURCE_PID = "RESOURCE_PID"; private Object myId; private Long myVersion; private IIdType myAssociatedResourceId; @@ -127,9 +128,9 @@ public class ResourcePersistentId { return retVal; } - public static ResourcePersistentId fromResource(IBaseResource theResource) { + public static ResourcePersistentId fromResource(IAnyResource theResource) { IIdType id = theResource.getIdElement(); - ResourcePersistentId retval = new ResourcePersistentId(id.getIdPart()); + ResourcePersistentId retval = new ResourcePersistentId(theResource.getUserData(RESOURCE_PID)); retval.setAssociatedResourceId(id); retval.setVersion(id.getVersionIdPartAsLong()); return retval; From 4ab0f7076a607d98569ee0fc7669ae3521cfa6db Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Thu, 9 Sep 2021 09:29:45 -0400 Subject: [PATCH 097/143] remove problematic method --- .../rest/api/server/storage/ResourcePersistentId.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java index 020c043d866..ad04685141e 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/storage/ResourcePersistentId.java @@ -21,7 +21,6 @@ package ca.uhn.fhir.rest.api.server.storage; */ import ca.uhn.fhir.util.ObjectUtil; -import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IIdType; import java.util.ArrayList; @@ -127,12 +126,4 @@ public class ResourcePersistentId { } return retVal; } - - public static ResourcePersistentId fromResource(IAnyResource theResource) { - IIdType id = theResource.getIdElement(); - ResourcePersistentId retval = new ResourcePersistentId(theResource.getUserData(RESOURCE_PID)); - retval.setAssociatedResourceId(id); - retval.setVersion(id.getVersionIdPartAsLong()); - return retval; - } } From 41d5e2b8e78e1392802479c9a87a2f04e48c433a Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 9 Sep 2021 10:50:54 -0400 Subject: [PATCH 098/143] Add failing test, implementation --- .../jpa/dao/BaseTransactionProcessor.java | 94 ++++++++++++------- .../ca/uhn/fhir/jpa/dao/DaoFailureUtil.java | 18 ++++ .../jpa/dao/tx/HapiTransactionService.java | 6 +- .../fhir/jpa/dao/r4/FhirSystemDaoR4Test.java | 1 + .../r4/ResourceProviderR4BundleTest.java | 39 ++++++++ 5 files changed, 120 insertions(+), 38 deletions(-) create mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoFailureUtil.java diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index d554b645514..44d48638b21 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -80,6 +80,7 @@ import ca.uhn.fhir.util.UrlUtil; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.hl7.fhir.dstu3.model.Bundle; import org.hl7.fhir.exceptions.FHIRException; @@ -115,6 +116,7 @@ import java.util.IdentityHashMap; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Optional; import java.util.Set; @@ -366,8 +368,8 @@ public abstract class BaseTransactionProcessor { IBase nextRequestEntry = null; for (int i=0; i myResponseMap; private int myResponseOrder; private boolean myNestedMode; - - protected BundleTask(CountDownLatch theCompletedLatch, RequestDetails theRequestDetails, Map theResponseMap, int theResponseOrder, IBase theNextReqEntry, boolean theNestedMode) { + private Throwable myLastSeenException; + + protected RetriableBundleTask(CountDownLatch theCompletedLatch, RequestDetails theRequestDetails, Map theResponseMap, int theResponseOrder, IBase theNextReqEntry, boolean theNestedMode) { this.myCompletedLatch = theCompletedLatch; this.myRequestDetails = theRequestDetails; this.myNextReqEntry = theNextReqEntry; this.myResponseMap = theResponseMap; this.myResponseOrder = theResponseOrder; this.myNestedMode = theNestedMode; + this.myLastSeenException = null; } - + + private void processBatchEntry() { + IBaseBundle subRequestBundle = myVersionAdapter.createBundle(org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTION.toCode()); + myVersionAdapter.addEntry(subRequestBundle, (IBase) myNextReqEntry); + + IBaseBundle nextResponseBundle = processTransactionAsSubRequest(myRequestDetails, subRequestBundle, "Batch sub-request", myNestedMode); + + IBase subResponseEntry = (IBase) myVersionAdapter.getEntries(nextResponseBundle).get(0); + myResponseMap.put(myResponseOrder, subResponseEntry); + + /* + * If the individual entry didn't have a resource in its response, bring the sub-transaction's OperationOutcome across so the client can see it + */ + if (myVersionAdapter.getResource(subResponseEntry) == null) { + IBase nextResponseBundleFirstEntry = (IBase) myVersionAdapter.getEntries(nextResponseBundle).get(0); + myResponseMap.put(myResponseOrder, nextResponseBundleFirstEntry); + } + } + private boolean processBatchEntryWithRetry() { + int maxAttempts =3; + for (int attempt = 1;; attempt++) { + try { + processBatchEntry(); + return true; + } catch (BaseServerResponseException e) { + //If we catch a known and structured exception from HAPI, just fail. + myLastSeenException = e; + return false; + } catch (Throwable t) { + myLastSeenException = t; + //If we have caught a non-tag-storage failure we are unfamiliar with, or we have exceeded max attempts, exit. + if (!DaoFailureUtil.isTagStorageFailure(t) || attempt >= maxAttempts) { + ourLog.error("Failure during BATCH sub transaction processing", t); + return false; + } + } + } + } + @Override public void run() { - BaseServerResponseExceptionHolder caughtEx = new BaseServerResponseExceptionHolder(); - try { - IBaseBundle subRequestBundle = myVersionAdapter.createBundle(org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTION.toCode()); - myVersionAdapter.addEntry(subRequestBundle, (IBase) myNextReqEntry); - - IBaseBundle nextResponseBundle = processTransactionAsSubRequest(myRequestDetails, subRequestBundle, "Batch sub-request", myNestedMode); - - IBase subResponseEntry = (IBase) myVersionAdapter.getEntries(nextResponseBundle).get(0); - myResponseMap.put(myResponseOrder, subResponseEntry); - - /* - * If the individual entry didn't have a resource in its response, bring the sub-transaction's OperationOutcome across so the client can see it - */ - if (myVersionAdapter.getResource(subResponseEntry) == null) { - IBase nextResponseBundleFirstEntry = (IBase) myVersionAdapter.getEntries(nextResponseBundle).get(0); - myResponseMap.put(myResponseOrder, nextResponseBundleFirstEntry); - } - - } catch (BaseServerResponseException e) { - caughtEx.setException(e); - } catch (Throwable t) { - ourLog.error("Failure during BATCH sub transaction processing", t); - caughtEx.setException(new InternalErrorException(t)); + boolean success = processBatchEntryWithRetry(); + if (!success) { + populateResponseMapWithLastSeenException(); } - if (caughtEx.getException() != null) { - // add exception to the response map - myResponseMap.put(myResponseOrder, caughtEx); - } - // checking for the parallelism - ourLog.debug("processing bacth for {} is completed", myVersionAdapter.getEntryRequestUrl((IBase)myNextReqEntry)); + ourLog.debug("Processing batch entry for {} is completed", myVersionAdapter.getEntryRequestUrl((IBase)myNextReqEntry)); myCompletedLatch.countDown(); } + + private void populateResponseMapWithLastSeenException() { + BaseServerResponseExceptionHolder caughtEx = new BaseServerResponseExceptionHolder(); + caughtEx.setException(new InternalErrorException(myLastSeenException)); + myResponseMap.put(myResponseOrder, caughtEx); + } + } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoFailureUtil.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoFailureUtil.java new file mode 100644 index 00000000000..03e389ce6f6 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoFailureUtil.java @@ -0,0 +1,18 @@ +package ca.uhn.fhir.jpa.dao; + +import org.apache.commons.lang3.StringUtils; + +/** + * Utility class to help identify classes of failure. + */ +public class DaoFailureUtil { + + public static boolean isTagStorageFailure(Throwable t) { + if (StringUtils.isBlank(t.getMessage())) { + return false; + } else { + String msg = t.getMessage().toLowerCase(); + return msg.contains("hfj_tag_def") || msg.contains("hfj_res_tag"); + } + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/tx/HapiTransactionService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/tx/HapiTransactionService.java index dbe32cb989e..4a9c94376c8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/tx/HapiTransactionService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/tx/HapiTransactionService.java @@ -25,6 +25,7 @@ import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.interceptor.api.Pointcut; import ca.uhn.fhir.jpa.api.model.ResourceVersionConflictResolutionStrategy; import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao; +import ca.uhn.fhir.jpa.dao.DaoFailureUtil; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.api.server.storage.TransactionDetails; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; @@ -93,10 +94,9 @@ public class HapiTransactionService { * known to the system already, they'll both try to create a row in HFJ_TAG_DEF, * which is the tag definition table. In that case, a constraint error will be * thrown by one of the client threads, so we auto-retry in order to avoid - * annopying spurious failures for the client. + * annoying spurious failures for the client. */ - if (e.getMessage().contains("HFJ_TAG_DEF") || e.getMessage().contains("hfj_tag_def") || - e.getMessage().contains("HFJ_RES_TAG") || e.getMessage().contains("hfj_res_tag")) { + if (DaoFailureUtil.isTagStorageFailure(e)) { maxRetries = 3; } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java index b9257a30e0b..88a0987be86 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java @@ -10,6 +10,7 @@ import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamString; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.model.entity.ResourceTag; import ca.uhn.fhir.jpa.model.entity.TagTypeEnum; +import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.jpa.provider.SystemProviderDstu2Test; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4BundleTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4BundleTest.java index 3be614e3bbd..1e3d499c6e1 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4BundleTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4BundleTest.java @@ -249,6 +249,45 @@ public class ResourceProviderR4BundleTest extends BaseResourceProviderR4Test { assertEquals(ids.get(4), bundleEntries.get(6).getResource().getIdElement().toUnqualifiedVersionless().getValueAsString()); } + + @Test + public void testTagCacheWorksWithBatchMode() { + Bundle input = new Bundle(); + input.setType(BundleType.BATCH); + + Patient p = new Patient(); + p.setId("100"); + p.setGender(AdministrativeGender.MALE); + p.addIdentifier().setSystem("urn:foo").setValue("A"); + p.addName().setFamily("Smith"); + p.getMeta().addTag().setSystem("mysystem").setCode("mycode"); + input.addEntry().setResource(p).getRequest().setMethod(HTTPVerb.POST); + + Patient p2 = new Patient(); + p2.setId("200"); + p2.setGender(AdministrativeGender.MALE); + p2.addIdentifier().setSystem("urn:foo").setValue("A"); + p2.addName().setFamily("Smith"); + p2.getMeta().addTag().setSystem("mysystem").setCode("mycode"); + input.addEntry().setResource(p).getRequest().setMethod(HTTPVerb.POST); + + Patient p3 = new Patient(); + p3.setId("pat-300"); + p3.setGender(AdministrativeGender.MALE); + p3.addIdentifier().setSystem("urn:foo").setValue("A"); + p3.addName().setFamily("Smith"); + p3.getMeta().addTag().setSystem("mysystem").setCode("mycode"); + input.addEntry().setResource(p).getRequest().setMethod(HTTPVerb.PUT).setUrl("Patient/pat-300"); + + Bundle output = myClient.transaction().withBundle(input).execute(); + output.getEntry().stream() + .map(BundleEntryComponent::getResponse) + .map(Bundle.BundleEntryResponseComponent::getStatus) + .forEach(statusCode -> { + assertEquals(statusCode, "201 Created"); + }); + } + private List createPatients(int count) { List ids = new ArrayList(); From b3e24078aec99b7fce1ed3d70edb34aa79f6b0c6 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 9 Sep 2021 11:01:11 -0400 Subject: [PATCH 099/143] Add changelog --- .../hapi/fhir/changelog/5_6_0/2978-bundle-batch-tag-bug.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2978-bundle-batch-tag-bug.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2978-bundle-batch-tag-bug.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2978-bundle-batch-tag-bug.yaml new file mode 100644 index 00000000000..3ca5284f568 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2978-bundle-batch-tag-bug.yaml @@ -0,0 +1,3 @@ +--- +type: fix +title: "Fixed a bug where two identical tags in parallel entries being created in a batch would fail." From a4ba65a9fd42fac3bebecae4e12b836df6a14938 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 9 Sep 2021 12:27:34 -0400 Subject: [PATCH 100/143] Don't wrap known errors --- .../java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index 359c9936fdf..d40d555a8de 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -1691,7 +1691,7 @@ public abstract class BaseTransactionProcessor { private final Map myResponseMap; private final int myResponseOrder; private final boolean myNestedMode; - private Throwable myLastSeenException; + private BaseServerResponseException myLastSeenException; protected RetriableBundleTask(CountDownLatch theCompletedLatch, RequestDetails theRequestDetails, Map theResponseMap, int theResponseOrder, IBase theNextReqEntry, boolean theNestedMode) { this.myCompletedLatch = theCompletedLatch; @@ -1731,7 +1731,7 @@ public abstract class BaseTransactionProcessor { myLastSeenException = e; return false; } catch (Throwable t) { - myLastSeenException = t; + myLastSeenException = new InternalErrorException(t); //If we have caught a non-tag-storage failure we are unfamiliar with, or we have exceeded max attempts, exit. if (!DaoFailureUtil.isTagStorageFailure(t) || attempt >= maxAttempts) { ourLog.error("Failure during BATCH sub transaction processing", t); @@ -1755,7 +1755,7 @@ public abstract class BaseTransactionProcessor { private void populateResponseMapWithLastSeenException() { BaseServerResponseExceptionHolder caughtEx = new BaseServerResponseExceptionHolder(); - caughtEx.setException(new InternalErrorException(myLastSeenException)); + caughtEx.setException(myLastSeenException); myResponseMap.put(myResponseOrder, caughtEx); } From 10f0b0877c1b7f4f503b92a5168e87b93f232183 Mon Sep 17 00:00:00 2001 From: katie_smilecdr Date: Thu, 9 Sep 2021 17:14:51 -0400 Subject: [PATCH 101/143] [2973] fix "help {command}" --- .../main/java/ca/uhn/fhir/cli/BaseApp.java | 8 ++--- .../java/ca/uhn/fhir/cli/BaseAppTest.java | 31 +++++++++++++++++++ .../5_6_0/2973-CLI-option-help-fails.yaml | 4 +++ 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/BaseAppTest.java create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2973-CLI-option-help-fails.yaml diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java index dd4b652f239..23ca152a033 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java @@ -282,7 +282,7 @@ public abstract class BaseApp { } private Optional parseCommand(String[] theArgs) { - Optional commandOpt = getNextCommand(theArgs); + Optional commandOpt = getNextCommand(theArgs, 0); if (! commandOpt.isPresent()) { String message = "Unrecognized command: " + ansi().bold().fg(Ansi.Color.RED) + theArgs[0] + ansi().boldOff().fg(Ansi.Color.WHITE); @@ -294,8 +294,8 @@ public abstract class BaseApp { return commandOpt; } - private Optional getNextCommand(String[] theArgs) { - return ourCommands.stream().filter(cmd -> cmd.getCommandName().equals(theArgs[0])).findFirst(); + private Optional getNextCommand(String[] theArgs, int thePosition) { + return ourCommands.stream().filter(cmd -> cmd.getCommandName().equals(theArgs[thePosition])).findFirst(); } private void processHelp(String[] theArgs) { @@ -303,7 +303,7 @@ public abstract class BaseApp { logUsage(); return; } - Optional commandOpt = getNextCommand(theArgs); + Optional commandOpt = getNextCommand(theArgs, 1); if (! commandOpt.isPresent()) { String message = "Unknown command: " + theArgs[1]; System.err.println(message); diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/BaseAppTest.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/BaseAppTest.java new file mode 100644 index 00000000000..28f602bb142 --- /dev/null +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/BaseAppTest.java @@ -0,0 +1,31 @@ +package ca.uhn.fhir.cli; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.MatcherAssert.assertThat; + +public class BaseAppTest { + + private final PrintStream standardOut = System.out; + private final ByteArrayOutputStream outputStreamCaptor = new ByteArrayOutputStream(); + + @BeforeEach + public void setUp() { + System.setOut(new PrintStream(outputStreamCaptor)); + } + + @AfterEach + public void tearDown() { + System.setOut(standardOut); + } + + @Test + public void testHelpOption() { + App.main(new String[]{"help", "create-package"}); + assertThat(outputStreamCaptor.toString().trim(), outputStreamCaptor.toString().trim(), containsString("Usage")); + } +} diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2973-CLI-option-help-fails.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2973-CLI-option-help-fails.yaml new file mode 100644 index 00000000000..ba6d9a2aff4 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2973-CLI-option-help-fails.yaml @@ -0,0 +1,4 @@ +--- +type: fix +issue: 2973 +title: "CLI \"smileutil help {command}\" returns \"Unknown command\" which should return the usage of {command}. This has been corrected." From ed325e9e11951416e3b4d1fb815b952a3efd83f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Markovi=C4=8D?= Date: Fri, 10 Sep 2021 00:14:21 +0200 Subject: [PATCH 102/143] Enable multiple hosts in ElasticsearchHibernatePropertiesBuilder --- .../ca/uhn/hapi/fhir/docs/server_jpa/lastn.md | 7 ++- .../jpa/search/SearchCoordinatorSvcImpl.java | 2 +- ...asticsearchHibernatePropertiesBuilder.java | 31 ++++--------- .../lastn/ElasticsearchRestClientFactory.java | 46 ++++++++++--------- .../search/lastn/ElasticsearchSvcImpl.java | 10 ++-- .../config/ElasticsearchWithPrefixConfig.java | 2 +- .../config/TestR4ConfigWithElasticSearch.java | 2 +- .../TestR4ConfigWithElasticsearchClient.java | 2 +- .../jpa/dao/r4/ElasticsearchPrefixTest.java | 2 +- ...csearchHibernatePropertiesBuilderTest.java | 4 +- ...lasticsearchSvcMultipleObservationsIT.java | 2 +- ...tNElasticsearchSvcSingleObservationIT.java | 2 +- 12 files changed, 52 insertions(+), 60 deletions(-) diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/lastn.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/lastn.md index 4f70dac2307..f84b85ea65d 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/lastn.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/lastn.md @@ -31,12 +31,11 @@ In addition, the Elasticsearch client service, `ElasticsearchSvcImpl` will need ```java @Bean() public ElasticsearchSvcImpl elasticsearchSvc() { - String elasticsearchHost = "localhost"; - String elasticsearchUserId = "elastic"; + String elasticsearchHost = "localhost:9301"; + String elasticsearchUsername = "elastic"; String elasticsearchPassword = "changeme"; - int elasticsearchPort = 9301; - return new ElasticsearchSvcImpl(elasticsearchHost, elasticsearchPort, elasticsearchUserId, elasticsearchPassword); + return new ElasticsearchSvcImpl(elasticsearchHost, elasticsearchUsername, elasticsearchPassword); } ``` diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java index 4d266271bd9..aa67d53c597 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java @@ -1087,7 +1087,7 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { ourLog.trace("Performing count"); ISearchBuilder sb = newSearchBuilder(); Iterator countIterator = sb.createCountQuery(myParams, mySearch.getUuid(), myRequest, myRequestPartitionId); - Long count = countIterator.hasNext() ? countIterator.next() : 0; + Long count = countIterator.hasNext() ? countIterator.next() : 0L; ourLog.trace("Got count {}", count); TransactionTemplate txTemplate = new TransactionTemplate(myManagedTxManager); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java index 165b0478489..a39fb59c4a3 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java @@ -37,6 +37,7 @@ import org.hibernate.search.backend.elasticsearch.cfg.ElasticsearchIndexSettings import org.hibernate.search.mapper.orm.schema.management.SchemaManagementStrategyName; import org.slf4j.Logger; +import javax.annotation.Nullable; import java.io.IOException; import java.util.Arrays; import java.util.Properties; @@ -49,13 +50,13 @@ import static org.slf4j.LoggerFactory.getLogger; * FHIR JPA server. This class also injects a starter template into the ES cluster. */ public class ElasticsearchHibernatePropertiesBuilder { - private static final Logger ourLog = getLogger(ElasticsearchHibernatePropertiesBuilder.class); + private static final Logger ourLog = getLogger(ElasticsearchHibernatePropertiesBuilder.class); - private IndexStatus myRequiredIndexStatus = IndexStatus.YELLOW.YELLOW; + private IndexStatus myRequiredIndexStatus = IndexStatus.YELLOW; private SchemaManagementStrategyName myIndexSchemaManagementStrategy = SchemaManagementStrategyName.CREATE; - private String myRestUrl; + private String myHosts; private String myUsername; private String myPassword; private long myIndexManagementWaitTimeoutMillis = 10000L; @@ -77,11 +78,8 @@ public class ElasticsearchHibernatePropertiesBuilder { // the below properties are used for ElasticSearch integration theProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "elasticsearch"); - - theProperties.put(BackendSettings.backendKey(ElasticsearchIndexSettings.ANALYSIS_CONFIGURER), HapiElasticsearchAnalysisConfigurer.class.getName()); - - theProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.HOSTS), myRestUrl); + theProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.HOSTS), myHosts); theProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.PROTOCOL), myProtocol); if (StringUtils.isNotBlank(myUsername)) { @@ -102,8 +100,7 @@ public class ElasticsearchHibernatePropertiesBuilder { //This tells elasticsearch to use our custom index naming strategy. theProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.LAYOUT_STRATEGY), IndexNamePrefixLayoutStrategy.class.getName()); - injectStartupTemplate(myProtocol, myRestUrl, myUsername, myPassword); - + injectStartupTemplate(myProtocol, myHosts, myUsername, myPassword); } public ElasticsearchHibernatePropertiesBuilder setRequiredIndexStatus(IndexStatus theRequiredIndexStatus) { @@ -111,11 +108,8 @@ public class ElasticsearchHibernatePropertiesBuilder { return this; } - public ElasticsearchHibernatePropertiesBuilder setRestUrl(String theRestUrl) { - if (theRestUrl.contains("://")) { - throw new ConfigurationException("Elasticsearch URL cannot include a protocol, that is a separate property. Remove http:// or https:// from this URL."); - } - myRestUrl = theRestUrl; + public ElasticsearchHibernatePropertiesBuilder setHosts(String hosts) { + myHosts = hosts; return this; } @@ -150,18 +144,13 @@ public class ElasticsearchHibernatePropertiesBuilder { * TODO GGG HS: In HS6.1, we should have a native way of performing index settings manipulation at bootstrap time, so this should * eventually be removed in favour of whatever solution they come up with. */ - void injectStartupTemplate(String theProtocol, String theHostAndPort, String theUsername, String thePassword) { + void injectStartupTemplate(String protocol, String hosts, @Nullable String username, @Nullable String password) { PutIndexTemplateRequest ngramTemplate = new PutIndexTemplateRequest("ngram-template") .patterns(Arrays.asList("*resourcetable-*", "*termconcept-*")) .settings(Settings.builder().put("index.max_ngram_diff", 50)); - int colonIndex = theHostAndPort.indexOf(":"); - String host = theHostAndPort.substring(0, colonIndex); - Integer port = Integer.valueOf(theHostAndPort.substring(colonIndex + 1)); - String qualifiedHost = theProtocol + "://" + host; - try { - RestHighLevelClient elasticsearchHighLevelRestClient = ElasticsearchRestClientFactory.createElasticsearchHighLevelRestClient(qualifiedHost, port, theUsername, thePassword); + RestHighLevelClient elasticsearchHighLevelRestClient = ElasticsearchRestClientFactory.createElasticsearchHighLevelRestClient(protocol, hosts, username, password); ourLog.info("Adding starter template for large ngram diffs"); AcknowledgedResponse acknowledgedResponse = elasticsearchHighLevelRestClient.indices().putTemplate(ngramTemplate, RequestOptions.DEFAULT); assert acknowledgedResponse.isAcknowledged(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/lastn/ElasticsearchRestClientFactory.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/lastn/ElasticsearchRestClientFactory.java index 766945bbc23..b4cd687e313 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/lastn/ElasticsearchRestClientFactory.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/lastn/ElasticsearchRestClientFactory.java @@ -20,6 +20,7 @@ package ca.uhn.fhir.jpa.search.lastn; * #L% */ +import ca.uhn.fhir.context.ConfigurationException; import org.apache.commons.lang3.StringUtils; import org.apache.http.Header; import org.apache.http.HttpHost; @@ -28,38 +29,41 @@ import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.CredentialsProvider; import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.message.BasicHeader; +import org.elasticsearch.client.Node; import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.client.RestHighLevelClient; import javax.annotation.Nullable; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; public class ElasticsearchRestClientFactory { - private static String determineScheme(String theHostname) { - int schemeIdx = theHostname.indexOf("://"); - if (schemeIdx > 0) { - return theHostname.substring(0, schemeIdx); - } else { - return "http"; - } - } - - private static String stripHostOfScheme(String theHostname) { - int schemeIdx = theHostname.indexOf("://"); - if (schemeIdx > 0) { - return theHostname.substring(schemeIdx + 3); - } else { - return theHostname; - } - } - static public RestHighLevelClient createElasticsearchHighLevelRestClient( - String theHostname, int thePort, @Nullable String theUsername, @Nullable String thePassword) { + String protocol, String hosts, @Nullable String theUsername, @Nullable String thePassword) { - RestClientBuilder clientBuilder = RestClient.builder( - new HttpHost(stripHostOfScheme(theHostname), thePort, determineScheme(theHostname))); + if (hosts.contains("://")) { + throw new ConfigurationException("Elasticsearch URLs cannot include a protocol, that is a separate property. Remove http:// or https:// from this URL."); + } + String[] hostArray = hosts.split(","); + List clientNodes = Arrays.stream(hostArray) + .map(String::trim) + .filter(s -> s.contains(":")) + .map(h -> { + int colonIndex = h.indexOf(":"); + String host = h.substring(0, colonIndex); + int port = Integer.parseInt(h.substring(colonIndex + 1)); + return new Node(new HttpHost(host, port, protocol)); + }) + .collect(Collectors.toList()); + if (hostArray.length != clientNodes.size()) { + throw new ConfigurationException("Elasticsearch URLs have to contain ':' as a host:port separator. Example: localhost:9200,localhost:9201,localhost:9202"); + } + + RestClientBuilder clientBuilder = RestClient.builder(clientNodes.toArray(new Node[0])); if (StringUtils.isNotBlank(theUsername) && StringUtils.isNotBlank(thePassword)) { final CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(theUsername, thePassword)); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/lastn/ElasticsearchSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/lastn/ElasticsearchSvcImpl.java index 54a28d6cf3a..57faac61bd6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/lastn/ElasticsearchSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/lastn/ElasticsearchSvcImpl.java @@ -68,11 +68,11 @@ import org.elasticsearch.search.aggregations.bucket.terms.ParsedTerms; import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder; import org.elasticsearch.search.aggregations.metrics.ParsedTopHits; -import org.elasticsearch.search.aggregations.support.ValueType; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.sort.SortOrder; import org.springframework.beans.factory.annotation.Autowired; +import javax.annotation.Nullable; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; @@ -125,13 +125,13 @@ public class ElasticsearchSvcImpl implements IElasticsearchSvc { private PartitionSettings myPartitionSettings; //This constructor used to inject a dummy partitionsettings in test. - public ElasticsearchSvcImpl(PartitionSettings thePartitionSetings, String theHostname, int thePort, String theUsername, String thePassword) { - this(theHostname, thePort, theUsername, thePassword); + public ElasticsearchSvcImpl(PartitionSettings thePartitionSetings, String theHostname, @Nullable String theUsername, @Nullable String thePassword) { + this(theHostname, theUsername, thePassword); this.myPartitionSettings = thePartitionSetings; } - public ElasticsearchSvcImpl(String theHostname, int thePort, String theUsername, String thePassword) { - myRestHighLevelClient = ElasticsearchRestClientFactory.createElasticsearchHighLevelRestClient(theHostname, thePort, theUsername, thePassword); + public ElasticsearchSvcImpl(String theHostname, @Nullable String theUsername, @Nullable String thePassword) { + myRestHighLevelClient = ElasticsearchRestClientFactory.createElasticsearchHighLevelRestClient("http", theHostname, theUsername, thePassword); try { createObservationIndexIfMissing(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/ElasticsearchWithPrefixConfig.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/ElasticsearchWithPrefixConfig.java index 5789ee204dc..0014407fb09 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/ElasticsearchWithPrefixConfig.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/ElasticsearchWithPrefixConfig.java @@ -128,7 +128,7 @@ public class ElasticsearchWithPrefixConfig { .settings(Settings.builder().put("index.max_ngram_diff", 50)); try { - RestHighLevelClient elasticsearchHighLevelRestClient = ElasticsearchRestClientFactory.createElasticsearchHighLevelRestClient("http://" + host, httpPort, "", ""); + RestHighLevelClient elasticsearchHighLevelRestClient = ElasticsearchRestClientFactory.createElasticsearchHighLevelRestClient("http", host + ":" + httpPort, "", ""); AcknowledgedResponse acknowledgedResponse = elasticsearchHighLevelRestClient.indices().putTemplate(ngramTemplate, RequestOptions.DEFAULT); assert acknowledgedResponse.isAcknowledged(); } catch (IOException theE) { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticSearch.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticSearch.java index 2e358abe4ec..5c41dc91965 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticSearch.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticSearch.java @@ -41,7 +41,7 @@ public class TestR4ConfigWithElasticSearch extends TestR4Config { .setIndexSchemaManagementStrategy(SchemaManagementStrategyName.CREATE) .setIndexManagementWaitTimeoutMillis(10000) .setRequiredIndexStatus(IndexStatus.YELLOW) - .setRestUrl(host+ ":" + httpPort) + .setHosts(host + ":" + httpPort) .setProtocol("http") .setUsername("") .setPassword("") diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticsearchClient.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticsearchClient.java index 7e52caaf37f..3b2b011e505 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticsearchClient.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4ConfigWithElasticsearchClient.java @@ -21,7 +21,7 @@ public class TestR4ConfigWithElasticsearchClient extends TestR4ConfigWithElastic public ElasticsearchSvcImpl myElasticsearchSvc() { int elasticsearchPort = elasticContainer().getMappedPort(9200); String host = elasticContainer().getHost(); - return new ElasticsearchSvcImpl(host, elasticsearchPort, "", ""); + return new ElasticsearchSvcImpl(host + ":" + elasticsearchPort, null, null); } @PreDestroy diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ElasticsearchPrefixTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ElasticsearchPrefixTest.java index 239eadda9e0..ae869fe00a8 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ElasticsearchPrefixTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ElasticsearchPrefixTest.java @@ -33,7 +33,7 @@ public class ElasticsearchPrefixTest { public void test() throws IOException { //Given RestHighLevelClient elasticsearchHighLevelRestClient = ElasticsearchRestClientFactory.createElasticsearchHighLevelRestClient( - "http://" + elasticsearchContainer.getHost(), elasticsearchContainer.getMappedPort(9200), "", ""); + "http", elasticsearchContainer.getHost() + ":" + elasticsearchContainer.getMappedPort(9200), "", ""); //When RestClient lowLevelClient = elasticsearchHighLevelRestClient.getLowLevelClient(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilderTest.java index acca2706551..fce54f4b93c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilderTest.java @@ -42,7 +42,7 @@ class ElasticsearchHibernatePropertiesBuilderTest { //SUT try { - myPropertiesBuilder.setRestUrl(protocolHost); + myPropertiesBuilder.setHosts(protocolHost); fail(); } catch (ConfigurationException e ) { assertThat(e.getMessage(), is(equalTo(failureMessage))); @@ -50,7 +50,7 @@ class ElasticsearchHibernatePropertiesBuilderTest { Properties properties = new Properties(); myPropertiesBuilder - .setRestUrl(host) + .setHosts(host) .apply(properties); assertThat(properties.getProperty(BackendSettings.backendKey(ElasticsearchBackendSettings.HOSTS)), is(equalTo(host))); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcMultipleObservationsIT.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcMultipleObservationsIT.java index ae0bec25252..653c4de56f5 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcMultipleObservationsIT.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcMultipleObservationsIT.java @@ -68,7 +68,7 @@ public class LastNElasticsearchSvcMultipleObservationsIT { public void before() throws IOException { PartitionSettings partitionSettings = new PartitionSettings(); partitionSettings.setPartitioningEnabled(false); - elasticsearchSvc = new ElasticsearchSvcImpl(partitionSettings, elasticsearchContainer.getHost(), elasticsearchContainer.getMappedPort(9200), "", ""); + elasticsearchSvc = new ElasticsearchSvcImpl(partitionSettings, elasticsearchContainer.getHost() + ":" + elasticsearchContainer.getMappedPort(9200), null, null); if (!indexLoaded) { createMultiplePatientsAndObservations(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcSingleObservationIT.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcSingleObservationIT.java index a8447121486..55a5056f8d8 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcSingleObservationIT.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcSingleObservationIT.java @@ -97,7 +97,7 @@ public class LastNElasticsearchSvcSingleObservationIT { public void before() { PartitionSettings partitionSettings = new PartitionSettings(); partitionSettings.setPartitioningEnabled(false); - elasticsearchSvc = new ElasticsearchSvcImpl(partitionSettings, elasticsearchContainer.getHost(), elasticsearchContainer.getMappedPort(9200), "", ""); + elasticsearchSvc = new ElasticsearchSvcImpl(partitionSettings, elasticsearchContainer.getHost() + ":" + elasticsearchContainer.getMappedPort(9200), "", ""); } @AfterEach From 836948010ff89ed4b8b0653412bd5d0aada6c90a Mon Sep 17 00:00:00 2001 From: Justin Dar Date: Thu, 9 Sep 2021 16:10:09 -0700 Subject: [PATCH 103/143] Fixes issue (#2958) where Procedure?patient caused inconsistent results and ensured that such requests gave http 400 --- ...ure-patient-consistent-error-handling.yaml | 6 ++++ .../jpa/search/SearchCoordinatorSvcImpl.java | 5 +++ .../r4/ResourceProviderR4CacheTest.java | 32 +++++++++++++++++++ .../jpa/searchparam/SearchParameterMap.java | 4 +++ 4 files changed, 47 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2958-procedure-patient-consistent-error-handling.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2958-procedure-patient-consistent-error-handling.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2958-procedure-patient-consistent-error-handling.yaml new file mode 100644 index 00000000000..f90ca63a917 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2958-procedure-patient-consistent-error-handling.yaml @@ -0,0 +1,6 @@ +--- +type: fix +issue: 2958 +jira: SMILE-643 +title: "Fixed issue where the processing of queries like Procedure?patient= before a cache search would cause the parameter key to be removed. +Additionally, ensured that requests like Procedure?patient cause HTTP 400 Bad Request instead of HTTP 500 Internal Error." diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java index 4d266271bd9..8c1303f1571 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java @@ -1014,6 +1014,9 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { logged = true; ourLog.warn("Failed during search due to invalid request: {}", t.toString()); } + }else if (t instanceof java.lang.IllegalArgumentException && t.getMessage().contentEquals("The validated expression is false")) { + logged = true; + ourLog.warn("Failed during search due to invalid request: {}", t.toString()); } if (!logged) { @@ -1028,6 +1031,8 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { int failureCode = InternalErrorException.STATUS_CODE; if (t instanceof BaseServerResponseException) { failureCode = ((BaseServerResponseException) t).getStatusCode(); + }else if(t instanceof java.lang.IllegalArgumentException && t.getMessage().contentEquals("The validated expression is false")) { + failureCode = Constants.STATUS_HTTP_400_BAD_REQUEST; } if (System.getProperty(UNIT_TEST_CAPTURE_STACK) != null) { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java index 834d93ba816..fb33fcf46da 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java @@ -7,7 +7,11 @@ import ca.uhn.fhir.parser.StrictErrorHandler; import ca.uhn.fhir.rest.api.CacheControlDirective; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.client.interceptor.CapturingInterceptor; +import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; +import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import com.ctc.wstx.shaded.msv_core.verifier.jarv.Const; +import org.hl7.fhir.r4.model.Base; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.Patient; @@ -27,6 +31,7 @@ import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.core.IsNot.not; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.fail; public class ResourceProviderR4CacheTest extends BaseResourceProviderR4Test { @@ -227,5 +232,32 @@ public class ResourceProviderR4CacheTest extends BaseResourceProviderR4Test { assertEquals(1, resp2.getEntry().size()); } + @Test + public void testProcedurePatient(){ + Bundle resp2 = myClient + .search() + .byUrl("Procedure") + .returnBundle(Bundle.class) + .execute(); + + BaseServerResponseException exception = assertThrows(BaseServerResponseException.class, () -> {myClient + .search() + .byUrl("Procedure?patient=") + .returnBundle(Bundle.class) + .execute();}); + + assertEquals(Constants.STATUS_HTTP_400_BAD_REQUEST, exception.getStatusCode()); + } + + @Test + public void testPatient(){ + BaseServerResponseException exception = assertThrows(BaseServerResponseException.class, () -> {myClient + .search() + .byUrl("Procedure?patient=") + .returnBundle(Bundle.class) + .execute();}); + + assertEquals(Constants.STATUS_HTTP_400_BAD_REQUEST, exception.getStatusCode()); + } } diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java index 4ad522cf3be..061531f4cc1 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java @@ -396,11 +396,15 @@ public class SearchParameterMap implements Serializable { for (List nextValuesAndIn : nextValuesAndsIn) { List nextValuesOrsOut = new ArrayList<>(); + /* for (IQueryParameterType nextValueOrIn : nextValuesAndIn) { if (nextValueOrIn.getMissing() != null || isNotBlank(nextValueOrIn.getValueAsQueryToken(theCtx))) { nextValuesOrsOut.add(nextValueOrIn); } } + */ + + nextValuesOrsOut.addAll(nextValuesAndIn); nextValuesOrsOut.sort(new QueryParameterTypeComparator(theCtx)); From cfc0c7e6b3f0e8984e5f6212bf0504989cb8e982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Markovi=C4=8D?= Date: Fri, 10 Sep 2021 11:44:15 +0200 Subject: [PATCH 104/143] Add test for validation of multiple hosts in ElasticsearchHibernatePropertiesBuilder --- ...csearchHibernatePropertiesBuilderTest.java | 35 ++++++++++++++----- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilderTest.java index fce54f4b93c..df4598e86c8 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilderTest.java @@ -23,17 +23,11 @@ class ElasticsearchHibernatePropertiesBuilderTest { ElasticsearchHibernatePropertiesBuilder myPropertiesBuilder = spy(ElasticsearchHibernatePropertiesBuilder.class); - @BeforeEach - public void prepMocks() { - //ensures we don't try to reach out to a real ES server on apply. - doNothing().when(myPropertiesBuilder).injectStartupTemplate(any(), any(), any(), any()); - } - @Test - public void testRestUrlCannotContainProtocol() { + public void testHostsCannotContainProtocol() { String host = "localhost:9200"; String protocolHost = "https://" + host; - String failureMessage = "Elasticsearch URL cannot include a protocol, that is a separate property. Remove http:// or https:// from this URL."; + String failureMessage = "Elasticsearch URLs cannot include a protocol, that is a separate property. Remove http:// or https:// from this URL."; myPropertiesBuilder .setProtocol("https") @@ -42,12 +36,14 @@ class ElasticsearchHibernatePropertiesBuilderTest { //SUT try { - myPropertiesBuilder.setHosts(protocolHost); + myPropertiesBuilder.setHosts(protocolHost) + .apply(new Properties()); fail(); } catch (ConfigurationException e ) { assertThat(e.getMessage(), is(equalTo(failureMessage))); } + doNothing().when(myPropertiesBuilder).injectStartupTemplate(any(), any(), any(), any()); Properties properties = new Properties(); myPropertiesBuilder .setHosts(host) @@ -57,4 +53,25 @@ class ElasticsearchHibernatePropertiesBuilderTest { } + @Test + public void testHostsValueValidation() { + String host = "localhost_9200,localhost:9201,localhost:9202"; + String failureMessage = "Elasticsearch URLs have to contain ':' as a host:port separator. Example: localhost:9200,localhost:9201,localhost:9202"; + + myPropertiesBuilder + .setProtocol("https") + .setHosts(host) + .setUsername("whatever") + .setPassword("whatever"); + + //SUT + try { + myPropertiesBuilder + .apply(new Properties()); + fail(); + } catch (ConfigurationException e ) { + assertThat(e.getMessage(), is(equalTo(failureMessage))); + } + } + } From 1af7ed6223090cf04e545dac74d940d4e4b7c725 Mon Sep 17 00:00:00 2001 From: katie_smilecdr Date: Fri, 10 Sep 2021 09:40:35 -0400 Subject: [PATCH 105/143] [2973] update changelog --- .../hapi/fhir/changelog/5_6_0/2973-CLI-option-help-fails.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2973-CLI-option-help-fails.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2973-CLI-option-help-fails.yaml index ba6d9a2aff4..d2b6cf2ff64 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2973-CLI-option-help-fails.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2973-CLI-option-help-fails.yaml @@ -1,4 +1,4 @@ --- type: fix issue: 2973 -title: "CLI \"smileutil help {command}\" returns \"Unknown command\" which should return the usage of {command}. This has been corrected." +title: "CLI `smileutil help {command}` returns `Unknown command` which should return the usage of `command`. This has been corrected." From d6d862015b33a3b31ba9c842548afce6fed76e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Markovi=C4=8D?= Date: Fri, 10 Sep 2021 15:46:27 +0200 Subject: [PATCH 106/143] Address concerns in review for issue 2975 --- .../main/resources/ca/uhn/hapi/fhir/docs/server_jpa/lastn.md | 2 +- .../elastic/ElasticsearchHibernatePropertiesBuilder.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/lastn.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/lastn.md index f84b85ea65d..0848298ee66 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/lastn.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/lastn.md @@ -31,7 +31,7 @@ In addition, the Elasticsearch client service, `ElasticsearchSvcImpl` will need ```java @Bean() public ElasticsearchSvcImpl elasticsearchSvc() { - String elasticsearchHost = "localhost:9301"; + String elasticsearchHost = "localhost:9200"; String elasticsearchUsername = "elastic"; String elasticsearchPassword = "changeme"; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java index a39fb59c4a3..f428181d3f1 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java @@ -144,13 +144,13 @@ public class ElasticsearchHibernatePropertiesBuilder { * TODO GGG HS: In HS6.1, we should have a native way of performing index settings manipulation at bootstrap time, so this should * eventually be removed in favour of whatever solution they come up with. */ - void injectStartupTemplate(String protocol, String hosts, @Nullable String username, @Nullable String password) { + void injectStartupTemplate(String theProtocol, String theHosts, @Nullable String theUsername, @Nullable String thePassword) { PutIndexTemplateRequest ngramTemplate = new PutIndexTemplateRequest("ngram-template") .patterns(Arrays.asList("*resourcetable-*", "*termconcept-*")) .settings(Settings.builder().put("index.max_ngram_diff", 50)); try { - RestHighLevelClient elasticsearchHighLevelRestClient = ElasticsearchRestClientFactory.createElasticsearchHighLevelRestClient(protocol, hosts, username, password); + RestHighLevelClient elasticsearchHighLevelRestClient = ElasticsearchRestClientFactory.createElasticsearchHighLevelRestClient(theProtocol, theHosts, theUsername, thePassword); ourLog.info("Adding starter template for large ngram diffs"); AcknowledgedResponse acknowledgedResponse = elasticsearchHighLevelRestClient.indices().putTemplate(ngramTemplate, RequestOptions.DEFAULT); assert acknowledgedResponse.isAcknowledged(); From 30834d13ad995005c863ba3f62262f9ef9a616f8 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Fri, 10 Sep 2021 10:28:54 -0400 Subject: [PATCH 107/143] Add attribution. --- .../hapi/fhir/changelog/5_6_0/2975-elastic-improvements.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2975-elastic-improvements.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2975-elastic-improvements.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2975-elastic-improvements.yaml new file mode 100644 index 00000000000..77af34a96d1 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2975-elastic-improvements.yaml @@ -0,0 +1,5 @@ +--- +type: add +issue: 2975 +title: "Two improvements have been made to the connection to Elasticsearch. First, null username and password values are now permitted. Second, multiple hosts are now permitted via the `setHosts()` method on the ElasticHibernatePropertiesBuilder, allowing you to + connect to multiple elasticsearch clusters at once. Thanks to Dušan Marković for the contribution!" From 9f778a5b8273970e4d2a6ccc5625f3447e37f7d3 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Fri, 10 Sep 2021 13:05:03 -0400 Subject: [PATCH 108/143] Add attribution in the pom --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index a4ce1a7c719..79cc3817764 100644 --- a/pom.xml +++ b/pom.xml @@ -737,6 +737,12 @@ rbhman Bruno Hedman + + + bratwurtz + Dušan Marković + Better + From 77845d66f76913a1c743450b62cd0149387aef03 Mon Sep 17 00:00:00 2001 From: Justin Dar Date: Fri, 10 Sep 2021 10:54:33 -0700 Subject: [PATCH 109/143] Improved code formatting --- ...procedure-patient-consistent-error-handling.yaml | 2 +- .../fhir/jpa/search/SearchCoordinatorSvcImpl.java | 8 +++----- .../provider/r4/ResourceProviderR4CacheTest.java | 13 +++++++++---- .../fhir/jpa/searchparam/SearchParameterMap.java | 7 ------- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2958-procedure-patient-consistent-error-handling.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2958-procedure-patient-consistent-error-handling.yaml index f90ca63a917..4cee4993a52 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2958-procedure-patient-consistent-error-handling.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2958-procedure-patient-consistent-error-handling.yaml @@ -3,4 +3,4 @@ type: fix issue: 2958 jira: SMILE-643 title: "Fixed issue where the processing of queries like Procedure?patient= before a cache search would cause the parameter key to be removed. -Additionally, ensured that requests like Procedure?patient cause HTTP 400 Bad Request instead of HTTP 500 Internal Error." +Additionally, ensured that requests like Procedure?patient= cause HTTP 400 Bad Request instead of HTTP 500 Internal Error." diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java index 8c1303f1571..c03fc350699 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java @@ -1014,9 +1014,6 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { logged = true; ourLog.warn("Failed during search due to invalid request: {}", t.toString()); } - }else if (t instanceof java.lang.IllegalArgumentException && t.getMessage().contentEquals("The validated expression is false")) { - logged = true; - ourLog.warn("Failed during search due to invalid request: {}", t.toString()); } if (!logged) { @@ -1031,8 +1028,6 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { int failureCode = InternalErrorException.STATUS_CODE; if (t instanceof BaseServerResponseException) { failureCode = ((BaseServerResponseException) t).getStatusCode(); - }else if(t instanceof java.lang.IllegalArgumentException && t.getMessage().contentEquals("The validated expression is false")) { - failureCode = Constants.STATUS_HTTP_400_BAD_REQUEST; } if (System.getProperty(UNIT_TEST_CAPTURE_STACK) != null) { @@ -1212,6 +1207,9 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { } catch (IOException e) { ourLog.error("IO failure during database access", e); throw new InternalErrorException(e); + } catch (IllegalArgumentException e) { + ourLog.error("Illegal Argument during database access", e); + throw new InvalidRequestException("Parameter value missing in request", e); } } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java index fb33fcf46da..eca83de0556 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java @@ -17,6 +17,7 @@ import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.Patient; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -31,6 +32,7 @@ import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.core.IsNot.not; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.fail; @@ -233,24 +235,27 @@ public class ResourceProviderR4CacheTest extends BaseResourceProviderR4Test { } @Test - public void testProcedurePatient(){ - Bundle resp2 = myClient + public void testParamWithNoValueIsConsideredForCacheResults(){ + // Given: We populate the cache by searching + myClient .search() .byUrl("Procedure") .returnBundle(Bundle.class) .execute(); + // When: We search Procedure?patient= BaseServerResponseException exception = assertThrows(BaseServerResponseException.class, () -> {myClient .search() .byUrl("Procedure?patient=") .returnBundle(Bundle.class) .execute();}); - assertEquals(Constants.STATUS_HTTP_400_BAD_REQUEST, exception.getStatusCode()); + // Then: We do not get a cache hit + assertNotEquals(Constants.STATUS_HTTP_200_OK, exception.getStatusCode()); } @Test - public void testPatient(){ + public void testReturn400ForParameterWithNoValue(){ BaseServerResponseException exception = assertThrows(BaseServerResponseException.class, () -> {myClient .search() .byUrl("Procedure?patient=") diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java index 061531f4cc1..1e88bb00673 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java @@ -396,13 +396,6 @@ public class SearchParameterMap implements Serializable { for (List nextValuesAndIn : nextValuesAndsIn) { List nextValuesOrsOut = new ArrayList<>(); - /* - for (IQueryParameterType nextValueOrIn : nextValuesAndIn) { - if (nextValueOrIn.getMissing() != null || isNotBlank(nextValueOrIn.getValueAsQueryToken(theCtx))) { - nextValuesOrsOut.add(nextValueOrIn); - } - } - */ nextValuesOrsOut.addAll(nextValuesAndIn); From 2163e6e54870fbbbfcc01d67c6720e542d65e1b6 Mon Sep 17 00:00:00 2001 From: Justin Dar Date: Fri, 10 Sep 2021 12:36:11 -0700 Subject: [PATCH 110/143] Fixed error that previous fix caused --- .../java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java | 8 +++++++- .../ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java | 3 --- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java index b667e3a1375..0674ba87ffe 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java @@ -34,6 +34,7 @@ import ca.uhn.fhir.jpa.util.MemoryCacheService; import ca.uhn.fhir.jpa.util.QueryChunker; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import com.google.common.annotations.VisibleForTesting; @@ -204,7 +205,12 @@ public class IdHelperService { */ @Nonnull public List resolveResourcePersistentIdsWithCache(RequestPartitionId theRequestPartitionId, List theIds) { - theIds.forEach(id -> Validate.isTrue(id.hasIdPart())); + try { + theIds.forEach(id -> Validate.isTrue(id.hasIdPart())); + } catch (IllegalArgumentException e) { + ourLog.error("Illegal Argument during database access", e); + throw new InvalidRequestException("Parameter value missing in request", e); + } if (theIds.isEmpty()) { return Collections.emptyList(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java index c03fc350699..4d266271bd9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java @@ -1207,9 +1207,6 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { } catch (IOException e) { ourLog.error("IO failure during database access", e); throw new InternalErrorException(e); - } catch (IllegalArgumentException e) { - ourLog.error("Illegal Argument during database access", e); - throw new InvalidRequestException("Parameter value missing in request", e); } } } From b224463d35e11e498584d0f2f14e7bc9f95657ce Mon Sep 17 00:00:00 2001 From: Tadgh Date: Fri, 10 Sep 2021 22:46:35 -0400 Subject: [PATCH 111/143] add broken test --- .../fhir/jpa/dao/r4/FhirSystemDaoR4Test.java | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java index 88a0987be86..388d7696427 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java @@ -51,7 +51,9 @@ import org.hl7.fhir.r4.model.DateTimeType; import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.Encounter; import org.hl7.fhir.r4.model.EpisodeOfCare; +import org.hl7.fhir.r4.model.HumanName; import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Identifier; import org.hl7.fhir.r4.model.Medication; import org.hl7.fhir.r4.model.MedicationRequest; import org.hl7.fhir.r4.model.Meta; @@ -1161,6 +1163,48 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest { validate(outcome); } + @Test + public void testConditionalUpdate_forObservationWithNonExistentPatientSubject_shouldCreateLinkedResources() { + Bundle transactionBundle = new Bundle().setType(BundleType.TRANSACTION); + + // Patient + HumanName patientName = new HumanName().setFamily("TEST_LAST_NAME").addGiven("TEST_FIRST_NAME"); + Identifier patientIdentifier = new Identifier().setSystem("http://example.com/mrns").setValue("U1234567890"); + Patient patient = new Patient() + .setName(List.of(patientName)) + .setIdentifier(List.of(patientIdentifier)); + patient.setId(IdType.newRandomUuid()); + + transactionBundle + .addEntry() + .setFullUrl(patient.getId()) + .setResource(patient) + .getRequest() + .setMethod(Bundle.HTTPVerb.PUT) + .setUrl("/Patient?identifier=" + patientIdentifier.getSystem() + "|" + patientIdentifier.getValue()); + + // Observation + Observation observation = new Observation(); + observation.setId(IdType.newRandomUuid()); + observation.getSubject().setReference(patient.getIdElement().toUnqualifiedVersionless().toString()); + + transactionBundle + .addEntry() + .setFullUrl(observation.getId()) + .setResource(observation) + .getRequest() + .setMethod(Bundle.HTTPVerb.PUT) + .setUrl("/Observation?subject=" + patient.getIdElement().toUnqualifiedVersionless().toString()); + + ourLog.info("Patient TEMP UUID: {}", patient.getId()); + String s = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(transactionBundle); + System.out.println(s); + Bundle outcome= mySystemDao.transaction(null, transactionBundle); + String patientLocation = outcome.getEntry().get(0).getResponse().getLocation(); + assertThat(patientLocation, matchesPattern("Patient/[a-z0-9-]+/_history/1")); + String observationLocation = outcome.getEntry().get(1).getResponse().getLocation(); + assertThat(observationLocation, matchesPattern("Observation/[a-z0-9-]+/_history/1")); + } @Test public void testTransactionCreateInlineMatchUrlWithOneMatch() { From 94f157a4ac7b1aef76d7cc5723fc7f24274e5e28 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Sat, 11 Sep 2021 15:13:05 -0400 Subject: [PATCH 112/143] Start refactoring of basetransactionprocessor --- hapi-fhir-jpaserver-base/pom.xml | 10 +- .../jpa/dao/BaseTransactionProcessor.java | 143 ++++++++++-------- .../fhir/jpa/dao/r4/FhirSystemDaoR4Test.java | 28 ++++ 3 files changed, 121 insertions(+), 60 deletions(-) diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index de3950d1860..b915ea16c06 100644 --- a/hapi-fhir-jpaserver-base/pom.xml +++ b/hapi-fhir-jpaserver-base/pom.xml @@ -815,7 +815,15 @@ - + + org.apache.maven.plugins + maven-compiler-plugin + + 9 + 9 + + + ${project.basedir}/src/main/resources diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index d40d555a8de..ef476ec1d58 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -93,6 +93,7 @@ import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IPrimitiveType; +import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -481,7 +482,7 @@ public abstract class BaseTransactionProcessor { entries.sort(new TransactionSorter(placeholderIds)); // perform all writes - doTransactionWriteOperations(theRequestDetails, theActionName, + prepareThenExecuteTransactionWriteOperations(theRequestDetails, theActionName, transactionDetails, transactionStopWatch, response, originalRequestOrder, entries); @@ -584,38 +585,15 @@ public abstract class BaseTransactionProcessor { * heavy load with lots of concurrent transactions using all available * database connections. */ - private void doTransactionWriteOperations(RequestDetails theRequestDetails, String theActionName, - TransactionDetails theTransactionDetails, StopWatch theTransactionStopWatch, - IBaseBundle theResponse, IdentityHashMap theOriginalRequestOrder, - List theEntries) { + private void prepareThenExecuteTransactionWriteOperations(RequestDetails theRequestDetails, String theActionName, + TransactionDetails theTransactionDetails, StopWatch theTransactionStopWatch, + IBaseBundle theResponse, IdentityHashMap theOriginalRequestOrder, + List theEntries) { + TransactionWriteOperationsDetails writeOperationsDetails = null; - if (CompositeInterceptorBroadcaster.hasHooks(Pointcut.STORAGE_TRANSACTION_WRITE_OPERATIONS_PRE, myInterceptorBroadcaster, theRequestDetails) || - CompositeInterceptorBroadcaster.hasHooks(Pointcut.STORAGE_TRANSACTION_WRITE_OPERATIONS_POST, myInterceptorBroadcaster, theRequestDetails)) { - - List updateRequestUrls = new ArrayList<>(); - List conditionalCreateRequestUrls = new ArrayList<>(); - for (IBase nextEntry : theEntries) { - String method = myVersionAdapter.getEntryRequestVerb(myContext, nextEntry); - if ("PUT".equals(method)) { - String requestUrl = myVersionAdapter.getEntryRequestUrl(nextEntry); - if (isNotBlank(requestUrl)) { - updateRequestUrls.add(requestUrl); - } - } else if ("POST".equals(method)) { - String requestUrl = myVersionAdapter.getEntryRequestIfNoneExist(nextEntry); - if (isNotBlank(requestUrl) && requestUrl.contains("?")) { - conditionalCreateRequestUrls.add(requestUrl); - } - } - } - - writeOperationsDetails = new TransactionWriteOperationsDetails(); - writeOperationsDetails.setUpdateRequestUrls(updateRequestUrls); - writeOperationsDetails.setConditionalCreateRequestUrls(conditionalCreateRequestUrls); - HookParams params = new HookParams() - .add(TransactionDetails.class, theTransactionDetails) - .add(TransactionWriteOperationsDetails.class, writeOperationsDetails); - CompositeInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequestDetails, Pointcut.STORAGE_TRANSACTION_WRITE_OPERATIONS_PRE, params); + if (haveWriteOperationsHooks(theRequestDetails)) { + writeOperationsDetails = buildWriteOperationsDetails(theEntries); + callWriteOperationsHook(Pointcut.STORAGE_TRANSACTION_WRITE_OPERATIONS_PRE, theRequestDetails, theTransactionDetails, writeOperationsDetails); } TransactionCallback> txCallback = status -> { @@ -636,13 +614,9 @@ public abstract class BaseTransactionProcessor { try { entriesToProcess = myHapiTransactionService.execute(theRequestDetails, theTransactionDetails, txCallback); - } - finally { - if (writeOperationsDetails != null) { - HookParams params = new HookParams() - .add(TransactionDetails.class, theTransactionDetails) - .add(TransactionWriteOperationsDetails.class, writeOperationsDetails); - CompositeInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequestDetails, Pointcut.STORAGE_TRANSACTION_WRITE_OPERATIONS_POST, params); + } finally { + if (haveWriteOperationsHooks(theRequestDetails)) { + callWriteOperationsHook(Pointcut.STORAGE_TRANSACTION_WRITE_OPERATIONS_POST, theRequestDetails, theTransactionDetails, writeOperationsDetails); } } @@ -656,6 +630,45 @@ public abstract class BaseTransactionProcessor { } } + private boolean haveWriteOperationsHooks(RequestDetails theRequestDetails) { + return CompositeInterceptorBroadcaster.hasHooks(Pointcut.STORAGE_TRANSACTION_WRITE_OPERATIONS_PRE, myInterceptorBroadcaster, theRequestDetails) || + CompositeInterceptorBroadcaster.hasHooks(Pointcut.STORAGE_TRANSACTION_WRITE_OPERATIONS_POST, myInterceptorBroadcaster, theRequestDetails); + } + + private void callWriteOperationsHook(Pointcut thePointcut, RequestDetails theRequestDetails, TransactionDetails theTransactionDetails, TransactionWriteOperationsDetails theWriteOperationsDetails) { + HookParams params = new HookParams() + .add(TransactionDetails.class, theTransactionDetails) + .add(TransactionWriteOperationsDetails.class, theWriteOperationsDetails); + CompositeInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequestDetails, thePointcut, params); + } + + @NotNull + private TransactionWriteOperationsDetails buildWriteOperationsDetails(List theEntries) { + TransactionWriteOperationsDetails writeOperationsDetails; + List updateRequestUrls = new ArrayList<>(); + List conditionalCreateRequestUrls = new ArrayList<>(); + //Extract + for (IBase nextEntry : theEntries) { + String method = myVersionAdapter.getEntryRequestVerb(myContext, nextEntry); + if ("PUT".equals(method)) { + String requestUrl = myVersionAdapter.getEntryRequestUrl(nextEntry); + if (isNotBlank(requestUrl)) { + updateRequestUrls.add(requestUrl); + } + } else if ("POST".equals(method)) { + String requestUrl = myVersionAdapter.getEntryRequestIfNoneExist(nextEntry); + if (isNotBlank(requestUrl) && requestUrl.contains("?")) { + conditionalCreateRequestUrls.add(requestUrl); + } + } + } + + writeOperationsDetails = new TransactionWriteOperationsDetails(); + writeOperationsDetails.setUpdateRequestUrls(updateRequestUrls); + writeOperationsDetails.setConditionalCreateRequestUrls(conditionalCreateRequestUrls); + return writeOperationsDetails; + } + private boolean isValidVerb(String theVerb) { try { return org.hl7.fhir.r4.model.Bundle.HTTPVerb.fromCode(theVerb) != null; @@ -704,7 +717,7 @@ public abstract class BaseTransactionProcessor { IBaseResource resource = myVersionAdapter.getResource(nextReqEntry); if (resource != null) { String verb = myVersionAdapter.getEntryRequestVerb(myContext, nextReqEntry); - String entryUrl = myVersionAdapter.getFullUrl(nextReqEntry); + String entryFullUrl = myVersionAdapter.getFullUrl(nextReqEntry); String requestUrl = myVersionAdapter.getEntryRequestUrl(nextReqEntry); String ifNoneExist = myVersionAdapter.getEntryRequestIfNoneExist(nextReqEntry); String key = verb + "|" + requestUrl + "|" + ifNoneExist; @@ -712,7 +725,7 @@ public abstract class BaseTransactionProcessor { // Conditional UPDATE boolean consolidateEntry = false; if ("PUT".equals(verb)) { - if (isNotBlank(entryUrl) && isNotBlank(requestUrl)) { + if (isNotBlank(entryFullUrl) && isNotBlank(requestUrl)) { int questionMarkIndex = requestUrl.indexOf('?'); if (questionMarkIndex >= 0 && requestUrl.length() > (questionMarkIndex + 1)) { consolidateEntry = true; @@ -722,8 +735,8 @@ public abstract class BaseTransactionProcessor { // Conditional CREATE if ("POST".equals(verb)) { - if (isNotBlank(entryUrl) && isNotBlank(requestUrl) && isNotBlank(ifNoneExist)) { - if (!entryUrl.equals(requestUrl)) { + if (isNotBlank(entryFullUrl) && isNotBlank(requestUrl) && isNotBlank(ifNoneExist)) { + if (!entryFullUrl.equals(requestUrl)) { consolidateEntry = true; } } @@ -731,33 +744,41 @@ public abstract class BaseTransactionProcessor { if (consolidateEntry) { if (!keyToUuid.containsKey(key)) { - keyToUuid.put(key, entryUrl); + keyToUuid.put(key, entryFullUrl); } else { ourLog.info("Discarding transaction bundle entry {} as it contained a duplicate conditional {}", originalIndex, verb); theEntries.remove(index); index--; String existingUuid = keyToUuid.get(key); - for (IBase nextEntry : theEntries) { - IBaseResource nextResource = myVersionAdapter.getResource(nextEntry); - for (IBaseReference nextReference : myContext.newTerser().getAllPopulatedChildElementsOfType(nextResource, IBaseReference.class)) { - // We're interested in any references directly to the placeholder ID, but also - // references that have a resource target that has the placeholder ID. - String nextReferenceId = nextReference.getReferenceElement().getValue(); - if (isBlank(nextReferenceId) && nextReference.getResource() != null) { - nextReferenceId = nextReference.getResource().getIdElement().getValue(); - } - if (entryUrl.equals(nextReferenceId)) { - nextReference.setReference(existingUuid); - nextReference.setResource(null); - } - } - } + replaceReferencesInEntriesWithConsolidatedUUID(theEntries, entryFullUrl, existingUuid); } } } } } + /** + * Iterates over all entries, and if it finds any which have references which match the fullUrl of the entry that was consolidated out + * replace them with our new consolidated UUID + */ + private void replaceReferencesInEntriesWithConsolidatedUUID(List theEntries, String theEntryFullUrl, String existingUuid) { + for (IBase nextEntry : theEntries) { + IBaseResource nextResource = myVersionAdapter.getResource(nextEntry); + for (IBaseReference nextReference : myContext.newTerser().getAllPopulatedChildElementsOfType(nextResource, IBaseReference.class)) { + // We're interested in any references directly to the placeholder ID, but also + // references that have a resource target that has the placeholder ID. + String nextReferenceId = nextReference.getReferenceElement().getValue(); + if (isBlank(nextReferenceId) && nextReference.getResource() != null) { + nextReferenceId = nextReference.getResource().getIdElement().getValue(); + } + if (theEntryFullUrl.equals(nextReferenceId)) { + nextReference.setReference(existingUuid); + nextReference.setResource(null); + } + } + } + } + /** * Retrieves the next resource id (IIdType) from the base resource and next request entry. * @param theBaseResource - base resource @@ -810,12 +831,16 @@ public abstract class BaseTransactionProcessor { return nextResourceId; } + /** After pre-hooks have been called + * + */ protected Map doTransactionWriteOperations(final RequestDetails theRequest, String theActionName, TransactionDetails theTransactionDetails, Set theAllIds, Map theIdSubstitutions, Map theIdToPersistedOutcome, IBaseBundle theResponse, IdentityHashMap theOriginalRequestOrder, List theEntries, StopWatch theTransactionStopWatch) { + // During a transaction, we don't execute hooks, instead, we execute them all post-transaction. theTransactionDetails.beginAcceptingDeferredInterceptorBroadcasts( Pointcut.STORAGE_PRECOMMIT_RESOURCE_CREATED, Pointcut.STORAGE_PRECOMMIT_RESOURCE_UPDATED, diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java index 388d7696427..595716b47fb 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java @@ -1206,6 +1206,34 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest { assertThat(observationLocation, matchesPattern("Observation/[a-z0-9-]+/_history/1")); } + @Test + public void testConditionalUrlWhichDoesNotMatcHResource() { + Bundle transactionBundle = new Bundle().setType(BundleType.TRANSACTION); + + // Patient + HumanName patientName = new HumanName().setFamily("TEST_LAST_NAME").addGiven("TEST_FIRST_NAME"); + Identifier patientIdentifier = new Identifier().setSystem("http://example.com/mrns").setValue("U1234567890"); + Patient patient = new Patient() + .setName(List.of(patientName)) + .setIdentifier(List.of(patientIdentifier)); + patient.setId(IdType.newRandomUuid()); + + transactionBundle + .addEntry() + .setFullUrl(patient.getId()) + .setResource(patient) + .getRequest() + .setMethod(Bundle.HTTPVerb.PUT) + .setUrl("/Patient?identifier=" + patientIdentifier.getSystem() + "|" + "zoop"); + + ourLog.info("Patient TEMP UUID: {}", patient.getId()); + String s = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(transactionBundle); + System.out.println(s); + Bundle outcome= mySystemDao.transaction(null, transactionBundle); + String patientLocation = outcome.getEntry().get(0).getResponse().getLocation(); + assertThat(patientLocation, matchesPattern("Patient/[a-z0-9-]+/_history/1")); + } + @Test public void testTransactionCreateInlineMatchUrlWithOneMatch() { String methodName = "testTransactionCreateInlineMatchUrlWithOneMatch"; From 55544311466a3b0fd73ee4822f8fc06bb00e53fa Mon Sep 17 00:00:00 2001 From: James Agnew Date: Sat, 11 Sep 2021 18:27:18 -0400 Subject: [PATCH 113/143] Avoid dead SearchParameter links in CapabilityStatement (#2790) * Avoid dead SearchParameter links in CapabilityStatement * Resolve fixmes * Build fix * Test fix * Test fix * Test fix * Work on metadata * Fixes * Test fixes * Test fix * Test fix * Test fixes * Test fix * Work on test fixes * Test fixes * Test fixes * Test fixes * Test fix * Fix params * Resolve fixme * Adjust changelogs * Version bump to 5.6.0-PRE7 * Add license header * Bump version to 5.6.0-PRE5-SNAPSHOT --- hapi-deployable-pom/pom.xml | 2 +- hapi-fhir-android/pom.xml | 2 +- hapi-fhir-base/pom.xml | 2 +- .../ca/uhn/fhir/context/ModelScanner.java | 13 +- .../uhn/fhir/context/RuntimeSearchParam.java | 48 +- .../fhir/instance/model/api/IAnyResource.java | 7 - hapi-fhir-bom/pom.xml | 4 +- hapi-fhir-cli/hapi-fhir-cli-api/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-app/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml | 2 +- hapi-fhir-cli/pom.xml | 2 +- hapi-fhir-client-okhttp/pom.xml | 2 +- hapi-fhir-client/pom.xml | 2 +- hapi-fhir-converter/pom.xml | 2 +- hapi-fhir-dist/pom.xml | 2 +- hapi-fhir-docs/pom.xml | 2 +- ...0-correct-searchparameter-urls-in-jps.yaml | 5 + .../5_6_0/2790-remove-language-from-jpa.yaml | 7 + hapi-fhir-jacoco/pom.xml | 2 +- hapi-fhir-jaxrsserver-base/pom.xml | 2 +- hapi-fhir-jpaserver-api/pom.xml | 2 +- hapi-fhir-jpaserver-base/pom.xml | 2 +- .../ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java | 6 - .../ca/uhn/fhir/jpa/dao/DaoFailureUtil.java | 20 + .../predicate/PredicateBuilderReference.java | 47 - .../dao/predicate/PredicateBuilderToken.java | 3 + .../r4/FhirResourceDaoSearchParameterR4.java | 8 +- .../fhir/jpa/search/builder/QueryStack.java | 44 - .../predicate/TokenPredicateBuilder.java | 2 +- ...ceDaoDstu2SearchCustomSearchParamTest.java | 4 +- .../FhirResourceDaoDstu2SearchNoFtTest.java | 148 - .../dao/dstu2/FhirResourceDaoDstu2Test.java | 12 +- ...ceDaoDstu3SearchCustomSearchParamTest.java | 4 +- .../FhirResourceDaoDstu3SearchNoFtTest.java | 147 - .../dao/dstu3/FhirResourceDaoDstu3Test.java | 11 +- .../dao/r4/FhirResourceDaoR4CreateTest.java | 26 + ...rceDaoR4FilterLegacySearchBuilderTest.java | 22 - .../dao/r4/FhirResourceDaoR4FilterTest.java | 24 +- ...rResourceDaoR4LegacySearchBuilderTest.java | 156 - ...ourceDaoR4SearchCustomSearchParamTest.java | 6 +- .../r4/FhirResourceDaoR4SearchNoFtTest.java | 155 - .../FhirResourceDaoR4SearchNoHashesTest.java | 172 +- .../jpa/dao/r4/FhirResourceDaoR4Test.java | 13 +- .../FhirResourceDaoSearchParameterR4Test.java | 3 - .../jpa/dao/r4/PartitioningSqlR4Test.java | 12 +- .../jpa/graphql/JpaStorageServicesTest.java | 2 +- ...earchPreferHandlingInterceptorJpaTest.java | 8 +- ...rCapabilityStatementProviderJpaR4Test.java | 70 +- .../stresstest/GiantTransactionPerfTest.java | 2 + .../InMemorySubscriptionMatcherR4Test.java | 12 - hapi-fhir-jpaserver-batch/pom.xml | 2 +- hapi-fhir-jpaserver-cql/pom.xml | 2 +- hapi-fhir-jpaserver-mdm/pom.xml | 2 +- hapi-fhir-jpaserver-migrate/pom.xml | 2 +- .../tasks/HapiFhirJpaMigrationTasks.java | 6 + hapi-fhir-jpaserver-model/pom.xml | 2 +- .../fhir/jpa/model/entity/ResourceTable.java | 13 +- hapi-fhir-jpaserver-searchparam/pom.xml | 2 +- .../jpa/searchparam/ResourceMetaParams.java | 2 - .../ResourceIndexedSearchParams.java | 15 +- .../matcher/InMemoryResourceMatcher.java | 1 - .../registry/ReadOnlySearchParamCache.java | 39 +- .../registry/SearchParamRegistryImpl.java | 7 +- .../SearchParameterCanonicalizer.java | 10 +- .../registry/SearchParamRegistryImplTest.java | 8 +- hapi-fhir-jpaserver-subscription/pom.xml | 2 +- hapi-fhir-jpaserver-test-utilities/pom.xml | 2 +- hapi-fhir-jpaserver-uhnfhirtest/pom.xml | 2 +- hapi-fhir-server-mdm/pom.xml | 2 +- hapi-fhir-server-openapi/pom.xml | 2 +- hapi-fhir-server/pom.xml | 2 +- .../server/method/SearchMethodBinding.java | 1 - .../ServerCapabilityStatementProvider.java | 10 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../hapi-fhir-spring-boot-samples/pom.xml | 2 +- .../hapi-fhir-spring-boot-starter/pom.xml | 2 +- hapi-fhir-spring-boot/pom.xml | 2 +- .../model/dstu/resource/BaseResource.java | 9 - .../java/ca/uhn/fhir/context/NameChanges.java | 2 +- .../ca/uhn/fhir/context/copy/NameChanges.java | 2 +- .../src/test/resources/alert.profile.json | 7 +- .../src/test/resources/patient.profile.json | 7 +- hapi-fhir-structures-dstu2.1/pom.xml | 2 +- hapi-fhir-structures-dstu2/pom.xml | 2 +- .../model/dstu2/resource/BaseResource.java | 9 +- .../rest/server/PatientResourceProvider.java | 4 - .../ServerConformanceProviderDstu2Test.java | 2 +- hapi-fhir-structures-dstu3/pom.xml | 2 +- .../fhir/context/FhirContextDstu3Test.java | 2 +- hapi-fhir-structures-hl7org-dstu2/pom.xml | 2 +- hapi-fhir-structures-r4/pom.xml | 2 +- hapi-fhir-structures-r5/pom.xml | 2 +- .../rest/server/PatientResourceProvider.java | 4 - ...rverCapabilityStatementProviderR5Test.java | 3 +- hapi-fhir-test-utilities/pom.xml | 2 +- hapi-fhir-testpage-overlay/pom.xml | 2 +- .../pom.xml | 2 +- hapi-fhir-validation-resources-dstu2/pom.xml | 2 +- hapi-fhir-validation-resources-dstu3/pom.xml | 2 +- hapi-fhir-validation-resources-r4/pom.xml | 2 +- .../fhir/r4/model/sp/search-parameters.json | 49075 ++++++++++++++++ .../r4/model/sp/SearchParametersTest.java | 18 + hapi-fhir-validation-resources-r5/pom.xml | 2 +- hapi-fhir-validation/pom.xml | 2 +- hapi-tinder-plugin/pom.xml | 16 +- .../fhir/tinder/ResourceMinimizerMojo.java | 44 +- hapi-tinder-test/pom.xml | 2 +- pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- 114 files changed, 49487 insertions(+), 1160 deletions(-) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2790-correct-searchparameter-urls-in-jps.yaml create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2790-remove-language-from-jpa.yaml create mode 100644 hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/sp/search-parameters.json create mode 100644 hapi-fhir-validation-resources-r4/src/test/java/org/hl7/fhir/r4/model/sp/SearchParametersTest.java diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index e7b4678dcaf..e70a9982ec0 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index 5080a741de5..fcc0073c6c9 100644 --- a/hapi-fhir-android/pom.xml +++ b/hapi-fhir-android/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index cf2f5a9d5c8..4250734be2e 100644 --- a/hapi-fhir-base/pom.xml +++ b/hapi-fhir-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java index a03d8d39414..e691c080d1c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java @@ -73,7 +73,6 @@ import static org.apache.commons.lang3.StringUtils.isBlank; class ModelScanner { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ModelScanner.class); - private Map, BaseRuntimeElementDefinition> myClassToElementDefinitions = new HashMap<>(); private FhirContext myContext; private Map myIdToResourceDefinition = new HashMap<>(); @@ -90,6 +89,7 @@ class ModelScanner { @Nonnull Collection> theResourceTypes) throws ConfigurationException { myContext = theContext; myVersion = theVersion; + Set> toScan = new HashSet<>(theResourceTypes); init(theExistingDefinitions, toScan); } @@ -405,8 +405,8 @@ class ModelScanner { List components = null; if (paramType == RestSearchParameterTypeEnum.COMPOSITE) { components = new ArrayList<>(); - for (String next : searchParam.compositeOf()) { - String ref = "http://hl7.org/fhir/SearchParameter/" + theResourceDef.getName().toLowerCase() + "-" + next; + for (String name : searchParam.compositeOf()) { + String ref = toCanonicalSearchParameterUri(theResourceDef, name); components.add(new RuntimeSearchParam.Component(null, ref)); } } @@ -414,7 +414,8 @@ class ModelScanner { Collection base = Collections.singletonList(theResourceDef.getName()); String url = null; if (theResourceDef.isStandardType()) { - url = "http://hl7.org/fhir/SearchParameter/" + theResourceDef.getName().toLowerCase() + "-" + searchParam.name(); + String name = searchParam.name(); + url = toCanonicalSearchParameterUri(theResourceDef, name); } RuntimeSearchParam param = new RuntimeSearchParam(null, url, searchParam.name(), searchParam.description(), searchParam.path(), paramType, providesMembershipInCompartments, toTargetList(searchParam.target()), RuntimeSearchParamStatusEnum.ACTIVE, null, components, base); theResourceDef.addSearchParam(param); @@ -424,6 +425,10 @@ class ModelScanner { } + private String toCanonicalSearchParameterUri(RuntimeResourceDefinition theResourceDef, String theName) { + return "http://hl7.org/fhir/SearchParameter/" + theResourceDef.getName() + "-" + theName; + } + private Set toTargetList(Class[] theTarget) { HashSet retVal = new HashSet<>(); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeSearchParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeSearchParam.java index 746deccd120..d1cb595f7d4 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeSearchParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeSearchParam.java @@ -233,18 +233,7 @@ public class RuntimeSearchParam { } public List getPathsSplit() { - String path = getPath(); - if (path.indexOf('|') == -1) { - return Collections.singletonList(path); - } - - List retVal = new ArrayList<>(); - StringTokenizer tok = new StringTokenizer(path, "|"); - while (tok.hasMoreElements()) { - String nextPath = tok.nextToken().trim(); - retVal.add(nextPath.trim()); - } - return retVal; + return getPathsSplitForResourceType(null); } /** @@ -266,6 +255,41 @@ public class RuntimeSearchParam { return myPhoneticEncoder.encode(theString); } + public List getPathsSplitForResourceType(@Nullable String theResourceName) { + String path = getPath(); + if (path.indexOf('|') == -1) { + if (theResourceName != null && !pathMatchesResourceType(theResourceName, path)) { + return Collections.emptyList(); + } + return Collections.singletonList(path); + } + + List retVal = new ArrayList<>(); + StringTokenizer tok = new StringTokenizer(path, "|"); + while (tok.hasMoreElements()) { + String nextPath = tok.nextToken().trim(); + if (theResourceName != null && !pathMatchesResourceType(theResourceName, nextPath)) { + continue; + } + retVal.add(nextPath.trim()); + } + return retVal; + } + + private boolean pathMatchesResourceType(String theResourceName, String thePath) { + if (thePath.startsWith(theResourceName + ".")) { + return true; + } + if (thePath.startsWith("Resouce.") || thePath.startsWith("DomainResource.")) { + return true; + } + if (Character.isLowerCase(thePath.charAt(0))) { + return true; + } + + return false; + } + public enum RuntimeSearchParamStatusEnum { ACTIVE, DRAFT, diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IAnyResource.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IAnyResource.java index 105548d3d99..9fcacdc4ebd 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IAnyResource.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IAnyResource.java @@ -28,13 +28,6 @@ import ca.uhn.fhir.rest.gclient.TokenClientParam; */ public interface IAnyResource extends IBaseResource { - /** - * Search parameter constant for _language - */ - @SearchParamDefinition(name="_language", path="", description="The language of the resource", type="string" ) - String SP_RES_LANGUAGE = "_language"; - - /** * Search parameter constant for _id */ diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml index 5b83473d8bd..8fe5cf9a5b4 100644 --- a/hapi-fhir-bom/pom.xml +++ b/hapi-fhir-bom/pom.xml @@ -3,14 +3,14 @@ 4.0.0 ca.uhn.hapi.fhir hapi-fhir-bom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT pom HAPI FHIR BOM ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml index e75639496f0..c03744e91ea 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml index da95c8249b7..5e11c79536a 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir-cli - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml index 39a65d2c304..a53adf1d7b4 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../../hapi-deployable-pom diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml index 918a356bcce..1944f4105b2 100644 --- a/hapi-fhir-cli/pom.xml +++ b/hapi-fhir-cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml index fc1ff968610..b12089d304e 100644 --- a/hapi-fhir-client-okhttp/pom.xml +++ b/hapi-fhir-client-okhttp/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml index 22095a8b31e..50382d3feb9 100644 --- a/hapi-fhir-client/pom.xml +++ b/hapi-fhir-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml index 3edd8134ceb..ca9ac09d67d 100644 --- a/hapi-fhir-converter/pom.xml +++ b/hapi-fhir-converter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml index 507cc110724..7bd546d13d0 100644 --- a/hapi-fhir-dist/pom.xml +++ b/hapi-fhir-dist/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml index 9203c8fa4d2..5f99f8bd00b 100644 --- a/hapi-fhir-docs/pom.xml +++ b/hapi-fhir-docs/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2790-correct-searchparameter-urls-in-jps.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2790-correct-searchparameter-urls-in-jps.yaml new file mode 100644 index 00000000000..66a1517ac15 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2790-correct-searchparameter-urls-in-jps.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 2790 +title: "The SearchParameter canonical URLs exported by the JPA server have been adjusted to match the URLs + specified in the FHIR specification." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2790-remove-language-from-jpa.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2790-remove-language-from-jpa.yaml new file mode 100644 index 00000000000..d6ddb530e75 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2790-remove-language-from-jpa.yaml @@ -0,0 +1,7 @@ +--- +type: change +issue: 2790 +title: "Support for the `_language` search parameter has been dropped from the JPA server. This search parameter + was specified in FHIR DSTU1 but was dropped in later versions. It is rarely used in practice and imposes + an indexing cost, so it has now been removed. A custom search parameter may be used in order to achieve + the same functionality if needed." diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml index 8a4adc9ac2a..e9b53373037 100644 --- a/hapi-fhir-jacoco/pom.xml +++ b/hapi-fhir-jacoco/pom.xml @@ -11,7 +11,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml index 9679ed049c5..2887333a9c8 100644 --- a/hapi-fhir-jaxrsserver-base/pom.xml +++ b/hapi-fhir-jaxrsserver-base/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-api/pom.xml b/hapi-fhir-jpaserver-api/pom.xml index 4da1a0f45ee..4f709865c14 100644 --- a/hapi-fhir-jpaserver-api/pom.xml +++ b/hapi-fhir-jpaserver-api/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index de3950d1860..1c6c860a492 100644 --- a/hapi-fhir-jpaserver-base/pom.xml +++ b/hapi-fhir-jpaserver-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java index 4abd1899274..d612b88fe50 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java @@ -1228,12 +1228,6 @@ public abstract class BaseHapiFhirDao extends BaseStora } entity.setUpdated(theTransactionDetails.getTransactionDate()); - if (theResource instanceof IResource) { - entity.setLanguage(((IResource) theResource).getLanguage().getValue()); - } else { - entity.setLanguage(((IAnyResource) theResource).getLanguageElement().getValue()); - } - newParams.populateResourceTableSearchParamsPresentFlags(entity); entity.setIndexStatus(INDEX_STATUS_INDEXED); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoFailureUtil.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoFailureUtil.java index 03e389ce6f6..ad27290f96c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoFailureUtil.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoFailureUtil.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.jpa.dao; +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import org.apache.commons.lang3.StringUtils; /** diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderReference.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderReference.java index 1eba216a54c..62ebba77afc 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderReference.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderReference.java @@ -559,11 +559,6 @@ class PredicateBuilderReference extends BasePredicateBuilder { myPredicateBuilder.addPredicateResourceId(theAndOrParams, theResourceName, theRequestPartitionId); break; - case IAnyResource.SP_RES_LANGUAGE: - addPredicateLanguage(theAndOrParams, - null); - break; - case Constants.PARAM_HAS: addPredicateHas(theResourceName, theAndOrParams, theRequest, theRequestPartitionId); break; @@ -733,9 +728,6 @@ class PredicateBuilderReference extends BasePredicateBuilder { null, theFilter.getValue()); return myPredicateBuilder.addPredicateResourceId(Collections.singletonList(Collections.singletonList(param)), myResourceName, theFilter.getOperation(), theRequestPartitionId); - } else if (theFilter.getParamPath().getName().equals(IAnyResource.SP_RES_LANGUAGE)) { - return addPredicateLanguage(Collections.singletonList(Collections.singletonList(new StringParam(theFilter.getValue()))), - theFilter.getOperation()); } RuntimeSearchParam searchParam = mySearchParamRegistry.getActiveSearchParam(theResourceName, theFilter.getParamPath().getName()); @@ -828,45 +820,6 @@ class PredicateBuilderReference extends BasePredicateBuilder { return qp; } - private Predicate addPredicateLanguage(List> theList, - SearchFilterParser.CompareOperation operation) { - for (List nextList : theList) { - - Set values = new HashSet<>(); - for (IQueryParameterType next : nextList) { - if (next instanceof StringParam) { - String nextValue = ((StringParam) next).getValue(); - if (isBlank(nextValue)) { - continue; - } - values.add(nextValue); - } else { - throw new InternalErrorException("Language parameter must be of type " + StringParam.class.getCanonicalName() + " - Got " + next.getClass().getCanonicalName()); - } - } - - if (values.isEmpty()) { - continue; - } - - Predicate predicate; - if ((operation == null) || - (operation == SearchFilterParser.CompareOperation.eq)) { - predicate = myQueryStack.get("myLanguage").as(String.class).in(values); - } else if (operation == SearchFilterParser.CompareOperation.ne) { - predicate = myQueryStack.get("myLanguage").as(String.class).in(values).not(); - } else { - throw new InvalidRequestException("Unsupported operator specified in language query, only \"eq\" and \"ne\" are supported"); - } - myQueryStack.addPredicate(predicate); - if (operation != null) { - return predicate; - } - } - - return null; - } - private void addPredicateSource(List> theAndOrParams, RequestDetails theRequest) { for (List nextAnd : theAndOrParams) { addPredicateSource(nextAnd, SearchFilterParser.CompareOperation.eq, theRequest); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderToken.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderToken.java index bc5cccb736c..c98eb045a47 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderToken.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderToken.java @@ -261,6 +261,9 @@ class PredicateBuilderToken extends BasePredicateBuilder implements IPredicateBu if (theSearchParam != null) { Set valueSetUris = Sets.newHashSet(); for (String nextPath : theSearchParam.getPathsSplit()) { + if (!nextPath.startsWith(myResourceType + ".")) { + continue; + } BaseRuntimeChildDefinition def = myContext.newTerser().getDefinition(myResourceType, nextPath); if (def instanceof BaseRuntimeDeclaredChildDefinition) { String valueSet = ((BaseRuntimeDeclaredChildDefinition) def).getBindingValueSet(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSearchParameterR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSearchParameterR4.java index e6ef352724c..bf9277feb12 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSearchParameterR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSearchParameterR4.java @@ -92,8 +92,12 @@ public class FhirResourceDaoSearchParameterR4 extends BaseHapiFhirResourceDao nextBaseType : theResource.getBase()) { String nextBase = nextBaseType.getValueAsString(); RuntimeSearchParam existingSearchParam = theSearchParamRegistry.getActiveSearchParam(nextBase, theResource.getCode()); - if (existingSearchParam != null && existingSearchParam.getId() == null) { - throw new UnprocessableEntityException("Can not override built-in search parameter " + nextBase + ":" + theResource.getCode() + " because overriding is disabled on this server"); + if (existingSearchParam != null) { + boolean isBuiltIn = existingSearchParam.getId() == null; + isBuiltIn |= existingSearchParam.getUri().startsWith("http://hl7.org/fhir/SearchParameter/"); + if (isBuiltIn) { + throw new UnprocessableEntityException("Can not override built-in search parameter " + nextBase + ":" + theResource.getCode() + " because overriding is disabled on this server"); + } } } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java index 03385f34fb7..82bf3d886fe 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/QueryStack.java @@ -434,9 +434,6 @@ public class QueryStack { param.setValueAsQueryToken(null, null, null, theFilter.getValue()); return theQueryStack3.createPredicateResourceId(null, Collections.singletonList(Collections.singletonList(param)), theResourceName, theFilter.getOperation(), theRequestPartitionId); } - case IAnyResource.SP_RES_LANGUAGE: { - return theQueryStack3.createPredicateLanguage(Collections.singletonList(Collections.singletonList(new StringParam(theFilter.getValue()))), theFilter.getOperation()); - } case Constants.PARAM_SOURCE: { TokenParam param = new TokenParam(); param.setValueAsQueryToken(null, null, null, theFilter.getValue()); @@ -579,44 +576,6 @@ public class QueryStack { return toAndPredicate(andPredicates); } - public Condition createPredicateLanguage(List> theList, Object theOperation) { - - ResourceTablePredicateBuilder rootTable = mySqlBuilder.getOrCreateResourceTablePredicateBuilder(); - - List predicates = new ArrayList<>(); - for (List nextList : theList) { - - Set values = new HashSet<>(); - for (IQueryParameterType next : nextList) { - if (next instanceof StringParam) { - String nextValue = ((StringParam) next).getValue(); - if (isBlank(nextValue)) { - continue; - } - values.add(nextValue); - } else { - throw new InternalErrorException("Language parameter must be of type " + StringParam.class.getCanonicalName() + " - Got " + next.getClass().getCanonicalName()); - } - } - - if (values.isEmpty()) { - continue; - } - - if ((theOperation == null) || - (theOperation == SearchFilterParser.CompareOperation.eq)) { - predicates.add(rootTable.createLanguagePredicate(values, false)); - } else if (theOperation == SearchFilterParser.CompareOperation.ne) { - predicates.add(rootTable.createLanguagePredicate(values, true)); - } else { - throw new InvalidRequestException("Unsupported operator specified in language query, only \"eq\" and \"ne\" are supported"); - } - - } - - return toAndPredicate(predicates); - } - public Condition createPredicateNumber(@Nullable DbColumn theSourceJoinColumn, String theResourceName, String theSpnamePrefix, RuntimeSearchParam theSearchParam, List theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) { @@ -1099,9 +1058,6 @@ public class QueryStack { case IAnyResource.SP_RES_ID: return createPredicateResourceId(theSourceJoinColumn, theAndOrParams, theResourceName, null, theRequestPartitionId); - case IAnyResource.SP_RES_LANGUAGE: - return createPredicateLanguage(theAndOrParams, null); - case Constants.PARAM_HAS: return createPredicateHas(theSourceJoinColumn, theResourceName, theAndOrParams, theRequest, theRequestPartitionId); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/TokenPredicateBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/TokenPredicateBuilder.java index 87f8a02fcd6..704608e9784 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/TokenPredicateBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/TokenPredicateBuilder.java @@ -222,7 +222,7 @@ public class TokenPredicateBuilder extends BaseSearchParamPredicateBuilder { if (retVal == null) { if (theSearchParam != null) { Set valueSetUris = Sets.newHashSet(); - for (String nextPath : theSearchParam.getPathsSplit()) { + for (String nextPath : theSearchParam.getPathsSplitForResourceType(getResourceType())) { Class type = getFhirContext().getResourceDefinition(getResourceType()).getImplementingClass(); BaseRuntimeChildDefinition def = getFhirContext().newTerser().getDefinition(type, nextPath); if (def instanceof BaseRuntimeDeclaredChildDefinition) { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchCustomSearchParamTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchCustomSearchParamTest.java index 3d356be0e42..0047445b92c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchCustomSearchParamTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchCustomSearchParamTest.java @@ -1033,7 +1033,7 @@ public class FhirResourceDaoDstu2SearchCustomSearchParamTest extends BaseJpaDstu myPatientDao.search(map).size(); fail(); } catch (InvalidRequestException e) { - assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, animal-breed, animal-species, birthdate, careprovider, deathdate, deceased, email, family, gender, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); + assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, animal-breed, animal-species, birthdate, careprovider, deathdate, deceased, email, family, gender, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); } } @@ -1070,7 +1070,7 @@ public class FhirResourceDaoDstu2SearchCustomSearchParamTest extends BaseJpaDstu myPatientDao.search(map).size(); fail(); } catch (InvalidRequestException e) { - assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, animal-breed, animal-species, birthdate, careprovider, deathdate, deceased, email, family, gender, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); + assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, animal-breed, animal-species, birthdate, careprovider, deathdate, deceased, email, family, gender, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); } // Try with normal gender SP diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchNoFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchNoFtTest.java index c3de91cb14f..a1bfae57c0a 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchNoFtTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchNoFtTest.java @@ -727,9 +727,6 @@ public class FhirResourceDaoDstu2SearchNoFtTest extends BaseJpaDstu2Test { params.add("_id", new StringDt("TEST")); assertEquals(1, toList(myPatientDao.search(params)).size()); - params.add("_language", new StringParam("TEST")); - assertEquals(1, toList(myPatientDao.search(params)).size()); - params.add(Patient.SP_IDENTIFIER, new TokenParam("TEST", "TEST")); assertEquals(1, toList(myPatientDao.search(params)).size()); @@ -744,9 +741,6 @@ public class FhirResourceDaoDstu2SearchNoFtTest extends BaseJpaDstu2Test { params.add("_id", new StringDt("TEST")); assertEquals(0, toList(myPatientDao.search(params)).size()); - params.add("_language", new StringParam("TEST")); - assertEquals(0, toList(myPatientDao.search(params)).size()); - params.add(Patient.SP_IDENTIFIER, new TokenParam("TEST", "TEST")); assertEquals(0, toList(myPatientDao.search(params)).size()); @@ -766,148 +760,6 @@ public class FhirResourceDaoDstu2SearchNoFtTest extends BaseJpaDstu2Test { } } - @Test - public void testSearchLanguageParam() { - IIdType id1; - { - Patient patient = new Patient(); - patient.getLanguage().setValue("en_CA"); - patient.addIdentifier().setSystem("urn:system").setValue("001"); - patient.addName().addFamily("testSearchLanguageParam").addGiven("Joe"); - id1 = myPatientDao.create(patient, mySrd).getId(); - } - IIdType id2; - { - Patient patient = new Patient(); - patient.getLanguage().setValue("en_US"); - patient.addIdentifier().setSystem("urn:system").setValue("002"); - patient.addName().addFamily("testSearchLanguageParam").addGiven("John"); - id2 = myPatientDao.create(patient, mySrd).getId(); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add(BaseResource.SP_RES_LANGUAGE, new StringParam("en_CA")); - List patients = toList(myPatientDao.search(params)); - assertEquals(1, patients.size()); - assertEquals(id1.toUnqualifiedVersionless(), patients.get(0).getId().toUnqualifiedVersionless()); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add(BaseResource.SP_RES_LANGUAGE, new StringParam("en_US")); - List patients = toList(myPatientDao.search(params)); - assertEquals(1, patients.size()); - assertEquals(id2.toUnqualifiedVersionless(), patients.get(0).getId().toUnqualifiedVersionless()); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add(BaseResource.SP_RES_LANGUAGE, new StringParam("en_GB")); - List patients = toList(myPatientDao.search(params)); - assertEquals(0, patients.size()); - } - } - - @Test - public void testSearchLanguageParamAndOr() { - IIdType id1; - { - Patient patient = new Patient(); - patient.getLanguage().setValue("en_CA"); - patient.addIdentifier().setSystem("urn:system").setValue("001"); - patient.addName().addFamily("testSearchLanguageParam").addGiven("Joe"); - id1 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); - } - - Date betweenTime = new Date(); - - IIdType id2; - { - Patient patient = new Patient(); - patient.getLanguage().setValue("en_US"); - patient.addIdentifier().setSystem("urn:system").setValue("002"); - patient.addName().addFamily("testSearchLanguageParam").addGiven("John"); - id2 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add(BaseResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("en_US"))); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1, id2)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add(BaseResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("en_US"))); - params.setLastUpdated(new DateRangeParam(betweenTime, null)); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id2)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add(BaseResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronous(true); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA"))); - params.add(BaseResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronous(true); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("ZZZZZ"))); - params.add(BaseResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), empty()); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronous(true); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("ZZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - params.add(BaseResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), empty()); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronous(true); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(BaseResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add("_id", new StringParam(id1.getIdPart())); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(BaseResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronous(true); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(BaseResource.SP_RES_LANGUAGE, and); - params.add("_id", new StringParam(id1.getIdPart())); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - - } - @Test public void testSearchLastUpdatedParam() throws InterruptedException { String methodName = "testSearchLastUpdatedParam"; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2Test.java index a301fbb49d0..71c2af076fc 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2Test.java @@ -224,7 +224,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { } @Test - public void testCantSearchForDeletedResourceByLanguageOrTag() { + public void testCantSearchForDeletedResourceByTag() { String methodName = "testCantSearchForDeletedResourceByLanguageOrTag"; Organization org = new Organization(); org.setLanguage(new CodeDt("EN_ca")); @@ -236,9 +236,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { IIdType orgId = myOrganizationDao.create(org, mySrd).getId().toUnqualifiedVersionless(); - SearchParameterMap map = new SearchParameterMap(); - map.add("_language", new StringParam("EN_ca")); - assertEquals(1, myOrganizationDao.search(map).size().intValue()); + SearchParameterMap map; map = new SearchParameterMap(); map.add("_tag", new TokenParam(methodName, methodName)); @@ -246,10 +244,6 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { myOrganizationDao.delete(orgId, mySrd); - map = new SearchParameterMap(); - map.add("_language", new StringParam("EN_ca")); - assertEquals(0, myOrganizationDao.search(map).size().intValue()); - map = new SearchParameterMap(); map.add("_tag", new TokenParam(methodName, methodName)); assertEquals(0, myOrganizationDao.search(map).size().intValue()); @@ -1603,7 +1597,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { found = toList(myPatientDao.search(new SearchParameterMap().setLoadSynchronous(true).add(Patient.SP_BIRTHDATE + "AAAA", new DateParam(ParamPrefixEnum.GREATERTHAN, "2000-01-01")))); assertEquals(0, found.size()); } catch (InvalidRequestException e) { - assertEquals("Unknown search parameter \"birthdateAAAA\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, animal-breed, animal-species, birthdate, careprovider, deathdate, deceased, email, family, gender, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); + assertEquals("Unknown search parameter \"birthdateAAAA\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, animal-breed, animal-species, birthdate, careprovider, deathdate, deceased, email, family, gender, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchCustomSearchParamTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchCustomSearchParamTest.java index b8159d4c533..f8f68a13526 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchCustomSearchParamTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchCustomSearchParamTest.java @@ -1015,7 +1015,7 @@ public class FhirResourceDaoDstu3SearchCustomSearchParamTest extends BaseJpaDstu myPatientDao.search(map).size(); fail(); } catch (InvalidRequestException e) { - assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, animal-breed, animal-species, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); + assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, animal-breed, animal-species, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); } } @@ -1053,7 +1053,7 @@ public class FhirResourceDaoDstu3SearchCustomSearchParamTest extends BaseJpaDstu myPatientDao.search(map).size(); fail(); } catch (InvalidRequestException e) { - assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, animal-breed, animal-species, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); + assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, animal-breed, animal-species, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); } // Try with normal gender SP diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java index ba988e02b70..9a544149148 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java @@ -1192,11 +1192,6 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { params.add("_id", new StringParam("TEST")); assertEquals(1, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add("_language", new StringParam("TEST")); - assertEquals(1, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); params.setLoadSynchronous(true); params.add(Patient.SP_IDENTIFIER, new TokenParam("TEST", "TEST")); @@ -1214,11 +1209,6 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { params.add("_id", new StringParam("TEST")); assertEquals(0, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add("_language", new StringParam("TEST")); - assertEquals(0, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); params.setLoadSynchronous(true); params.add(Patient.SP_IDENTIFIER, new TokenParam("TEST", "TEST")); @@ -1241,143 +1231,6 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { } } - @Test - public void testSearchLanguageParam() { - IIdType id1; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_CA"); - patient.addIdentifier().setSystem("urn:system").setValue("001"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("Joe"); - id1 = myPatientDao.create(patient, mySrd).getId(); - } - IIdType id2; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_US"); - patient.addIdentifier().setSystem("urn:system").setValue("002"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("John"); - id2 = myPatientDao.create(patient, mySrd).getId(); - } - SearchParameterMap params; - { - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - - params.add(IAnyResource.SP_RES_LANGUAGE, new StringParam("en_CA")); - List patients = toList(myPatientDao.search(params)); - assertEquals(1, patients.size()); - assertEquals(id1.toUnqualifiedVersionless(), patients.get(0).getIdElement().toUnqualifiedVersionless()); - } - { - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - - params.add(IAnyResource.SP_RES_LANGUAGE, new StringParam("en_US")); - List patients = toList(myPatientDao.search(params)); - assertEquals(1, patients.size()); - assertEquals(id2.toUnqualifiedVersionless(), patients.get(0).getIdElement().toUnqualifiedVersionless()); - } - { - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - - params.add(IAnyResource.SP_RES_LANGUAGE, new StringParam("en_GB")); - List patients = toList(myPatientDao.search(params)); - assertEquals(0, patients.size()); - } - } - - @Test - public void testSearchLanguageParamAndOr() { - IIdType id1; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_CA"); - patient.addIdentifier().setSystem("urn:system").setValue("001"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("Joe"); - id1 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); - } - TestUtil.sleepOneClick(); - Date betweenTime = new Date(); - - IIdType id2; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_US"); - patient.addIdentifier().setSystem("urn:system").setValue("002"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("John"); - id2 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add(IAnyResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("en_US"))); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1, id2)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add(IAnyResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("en_US"))); - params.setLastUpdated(new DateRangeParam(betweenTime, null)); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id2)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add(IAnyResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA"))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("ZZZZZ"))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), empty()); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("ZZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), empty()); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add("_id", new StringParam(id1.getIdPart())); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - params.add("_id", new StringParam(id1.getIdPart())); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - - } - @Test public void testSearchLastUpdatedParam() { String methodName = "testSearchLastUpdatedParam"; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java index e543d2310f7..7d8793dffe2 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java @@ -206,21 +206,12 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { IIdType orgId = myOrganizationDao.create(org, mySrd).getId().toUnqualifiedVersionless(); SearchParameterMap map = new SearchParameterMap(); - map.add("_language", new StringParam("EN_ca")); - assertEquals(1, myOrganizationDao.search(map).size().intValue()); - - map = new SearchParameterMap(); map.setLoadSynchronous(true); map.add("_tag", new TokenParam(methodName, methodName)); assertEquals(1, myOrganizationDao.search(map).size().intValue()); myOrganizationDao.delete(orgId, mySrd); - map = new SearchParameterMap(); - map.setLoadSynchronous(true); - map.add("_language", new StringParam("EN_ca")); - assertEquals(0, myOrganizationDao.search(map).size().intValue()); - map = new SearchParameterMap(); map.setLoadSynchronous(true); map.add("_tag", new TokenParam(methodName, methodName)); @@ -2014,7 +2005,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { found = toList(myPatientDao.search(new SearchParameterMap(Patient.SP_BIRTHDATE + "AAAA", new DateParam(ParamPrefixEnum.GREATERTHAN, "2000-01-01")).setLoadSynchronous(true))); assertEquals(0, found.size()); } catch (InvalidRequestException e) { - assertEquals("Unknown search parameter \"birthdateAAAA\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, animal-breed, animal-species, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); + assertEquals("Unknown search parameter \"birthdateAAAA\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, animal-breed, animal-species, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4CreateTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4CreateTest.java index 254600f7acb..7a1411fd99b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4CreateTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4CreateTest.java @@ -5,6 +5,7 @@ import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.model.entity.NormalizedQuantitySearchLevel; import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamQuantity; import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamQuantityNormalized; +import ca.uhn.fhir.jpa.model.entity.ResourceLink; import ca.uhn.fhir.jpa.model.util.UcumServiceUtil; import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; @@ -28,6 +29,7 @@ import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Organization; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Quantity; +import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.SampledData; import org.hl7.fhir.r4.model.SearchParameter; import org.junit.jupiter.api.AfterEach; @@ -63,6 +65,30 @@ public class FhirResourceDaoR4CreateTest extends BaseJpaR4Test { myModelConfig.setNormalizedQuantitySearchLevel(NormalizedQuantitySearchLevel.NORMALIZED_QUANTITY_SEARCH_NOT_SUPPORTED); } + + @Test + public void testCreateLinkCreatesAppropriatePaths() { + Patient p = new Patient(); + p.setId("Patient/A"); + p.setActive(true); + myPatientDao.update(p, mySrd); + + Observation obs = new Observation(); + obs.setSubject(new Reference("Patient/A")); + myObservationDao.create(obs, mySrd); + + runInTransaction(() ->{ + List allLinks = myResourceLinkDao.findAll(); + List paths = allLinks + .stream() + .map(t -> t.getSourcePath()) + .sorted() + .collect(Collectors.toList()); + assertThat(paths.toString(), paths, contains("Observation.subject", "Observation.subject.where(resolve() is Patient)")); + }); + } + + @Test public void testConditionalCreateWithPlusInUrl() { Observation obs = new Observation(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4FilterLegacySearchBuilderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4FilterLegacySearchBuilderTest.java index fd6bb9fdab9..2fced929ab1 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4FilterLegacySearchBuilderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4FilterLegacySearchBuilderTest.java @@ -349,28 +349,6 @@ public class FhirResourceDaoR4FilterLegacySearchBuilderTest extends BaseJpaR4Tes } - @Test - public void testLanguageComparatorEq() { - - Patient p = new Patient(); - p.setLanguage("en"); - p.addName().setFamily("Smith").addGiven("John"); - p.setBirthDateElement(new DateType("1955-01-01")); - p.setActive(true); - String id1 = myPatientDao.create(p).getId().toUnqualifiedVersionless().getValue(); - - SearchParameterMap map; - List found; - - map = new SearchParameterMap(); - map.setLoadSynchronous(true); - map.add(Constants.PARAM_FILTER, new StringParam("_language eq en")); - found = toUnqualifiedVersionlessIdValues(myPatientDao.search(map)); - assertThat(found, containsInAnyOrder(id1)); - - } - - @Test public void testStringComparatorCo() { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4FilterTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4FilterTest.java index eacf7d652e9..edcb41ca62b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4FilterTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4FilterTest.java @@ -347,28 +347,6 @@ public class FhirResourceDaoR4FilterTest extends BaseJpaR4Test { } - @Test - public void testLanguageComparatorEq() { - - Patient p = new Patient(); - p.setLanguage("en"); - p.addName().setFamily("Smith").addGiven("John"); - p.setBirthDateElement(new DateType("1955-01-01")); - p.setActive(true); - String id1 = myPatientDao.create(p).getId().toUnqualifiedVersionless().getValue(); - - SearchParameterMap map; - List found; - - map = new SearchParameterMap(); - map.setLoadSynchronous(true); - map.add(Constants.PARAM_FILTER, new StringParam("_language eq en")); - found = toUnqualifiedVersionlessIdValues(myPatientDao.search(map)); - assertThat(found, containsInAnyOrder(id1)); - - } - - @Test public void testStringComparatorCo() { @@ -1254,7 +1232,7 @@ public class FhirResourceDaoR4FilterTest extends BaseJpaR4Test { try { myPatientDao.search(map); } catch (InvalidRequestException e) { - assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); + assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_content, _id, _lastUpdated, _profile, _security, _source, _tag, _text, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4LegacySearchBuilderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4LegacySearchBuilderTest.java index 7a18b4ed391..5366efa789c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4LegacySearchBuilderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4LegacySearchBuilderTest.java @@ -2369,14 +2369,6 @@ public class FhirResourceDaoR4LegacySearchBuilderTest extends BaseJpaR4Test { params.add("_id", new StringParam("TEST")); assertEquals(1, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add("_language", new StringParam("TEST")); - myCaptureQueriesListener.clear(); - result = toList(myPatientDao.search(params)); - myCaptureQueriesListener.logSelectQueriesForCurrentThread(0); - assertEquals(1, result.size()); - params = new SearchParameterMap(); params.setLoadSynchronous(true); params.add(Patient.SP_IDENTIFIER, new TokenParam("TEST", "TEST")); @@ -2394,11 +2386,6 @@ public class FhirResourceDaoR4LegacySearchBuilderTest extends BaseJpaR4Test { params.add("_id", new StringParam("TEST")); assertEquals(0, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add("_language", new StringParam("TEST")); - assertEquals(0, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); params.setLoadSynchronous(true); params.add(Patient.SP_IDENTIFIER, new TokenParam("TEST", "TEST")); @@ -2421,149 +2408,6 @@ public class FhirResourceDaoR4LegacySearchBuilderTest extends BaseJpaR4Test { } } - @Test - public void testSearchLanguageParam() { - IIdType id1; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_CA"); - patient.addIdentifier().setSystem("urn:system").setValue("001"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("Joe"); - id1 = myPatientDao.create(patient, mySrd).getId(); - } - IIdType id2; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_US"); - patient.addIdentifier().setSystem("urn:system").setValue("002"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("John"); - id2 = myPatientDao.create(patient, mySrd).getId(); - } - SearchParameterMap params; - { - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - - params.add(IAnyResource.SP_RES_LANGUAGE, new StringParam("en_CA")); - myCaptureQueriesListener.clear(); - List patients = toList(myPatientDao.search(params)); - myCaptureQueriesListener.logSelectQueriesForCurrentThread(0); - assertEquals(1, patients.size()); - assertEquals(id1.toUnqualifiedVersionless(), patients.get(0).getIdElement().toUnqualifiedVersionless()); - } - { - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - - params.add(IAnyResource.SP_RES_LANGUAGE, new StringParam("en_US")); - List patients = toList(myPatientDao.search(params)); - assertEquals(1, patients.size()); - assertEquals(id2.toUnqualifiedVersionless(), patients.get(0).getIdElement().toUnqualifiedVersionless()); - } - { - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - - params.add(IAnyResource.SP_RES_LANGUAGE, new StringParam("en_GB")); - List patients = toList(myPatientDao.search(params)); - assertEquals(0, patients.size()); - } - } - - @Test - public void testSearchLanguageParamAndOr() { - IIdType id1; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_CA"); - patient.addIdentifier().setSystem("urn:system").setValue("001"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("Joe"); - id1 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); - } - - TestUtil.sleepOneClick(); - - Date betweenTime = new Date(); - - TestUtil.sleepOneClick(); - - IIdType id2; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_US"); - patient.addIdentifier().setSystem("urn:system").setValue("002"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("John"); - id2 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add(IAnyResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("en_US"))); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1, id2)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add(IAnyResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("en_US"))); - params.setLastUpdated(new DateRangeParam(betweenTime, null)); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id2)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add(IAnyResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA"))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("ZZZZZ"))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), empty()); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("ZZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), empty()); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add("_id", new StringParam(id1.getIdPart())); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - params.add("_id", new StringParam(id1.getIdPart())); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - - } - @Test public void testSearchLastUpdatedParam() { String methodName = "testSearchLastUpdatedParam"; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchCustomSearchParamTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchCustomSearchParamTest.java index baa3a2d3a76..251945e4f61 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchCustomSearchParamTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchCustomSearchParamTest.java @@ -1512,7 +1512,7 @@ public class FhirResourceDaoR4SearchCustomSearchParamTest extends BaseJpaR4Test myPatientDao.search(map).size(); fail(); } catch (InvalidRequestException e) { - assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); + assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_content, _id, _lastUpdated, _profile, _security, _source, _tag, _text, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); } // Delete the param @@ -1528,7 +1528,7 @@ public class FhirResourceDaoR4SearchCustomSearchParamTest extends BaseJpaR4Test myPatientDao.search(map).size(); fail(); } catch (InvalidRequestException e) { - assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); + assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_content, _id, _lastUpdated, _profile, _security, _source, _tag, _text, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); } } @@ -1605,7 +1605,7 @@ public class FhirResourceDaoR4SearchCustomSearchParamTest extends BaseJpaR4Test myPatientDao.search(map).size(); fail(); } catch (InvalidRequestException e) { - assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); + assertEquals("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_content, _id, _lastUpdated, _profile, _security, _source, _tag, _text, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); } // Try with normal gender SP diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java index 71b3e7bcdc2..5ee19c00c8e 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java @@ -2464,14 +2464,6 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { params.add("_id", new StringParam("TEST")); assertEquals(1, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add("_language", new StringParam("TEST")); - myCaptureQueriesListener.clear(); - result = toList(myPatientDao.search(params)); - myCaptureQueriesListener.logSelectQueriesForCurrentThread(0); - assertEquals(1, result.size()); - params = new SearchParameterMap(); params.setLoadSynchronous(true); params.add(Patient.SP_IDENTIFIER, new TokenParam("TEST", "TEST")); @@ -2489,11 +2481,6 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { params.add("_id", new StringParam("TEST")); assertEquals(0, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add("_language", new StringParam("TEST")); - assertEquals(0, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); params.setLoadSynchronous(true); params.add(Patient.SP_IDENTIFIER, new TokenParam("TEST", "TEST")); @@ -2516,148 +2503,6 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { } } - @Test - public void testSearchLanguageParam() { - IIdType id1; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_CA"); - patient.addIdentifier().setSystem("urn:system").setValue("001"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("Joe"); - id1 = myPatientDao.create(patient, mySrd).getId(); - } - IIdType id2; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_US"); - patient.addIdentifier().setSystem("urn:system").setValue("002"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("John"); - id2 = myPatientDao.create(patient, mySrd).getId(); - } - SearchParameterMap params; - { - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - - params.add(IAnyResource.SP_RES_LANGUAGE, new StringParam("en_CA")); - myCaptureQueriesListener.clear(); - List patients = toList(myPatientDao.search(params)); - myCaptureQueriesListener.logSelectQueriesForCurrentThread(0); - assertEquals(1, patients.size()); - assertEquals(id1.toUnqualifiedVersionless(), patients.get(0).getIdElement().toUnqualifiedVersionless()); - } - { - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - - params.add(IAnyResource.SP_RES_LANGUAGE, new StringParam("en_US")); - List patients = toList(myPatientDao.search(params)); - assertEquals(1, patients.size()); - assertEquals(id2.toUnqualifiedVersionless(), patients.get(0).getIdElement().toUnqualifiedVersionless()); - } - { - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - - params.add(IAnyResource.SP_RES_LANGUAGE, new StringParam("en_GB")); - List patients = toList(myPatientDao.search(params)); - assertEquals(0, patients.size()); - } - } - - @Test - public void testSearchLanguageParamAndOr() { - IIdType id1; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_CA"); - patient.addIdentifier().setSystem("urn:system").setValue("001"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("Joe"); - id1 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); - } - - TestUtil.sleepOneClick(); - - Date betweenTime = new Date(); - - TestUtil.sleepOneClick(); - - IIdType id2; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_US"); - patient.addIdentifier().setSystem("urn:system").setValue("002"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("John"); - id2 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add(IAnyResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("en_US"))); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1, id2)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add(IAnyResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("en_US"))); - params.setLastUpdated(new DateRangeParam(betweenTime, null)); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id2)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add(IAnyResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA"))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("ZZZZZ"))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), empty()); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("ZZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), empty()); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add("_id", new StringParam(id1.getIdPart())); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - params.add("_id", new StringParam(id1.getIdPart())); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - - } @Test public void testSearchLastUpdatedParam() { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java index 475bf310a5d..86220f8281d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java @@ -12,6 +12,7 @@ import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamToken; import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamUri; import ca.uhn.fhir.jpa.model.entity.ResourceLink; import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.jpa.model.util.UcumServiceUtil; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap.EverythingModeEnum; import ca.uhn.fhir.jpa.util.TestUtil; @@ -43,8 +44,6 @@ import ca.uhn.fhir.rest.param.UriParam; import ca.uhn.fhir.rest.param.UriParamQualifierEnum; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.MethodNotAllowedException; -import ca.uhn.fhir.jpa.model.util.UcumServiceUtil; - import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.api.IAnyResource; @@ -144,8 +143,8 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test { myDaoConfig.setFetchSizeDefaultMaximum(new DaoConfig().getFetchSizeDefaultMaximum()); myDaoConfig.setAllowContainsSearches(new DaoConfig().isAllowContainsSearches()); myDaoConfig.setDisableHashBasedSearches(false); - myModelConfig.setNormalizedQuantitySearchLevel(NormalizedQuantitySearchLevel.NORMALIZED_QUANTITY_SEARCH_NOT_SUPPORTED); - } + myModelConfig.setNormalizedQuantitySearchLevel(NormalizedQuantitySearchLevel.NORMALIZED_QUANTITY_SEARCH_NOT_SUPPORTED); + } @BeforeEach public void beforeInitialize() { @@ -1201,8 +1200,8 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test { .setCode(new CodeableConcept().addCoding(new Coding().setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("cm"))) .setValue(new Quantity().setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("cm").setValue(1.2)); o1.addComponent() - .setCode(new CodeableConcept().addCoding(new Coding().setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("m"))) - .setValue(new Quantity().setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("mm").setValue(2)); + .setCode(new CodeableConcept().addCoding(new Coding().setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("m"))) + .setValue(new Quantity().setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("mm").setValue(2)); IIdType id1 = myObservationDao.create(o1, mySrd).getId().toUnqualifiedVersionless(); String param = Observation.SP_COMPONENT_VALUE_QUANTITY; @@ -1214,7 +1213,7 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test { assertThat("Got: " + toUnqualifiedVersionlessIdValues(result), toUnqualifiedVersionlessIdValues(result), containsInAnyOrder(id1.getValue())); } } - + @Test public void testComponentQuantityWithNormalizedQuantityStorageSupported() { @@ -1224,8 +1223,8 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test { .setCode(new CodeableConcept().addCoding(new Coding().setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("cm"))) .setValue(new Quantity().setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("cm").setValue(1.2)); o1.addComponent() - .setCode(new CodeableConcept().addCoding(new Coding().setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("m"))) - .setValue(new Quantity().setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("mm").setValue(2)); + .setCode(new CodeableConcept().addCoding(new Coding().setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("m"))) + .setValue(new Quantity().setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("mm").setValue(2)); IIdType id1 = myObservationDao.create(o1, mySrd).getId().toUnqualifiedVersionless(); String param = Observation.SP_COMPONENT_VALUE_QUANTITY; @@ -1237,7 +1236,7 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test { assertThat("Got: " + toUnqualifiedVersionlessIdValues(result), toUnqualifiedVersionlessIdValues(result), containsInAnyOrder(id1.getValue())); } } - + @Test public void testSearchCompositeParamQuantity() { Observation o1 = new Observation(); @@ -1344,9 +1343,9 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test { IBundleProvider result = myObservationDao.search(new SearchParameterMap().setLoadSynchronous(true).add(param, val)); assertThat(toUnqualifiedVersionlessIdValues(result), empty()); } - + } - + @Test public void testSearchDateWrongParam() { Patient p1 = new Patient(); @@ -1391,11 +1390,6 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test { params.add("_id", new StringParam("TEST")); assertEquals(1, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add("_language", new StringParam("TEST")); - assertEquals(1, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); params.setLoadSynchronous(true); params.add(Patient.SP_IDENTIFIER, new TokenParam("TEST", "TEST")); @@ -1413,11 +1407,6 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test { params.add("_id", new StringParam("TEST")); assertEquals(0, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - params.add("_language", new StringParam("TEST")); - assertEquals(0, toList(myPatientDao.search(params)).size()); - params = new SearchParameterMap(); params.setLoadSynchronous(true); params.add(Patient.SP_IDENTIFIER, new TokenParam("TEST", "TEST")); @@ -1440,145 +1429,6 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test { } } - @Test - public void testSearchLanguageParam() { - IIdType id1; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_CA"); - patient.addIdentifier().setSystem("urn:system").setValue("001"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("Joe"); - id1 = myPatientDao.create(patient, mySrd).getId(); - } - IIdType id2; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_US"); - patient.addIdentifier().setSystem("urn:system").setValue("002"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("John"); - id2 = myPatientDao.create(patient, mySrd).getId(); - } - SearchParameterMap params; - { - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - - params.add(IAnyResource.SP_RES_LANGUAGE, new StringParam("en_CA")); - List patients = toList(myPatientDao.search(params)); - assertEquals(1, patients.size()); - assertEquals(id1.toUnqualifiedVersionless(), patients.get(0).getIdElement().toUnqualifiedVersionless()); - } - { - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - - params.add(IAnyResource.SP_RES_LANGUAGE, new StringParam("en_US")); - List patients = toList(myPatientDao.search(params)); - assertEquals(1, patients.size()); - assertEquals(id2.toUnqualifiedVersionless(), patients.get(0).getIdElement().toUnqualifiedVersionless()); - } - { - params = new SearchParameterMap(); - params.setLoadSynchronous(true); - - params.add(IAnyResource.SP_RES_LANGUAGE, new StringParam("en_GB")); - List patients = toList(myPatientDao.search(params)); - assertEquals(0, patients.size()); - } - } - - @Test - public void testSearchLanguageParamAndOr() { - IIdType id1; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_CA"); - patient.addIdentifier().setSystem("urn:system").setValue("001"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("Joe"); - id1 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); - } - - TestUtil.sleepOneClick(); - - Date betweenTime = new Date(); - - IIdType id2; - { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_US"); - patient.addIdentifier().setSystem("urn:system").setValue("002"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("John"); - id2 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add(IAnyResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("en_US"))); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1, id2)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add(IAnyResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("en_US"))); - params.setLastUpdated(new DateRangeParam(betweenTime, null)); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id2)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add(IAnyResource.SP_RES_LANGUAGE, new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA"))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("ZZZZZ"))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), empty()); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("ZZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), empty()); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - params.add("_id", new StringParam(id1.getIdPart())); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - { - SearchParameterMap params = new SearchParameterMap(); - StringAndListParam and = new StringAndListParam(); - and.addAnd(new StringOrListParam().addOr(new StringParam("en_CA")).addOr(new StringParam("ZZZZ"))); - and.addAnd(new StringOrListParam().addOr(new StringParam("")).addOr(new StringParam(null))); - params.add(IAnyResource.SP_RES_LANGUAGE, and); - params.add("_id", new StringParam(id1.getIdPart())); - assertThat(toUnqualifiedVersionlessIds(myPatientDao.search(params)), containsInAnyOrder(id1)); - } - - } - @Test public void testSearchLastUpdatedParam() { String methodName = "testSearchLastUpdatedParam"; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java index 969c47a30ce..e6794b6caea 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java @@ -422,9 +422,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { IIdType orgId = myOrganizationDao.create(org, mySrd).getId().toUnqualifiedVersionless(); - SearchParameterMap map = new SearchParameterMap(); - map.add("_language", new StringParam("EN_ca")); - assertEquals(1, myOrganizationDao.search(map).size().intValue()); + SearchParameterMap map; map = new SearchParameterMap(); map.setLoadSynchronous(true); @@ -433,11 +431,6 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { myOrganizationDao.delete(orgId, mySrd); - map = new SearchParameterMap(); - map.setLoadSynchronous(true); - map.add("_language", new StringParam("EN_ca")); - assertEquals(0, myOrganizationDao.search(map).size().intValue()); - map = new SearchParameterMap(); map.setLoadSynchronous(true); map.add("_tag", new TokenParam(methodName, methodName)); @@ -2576,7 +2569,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { found = toList(myPatientDao.search(new SearchParameterMap(Patient.SP_BIRTHDATE + "AAAA", new DateParam(ParamPrefixEnum.GREATERTHAN, "2000-01-01")).setLoadSynchronous(true))); assertEquals(0, found.size()); } catch (InvalidRequestException e) { - assertEquals("Unknown search parameter \"birthdateAAAA\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); + assertEquals("Unknown search parameter \"birthdateAAAA\" for resource type \"Patient\". Valid search parameters for this search are: [_content, _id, _lastUpdated, _profile, _security, _source, _tag, _text, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]", e.getMessage()); } } @@ -3342,7 +3335,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { myObservationDao.search(pm); fail(); } catch (InvalidRequestException e) { - assertEquals("Unknown _sort parameter value \"hello\" for resource type \"Observation\" (Note: sort parameters values must use a valid Search Parameter). Valid values for this search are: [_id, _language, _lastUpdated, based-on, category, code, code-value-concept, code-value-date, code-value-quantity, code-value-string, combo-code, combo-code-value-concept, combo-code-value-quantity, combo-data-absent-reason, combo-value-concept, combo-value-quantity, component-code, component-code-value-concept, component-code-value-quantity, component-data-absent-reason, component-value-concept, component-value-quantity, data-absent-reason, date, derived-from, device, encounter, focus, has-member, identifier, method, part-of, patient, performer, specimen, status, subject, value-concept, value-date, value-quantity, value-string]", e.getMessage()); + assertEquals("Unknown _sort parameter value \"hello\" for resource type \"Observation\" (Note: sort parameters values must use a valid Search Parameter). Valid values for this search are: [_content, _id, _lastUpdated, _profile, _security, _source, _tag, _text, based-on, category, code, code-value-concept, code-value-date, code-value-quantity, code-value-string, combo-code, combo-code-value-concept, combo-code-value-quantity, combo-data-absent-reason, combo-value-concept, combo-value-quantity, component-code, component-code-value-concept, component-code-value-quantity, component-data-absent-reason, component-value-concept, component-value-quantity, data-absent-reason, date, derived-from, device, encounter, focus, has-member, identifier, method, part-of, patient, performer, specimen, status, subject, value-concept, value-date, value-quantity, value-string]", e.getMessage()); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSearchParameterR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSearchParameterR4Test.java index 85011502e58..78eb2ec76e4 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSearchParameterR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSearchParameterR4Test.java @@ -50,9 +50,6 @@ public class FhirResourceDaoSearchParameterR4Test { if (nextp.getName().equals("_id")) { continue; } - if (nextp.getName().equals("_language")) { - continue; - } if (isBlank(nextp.getPath())) { continue; } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java index 7b635e56f1b..150e795a5be 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java @@ -79,6 +79,7 @@ import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.matchesPattern; +import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.startsWith; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; @@ -409,7 +410,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { // HFJ_SPIDX_STRING List strings = myResourceIndexedSearchParamStringDao.findAllForResourceId(patientId); ourLog.info("\n * {}", strings.stream().map(ResourceIndexedSearchParamString::toString).collect(Collectors.joining("\n * "))); - assertEquals(10, strings.size()); + assertEquals(9, strings.size()); assertEquals(myPartitionId, strings.get(0).getPartitionId().getPartitionId().intValue()); assertEquals(myPartitionDate, strings.get(0).getPartitionId().getPartitionDate()); @@ -492,8 +493,11 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { // HFJ_SPIDX_STRING List strings = myResourceIndexedSearchParamStringDao.findAllForResourceId(patientId); - ourLog.info("\n * {}", strings.stream().map(ResourceIndexedSearchParamString::toString).collect(Collectors.joining("\n * "))); - assertEquals(10, strings.size()); + String stringsDesc = strings.stream().map(ResourceIndexedSearchParamString::toString).sorted().collect(Collectors.joining("\n * ")); + ourLog.info("\n * {}", stringsDesc); + assertThat(stringsDesc, not(containsString("_text"))); + assertThat(stringsDesc, not(containsString("_content"))); + assertEquals(9, strings.size(), stringsDesc); assertEquals(null, strings.get(0).getPartitionId().getPartitionId()); assertEquals(myPartitionDate, strings.get(0).getPartitionId().getPartitionDate()); @@ -701,7 +705,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { // HFJ_SPIDX_STRING List strings = myResourceIndexedSearchParamStringDao.findAllForResourceId(patientId); ourLog.info("\n * {}", strings.stream().map(ResourceIndexedSearchParamString::toString).collect(Collectors.joining("\n * "))); - assertEquals(10, strings.size()); + assertEquals(9, strings.size()); assertEquals(myPartitionId, strings.get(0).getPartitionId().getPartitionId().intValue()); assertEquals(myPartitionDate, strings.get(0).getPartitionId().getPartitionDate()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/graphql/JpaStorageServicesTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/graphql/JpaStorageServicesTest.java index f0560139ff2..27d843abb58 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/graphql/JpaStorageServicesTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/graphql/JpaStorageServicesTest.java @@ -106,7 +106,7 @@ public class JpaStorageServicesTest extends BaseJpaR4Test { mySvc.listResources(mySrd, "Appointment", Collections.singletonList(argument), result); fail(); } catch (InvalidRequestException e) { - assertEquals("Unknown GraphQL argument \"test\". Value GraphQL argument for this type are: [_id, _language, actor, appointment_type, based_on, date, identifier, location, part_status, patient, practitioner, reason_code, reason_reference, service_category, service_type, slot, specialty, status, supporting_info]", e.getMessage()); + assertEquals("Unknown GraphQL argument \"test\". Value GraphQL argument for this type are: [_content, _id, _lastUpdated, _profile, _security, _source, _tag, _text, actor, appointment_type, based_on, date, identifier, location, part_status, patient, practitioner, reason_code, reason_reference, service_category, service_type, slot, specialty, status, supporting_info]", e.getMessage()); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/interceptor/SearchPreferHandlingInterceptorJpaTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/interceptor/SearchPreferHandlingInterceptorJpaTest.java index 925783d07da..247286c21f6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/interceptor/SearchPreferHandlingInterceptorJpaTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/interceptor/SearchPreferHandlingInterceptorJpaTest.java @@ -62,7 +62,7 @@ public class SearchPreferHandlingInterceptorJpaTest extends BaseResourceProvider .execute(); fail(); } catch (InvalidRequestException e) { - assertThat(e.getMessage(), containsString("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]")); + assertThat(e.getMessage(), containsString("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_content, _id, _lastUpdated, _profile, _security, _source, _tag, _text, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]")); } } @@ -81,7 +81,7 @@ public class SearchPreferHandlingInterceptorJpaTest extends BaseResourceProvider .execute(); fail(); } catch (InvalidRequestException e) { - assertThat(e.getMessage(), containsString("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]")); + assertThat(e.getMessage(), containsString("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_content, _id, _lastUpdated, _profile, _security, _source, _tag, _text, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]")); } } @@ -100,7 +100,7 @@ public class SearchPreferHandlingInterceptorJpaTest extends BaseResourceProvider .execute(); fail(); } catch (InvalidRequestException e) { - assertThat(e.getMessage(), containsString("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]")); + assertThat(e.getMessage(), containsString("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_content, _id, _lastUpdated, _profile, _security, _source, _tag, _text, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]")); } } @@ -136,7 +136,7 @@ public class SearchPreferHandlingInterceptorJpaTest extends BaseResourceProvider .execute(); fail(); } catch (InvalidRequestException e) { - assertThat(e.getMessage(), containsString("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_id, _language, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]")); + assertThat(e.getMessage(), containsString("Unknown search parameter \"foo\" for resource type \"Patient\". Valid search parameters for this search are: [_content, _id, _lastUpdated, _profile, _security, _source, _tag, _text, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]")); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ServerCapabilityStatementProviderJpaR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ServerCapabilityStatementProviderJpaR4Test.java index f32eb24e324..920b5a14a7f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ServerCapabilityStatementProviderJpaR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ServerCapabilityStatementProviderJpaR4Test.java @@ -5,6 +5,10 @@ import ca.uhn.fhir.jpa.packages.PackageInstallationSpec; import ca.uhn.fhir.rest.api.CacheControlDirective; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.server.provider.ServerCapabilityStatementProvider; +import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.r4.model.Bundle; +import org.hamcrest.Matchers; import org.hl7.fhir.r4.model.CapabilityStatement; import org.hl7.fhir.r4.model.Enumerations; import org.hl7.fhir.r4.model.SearchParameter; @@ -17,8 +21,10 @@ import org.slf4j.LoggerFactory; import javax.annotation.Nonnull; import java.io.IOException; import java.util.List; +import java.util.Set; import java.util.stream.Collectors; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.hasItem; @@ -26,11 +32,42 @@ import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.not; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; public class ServerCapabilityStatementProviderJpaR4Test extends BaseResourceProviderR4Test { private static final Logger ourLog = LoggerFactory.getLogger(ServerCapabilityStatementProviderJpaR4Test.class); + @Test + public void testBuiltInSearchParameters() { + CapabilityStatement cs = myClient.capabilities().ofType(CapabilityStatement.class).execute(); + CapabilityStatement.CapabilityStatementRestResourceComponent resource = cs.getRest().get(0).getResource().get(0); + List definitions = resource.getSearchParam() + .stream() + .filter(t -> isNotBlank(t.getDefinition())) + .map(t->t.getDefinition()) + .sorted() + .collect(Collectors.toList()); + assertThat(definitions.toString(), definitions, Matchers.contains( + "http://hl7.org/fhir/SearchParameter/Account-identifier", + "http://hl7.org/fhir/SearchParameter/Account-name", + "http://hl7.org/fhir/SearchParameter/Account-owner", + "http://hl7.org/fhir/SearchParameter/Account-patient", + "http://hl7.org/fhir/SearchParameter/Account-period", + "http://hl7.org/fhir/SearchParameter/Account-status", + "http://hl7.org/fhir/SearchParameter/Account-subject", + "http://hl7.org/fhir/SearchParameter/Account-type", + "http://hl7.org/fhir/SearchParameter/DomainResource-text", + "http://hl7.org/fhir/SearchParameter/Resource-content", + "http://hl7.org/fhir/SearchParameter/Resource-id", + "http://hl7.org/fhir/SearchParameter/Resource-lastUpdated", + "http://hl7.org/fhir/SearchParameter/Resource-profile", + "http://hl7.org/fhir/SearchParameter/Resource-security", + "http://hl7.org/fhir/SearchParameter/Resource-source", + "http://hl7.org/fhir/SearchParameter/Resource-tag" + )); + } + @Test public void testCorrectResourcesReflected() { CapabilityStatement cs = myClient.capabilities().ofType(CapabilityStatement.class).execute(); @@ -104,8 +141,8 @@ public class ServerCapabilityStatementProviderJpaR4Test extends BaseResourceProv List fooSearchParams = findSearchParams(cs, "Patient", "_lastUpdated"); assertEquals(1, fooSearchParams.size()); assertEquals("_lastUpdated", fooSearchParams.get(0).getName()); - assertEquals("http://localhost:" + ourPort + "/fhir/context/SearchParameter/Patient-_lastUpdated", fooSearchParams.get(0).getDefinition()); - assertEquals("Only return resources which were last updated as specified by the given range", fooSearchParams.get(0).getDocumentation()); + assertEquals("http://hl7.org/fhir/SearchParameter/Resource-lastUpdated", fooSearchParams.get(0).getDefinition()); + assertEquals("When the resource version last changed", fooSearchParams.get(0).getDocumentation()); assertEquals(Enumerations.SearchParamType.DATE, fooSearchParams.get(0).getType()); } @@ -265,6 +302,35 @@ public class ServerCapabilityStatementProviderJpaR4Test extends BaseResourceProv assertThat(findSearchParams(cs, "Patient", Constants.PARAM_FILTER), hasSize(0)); } + + @Test + public void testBuiltInParametersHaveAppropriateUrl() throws IOException { + Bundle allSearchParamBundle = loadResourceFromClasspath(Bundle.class, "org/hl7/fhir/r4/model/sp/search-parameters.json"); + Set allSearchParamUrls = allSearchParamBundle + .getEntry() + .stream() + .map(t -> (SearchParameter) t.getResource()) + .map(t -> t.getUrl()) + .filter(StringUtils::isNotBlank) + .collect(Collectors.toSet()); + + CapabilityStatement cs = myClient.capabilities().ofType(CapabilityStatement.class).execute(); + for (CapabilityStatement.CapabilityStatementRestResourceComponent nextResource : cs.getRestFirstRep().getResource()) { + for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent nextSp : nextResource.getSearchParam()) { + if (nextSp.getName().equals("_has")) { + if (nextSp.getDefinition() == null) { + continue; + } + } + if (!allSearchParamUrls.contains(nextSp.getDefinition())) { + fail("Invalid search parameter: " + nextSp.getName() + " has definition URL: " + nextSp.getDefinition()); + } + } + } + } + + + @Nonnull private List findSupportedProfiles(CapabilityStatement theCapabilityStatement, String theResourceType) { assertEquals(1, theCapabilityStatement.getRest().size()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java index 405e2302044..fb0bb5230dd 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java @@ -36,6 +36,7 @@ import ca.uhn.fhir.jpa.searchparam.extractor.SearchParamExtractorR4; import ca.uhn.fhir.jpa.searchparam.extractor.SearchParamExtractorService; import ca.uhn.fhir.jpa.searchparam.matcher.InMemoryResourceMatcher; import ca.uhn.fhir.jpa.searchparam.registry.SearchParamRegistryImpl; +import ca.uhn.fhir.jpa.searchparam.registry.SearchParameterCanonicalizer; import ca.uhn.fhir.jpa.sp.SearchParamPresenceSvcImpl; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; @@ -218,6 +219,7 @@ public class GiantTransactionPerfTest { mySearchParamRegistry = new SearchParamRegistryImpl(); mySearchParamRegistry.setResourceChangeListenerRegistry(myResourceChangeListenerRegistry); + mySearchParamRegistry.setSearchParameterCanonicalizerForUnitTest(new SearchParameterCanonicalizer(myCtx)); mySearchParamRegistry.setFhirContext(myCtx); mySearchParamRegistry.setModelConfig(myDaoConfig.getModelConfig()); mySearchParamRegistry.registerListener(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcherR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcherR4Test.java index 7830b2b682f..da710f61202 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcherR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcherR4Test.java @@ -338,18 +338,6 @@ public class InMemorySubscriptionMatcherR4Test { assertNotMatched(o1, params); } - @Test - public void testLanguageNotSupported() { - Patient patient = new Patient(); - patient.getLanguageElement().setValue("en_CA"); - patient.addIdentifier().setSystem("urn:system").setValue("001"); - patient.addName().setFamily("testSearchLanguageParam").addGiven("Joe"); - SearchParameterMap params; - params = new SearchParameterMap(); - params.add(IAnyResource.SP_RES_LANGUAGE, new StringParam("en_CA")); - assertUnsupported(patient, params); - } - @Test public void testLocationPositionNotSupported() { Location loc = new Location(); diff --git a/hapi-fhir-jpaserver-batch/pom.xml b/hapi-fhir-jpaserver-batch/pom.xml index 537dbf63a6d..cf0abe606d6 100644 --- a/hapi-fhir-jpaserver-batch/pom.xml +++ b/hapi-fhir-jpaserver-batch/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-cql/pom.xml b/hapi-fhir-jpaserver-cql/pom.xml index d35fc53d840..d08c19cfdca 100644 --- a/hapi-fhir-jpaserver-cql/pom.xml +++ b/hapi-fhir-jpaserver-cql/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml index b107b05524d..0ebb48c99dd 100644 --- a/hapi-fhir-jpaserver-mdm/pom.xml +++ b/hapi-fhir-jpaserver-mdm/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-migrate/pom.xml b/hapi-fhir-jpaserver-migrate/pom.xml index 51ad10f5afd..6381faf35c4 100644 --- a/hapi-fhir-jpaserver-migrate/pom.xml +++ b/hapi-fhir-jpaserver-migrate/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java index dcd04dcad57..5cd1eb78135 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java @@ -122,6 +122,12 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks { cmbTokNuTable.addColumn("20210722.1", "PARTITION_ID").nullable().type(ColumnTypeEnum.INT); cmbTokNuTable.addColumn("20210722.2", "PARTITION_DATE").nullable().type(ColumnTypeEnum.DATE_ONLY); cmbTokNuTable.modifyColumn("20210722.3", "RES_ID").nullable().withType(ColumnTypeEnum.LONG); + + // Dropping index on the language column, as it's no longer in use. + // TODO: After 2 releases from 5.5.0, drop the column too + version.onTable("HFJ_RESOURCE") + .dropIndex("20210908.1", "IDX_RES_LANG"); + } private void init540() { diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml index 99858b3966c..d37223e4c57 100644 --- a/hapi-fhir-jpaserver-model/pom.xml +++ b/hapi-fhir-jpaserver-model/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java index 171694e4623..6ddd162e87f 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java @@ -55,7 +55,6 @@ import static org.apache.commons.lang3.StringUtils.defaultString; @Entity @Table(name = "HFJ_RESOURCE", uniqueConstraints = {}, indexes = { @Index(name = "IDX_RES_DATE", columnList = "RES_UPDATED"), - @Index(name = "IDX_RES_LANG", columnList = "RES_TYPE,RES_LANGUAGE"), @Index(name = "IDX_RES_TYPE", columnList = "RES_TYPE"), @Index(name = "IDX_INDEXSTATUS", columnList = "SP_INDEX_STATUS") }) @@ -100,6 +99,7 @@ public class ResourceTable extends BaseHasResource implements Serializable, IBas @OptimisticLock(excluded = true) private Long myIndexStatus; + // TODO: Removed in 5.5.0. Drop in a future release. @Column(name = "RES_LANGUAGE", length = MAX_LANGUAGE_LENGTH, nullable = true) @OptimisticLock(excluded = true) private String myLanguage; @@ -310,17 +310,6 @@ public class ResourceTable extends BaseHasResource implements Serializable, IBas myIndexStatus = theIndexStatus; } - public String getLanguage() { - return myLanguage; - } - - public void setLanguage(String theLanguage) { - if (defaultString(theLanguage).length() > MAX_LANGUAGE_LENGTH) { - throw new UnprocessableEntityException("Language exceeds maximum length of " + MAX_LANGUAGE_LENGTH + " chars: " + theLanguage); - } - myLanguage = theLanguage; - } - public Collection getParamsComboStringUnique() { if (myParamsComboStringUnique == null) { myParamsComboStringUnique = new ArrayList<>(); diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml index a3057b5f43b..769c3156374 100755 --- a/hapi-fhir-jpaserver-searchparam/pom.xml +++ b/hapi-fhir-jpaserver-searchparam/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/ResourceMetaParams.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/ResourceMetaParams.java index fb11a890cb5..e274c69e505 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/ResourceMetaParams.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/ResourceMetaParams.java @@ -52,8 +52,6 @@ public class ResourceMetaParams { Map>> resourceMetaAndParams = new HashMap<>(); resourceMetaParams.put(IAnyResource.SP_RES_ID, StringParam.class); resourceMetaAndParams.put(IAnyResource.SP_RES_ID, StringAndListParam.class); - resourceMetaParams.put(IAnyResource.SP_RES_LANGUAGE, StringParam.class); - resourceMetaAndParams.put(IAnyResource.SP_RES_LANGUAGE, StringAndListParam.class); resourceMetaParams.put(Constants.PARAM_TAG, TokenParam.class); resourceMetaAndParams.put(Constants.PARAM_TAG, TokenAndListParam.class); resourceMetaParams.put(Constants.PARAM_PROFILE, UriParam.class); diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParams.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParams.java index 9416e13683b..503a7f97768 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParams.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParams.java @@ -225,7 +225,7 @@ public final class ResourceIndexedSearchParams { resourceParams = myDateParams; break; case REFERENCE: - return matchResourceLinks(theModelConfig, theResourceName, theParamName, value, theParamDef.getPath()); + return matchResourceLinks(theModelConfig, theResourceName, theParamName, value, theParamDef.getPathsSplitForResourceType(theResourceName)); case COMPOSITE: case HAS: case SPECIAL: @@ -256,6 +256,15 @@ public final class ResourceIndexedSearchParams { return matchResourceLinks(new ModelConfig(), theResourceName, theParamName, theParam, theParamPath); } + public boolean matchResourceLinks(ModelConfig theModelConfig, String theResourceName, String theParamName, IQueryParameterType theParam, List theParamPaths) { + for (String nextPath : theParamPaths) { + if (matchResourceLinks(theModelConfig, theResourceName, theParamName, theParam, nextPath)) { + return true; + } + } + return false; + } + // KHS This needs to be public as libraries outside of hapi call it directly public boolean matchResourceLinks(ModelConfig theModelConfig, String theResourceName, String theParamName, IQueryParameterType theParam, String theParamPath) { ReferenceParam reference = (ReferenceParam) theParam; @@ -331,6 +340,10 @@ public final class ResourceIndexedSearchParams { Collection paramCollection) { for (Map.Entry nextEntry : activeSearchParams) { String nextParamName = nextEntry.getKey(); + if (nextParamName == null || nextParamName.startsWith("_")) { + continue; + } + if (nextEntry.getValue().getParamType() == type) { boolean haveParam = false; for (BaseResourceIndexedSearchParam nextParam : paramCollection) { diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryResourceMatcher.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryResourceMatcher.java index f6d0027898f..86dbdd3047b 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryResourceMatcher.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryResourceMatcher.java @@ -164,7 +164,6 @@ public class InMemoryResourceMatcher { case IAnyResource.SP_RES_ID: return InMemoryMatchResult.fromBoolean(matchIdsAndOr(theAndOrParams, theResource)); - case IAnyResource.SP_RES_LANGUAGE: case Constants.PARAM_HAS: case Constants.PARAM_TAG: case Constants.PARAM_PROFILE: diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/ReadOnlySearchParamCache.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/ReadOnlySearchParamCache.java index 1b578384de2..58ea735f490 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/ReadOnlySearchParamCache.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/ReadOnlySearchParamCache.java @@ -21,10 +21,17 @@ package ca.uhn.fhir.jpa.searchparam.registry; */ import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeSearchParam; +import ca.uhn.fhir.util.BundleUtil; +import ca.uhn.fhir.util.ClasspathUtil; import com.google.common.annotations.VisibleForTesting; +import org.apache.commons.lang3.tuple.Pair; +import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseResource; +import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -73,22 +80,42 @@ public class ReadOnlySearchParamCache { return myUrlToParam.get(theUrl); } - public static ReadOnlySearchParamCache fromFhirContext(FhirContext theFhirContext) { - ReadOnlySearchParamCache retval = new ReadOnlySearchParamCache(); + public static ReadOnlySearchParamCache fromFhirContext(FhirContext theFhirContext, SearchParameterCanonicalizer theCanonicalizer) { + assert theCanonicalizer != null; + + ReadOnlySearchParamCache retVal = new ReadOnlySearchParamCache(); Set resourceNames = theFhirContext.getResourceTypes(); + if (theFhirContext.getVersion().getVersion() == FhirVersionEnum.R4) { + IBaseBundle allSearchParameterBundle = (IBaseBundle) theFhirContext.newJsonParser().parseResource(ClasspathUtil.loadResourceAsStream("org/hl7/fhir/r4/model/sp/search-parameters.json")); + for (IBaseResource next : BundleUtil.toListOfResources(theFhirContext, allSearchParameterBundle)) { + RuntimeSearchParam nextCanonical = theCanonicalizer.canonicalizeSearchParameter(next); + if (nextCanonical != null) { + Collection base = nextCanonical.getBase(); + if (base.contains("Resource") || base.contains("DomainResource")) { + base = resourceNames; + } + + for (String nextBase : base) { + Map nameToParam = retVal.myResourceNameToSpNameToSp.computeIfAbsent(nextBase, t -> new HashMap<>()); + String nextName = nextCanonical.getName(); + nameToParam.putIfAbsent(nextName, nextCanonical); + } + } + } + } + for (String resourceName : resourceNames) { RuntimeResourceDefinition nextResDef = theFhirContext.getResourceDefinition(resourceName); String nextResourceName = nextResDef.getName(); - HashMap nameToParam = new HashMap<>(); - retval.myResourceNameToSpNameToSp.put(nextResourceName, nameToParam); + Map nameToParam = retVal.myResourceNameToSpNameToSp.computeIfAbsent(nextResourceName, t-> new HashMap<>()); for (RuntimeSearchParam nextSp : nextResDef.getSearchParams()) { - nameToParam.put(nextSp.getName(), nextSp); + nameToParam.putIfAbsent(nextSp.getName(), nextSp); } } - return retval; + return retVal; } public static ReadOnlySearchParamCache fromRuntimeSearchParamCache(RuntimeSearchParamCache theRuntimeSearchParamCache) { diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImpl.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImpl.java index d465608e66c..1cf5e6f1939 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImpl.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImpl.java @@ -167,7 +167,7 @@ public class SearchParamRegistryImpl implements ISearchParamRegistry, IResourceC private ReadOnlySearchParamCache getBuiltInSearchParams() { if (myBuiltInSearchParams == null) { - myBuiltInSearchParams = ReadOnlySearchParamCache.fromFhirContext(myFhirContext); + myBuiltInSearchParams = ReadOnlySearchParamCache.fromFhirContext(myFhirContext, mySearchParameterCanonicalizer); } return myBuiltInSearchParams; } @@ -314,4 +314,9 @@ public class SearchParamRegistryImpl implements ISearchParamRegistry, IResourceC handleInit(Collections.emptyList()); } + @VisibleForTesting + public void setSearchParameterCanonicalizerForUnitTest(SearchParameterCanonicalizer theSearchParameterCanonicalizerForUnitTest) { + mySearchParameterCanonicalizer = theSearchParameterCanonicalizerForUnitTest; + } + } diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParameterCanonicalizer.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParameterCanonicalizer.java index da2b3b9a587..e9e679c4050 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParameterCanonicalizer.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParameterCanonicalizer.java @@ -87,7 +87,11 @@ public class SearchParameterCanonicalizer { default: throw new InternalErrorException("SearchParameter canonicalization not supported for FHIR version" + myFhirContext.getVersion().getVersion()); } - extractExtensions(theSearchParameter, retVal); + + if (retVal != null) { + extractExtensions(theSearchParameter, retVal); + } + return retVal; } @@ -309,7 +313,9 @@ public class SearchParameterCanonicalizer { Set targets = terser.getValues(theNextSp, "target", IPrimitiveType.class).stream().map(t -> t.getValueAsString()).collect(Collectors.toSet()); if (isBlank(name) || isBlank(path) || paramType == null) { - if (paramType != RestSearchParameterTypeEnum.COMPOSITE) { + if ("_text".equals(name) || "_content".equals(name)) { + // ok + } else if (paramType != RestSearchParameterTypeEnum.COMPOSITE) { return null; } } diff --git a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImplTest.java b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImplTest.java index 7c02e9b71db..a8e46ee64a2 100644 --- a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImplTest.java +++ b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImplTest.java @@ -63,7 +63,7 @@ import static org.mockito.Mockito.when; @ExtendWith(SpringExtension.class) public class SearchParamRegistryImplTest { private static final FhirContext ourFhirContext = FhirContext.forR4(); - private static final ReadOnlySearchParamCache ourBuiltInSearchParams = ReadOnlySearchParamCache.fromFhirContext(ourFhirContext); + private static final ReadOnlySearchParamCache ourBuiltInSearchParams = ReadOnlySearchParamCache.fromFhirContext(ourFhirContext, new SearchParameterCanonicalizer(ourFhirContext)); public static final int TEST_SEARCH_PARAMS = 3; private static final List ourEntities; @@ -77,7 +77,7 @@ public class SearchParamRegistryImplTest { ourEntities.add(createEntity(ourLastId, 1)); } ourResourceVersionMap = ResourceVersionMap.fromResourceTableEntities(ourEntities); - ourBuiltinPatientSearchParamCount = ReadOnlySearchParamCache.fromFhirContext(ourFhirContext).getSearchParamMap("Patient").size(); + ourBuiltinPatientSearchParamCount = ReadOnlySearchParamCache.fromFhirContext(ourFhirContext, new SearchParameterCanonicalizer(ourFhirContext)).getSearchParamMap("Patient").size(); } @Autowired @@ -178,7 +178,7 @@ public class SearchParamRegistryImplTest { @Test void handleInit() { - assertEquals(25, mySearchParamRegistry.getActiveSearchParams("Patient").size()); + assertEquals(31, mySearchParamRegistry.getActiveSearchParams("Patient").size()); IdDt idBad = new IdDt("SearchParameter/bad"); when(mySearchParamProvider.read(idBad)).thenThrow(new ResourceNotFoundException("id bad")); @@ -191,7 +191,7 @@ public class SearchParamRegistryImplTest { idList.add(idBad); idList.add(idGood); mySearchParamRegistry.handleInit(idList); - assertEquals(26, mySearchParamRegistry.getActiveSearchParams("Patient").size()); + assertEquals(32, mySearchParamRegistry.getActiveSearchParams("Patient").size()); } @Test diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml index ec5d4f3dbfb..e82047b9a84 100644 --- a/hapi-fhir-jpaserver-subscription/pom.xml +++ b/hapi-fhir-jpaserver-subscription/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml index cd6c3fadfcc..ed0446ecb7c 100644 --- a/hapi-fhir-jpaserver-test-utilities/pom.xml +++ b/hapi-fhir-jpaserver-test-utilities/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index b044e150afd..102099628b9 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml index 6bce8a8a03a..c4b363475e5 100644 --- a/hapi-fhir-server-mdm/pom.xml +++ b/hapi-fhir-server-mdm/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml index fa6e5acf538..a7a0f5b62e4 100644 --- a/hapi-fhir-server-openapi/pom.xml +++ b/hapi-fhir-server-openapi/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml index df1d48956cb..9e939a8b842 100644 --- a/hapi-fhir-server/pom.xml +++ b/hapi-fhir-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchMethodBinding.java index 233414fcabc..47141ac21b8 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchMethodBinding.java @@ -59,7 +59,6 @@ public class SearchMethodBinding extends BaseResourceReturningMethodBinding { static { HashSet specialSearchParams = new HashSet<>(); specialSearchParams.add(IAnyResource.SP_RES_ID); - specialSearchParams.add(IAnyResource.SP_RES_LANGUAGE); specialSearchParams.add(Constants.PARAM_INCLUDE); specialSearchParams.add(Constants.PARAM_REVINCLUDE); SPECIAL_SEARCH_PARAMS = Collections.unmodifiableSet(specialSearchParams); diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ServerCapabilityStatementProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ServerCapabilityStatementProvider.java index 923bc8f5519..408b8baa10c 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ServerCapabilityStatementProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ServerCapabilityStatementProvider.java @@ -411,15 +411,7 @@ public class ServerCapabilityStatementProvider implements IServerConformanceProv } String spUri = next.getUri(); - if (isBlank(spUri) && servletRequest != null) { - String id; - if (next.getId() != null) { - id = next.getId().toUnqualifiedVersionless().getValue(); - } else { - id = resourceName + "-" + next.getName(); - } - spUri = configuration.getServerAddressStrategy().determineServerBase(servletRequest.getServletContext(), servletRequest) + "/" + id; - } + if (isNotBlank(spUri)) { terser.addElement(searchParam, "definition", spUri); } diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml index 806c163b4a0..53e0d08a968 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml index 20d4de90f0b..1bc5de61f40 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT hapi-fhir-spring-boot-sample-client-apache diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml index 42703201b87..7e30b65d2b7 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT hapi-fhir-spring-boot-sample-client-okhttp diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml index da89e1a588e..a76318684c6 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT hapi-fhir-spring-boot-sample-server-jersey diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml index eed71fc788b..4f824c60db2 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT hapi-fhir-spring-boot-samples diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml index c85465c39c1..d0d3f5e065f 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml index 3153f3339c5..04d9e96e88d 100644 --- a/hapi-fhir-spring-boot/pom.xml +++ b/hapi-fhir-spring-boot/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/BaseResource.java b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/BaseResource.java index 40ddf538aa4..5c0a967eede 100644 --- a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/BaseResource.java +++ b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/BaseResource.java @@ -72,18 +72,9 @@ public abstract class BaseResource extends BaseElement implements IResource { @SearchParamDefinition(name="_id", path="", description="The ID of the resource", type="string" ) public static final String SP_RES_ID = "_id"; - /** - * Search parameter constant for _language - */ - @SearchParamDefinition(name="_language", path="", description="The language of the resource", type="string" ) - public static final String SP_RES_LANGUAGE = "_language"; - - - @Child(name = "contained", order = 2, min = 0, max = 1) private ContainedDt myContained; - private IdDt myId; @Child(name = "language", order = 0, min = 0, max = 1) diff --git a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/context/NameChanges.java b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/context/NameChanges.java index 981616ce838..1e76f5aef99 100644 --- a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/context/NameChanges.java +++ b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/context/NameChanges.java @@ -42,7 +42,7 @@ public class NameChanges { } if (name.startsWith("_")) { - continue; // _id and _language + continue; // _id } String path = nextParam.getPath(); diff --git a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/context/copy/NameChanges.java b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/context/copy/NameChanges.java index d8e2ec91a98..4ef90922f1d 100644 --- a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/context/copy/NameChanges.java +++ b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/context/copy/NameChanges.java @@ -42,7 +42,7 @@ public class NameChanges { } if (name.startsWith("_")) { - continue; // _id and _language + continue; // _id } String path = nextParam.getPath(); diff --git a/hapi-fhir-structures-dstu/src/test/resources/alert.profile.json b/hapi-fhir-structures-dstu/src/test/resources/alert.profile.json index d2466f49221..4495f27dd94 100644 --- a/hapi-fhir-structures-dstu/src/test/resources/alert.profile.json +++ b/hapi-fhir-structures-dstu/src/test/resources/alert.profile.json @@ -277,11 +277,6 @@ "type": "token", "documentation": "The logical resource id associated with the resource (must be supported by all servers)" }, - { - "name": "_language", - "type": "token", - "documentation": "The language of the resource" - }, { "name": "subject", "type": "reference", @@ -291,4 +286,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/hapi-fhir-structures-dstu/src/test/resources/patient.profile.json b/hapi-fhir-structures-dstu/src/test/resources/patient.profile.json index 2ad4938e7f4..377618894c5 100644 --- a/hapi-fhir-structures-dstu/src/test/resources/patient.profile.json +++ b/hapi-fhir-structures-dstu/src/test/resources/patient.profile.json @@ -1021,11 +1021,6 @@ "type": "token", "documentation": "The logical resource id associated with the resource (must be supported by all servers)" }, - { - "name": "_language", - "type": "token", - "documentation": "The language of the resource" - }, { "name": "active", "type": "token", @@ -1118,4 +1113,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml index 985c794b0b0..203d9759eb9 100644 --- a/hapi-fhir-structures-dstu2.1/pom.xml +++ b/hapi-fhir-structures-dstu2.1/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml index bea02731f16..6545402f181 100644 --- a/hapi-fhir-structures-dstu2/pom.xml +++ b/hapi-fhir-structures-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java index 67df821c05f..e4e72f5310b 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java @@ -69,13 +69,6 @@ public abstract class BaseResource extends BaseElement implements IResource { @SearchParamDefinition(name="_id", path="", description="The ID of the resource", type="string" ) public static final String SP_RES_ID = "_id"; - - /** - * Search parameter constant for _language - */ - @SearchParamDefinition(name="_language", path="", description="The language of the resource", type="string" ) - public static final String SP_RES_LANGUAGE = "_language"; - @Child(name = "contained", order = 2, min = 0, max = 1) private ContainedDt myContained; @@ -127,7 +120,7 @@ public abstract class BaseResource extends BaseElement implements IResource { @Override public IBaseMetaType addProfile(String theProfile) { - ArrayList newTagList = new ArrayList(); + ArrayList newTagList = new ArrayList<>(); List existingTagList = ResourceMetadataKeyEnum.PROFILES.get(BaseResource.this); if (existingTagList != null) { newTagList.addAll(existingTagList); diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/PatientResourceProvider.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/PatientResourceProvider.java index 72ba6d6eeb8..07079f0e3e2 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/PatientResourceProvider.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/PatientResourceProvider.java @@ -33,10 +33,6 @@ public class PatientResourceProvider implements IResourceProvider @OptionalParam(name="_id") StringAndListParam theId, - @Description(shortDefinition="The resource language") - @OptionalParam(name="_language") - StringAndListParam theResourceLanguage, - @Description(shortDefinition="Search the contents of the resource's data using a fulltext search") @OptionalParam(name=Constants.PARAM_CONTENT) StringAndListParam theFtContent, diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/ServerConformanceProviderDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/ServerConformanceProviderDstu2Test.java index 1d6bf3f7930..c627b4d54b9 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/ServerConformanceProviderDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/ServerConformanceProviderDstu2Test.java @@ -501,7 +501,7 @@ public class ServerConformanceProviderDstu2Test { if (resourceBinding.getResourceName().equals("Patient")) { List> methodBindings = resourceBinding.getMethodBindings(); SearchMethodBinding binding = (SearchMethodBinding) methodBindings.get(0); - SearchParameter param = (SearchParameter) binding.getParameters().get(25); + SearchParameter param = (SearchParameter) binding.getParameters().get(24); assertEquals("The organization at which this person is a patient", param.getDescription()); found = true; } diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml index 75e68f16c5b..d9856c320b0 100644 --- a/hapi-fhir-structures-dstu3/pom.xml +++ b/hapi-fhir-structures-dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/context/FhirContextDstu3Test.java b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/context/FhirContextDstu3Test.java index ff8b4ce7cbf..ef4d4b0468b 100644 --- a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/context/FhirContextDstu3Test.java +++ b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/context/FhirContextDstu3Test.java @@ -49,7 +49,7 @@ public class FhirContextDstu3Test { @Test public void testRuntimeSearchParamToString() { String val = ourCtx.getResourceDefinition("Patient").getSearchParam("gender").toString(); - assertEquals("RuntimeSearchParam[base=[Patient],name=gender,path=Patient.gender,id=,uri=http://hl7.org/fhir/SearchParameter/patient-gender]", val); + assertEquals("RuntimeSearchParam[base=[Patient],name=gender,path=Patient.gender,id=,uri=http://hl7.org/fhir/SearchParameter/Patient-gender]", val); } @Test diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml index ce80fb38faa..9821181f70c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/pom.xml +++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml index 6c7ed34d4a1..d026c82c568 100644 --- a/hapi-fhir-structures-r4/pom.xml +++ b/hapi-fhir-structures-r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml index 318e07cdd9d..54c8261c98e 100644 --- a/hapi-fhir-structures-r5/pom.xml +++ b/hapi-fhir-structures-r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/PatientResourceProvider.java b/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/PatientResourceProvider.java index beb1db24d64..bca7548cacb 100644 --- a/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/PatientResourceProvider.java +++ b/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/PatientResourceProvider.java @@ -35,10 +35,6 @@ public class PatientResourceProvider implements IResourceProvider @OptionalParam(name="_id") StringAndListParam theId, - @Description(shortDefinition="The resource language") - @OptionalParam(name="_language") - StringAndListParam theResourceLanguage, - @Description(shortDefinition="Search the contents of the resource's data using a fulltext search") @OptionalParam(name=Constants.PARAM_CONTENT) StringAndListParam theFtContent, diff --git a/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR5Test.java b/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR5Test.java index d1940e3649f..baa2c7758fa 100644 --- a/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR5Test.java +++ b/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR5Test.java @@ -479,7 +479,8 @@ public class ServerCapabilityStatementProviderR5Test { List> methodBindings = resourceBinding.getMethodBindings(); SearchMethodBinding binding = (SearchMethodBinding) methodBindings.get(0); SearchParameter param = (SearchParameter) binding.getParameters().get(25); - assertEquals("The organization at which this person is a patient", param.getDescription()); + assertEquals("careprovider", param.getName()); + assertEquals("Patient's nominated care provider, could be a care manager, not the organization that manages the record", param.getDescription()); found = true; } } diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml index a542bb6ed6b..fe8822ed4cd 100644 --- a/hapi-fhir-test-utilities/pom.xml +++ b/hapi-fhir-test-utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml index 6b85577acd9..466f37f72e3 100644 --- a/hapi-fhir-testpage-overlay/pom.xml +++ b/hapi-fhir-testpage-overlay/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml index 51d1172c750..9be7e6175f5 100644 --- a/hapi-fhir-validation-resources-dstu2.1/pom.xml +++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml index b65d94a559c..312012590ee 100644 --- a/hapi-fhir-validation-resources-dstu2/pom.xml +++ b/hapi-fhir-validation-resources-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml index c2c456377c7..9e4259aa765 100644 --- a/hapi-fhir-validation-resources-dstu3/pom.xml +++ b/hapi-fhir-validation-resources-dstu3/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml index 48f48396833..670e3eb55c9 100644 --- a/hapi-fhir-validation-resources-r4/pom.xml +++ b/hapi-fhir-validation-resources-r4/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/sp/search-parameters.json b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/sp/search-parameters.json new file mode 100644 index 00000000000..3941bb8757d --- /dev/null +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/sp/search-parameters.json @@ -0,0 +1,49075 @@ +{ +"resourceType": "Bundle", +"id": "searchParams", +"meta": { + "lastUpdated": "2019-11-01T09:29:23.356+11:00" +}, +"type": "collection", +"entry": [ { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DomainResource-text", + "resource": { + "resourceType": "SearchParameter", + "id": "DomainResource-text", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DomainResource-text", + "version": "4.0.1", + "name": "_text", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Search on the narrative of the resource", + "code": "_text", + "base": [ "DomainResource" ], + "type": "string", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Resource-content", + "resource": { + "resourceType": "SearchParameter", + "id": "Resource-content", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Resource-content", + "version": "4.0.1", + "name": "_content", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Search on the entire content of the resource", + "code": "_content", + "base": [ "Resource" ], + "type": "string", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Resource-id", + "resource": { + "resourceType": "SearchParameter", + "id": "Resource-id", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Resource-id", + "version": "4.0.1", + "name": "_id", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Logical id of this artifact", + "code": "_id", + "base": [ "Resource" ], + "type": "token", + "expression": "Resource.id", + "xpath": "f:Resource/f:id", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Resource-lastUpdated", + "resource": { + "resourceType": "SearchParameter", + "id": "Resource-lastUpdated", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Resource-lastUpdated", + "version": "4.0.1", + "name": "_lastUpdated", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "When the resource version last changed", + "code": "_lastUpdated", + "base": [ "Resource" ], + "type": "date", + "expression": "Resource.meta.lastUpdated", + "xpath": "f:Resource/f:meta/f:lastUpdated", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Resource-profile", + "resource": { + "resourceType": "SearchParameter", + "id": "Resource-profile", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Resource-profile", + "version": "4.0.1", + "name": "_profile", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Profiles this resource claims to conform to", + "code": "_profile", + "base": [ "Resource" ], + "type": "uri", + "expression": "Resource.meta.profile", + "xpath": "f:Resource/f:meta/f:profile", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Resource-query", + "resource": { + "resourceType": "SearchParameter", + "id": "Resource-query", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Resource-query", + "version": "4.0.1", + "name": "_query", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A custom search profile that describes a specific defined query operation", + "code": "_query", + "base": [ "Resource" ], + "type": "token", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Resource-security", + "resource": { + "resourceType": "SearchParameter", + "id": "Resource-security", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Resource-security", + "version": "4.0.1", + "name": "_security", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Security Labels applied to this resource", + "code": "_security", + "base": [ "Resource" ], + "type": "token", + "expression": "Resource.meta.security", + "xpath": "f:Resource/f:meta/f:security", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Resource-source", + "resource": { + "resourceType": "SearchParameter", + "id": "Resource-source", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Resource-source", + "version": "4.0.1", + "name": "_source", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Identifies where the resource comes from", + "code": "_source", + "base": [ "Resource" ], + "type": "uri", + "expression": "Resource.meta.source", + "xpath": "f:Resource/f:meta/f:source", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Resource-tag", + "resource": { + "resourceType": "SearchParameter", + "id": "Resource-tag", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Resource-tag", + "version": "4.0.1", + "name": "_tag", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Tags applied to this resource", + "code": "_tag", + "base": [ "Resource" ], + "type": "token", + "expression": "Resource.meta.tag", + "xpath": "f:Resource/f:meta/f:tag", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Account-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Account-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Account-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Account number", + "code": "identifier", + "base": [ "Account" ], + "type": "token", + "expression": "Account.identifier", + "xpath": "f:Account/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Account-name", + "resource": { + "resourceType": "SearchParameter", + "id": "Account-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Account-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Human-readable label", + "code": "name", + "base": [ "Account" ], + "type": "string", + "expression": "Account.name", + "xpath": "f:Account/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Account-owner", + "resource": { + "resourceType": "SearchParameter", + "id": "Account-owner", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Account-owner", + "version": "4.0.1", + "name": "owner", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Entity managing the Account", + "code": "owner", + "base": [ "Account" ], + "type": "reference", + "expression": "Account.owner", + "xpath": "f:Account/f:owner", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Account-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Account-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Account-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The entity that caused the expenses", + "code": "patient", + "base": [ "Account" ], + "type": "reference", + "expression": "Account.subject.where(resolve() is Patient)", + "xpath": "f:Account/f:subject", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Account-period", + "resource": { + "resourceType": "SearchParameter", + "id": "Account-period", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Account-period", + "version": "4.0.1", + "name": "period", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Transaction window", + "code": "period", + "base": [ "Account" ], + "type": "date", + "expression": "Account.servicePeriod", + "xpath": "f:Account/f:servicePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Account-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Account-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Account-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "active | inactive | entered-in-error | on-hold | unknown", + "code": "status", + "base": [ "Account" ], + "type": "token", + "expression": "Account.status", + "xpath": "f:Account/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Account-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Account-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Account-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The entity that caused the expenses", + "code": "subject", + "base": [ "Account" ], + "type": "reference", + "expression": "Account.subject", + "xpath": "f:Account/f:subject", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "HealthcareService", "PractitionerRole", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Account-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Account-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Account-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "E.g. patient, expense, depreciation", + "code": "type", + "base": [ "Account" ], + "type": "token", + "expression": "Account.type", + "xpath": "f:Account/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-composed-of", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-composed-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-composed-of", + "version": "4.0.1", + "name": "composed-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "composed-of", + "base": [ "ActivityDefinition" ], + "type": "reference", + "expression": "ActivityDefinition.relatedArtifact.where(type='composed-of').resource", + "xpath": "f:ActivityDefinition/f:relatedArtifact[f:type/@value='composed-of']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context assigned to the activity definition", + "code": "context", + "base": [ "ActivityDefinition" ], + "type": "token", + "expression": "(ActivityDefinition.useContext.value as CodeableConcept)", + "xpath": "f:ActivityDefinition/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the activity definition", + "code": "context-quantity", + "base": [ "ActivityDefinition" ], + "type": "quantity", + "expression": "(ActivityDefinition.useContext.value as Quantity) | (ActivityDefinition.useContext.value as Range)", + "xpath": "f:ActivityDefinition/f:useContext/f:valueQuantity | f:ActivityDefinition/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the activity definition", + "code": "context-type", + "base": [ "ActivityDefinition" ], + "type": "token", + "expression": "ActivityDefinition.useContext.code", + "xpath": "f:ActivityDefinition/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-date", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The activity definition publication date", + "code": "date", + "base": [ "ActivityDefinition" ], + "type": "date", + "expression": "ActivityDefinition.date", + "xpath": "f:ActivityDefinition/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-depends-on", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-depends-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-depends-on", + "version": "4.0.1", + "name": "depends-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "depends-on", + "base": [ "ActivityDefinition" ], + "type": "reference", + "expression": "ActivityDefinition.relatedArtifact.where(type='depends-on').resource | ActivityDefinition.library", + "xpath": "f:ActivityDefinition/f:relatedArtifact[f:type/@value='depends-on']/f:resource | f:ActivityDefinition/f:library", + "xpathUsage": "normal", + "target": [ "Library", "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-derived-from", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-derived-from", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-derived-from", + "version": "4.0.1", + "name": "derived-from", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "derived-from", + "base": [ "ActivityDefinition" ], + "type": "reference", + "expression": "ActivityDefinition.relatedArtifact.where(type='derived-from').resource", + "xpath": "f:ActivityDefinition/f:relatedArtifact[f:type/@value='derived-from']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-description", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The description of the activity definition", + "code": "description", + "base": [ "ActivityDefinition" ], + "type": "string", + "expression": "ActivityDefinition.description", + "xpath": "f:ActivityDefinition/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The time during which the activity definition is intended to be in use", + "code": "effective", + "base": [ "ActivityDefinition" ], + "type": "date", + "expression": "ActivityDefinition.effectivePeriod", + "xpath": "f:ActivityDefinition/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "External identifier for the activity definition", + "code": "identifier", + "base": [ "ActivityDefinition" ], + "type": "token", + "expression": "ActivityDefinition.identifier", + "xpath": "f:ActivityDefinition/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the activity definition", + "code": "jurisdiction", + "base": [ "ActivityDefinition" ], + "type": "token", + "expression": "ActivityDefinition.jurisdiction", + "xpath": "f:ActivityDefinition/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-name", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the activity definition", + "code": "name", + "base": [ "ActivityDefinition" ], + "type": "string", + "expression": "ActivityDefinition.name", + "xpath": "f:ActivityDefinition/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-predecessor", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-predecessor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-predecessor", + "version": "4.0.1", + "name": "predecessor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "predecessor", + "base": [ "ActivityDefinition" ], + "type": "reference", + "expression": "ActivityDefinition.relatedArtifact.where(type='predecessor').resource", + "xpath": "f:ActivityDefinition/f:relatedArtifact[f:type/@value='predecessor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Name of the publisher of the activity definition", + "code": "publisher", + "base": [ "ActivityDefinition" ], + "type": "string", + "expression": "ActivityDefinition.publisher", + "xpath": "f:ActivityDefinition/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The current status of the activity definition", + "code": "status", + "base": [ "ActivityDefinition" ], + "type": "token", + "expression": "ActivityDefinition.status", + "xpath": "f:ActivityDefinition/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-successor", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-successor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-successor", + "version": "4.0.1", + "name": "successor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "successor", + "base": [ "ActivityDefinition" ], + "type": "reference", + "expression": "ActivityDefinition.relatedArtifact.where(type='successor').resource", + "xpath": "f:ActivityDefinition/f:relatedArtifact[f:type/@value='successor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-title", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The human-friendly name of the activity definition", + "code": "title", + "base": [ "ActivityDefinition" ], + "type": "string", + "expression": "ActivityDefinition.title", + "xpath": "f:ActivityDefinition/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-topic", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-topic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-topic", + "version": "4.0.1", + "name": "topic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Topics associated with the module", + "code": "topic", + "base": [ "ActivityDefinition" ], + "type": "token", + "expression": "ActivityDefinition.topic", + "xpath": "f:ActivityDefinition/f:topic", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-url", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The uri that identifies the activity definition", + "code": "url", + "base": [ "ActivityDefinition" ], + "type": "uri", + "expression": "ActivityDefinition.url", + "xpath": "f:ActivityDefinition/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-version", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The business version of the activity definition", + "code": "version", + "base": [ "ActivityDefinition" ], + "type": "token", + "expression": "ActivityDefinition.version", + "xpath": "f:ActivityDefinition/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the activity definition", + "code": "context-type-quantity", + "base": [ "ActivityDefinition" ], + "type": "composite", + "expression": "ActivityDefinition.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "ActivityDefinition-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the activity definition", + "code": "context-type-value", + "base": [ "ActivityDefinition" ], + "type": "composite", + "expression": "ActivityDefinition.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/ActivityDefinition-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AdverseEvent-actuality", + "resource": { + "resourceType": "SearchParameter", + "id": "AdverseEvent-actuality", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AdverseEvent-actuality", + "version": "4.0.1", + "name": "actuality", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "actual | potential", + "code": "actuality", + "base": [ "AdverseEvent" ], + "type": "token", + "expression": "AdverseEvent.actuality", + "xpath": "f:AdverseEvent/f:actuality", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AdverseEvent-category", + "resource": { + "resourceType": "SearchParameter", + "id": "AdverseEvent-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AdverseEvent-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "product-problem | product-quality | product-use-error | wrong-dose | incorrect-prescribing-information | wrong-technique | wrong-route-of-administration | wrong-rate | wrong-duration | wrong-time | expired-drug | medical-device-use-error | problem-different-manufacturer | unsafe-physical-environment", + "code": "category", + "base": [ "AdverseEvent" ], + "type": "token", + "expression": "AdverseEvent.category", + "xpath": "f:AdverseEvent/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AdverseEvent-date", + "resource": { + "resourceType": "SearchParameter", + "id": "AdverseEvent-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AdverseEvent-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "When the event occurred", + "code": "date", + "base": [ "AdverseEvent" ], + "type": "date", + "expression": "AdverseEvent.date", + "xpath": "f:AdverseEvent/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AdverseEvent-event", + "resource": { + "resourceType": "SearchParameter", + "id": "AdverseEvent-event", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AdverseEvent-event", + "version": "4.0.1", + "name": "event", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Type of the event itself in relation to the subject", + "code": "event", + "base": [ "AdverseEvent" ], + "type": "token", + "expression": "AdverseEvent.event", + "xpath": "f:AdverseEvent/f:event", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AdverseEvent-location", + "resource": { + "resourceType": "SearchParameter", + "id": "AdverseEvent-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AdverseEvent-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Location where adverse event occurred", + "code": "location", + "base": [ "AdverseEvent" ], + "type": "reference", + "expression": "AdverseEvent.location", + "xpath": "f:AdverseEvent/f:location", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AdverseEvent-recorder", + "resource": { + "resourceType": "SearchParameter", + "id": "AdverseEvent-recorder", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AdverseEvent-recorder", + "version": "4.0.1", + "name": "recorder", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Who recorded the adverse event", + "code": "recorder", + "base": [ "AdverseEvent" ], + "type": "reference", + "expression": "AdverseEvent.recorder", + "xpath": "f:AdverseEvent/f:recorder", + "xpathUsage": "normal", + "target": [ "Practitioner", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AdverseEvent-resultingcondition", + "resource": { + "resourceType": "SearchParameter", + "id": "AdverseEvent-resultingcondition", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AdverseEvent-resultingcondition", + "version": "4.0.1", + "name": "resultingcondition", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Effect on the subject due to this event", + "code": "resultingcondition", + "base": [ "AdverseEvent" ], + "type": "reference", + "expression": "AdverseEvent.resultingCondition", + "xpath": "f:AdverseEvent/f:resultingCondition", + "xpathUsage": "normal", + "target": [ "Condition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AdverseEvent-seriousness", + "resource": { + "resourceType": "SearchParameter", + "id": "AdverseEvent-seriousness", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AdverseEvent-seriousness", + "version": "4.0.1", + "name": "seriousness", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Seriousness of the event", + "code": "seriousness", + "base": [ "AdverseEvent" ], + "type": "token", + "expression": "AdverseEvent.seriousness", + "xpath": "f:AdverseEvent/f:seriousness", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AdverseEvent-severity", + "resource": { + "resourceType": "SearchParameter", + "id": "AdverseEvent-severity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AdverseEvent-severity", + "version": "4.0.1", + "name": "severity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "mild | moderate | severe", + "code": "severity", + "base": [ "AdverseEvent" ], + "type": "token", + "expression": "AdverseEvent.severity", + "xpath": "f:AdverseEvent/f:severity", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AdverseEvent-study", + "resource": { + "resourceType": "SearchParameter", + "id": "AdverseEvent-study", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AdverseEvent-study", + "version": "4.0.1", + "name": "study", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "AdverseEvent.study", + "code": "study", + "base": [ "AdverseEvent" ], + "type": "reference", + "expression": "AdverseEvent.study", + "xpath": "f:AdverseEvent/f:study", + "xpathUsage": "normal", + "target": [ "ResearchStudy" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AdverseEvent-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "AdverseEvent-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AdverseEvent-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Subject impacted by event", + "code": "subject", + "base": [ "AdverseEvent" ], + "type": "reference", + "expression": "AdverseEvent.subject", + "xpath": "f:AdverseEvent/f:subject", + "xpathUsage": "normal", + "target": [ "Practitioner", "Group", "Patient", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AdverseEvent-substance", + "resource": { + "resourceType": "SearchParameter", + "id": "AdverseEvent-substance", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AdverseEvent-substance", + "version": "4.0.1", + "name": "substance", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Refers to the specific entity that caused the adverse event", + "code": "substance", + "base": [ "AdverseEvent" ], + "type": "reference", + "expression": "AdverseEvent.suspectEntity.instance", + "xpath": "f:AdverseEvent/f:suspectEntity/f:instance", + "xpathUsage": "normal", + "target": [ "Immunization", "Device", "Medication", "Procedure", "Substance", "MedicationAdministration", "MedicationStatement" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-asserter", + "resource": { + "resourceType": "SearchParameter", + "id": "AllergyIntolerance-asserter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-asserter", + "version": "4.0.1", + "name": "asserter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Source of the information about the allergy", + "code": "asserter", + "base": [ "AllergyIntolerance" ], + "type": "reference", + "expression": "AllergyIntolerance.asserter", + "xpath": "f:AllergyIntolerance/f:asserter", + "xpathUsage": "normal", + "target": [ "Practitioner", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-category", + "resource": { + "resourceType": "SearchParameter", + "id": "AllergyIntolerance-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "food | medication | environment | biologic", + "code": "category", + "base": [ "AllergyIntolerance" ], + "type": "token", + "expression": "AllergyIntolerance.category", + "xpath": "f:AllergyIntolerance/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-clinical-status", + "resource": { + "resourceType": "SearchParameter", + "id": "AllergyIntolerance-clinical-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-clinical-status", + "version": "4.0.1", + "name": "clinical-status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "active | inactive | resolved", + "code": "clinical-status", + "base": [ "AllergyIntolerance" ], + "type": "token", + "expression": "AllergyIntolerance.clinicalStatus", + "xpath": "f:AllergyIntolerance/f:clinicalStatus", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/clinical-code", + "resource": { + "resourceType": "SearchParameter", + "id": "clinical-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/clinical-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance\r\n* [Condition](condition.html): Code for the condition\r\n* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered\r\n* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code\r\n* [List](list.html): What the purpose of this list is\r\n* [Medication](medication.html): Returns medications for a specific code\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication code\r\n* [Observation](observation.html): The code of the observation type\r\n* [Procedure](procedure.html): A code to identify a procedure\r\n* [ServiceRequest](servicerequest.html): What is being requested/ordered\r\n", + "code": "code", + "base": [ "AllergyIntolerance", "Condition", "DeviceRequest", "DiagnosticReport", "FamilyMemberHistory", "List", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationRequest", "MedicationStatement", "Observation", "Procedure", "ServiceRequest" ], + "type": "token", + "expression": "AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code", + "xpath": "f:AllergyIntolerance/f:code | f:AllergyIntolerance/f:reaction/f:substance | f:Condition/f:code | f:DeviceRequest/f:codeCodeableConcept | f:DiagnosticReport/f:code | f:FamilyMemberHistory/f:condition/f:code | f:List/f:code | f:Medication/f:code | f:MedicationAdministration/f:medicationCodeableConcept | f:MedicationDispense/f:medicationCodeableConcept | f:MedicationRequest/f:medicationCodeableConcept | f:MedicationStatement/f:medicationCodeableConcept | f:Observation/f:code | f:Procedure/f:code | f:ServiceRequest/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-criticality", + "resource": { + "resourceType": "SearchParameter", + "id": "AllergyIntolerance-criticality", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-criticality", + "version": "4.0.1", + "name": "criticality", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "low | high | unable-to-assess", + "code": "criticality", + "base": [ "AllergyIntolerance" ], + "type": "token", + "expression": "AllergyIntolerance.criticality", + "xpath": "f:AllergyIntolerance/f:criticality", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/clinical-date", + "resource": { + "resourceType": "SearchParameter", + "id": "clinical-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/clinical-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): Time period team covers\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When this Consent was created or indexed\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [Encounter](encounter.html): A date within the period the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination (non)-Administration Date\r\n* [List](list.html): When the list was prepared\r\n* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period\r\n* [Procedure](procedure.html): When the procedure was performed\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", + "code": "date", + "base": [ "AllergyIntolerance", "CarePlan", "CareTeam", "ClinicalImpression", "Composition", "Consent", "DiagnosticReport", "Encounter", "EpisodeOfCare", "FamilyMemberHistory", "Flag", "Immunization", "List", "Observation", "Procedure", "RiskAssessment", "SupplyRequest" ], + "type": "date", + "expression": "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn", + "xpath": "f:AllergyIntolerance/f:recordedDate | f:CarePlan/f:period | f:CareTeam/f:period | f:ClinicalImpression/f:date | f:Composition/f:date | f:Consent/f:dateTime | f:DiagnosticReport/f:effectiveDateTime | f:DiagnosticReport/f:effectivePeriod | f:Encounter/f:period | f:EpisodeOfCare/f:period | f:FamilyMemberHistory/f:date | f:Flag/f:period | f:Immunization/f:occurrenceDateTime | f:Immunization/f:occurrenceString | f:List/f:date | f:Observation/f:effectiveDateTime | f:Observation/f:effectivePeriod | f:Observation/f:effectiveTiming | f:Observation/f:effectiveInstant | f:Procedure/f:performedDateTime | f:Procedure/f:performedPeriod | f:Procedure/f:performedString | f:Procedure/f:performedAge | f:Procedure/f:performedRange | f:RiskAssessment/f:occurrenceDateTime | f:SupplyRequest/f:authoredOn", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/clinical-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "clinical-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/clinical-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\r\n* [DocumentReference](documentreference.html): Master Version Specific Identifier\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", + "code": "identifier", + "base": [ "AllergyIntolerance", "CarePlan", "CareTeam", "Composition", "Condition", "Consent", "DetectedIssue", "DeviceRequest", "DiagnosticReport", "DocumentManifest", "DocumentReference", "Encounter", "EpisodeOfCare", "FamilyMemberHistory", "Goal", "ImagingStudy", "Immunization", "List", "MedicationAdministration", "MedicationDispense", "MedicationRequest", "MedicationStatement", "NutritionOrder", "Observation", "Procedure", "RiskAssessment", "ServiceRequest", "SupplyDelivery", "SupplyRequest", "VisionPrescription" ], + "type": "token", + "expression": "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier", + "xpath": "f:AllergyIntolerance/f:identifier | f:CarePlan/f:identifier | f:CareTeam/f:identifier | f:Composition/f:identifier | f:Condition/f:identifier | f:Consent/f:identifier | f:DetectedIssue/f:identifier | f:DeviceRequest/f:identifier | f:DiagnosticReport/f:identifier | f:DocumentManifest/f:masterIdentifier | f:DocumentManifest/f:identifier | f:DocumentReference/f:masterIdentifier | f:DocumentReference/f:identifier | f:Encounter/f:identifier | f:EpisodeOfCare/f:identifier | f:FamilyMemberHistory/f:identifier | f:Goal/f:identifier | f:ImagingStudy/f:identifier | f:Immunization/f:identifier | f:List/f:identifier | f:MedicationAdministration/f:identifier | f:MedicationDispense/f:identifier | f:MedicationRequest/f:identifier | f:MedicationStatement/f:identifier | f:NutritionOrder/f:identifier | f:Observation/f:identifier | f:Procedure/f:identifier | f:RiskAssessment/f:identifier | f:ServiceRequest/f:identifier | f:SupplyDelivery/f:identifier | f:SupplyRequest/f:identifier | f:VisionPrescription/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-last-date", + "resource": { + "resourceType": "SearchParameter", + "id": "AllergyIntolerance-last-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-last-date", + "version": "4.0.1", + "name": "last-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Date(/time) of last known occurrence of a reaction", + "code": "last-date", + "base": [ "AllergyIntolerance" ], + "type": "date", + "expression": "AllergyIntolerance.lastOccurrence", + "xpath": "f:AllergyIntolerance/f:lastOccurrence", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-manifestation", + "resource": { + "resourceType": "SearchParameter", + "id": "AllergyIntolerance-manifestation", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-manifestation", + "version": "4.0.1", + "name": "manifestation", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Clinical symptoms/signs associated with the Event", + "code": "manifestation", + "base": [ "AllergyIntolerance" ], + "type": "token", + "expression": "AllergyIntolerance.reaction.manifestation", + "xpath": "f:AllergyIntolerance/f:reaction/f:manifestation", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-onset", + "resource": { + "resourceType": "SearchParameter", + "id": "AllergyIntolerance-onset", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-onset", + "version": "4.0.1", + "name": "onset", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Date(/time) when manifestations showed", + "code": "onset", + "base": [ "AllergyIntolerance" ], + "type": "date", + "expression": "AllergyIntolerance.reaction.onset", + "xpath": "f:AllergyIntolerance/f:reaction/f:onset", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/clinical-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "clinical-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/clinical-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient or group assessed\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient or group present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", + "code": "patient", + "base": [ "AllergyIntolerance", "CarePlan", "CareTeam", "ClinicalImpression", "Composition", "Condition", "Consent", "DetectedIssue", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "Encounter", "EpisodeOfCare", "FamilyMemberHistory", "Flag", "Goal", "ImagingStudy", "Immunization", "List", "MedicationAdministration", "MedicationDispense", "MedicationRequest", "MedicationStatement", "NutritionOrder", "Observation", "Procedure", "RiskAssessment", "ServiceRequest", "SupplyDelivery", "VisionPrescription" ], + "type": "reference", + "expression": "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient", + "xpath": "f:AllergyIntolerance/f:patient | f:CarePlan/f:subject | f:CareTeam/f:subject | f:ClinicalImpression/f:subject | f:Composition/f:subject | f:Condition/f:subject | f:Consent/f:patient | f:DetectedIssue/f:patient | f:DeviceRequest/f:subject | f:DeviceUseStatement/f:subject | f:DiagnosticReport/f:subject | f:DocumentManifest/f:subject | f:DocumentReference/f:subject | f:Encounter/f:subject | f:EpisodeOfCare/f:patient | f:FamilyMemberHistory/f:patient | f:Flag/f:subject | f:Goal/f:subject | f:ImagingStudy/f:subject | f:Immunization/f:patient | f:List/f:subject | f:MedicationAdministration/f:subject | f:MedicationDispense/f:subject | f:MedicationRequest/f:subject | f:MedicationStatement/f:subject | f:NutritionOrder/f:patient | f:Observation/f:subject | f:Procedure/f:subject | f:RiskAssessment/f:subject | f:ServiceRequest/f:subject | f:SupplyDelivery/f:patient | f:VisionPrescription/f:patient", + "xpathUsage": "normal", + "target": [ "Patient", "Group" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-recorder", + "resource": { + "resourceType": "SearchParameter", + "id": "AllergyIntolerance-recorder", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-recorder", + "version": "4.0.1", + "name": "recorder", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Who recorded the sensitivity", + "code": "recorder", + "base": [ "AllergyIntolerance" ], + "type": "reference", + "expression": "AllergyIntolerance.recorder", + "xpath": "f:AllergyIntolerance/f:recorder", + "xpathUsage": "normal", + "target": [ "Practitioner", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-route", + "resource": { + "resourceType": "SearchParameter", + "id": "AllergyIntolerance-route", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-route", + "version": "4.0.1", + "name": "route", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "How the subject was exposed to the substance", + "code": "route", + "base": [ "AllergyIntolerance" ], + "type": "token", + "expression": "AllergyIntolerance.reaction.exposureRoute", + "xpath": "f:AllergyIntolerance/f:reaction/f:exposureRoute", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-severity", + "resource": { + "resourceType": "SearchParameter", + "id": "AllergyIntolerance-severity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-severity", + "version": "4.0.1", + "name": "severity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "mild | moderate | severe (of event as a whole)", + "code": "severity", + "base": [ "AllergyIntolerance" ], + "type": "token", + "expression": "AllergyIntolerance.reaction.severity", + "xpath": "f:AllergyIntolerance/f:reaction/f:severity", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/clinical-type", + "resource": { + "resourceType": "SearchParameter", + "id": "clinical-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/clinical-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)\r\n* [Composition](composition.html): Kind of composition (LOINC if possible)\r\n* [DocumentManifest](documentmanifest.html): Kind of document set\r\n* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)\r\n* [Encounter](encounter.html): Specific type of encounter\r\n* [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management\r\n", + "code": "type", + "base": [ "AllergyIntolerance", "Composition", "DocumentManifest", "DocumentReference", "Encounter", "EpisodeOfCare" ], + "type": "token", + "expression": "AllergyIntolerance.type | Composition.type | DocumentManifest.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type", + "xpath": "f:AllergyIntolerance/f:type | f:Composition/f:type | f:DocumentManifest/f:type | f:DocumentReference/f:type | f:Encounter/f:type | f:EpisodeOfCare/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-verification-status", + "resource": { + "resourceType": "SearchParameter", + "id": "AllergyIntolerance-verification-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AllergyIntolerance-verification-status", + "version": "4.0.1", + "name": "verification-status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "unconfirmed | confirmed | refuted | entered-in-error", + "code": "verification-status", + "base": [ "AllergyIntolerance" ], + "type": "token", + "expression": "AllergyIntolerance.verificationStatus", + "xpath": "f:AllergyIntolerance/f:verificationStatus", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-actor", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-actor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-actor", + "version": "4.0.1", + "name": "actor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Any one of the individuals participating in the appointment", + "code": "actor", + "base": [ "Appointment" ], + "type": "reference", + "expression": "Appointment.participant.actor", + "xpath": "f:Appointment/f:participant/f:actor", + "xpathUsage": "normal", + "target": [ "Practitioner", "Device", "Patient", "HealthcareService", "PractitionerRole", "RelatedPerson", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-appointment-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-appointment-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-appointment-type", + "version": "4.0.1", + "name": "appointment-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The style of appointment or patient that has been booked in the slot (not service type)", + "code": "appointment-type", + "base": [ "Appointment" ], + "type": "token", + "expression": "Appointment.appointmentType", + "xpath": "f:Appointment/f:appointmentType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-based-on", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-based-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-based-on", + "version": "4.0.1", + "name": "based-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The service request this appointment is allocated to assess", + "code": "based-on", + "base": [ "Appointment" ], + "type": "reference", + "expression": "Appointment.basedOn", + "xpath": "f:Appointment/f:basedOn", + "xpathUsage": "normal", + "target": [ "ServiceRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Appointment date/time.", + "code": "date", + "base": [ "Appointment" ], + "type": "date", + "expression": "Appointment.start", + "xpath": "f:Appointment/f:start", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "An Identifier of the Appointment", + "code": "identifier", + "base": [ "Appointment" ], + "type": "token", + "expression": "Appointment.identifier", + "xpath": "f:Appointment/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-location", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "This location is listed in the participants of the appointment", + "code": "location", + "base": [ "Appointment" ], + "type": "reference", + "expression": "Appointment.participant.actor.where(resolve() is Location)", + "xpath": "f:Appointment/f:participant/f:actor", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-part-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-part-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-part-status", + "version": "4.0.1", + "name": "part-status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.", + "code": "part-status", + "base": [ "Appointment" ], + "type": "token", + "expression": "Appointment.participant.status", + "xpath": "f:Appointment/f:participant/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "One of the individuals of the appointment is this patient", + "code": "patient", + "base": [ "Appointment" ], + "type": "reference", + "expression": "Appointment.participant.actor.where(resolve() is Patient)", + "xpath": "f:Appointment/f:participant/f:actor", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-practitioner", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-practitioner", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-practitioner", + "version": "4.0.1", + "name": "practitioner", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "One of the individuals of the appointment is this practitioner", + "code": "practitioner", + "base": [ "Appointment" ], + "type": "reference", + "expression": "Appointment.participant.actor.where(resolve() is Practitioner)", + "xpath": "f:Appointment/f:participant/f:actor", + "xpathUsage": "normal", + "target": [ "Practitioner" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-reason-code", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-reason-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-reason-code", + "version": "4.0.1", + "name": "reason-code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Coded reason this appointment is scheduled", + "code": "reason-code", + "base": [ "Appointment" ], + "type": "token", + "expression": "Appointment.reasonCode", + "xpath": "f:Appointment/f:reasonCode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-reason-reference", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-reason-reference", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-reason-reference", + "version": "4.0.1", + "name": "reason-reference", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Reason the appointment is to take place (resource)", + "code": "reason-reference", + "base": [ "Appointment" ], + "type": "reference", + "expression": "Appointment.reasonReference", + "xpath": "f:Appointment/f:reasonReference", + "xpathUsage": "normal", + "target": [ "Condition", "Observation", "Procedure", "ImmunizationRecommendation" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-service-category", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-service-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-service-category", + "version": "4.0.1", + "name": "service-category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A broad categorization of the service that is to be performed during this appointment", + "code": "service-category", + "base": [ "Appointment" ], + "type": "token", + "expression": "Appointment.serviceCategory", + "xpath": "f:Appointment/f:serviceCategory", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-service-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-service-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-service-type", + "version": "4.0.1", + "name": "service-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The specific service that is to be performed during this appointment", + "code": "service-type", + "base": [ "Appointment" ], + "type": "token", + "expression": "Appointment.serviceType", + "xpath": "f:Appointment/f:serviceType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-slot", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-slot", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-slot", + "version": "4.0.1", + "name": "slot", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The slots that this appointment is filling", + "code": "slot", + "base": [ "Appointment" ], + "type": "reference", + "expression": "Appointment.slot", + "xpath": "f:Appointment/f:slot", + "xpathUsage": "normal", + "target": [ "Slot" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-specialty", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-specialty", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-specialty", + "version": "4.0.1", + "name": "specialty", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The specialty of a practitioner that would be required to perform the service requested in this appointment", + "code": "specialty", + "base": [ "Appointment" ], + "type": "token", + "expression": "Appointment.specialty", + "xpath": "f:Appointment/f:specialty", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The overall status of the appointment", + "code": "status", + "base": [ "Appointment" ], + "type": "token", + "expression": "Appointment.status", + "xpath": "f:Appointment/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Appointment-supporting-info", + "resource": { + "resourceType": "SearchParameter", + "id": "Appointment-supporting-info", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Appointment-supporting-info", + "version": "4.0.1", + "name": "supporting-info", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Additional information to support the appointment", + "code": "supporting-info", + "base": [ "Appointment" ], + "type": "reference", + "expression": "Appointment.supportingInformation", + "xpath": "f:Appointment/f:supportingInformation", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-actor", + "resource": { + "resourceType": "SearchParameter", + "id": "AppointmentResponse-actor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-actor", + "version": "4.0.1", + "name": "actor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The Person, Location/HealthcareService or Device that this appointment response replies for", + "code": "actor", + "base": [ "AppointmentResponse" ], + "type": "reference", + "expression": "AppointmentResponse.actor", + "xpath": "f:AppointmentResponse/f:actor", + "xpathUsage": "normal", + "target": [ "Practitioner", "Device", "Patient", "HealthcareService", "PractitionerRole", "RelatedPerson", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-appointment", + "resource": { + "resourceType": "SearchParameter", + "id": "AppointmentResponse-appointment", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-appointment", + "version": "4.0.1", + "name": "appointment", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The appointment that the response is attached to", + "code": "appointment", + "base": [ "AppointmentResponse" ], + "type": "reference", + "expression": "AppointmentResponse.appointment", + "xpath": "f:AppointmentResponse/f:appointment", + "xpathUsage": "normal", + "target": [ "Appointment" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "AppointmentResponse-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "An Identifier in this appointment response", + "code": "identifier", + "base": [ "AppointmentResponse" ], + "type": "token", + "expression": "AppointmentResponse.identifier", + "xpath": "f:AppointmentResponse/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-location", + "resource": { + "resourceType": "SearchParameter", + "id": "AppointmentResponse-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "This Response is for this Location", + "code": "location", + "base": [ "AppointmentResponse" ], + "type": "reference", + "expression": "AppointmentResponse.actor.where(resolve() is Location)", + "xpath": "f:AppointmentResponse/f:actor", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-part-status", + "resource": { + "resourceType": "SearchParameter", + "id": "AppointmentResponse-part-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-part-status", + "version": "4.0.1", + "name": "part-status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The participants acceptance status for this appointment", + "code": "part-status", + "base": [ "AppointmentResponse" ], + "type": "token", + "expression": "AppointmentResponse.participantStatus", + "xpath": "f:AppointmentResponse/f:participantStatus", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "AppointmentResponse-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "This Response is for this Patient", + "code": "patient", + "base": [ "AppointmentResponse" ], + "type": "reference", + "expression": "AppointmentResponse.actor.where(resolve() is Patient)", + "xpath": "f:AppointmentResponse/f:actor", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-practitioner", + "resource": { + "resourceType": "SearchParameter", + "id": "AppointmentResponse-practitioner", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AppointmentResponse-practitioner", + "version": "4.0.1", + "name": "practitioner", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "This Response is for this Practitioner", + "code": "practitioner", + "base": [ "AppointmentResponse" ], + "type": "reference", + "expression": "AppointmentResponse.actor.where(resolve() is Practitioner)", + "xpath": "f:AppointmentResponse/f:actor", + "xpathUsage": "normal", + "target": [ "Practitioner" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-action", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-action", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-action", + "version": "4.0.1", + "name": "action", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Type of action performed during the event", + "code": "action", + "base": [ "AuditEvent" ], + "type": "token", + "expression": "AuditEvent.action", + "xpath": "f:AuditEvent/f:action", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-address", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-address", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-address", + "version": "4.0.1", + "name": "address", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Identifier for the network access point of the user device", + "code": "address", + "base": [ "AuditEvent" ], + "type": "string", + "expression": "AuditEvent.agent.network.address", + "xpath": "f:AuditEvent/f:agent/f:network/f:address", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-agent", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-agent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-agent", + "version": "4.0.1", + "name": "agent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Identifier of who", + "code": "agent", + "base": [ "AuditEvent" ], + "type": "reference", + "expression": "AuditEvent.agent.who", + "xpath": "f:AuditEvent/f:agent/f:who", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-agent-name", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-agent-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-agent-name", + "version": "4.0.1", + "name": "agent-name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Human friendly name for the agent", + "code": "agent-name", + "base": [ "AuditEvent" ], + "type": "string", + "expression": "AuditEvent.agent.name", + "xpath": "f:AuditEvent/f:agent/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-agent-role", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-agent-role", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-agent-role", + "version": "4.0.1", + "name": "agent-role", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Agent role in the event", + "code": "agent-role", + "base": [ "AuditEvent" ], + "type": "token", + "expression": "AuditEvent.agent.role", + "xpath": "f:AuditEvent/f:agent/f:role", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-altid", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-altid", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-altid", + "version": "4.0.1", + "name": "altid", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Alternative User identity", + "code": "altid", + "base": [ "AuditEvent" ], + "type": "token", + "expression": "AuditEvent.agent.altId", + "xpath": "f:AuditEvent/f:agent/f:altId", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-date", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Time when the event was recorded", + "code": "date", + "base": [ "AuditEvent" ], + "type": "date", + "expression": "AuditEvent.recorded", + "xpath": "f:AuditEvent/f:recorded", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-entity", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-entity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-entity", + "version": "4.0.1", + "name": "entity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Specific instance of resource", + "code": "entity", + "base": [ "AuditEvent" ], + "type": "reference", + "expression": "AuditEvent.entity.what", + "xpath": "f:AuditEvent/f:entity/f:what", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-entity-name", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-entity-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-entity-name", + "version": "4.0.1", + "name": "entity-name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Descriptor for entity", + "code": "entity-name", + "base": [ "AuditEvent" ], + "type": "string", + "expression": "AuditEvent.entity.name", + "xpath": "f:AuditEvent/f:entity/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-entity-role", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-entity-role", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-entity-role", + "version": "4.0.1", + "name": "entity-role", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "What role the entity played", + "code": "entity-role", + "base": [ "AuditEvent" ], + "type": "token", + "expression": "AuditEvent.entity.role", + "xpath": "f:AuditEvent/f:entity/f:role", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-entity-type", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-entity-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-entity-type", + "version": "4.0.1", + "name": "entity-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Type of entity involved", + "code": "entity-type", + "base": [ "AuditEvent" ], + "type": "token", + "expression": "AuditEvent.entity.type", + "xpath": "f:AuditEvent/f:entity/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-outcome", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-outcome", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-outcome", + "version": "4.0.1", + "name": "outcome", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Whether the event succeeded or failed", + "code": "outcome", + "base": [ "AuditEvent" ], + "type": "token", + "expression": "AuditEvent.outcome", + "xpath": "f:AuditEvent/f:outcome", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Identifier of who", + "code": "patient", + "base": [ "AuditEvent" ], + "type": "reference", + "expression": "AuditEvent.agent.who.where(resolve() is Patient) | AuditEvent.entity.what.where(resolve() is Patient)", + "xpath": "f:AuditEvent/f:agent/f:who | f:AuditEvent/f:entity/f:what", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-policy", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-policy", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-policy", + "version": "4.0.1", + "name": "policy", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Policy that authorized event", + "code": "policy", + "base": [ "AuditEvent" ], + "type": "uri", + "expression": "AuditEvent.agent.policy", + "xpath": "f:AuditEvent/f:agent/f:policy", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-site", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-site", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-site", + "version": "4.0.1", + "name": "site", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Logical source location within the enterprise", + "code": "site", + "base": [ "AuditEvent" ], + "type": "token", + "expression": "AuditEvent.source.site", + "xpath": "f:AuditEvent/f:source/f:site", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-source", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-source", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-source", + "version": "4.0.1", + "name": "source", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "The identity of source detecting the event", + "code": "source", + "base": [ "AuditEvent" ], + "type": "reference", + "expression": "AuditEvent.source.observer", + "xpath": "f:AuditEvent/f:source/f:observer", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-subtype", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-subtype", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-subtype", + "version": "4.0.1", + "name": "subtype", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "More specific type/id for the event", + "code": "subtype", + "base": [ "AuditEvent" ], + "type": "token", + "expression": "AuditEvent.subtype", + "xpath": "f:AuditEvent/f:subtype", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/AuditEvent-type", + "resource": { + "resourceType": "SearchParameter", + "id": "AuditEvent-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/AuditEvent-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Type/identifier of event", + "code": "type", + "base": [ "AuditEvent" ], + "type": "token", + "expression": "AuditEvent.type", + "xpath": "f:AuditEvent/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Basic-author", + "resource": { + "resourceType": "SearchParameter", + "id": "Basic-author", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Basic-author", + "version": "4.0.1", + "name": "author", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Who created", + "code": "author", + "base": [ "Basic" ], + "type": "reference", + "expression": "Basic.author", + "xpath": "f:Basic/f:author", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Basic-code", + "resource": { + "resourceType": "SearchParameter", + "id": "Basic-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Basic-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Kind of Resource", + "code": "code", + "base": [ "Basic" ], + "type": "token", + "expression": "Basic.code", + "xpath": "f:Basic/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Basic-created", + "resource": { + "resourceType": "SearchParameter", + "id": "Basic-created", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Basic-created", + "version": "4.0.1", + "name": "created", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "When created", + "code": "created", + "base": [ "Basic" ], + "type": "date", + "expression": "Basic.created", + "xpath": "f:Basic/f:created", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Basic-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Basic-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Basic-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Business identifier", + "code": "identifier", + "base": [ "Basic" ], + "type": "token", + "expression": "Basic.identifier", + "xpath": "f:Basic/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Basic-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Basic-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Basic-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Identifies the focus of this resource", + "code": "patient", + "base": [ "Basic" ], + "type": "reference", + "expression": "Basic.subject.where(resolve() is Patient)", + "xpath": "f:Basic/f:subject", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Basic-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Basic-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Basic-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Identifies the focus of this resource", + "code": "subject", + "base": [ "Basic" ], + "type": "reference", + "expression": "Basic.subject", + "xpath": "f:Basic/f:subject", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/BodyStructure-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "BodyStructure-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/BodyStructure-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Bodystructure identifier", + "code": "identifier", + "base": [ "BodyStructure" ], + "type": "token", + "expression": "BodyStructure.identifier", + "xpath": "f:BodyStructure/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/BodyStructure-location", + "resource": { + "resourceType": "SearchParameter", + "id": "BodyStructure-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/BodyStructure-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Body site", + "code": "location", + "base": [ "BodyStructure" ], + "type": "token", + "expression": "BodyStructure.location", + "xpath": "f:BodyStructure/f:location", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/BodyStructure-morphology", + "resource": { + "resourceType": "SearchParameter", + "id": "BodyStructure-morphology", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/BodyStructure-morphology", + "version": "4.0.1", + "name": "morphology", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Kind of Structure", + "code": "morphology", + "base": [ "BodyStructure" ], + "type": "token", + "expression": "BodyStructure.morphology", + "xpath": "f:BodyStructure/f:morphology", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/BodyStructure-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "BodyStructure-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/BodyStructure-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Who this is about", + "code": "patient", + "base": [ "BodyStructure" ], + "type": "reference", + "expression": "BodyStructure.patient", + "xpath": "f:BodyStructure/f:patient", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Bundle-composition", + "resource": { + "resourceType": "SearchParameter", + "id": "Bundle-composition", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Bundle-composition", + "version": "4.0.1", + "name": "composition", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The first resource in the bundle, if the bundle type is \"document\" - this is a composition, and this parameter provides access to search its contents", + "code": "composition", + "base": [ "Bundle" ], + "type": "reference", + "expression": "Bundle.entry[0].resource", + "xpath": "f:Bundle/f:entry[0]/f:resource", + "xpathUsage": "normal", + "target": [ "Composition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Bundle-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Bundle-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Bundle-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Persistent identifier for the bundle", + "code": "identifier", + "base": [ "Bundle" ], + "type": "token", + "expression": "Bundle.identifier", + "xpath": "f:Bundle/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Bundle-message", + "resource": { + "resourceType": "SearchParameter", + "id": "Bundle-message", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Bundle-message", + "version": "4.0.1", + "name": "message", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The first resource in the bundle, if the bundle type is \"message\" - this is a message header, and this parameter provides access to search its contents", + "code": "message", + "base": [ "Bundle" ], + "type": "reference", + "expression": "Bundle.entry[0].resource", + "xpath": "f:Bundle/f:entry[0]/f:resource", + "xpathUsage": "normal", + "target": [ "MessageHeader" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Bundle-timestamp", + "resource": { + "resourceType": "SearchParameter", + "id": "Bundle-timestamp", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Bundle-timestamp", + "version": "4.0.1", + "name": "timestamp", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "When the bundle was assembled", + "code": "timestamp", + "base": [ "Bundle" ], + "type": "date", + "expression": "Bundle.timestamp", + "xpath": "f:Bundle/f:timestamp", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Bundle-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Bundle-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Bundle-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection", + "code": "type", + "base": [ "Bundle" ], + "type": "token", + "expression": "Bundle.type", + "xpath": "f:Bundle/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-context", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement\r\n* [CodeSystem](codesystem.html): A use context assigned to the code system\r\n* [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition\r\n* [ConceptMap](conceptmap.html): A use context assigned to the concept map\r\n* [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition\r\n* [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide\r\n* [MessageDefinition](messagedefinition.html): A use context assigned to the message definition\r\n* [NamingSystem](namingsystem.html): A use context assigned to the naming system\r\n* [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition\r\n* [SearchParameter](searchparameter.html): A use context assigned to the search parameter\r\n* [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition\r\n* [StructureMap](structuremap.html): A use context assigned to the structure map\r\n* [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities\r\n* [ValueSet](valueset.html): A use context assigned to the value set\r\n", + "code": "context", + "base": [ "CapabilityStatement", "CodeSystem", "CompartmentDefinition", "ConceptMap", "GraphDefinition", "ImplementationGuide", "MessageDefinition", "NamingSystem", "OperationDefinition", "SearchParameter", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "token", + "expression": "(CapabilityStatement.useContext.value as CodeableConcept) | (CodeSystem.useContext.value as CodeableConcept) | (CompartmentDefinition.useContext.value as CodeableConcept) | (ConceptMap.useContext.value as CodeableConcept) | (GraphDefinition.useContext.value as CodeableConcept) | (ImplementationGuide.useContext.value as CodeableConcept) | (MessageDefinition.useContext.value as CodeableConcept) | (NamingSystem.useContext.value as CodeableConcept) | (OperationDefinition.useContext.value as CodeableConcept) | (SearchParameter.useContext.value as CodeableConcept) | (StructureDefinition.useContext.value as CodeableConcept) | (StructureMap.useContext.value as CodeableConcept) | (TerminologyCapabilities.useContext.value as CodeableConcept) | (ValueSet.useContext.value as CodeableConcept)", + "xpath": "f:CapabilityStatement/f:useContext/f:valueCodeableConcept | f:CodeSystem/f:useContext/f:valueCodeableConcept | f:CompartmentDefinition/f:useContext/f:valueCodeableConcept | f:ConceptMap/f:useContext/f:valueCodeableConcept | f:GraphDefinition/f:useContext/f:valueCodeableConcept | f:ImplementationGuide/f:useContext/f:valueCodeableConcept | f:MessageDefinition/f:useContext/f:valueCodeableConcept | f:NamingSystem/f:useContext/f:valueCodeableConcept | f:OperationDefinition/f:useContext/f:valueCodeableConcept | f:SearchParameter/f:useContext/f:valueCodeableConcept | f:StructureDefinition/f:useContext/f:valueCodeableConcept | f:StructureMap/f:useContext/f:valueCodeableConcept | f:TerminologyCapabilities/f:useContext/f:valueCodeableConcept | f:ValueSet/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement\r\n* [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system\r\n* [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition\r\n* [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map\r\n* [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition\r\n* [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide\r\n* [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition\r\n* [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system\r\n* [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition\r\n* [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter\r\n* [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition\r\n* [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map\r\n* [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities\r\n* [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set\r\n", + "code": "context-quantity", + "base": [ "CapabilityStatement", "CodeSystem", "CompartmentDefinition", "ConceptMap", "GraphDefinition", "ImplementationGuide", "MessageDefinition", "NamingSystem", "OperationDefinition", "SearchParameter", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "quantity", + "expression": "(CapabilityStatement.useContext.value as Quantity) | (CapabilityStatement.useContext.value as Range) | (CodeSystem.useContext.value as Quantity) | (CodeSystem.useContext.value as Range) | (CompartmentDefinition.useContext.value as Quantity) | (CompartmentDefinition.useContext.value as Range) | (ConceptMap.useContext.value as Quantity) | (ConceptMap.useContext.value as Range) | (GraphDefinition.useContext.value as Quantity) | (GraphDefinition.useContext.value as Range) | (ImplementationGuide.useContext.value as Quantity) | (ImplementationGuide.useContext.value as Range) | (MessageDefinition.useContext.value as Quantity) | (MessageDefinition.useContext.value as Range) | (NamingSystem.useContext.value as Quantity) | (NamingSystem.useContext.value as Range) | (OperationDefinition.useContext.value as Quantity) | (OperationDefinition.useContext.value as Range) | (SearchParameter.useContext.value as Quantity) | (SearchParameter.useContext.value as Range) | (StructureDefinition.useContext.value as Quantity) | (StructureDefinition.useContext.value as Range) | (StructureMap.useContext.value as Quantity) | (StructureMap.useContext.value as Range) | (TerminologyCapabilities.useContext.value as Quantity) | (TerminologyCapabilities.useContext.value as Range) | (ValueSet.useContext.value as Quantity) | (ValueSet.useContext.value as Range)", + "xpath": "f:CapabilityStatement/f:useContext/f:valueQuantity | f:CapabilityStatement/f:useContext/f:valueRange | f:CodeSystem/f:useContext/f:valueQuantity | f:CodeSystem/f:useContext/f:valueRange | f:CompartmentDefinition/f:useContext/f:valueQuantity | f:CompartmentDefinition/f:useContext/f:valueRange | f:ConceptMap/f:useContext/f:valueQuantity | f:ConceptMap/f:useContext/f:valueRange | f:GraphDefinition/f:useContext/f:valueQuantity | f:GraphDefinition/f:useContext/f:valueRange | f:ImplementationGuide/f:useContext/f:valueQuantity | f:ImplementationGuide/f:useContext/f:valueRange | f:MessageDefinition/f:useContext/f:valueQuantity | f:MessageDefinition/f:useContext/f:valueRange | f:NamingSystem/f:useContext/f:valueQuantity | f:NamingSystem/f:useContext/f:valueRange | f:OperationDefinition/f:useContext/f:valueQuantity | f:OperationDefinition/f:useContext/f:valueRange | f:SearchParameter/f:useContext/f:valueQuantity | f:SearchParameter/f:useContext/f:valueRange | f:StructureDefinition/f:useContext/f:valueQuantity | f:StructureDefinition/f:useContext/f:valueRange | f:StructureMap/f:useContext/f:valueQuantity | f:StructureMap/f:useContext/f:valueRange | f:TerminologyCapabilities/f:useContext/f:valueQuantity | f:TerminologyCapabilities/f:useContext/f:valueRange | f:ValueSet/f:useContext/f:valueQuantity | f:ValueSet/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement\r\n* [CodeSystem](codesystem.html): A type of use context assigned to the code system\r\n* [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition\r\n* [ConceptMap](conceptmap.html): A type of use context assigned to the concept map\r\n* [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition\r\n* [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide\r\n* [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition\r\n* [NamingSystem](namingsystem.html): A type of use context assigned to the naming system\r\n* [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition\r\n* [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter\r\n* [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition\r\n* [StructureMap](structuremap.html): A type of use context assigned to the structure map\r\n* [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities\r\n* [ValueSet](valueset.html): A type of use context assigned to the value set\r\n", + "code": "context-type", + "base": [ "CapabilityStatement", "CodeSystem", "CompartmentDefinition", "ConceptMap", "GraphDefinition", "ImplementationGuide", "MessageDefinition", "NamingSystem", "OperationDefinition", "SearchParameter", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "token", + "expression": "CapabilityStatement.useContext.code | CodeSystem.useContext.code | CompartmentDefinition.useContext.code | ConceptMap.useContext.code | GraphDefinition.useContext.code | ImplementationGuide.useContext.code | MessageDefinition.useContext.code | NamingSystem.useContext.code | OperationDefinition.useContext.code | SearchParameter.useContext.code | StructureDefinition.useContext.code | StructureMap.useContext.code | TerminologyCapabilities.useContext.code | ValueSet.useContext.code", + "xpath": "f:CapabilityStatement/f:useContext/f:code | f:CodeSystem/f:useContext/f:code | f:CompartmentDefinition/f:useContext/f:code | f:ConceptMap/f:useContext/f:code | f:GraphDefinition/f:useContext/f:code | f:ImplementationGuide/f:useContext/f:code | f:MessageDefinition/f:useContext/f:code | f:NamingSystem/f:useContext/f:code | f:OperationDefinition/f:useContext/f:code | f:SearchParameter/f:useContext/f:code | f:StructureDefinition/f:useContext/f:code | f:StructureMap/f:useContext/f:code | f:TerminologyCapabilities/f:useContext/f:code | f:ValueSet/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-date", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): The capability statement publication date\r\n* [CodeSystem](codesystem.html): The code system publication date\r\n* [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date\r\n* [ConceptMap](conceptmap.html): The concept map publication date\r\n* [GraphDefinition](graphdefinition.html): The graph definition publication date\r\n* [ImplementationGuide](implementationguide.html): The implementation guide publication date\r\n* [MessageDefinition](messagedefinition.html): The message definition publication date\r\n* [NamingSystem](namingsystem.html): The naming system publication date\r\n* [OperationDefinition](operationdefinition.html): The operation definition publication date\r\n* [SearchParameter](searchparameter.html): The search parameter publication date\r\n* [StructureDefinition](structuredefinition.html): The structure definition publication date\r\n* [StructureMap](structuremap.html): The structure map publication date\r\n* [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date\r\n* [ValueSet](valueset.html): The value set publication date\r\n", + "code": "date", + "base": [ "CapabilityStatement", "CodeSystem", "CompartmentDefinition", "ConceptMap", "GraphDefinition", "ImplementationGuide", "MessageDefinition", "NamingSystem", "OperationDefinition", "SearchParameter", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "date", + "expression": "CapabilityStatement.date | CodeSystem.date | CompartmentDefinition.date | ConceptMap.date | GraphDefinition.date | ImplementationGuide.date | MessageDefinition.date | NamingSystem.date | OperationDefinition.date | SearchParameter.date | StructureDefinition.date | StructureMap.date | TerminologyCapabilities.date | ValueSet.date", + "xpath": "f:CapabilityStatement/f:date | f:CodeSystem/f:date | f:CompartmentDefinition/f:date | f:ConceptMap/f:date | f:GraphDefinition/f:date | f:ImplementationGuide/f:date | f:MessageDefinition/f:date | f:NamingSystem/f:date | f:OperationDefinition/f:date | f:SearchParameter/f:date | f:StructureDefinition/f:date | f:StructureMap/f:date | f:TerminologyCapabilities/f:date | f:ValueSet/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-description", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): The description of the capability statement\r\n* [CodeSystem](codesystem.html): The description of the code system\r\n* [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition\r\n* [ConceptMap](conceptmap.html): The description of the concept map\r\n* [GraphDefinition](graphdefinition.html): The description of the graph definition\r\n* [ImplementationGuide](implementationguide.html): The description of the implementation guide\r\n* [MessageDefinition](messagedefinition.html): The description of the message definition\r\n* [NamingSystem](namingsystem.html): The description of the naming system\r\n* [OperationDefinition](operationdefinition.html): The description of the operation definition\r\n* [SearchParameter](searchparameter.html): The description of the search parameter\r\n* [StructureDefinition](structuredefinition.html): The description of the structure definition\r\n* [StructureMap](structuremap.html): The description of the structure map\r\n* [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities\r\n* [ValueSet](valueset.html): The description of the value set\r\n", + "code": "description", + "base": [ "CapabilityStatement", "CodeSystem", "CompartmentDefinition", "ConceptMap", "GraphDefinition", "ImplementationGuide", "MessageDefinition", "NamingSystem", "OperationDefinition", "SearchParameter", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "string", + "expression": "CapabilityStatement.description | CodeSystem.description | CompartmentDefinition.description | ConceptMap.description | GraphDefinition.description | ImplementationGuide.description | MessageDefinition.description | NamingSystem.description | OperationDefinition.description | SearchParameter.description | StructureDefinition.description | StructureMap.description | TerminologyCapabilities.description | ValueSet.description", + "xpath": "f:CapabilityStatement/f:description | f:CodeSystem/f:description | f:CompartmentDefinition/f:description | f:ConceptMap/f:description | f:GraphDefinition/f:description | f:ImplementationGuide/f:description | f:MessageDefinition/f:description | f:NamingSystem/f:description | f:OperationDefinition/f:description | f:SearchParameter/f:description | f:StructureDefinition/f:description | f:StructureMap/f:description | f:TerminologyCapabilities/f:description | f:ValueSet/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-fhirversion", + "resource": { + "resourceType": "SearchParameter", + "id": "CapabilityStatement-fhirversion", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-fhirversion", + "version": "4.0.1", + "name": "fhirversion", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The version of FHIR", + "code": "fhirversion", + "base": [ "CapabilityStatement" ], + "type": "token", + "expression": "CapabilityStatement.version", + "xpath": "f:CapabilityStatement/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-format", + "resource": { + "resourceType": "SearchParameter", + "id": "CapabilityStatement-format", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-format", + "version": "4.0.1", + "name": "format", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "formats supported (xml | json | ttl | mime type)", + "code": "format", + "base": [ "CapabilityStatement" ], + "type": "token", + "expression": "CapabilityStatement.format", + "xpath": "f:CapabilityStatement/f:format", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-guide", + "resource": { + "resourceType": "SearchParameter", + "id": "CapabilityStatement-guide", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-guide", + "version": "4.0.1", + "name": "guide", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Implementation guides supported", + "code": "guide", + "base": [ "CapabilityStatement" ], + "type": "reference", + "expression": "CapabilityStatement.implementationGuide", + "xpath": "f:CapabilityStatement/f:implementationGuide", + "xpathUsage": "normal", + "target": [ "ImplementationGuide" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement\r\n* [CodeSystem](codesystem.html): Intended jurisdiction for the code system\r\n* [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map\r\n* [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition\r\n* [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide\r\n* [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition\r\n* [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system\r\n* [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition\r\n* [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter\r\n* [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition\r\n* [StructureMap](structuremap.html): Intended jurisdiction for the structure map\r\n* [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities\r\n* [ValueSet](valueset.html): Intended jurisdiction for the value set\r\n", + "code": "jurisdiction", + "base": [ "CapabilityStatement", "CodeSystem", "ConceptMap", "GraphDefinition", "ImplementationGuide", "MessageDefinition", "NamingSystem", "OperationDefinition", "SearchParameter", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "token", + "expression": "CapabilityStatement.jurisdiction | CodeSystem.jurisdiction | ConceptMap.jurisdiction | GraphDefinition.jurisdiction | ImplementationGuide.jurisdiction | MessageDefinition.jurisdiction | NamingSystem.jurisdiction | OperationDefinition.jurisdiction | SearchParameter.jurisdiction | StructureDefinition.jurisdiction | StructureMap.jurisdiction | TerminologyCapabilities.jurisdiction | ValueSet.jurisdiction", + "xpath": "f:CapabilityStatement/f:jurisdiction | f:CodeSystem/f:jurisdiction | f:ConceptMap/f:jurisdiction | f:GraphDefinition/f:jurisdiction | f:ImplementationGuide/f:jurisdiction | f:MessageDefinition/f:jurisdiction | f:NamingSystem/f:jurisdiction | f:OperationDefinition/f:jurisdiction | f:SearchParameter/f:jurisdiction | f:StructureDefinition/f:jurisdiction | f:StructureMap/f:jurisdiction | f:TerminologyCapabilities/f:jurisdiction | f:ValueSet/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-mode", + "resource": { + "resourceType": "SearchParameter", + "id": "CapabilityStatement-mode", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-mode", + "version": "4.0.1", + "name": "mode", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Mode - restful (server/client) or messaging (sender/receiver)", + "code": "mode", + "base": [ "CapabilityStatement" ], + "type": "token", + "expression": "CapabilityStatement.rest.mode", + "xpath": "f:CapabilityStatement/f:rest/f:mode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-name", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement\r\n* [CodeSystem](codesystem.html): Computationally friendly name of the code system\r\n* [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition\r\n* [ConceptMap](conceptmap.html): Computationally friendly name of the concept map\r\n* [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition\r\n* [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide\r\n* [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition\r\n* [NamingSystem](namingsystem.html): Computationally friendly name of the naming system\r\n* [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition\r\n* [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter\r\n* [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition\r\n* [StructureMap](structuremap.html): Computationally friendly name of the structure map\r\n* [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities\r\n* [ValueSet](valueset.html): Computationally friendly name of the value set\r\n", + "code": "name", + "base": [ "CapabilityStatement", "CodeSystem", "CompartmentDefinition", "ConceptMap", "GraphDefinition", "ImplementationGuide", "MessageDefinition", "NamingSystem", "OperationDefinition", "SearchParameter", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "string", + "expression": "CapabilityStatement.name | CodeSystem.name | CompartmentDefinition.name | ConceptMap.name | GraphDefinition.name | ImplementationGuide.name | MessageDefinition.name | NamingSystem.name | OperationDefinition.name | SearchParameter.name | StructureDefinition.name | StructureMap.name | TerminologyCapabilities.name | ValueSet.name", + "xpath": "f:CapabilityStatement/f:name | f:CodeSystem/f:name | f:CompartmentDefinition/f:name | f:ConceptMap/f:name | f:GraphDefinition/f:name | f:ImplementationGuide/f:name | f:MessageDefinition/f:name | f:NamingSystem/f:name | f:OperationDefinition/f:name | f:SearchParameter/f:name | f:StructureDefinition/f:name | f:StructureMap/f:name | f:TerminologyCapabilities/f:name | f:ValueSet/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement\r\n* [CodeSystem](codesystem.html): Name of the publisher of the code system\r\n* [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition\r\n* [ConceptMap](conceptmap.html): Name of the publisher of the concept map\r\n* [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition\r\n* [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide\r\n* [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition\r\n* [NamingSystem](namingsystem.html): Name of the publisher of the naming system\r\n* [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition\r\n* [SearchParameter](searchparameter.html): Name of the publisher of the search parameter\r\n* [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition\r\n* [StructureMap](structuremap.html): Name of the publisher of the structure map\r\n* [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities\r\n* [ValueSet](valueset.html): Name of the publisher of the value set\r\n", + "code": "publisher", + "base": [ "CapabilityStatement", "CodeSystem", "CompartmentDefinition", "ConceptMap", "GraphDefinition", "ImplementationGuide", "MessageDefinition", "NamingSystem", "OperationDefinition", "SearchParameter", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "string", + "expression": "CapabilityStatement.publisher | CodeSystem.publisher | CompartmentDefinition.publisher | ConceptMap.publisher | GraphDefinition.publisher | ImplementationGuide.publisher | MessageDefinition.publisher | NamingSystem.publisher | OperationDefinition.publisher | SearchParameter.publisher | StructureDefinition.publisher | StructureMap.publisher | TerminologyCapabilities.publisher | ValueSet.publisher", + "xpath": "f:CapabilityStatement/f:publisher | f:CodeSystem/f:publisher | f:CompartmentDefinition/f:publisher | f:ConceptMap/f:publisher | f:GraphDefinition/f:publisher | f:ImplementationGuide/f:publisher | f:MessageDefinition/f:publisher | f:NamingSystem/f:publisher | f:OperationDefinition/f:publisher | f:SearchParameter/f:publisher | f:StructureDefinition/f:publisher | f:StructureMap/f:publisher | f:TerminologyCapabilities/f:publisher | f:ValueSet/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-resource", + "resource": { + "resourceType": "SearchParameter", + "id": "CapabilityStatement-resource", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-resource", + "version": "4.0.1", + "name": "resource", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Name of a resource mentioned in a capability statement", + "code": "resource", + "base": [ "CapabilityStatement" ], + "type": "token", + "expression": "CapabilityStatement.rest.resource.type", + "xpath": "f:CapabilityStatement/f:rest/f:resource/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-resource-profile", + "resource": { + "resourceType": "SearchParameter", + "id": "CapabilityStatement-resource-profile", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-resource-profile", + "version": "4.0.1", + "name": "resource-profile", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A profile id invoked in a capability statement", + "code": "resource-profile", + "base": [ "CapabilityStatement" ], + "type": "reference", + "expression": "CapabilityStatement.rest.resource.profile", + "xpath": "f:CapabilityStatement/f:rest/f:resource/f:profile", + "xpathUsage": "normal", + "target": [ "StructureDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-security-service", + "resource": { + "resourceType": "SearchParameter", + "id": "CapabilityStatement-security-service", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-security-service", + "version": "4.0.1", + "name": "security-service", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates", + "code": "security-service", + "base": [ "CapabilityStatement" ], + "type": "token", + "expression": "CapabilityStatement.rest.security.service", + "xpath": "f:CapabilityStatement/f:rest/f:security/f:service", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-software", + "resource": { + "resourceType": "SearchParameter", + "id": "CapabilityStatement-software", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-software", + "version": "4.0.1", + "name": "software", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Part of the name of a software application", + "code": "software", + "base": [ "CapabilityStatement" ], + "type": "string", + "expression": "CapabilityStatement.software.name", + "xpath": "f:CapabilityStatement/f:software/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-status", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): The current status of the capability statement\r\n* [CodeSystem](codesystem.html): The current status of the code system\r\n* [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition\r\n* [ConceptMap](conceptmap.html): The current status of the concept map\r\n* [GraphDefinition](graphdefinition.html): The current status of the graph definition\r\n* [ImplementationGuide](implementationguide.html): The current status of the implementation guide\r\n* [MessageDefinition](messagedefinition.html): The current status of the message definition\r\n* [NamingSystem](namingsystem.html): The current status of the naming system\r\n* [OperationDefinition](operationdefinition.html): The current status of the operation definition\r\n* [SearchParameter](searchparameter.html): The current status of the search parameter\r\n* [StructureDefinition](structuredefinition.html): The current status of the structure definition\r\n* [StructureMap](structuremap.html): The current status of the structure map\r\n* [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities\r\n* [ValueSet](valueset.html): The current status of the value set\r\n", + "code": "status", + "base": [ "CapabilityStatement", "CodeSystem", "CompartmentDefinition", "ConceptMap", "GraphDefinition", "ImplementationGuide", "MessageDefinition", "NamingSystem", "OperationDefinition", "SearchParameter", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "token", + "expression": "CapabilityStatement.status | CodeSystem.status | CompartmentDefinition.status | ConceptMap.status | GraphDefinition.status | ImplementationGuide.status | MessageDefinition.status | NamingSystem.status | OperationDefinition.status | SearchParameter.status | StructureDefinition.status | StructureMap.status | TerminologyCapabilities.status | ValueSet.status", + "xpath": "f:CapabilityStatement/f:status | f:CodeSystem/f:status | f:CompartmentDefinition/f:status | f:ConceptMap/f:status | f:GraphDefinition/f:status | f:ImplementationGuide/f:status | f:MessageDefinition/f:status | f:NamingSystem/f:status | f:OperationDefinition/f:status | f:SearchParameter/f:status | f:StructureDefinition/f:status | f:StructureMap/f:status | f:TerminologyCapabilities/f:status | f:ValueSet/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-supported-profile", + "resource": { + "resourceType": "SearchParameter", + "id": "CapabilityStatement-supported-profile", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CapabilityStatement-supported-profile", + "version": "4.0.1", + "name": "supported-profile", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Profiles for use cases supported", + "code": "supported-profile", + "base": [ "CapabilityStatement" ], + "type": "reference", + "expression": "CapabilityStatement.rest.resource.supportedProfile", + "xpath": "f:CapabilityStatement/f:rest/f:resource/f:supportedProfile", + "xpathUsage": "normal", + "target": [ "StructureDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-title", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement\r\n* [CodeSystem](codesystem.html): The human-friendly name of the code system\r\n* [ConceptMap](conceptmap.html): The human-friendly name of the concept map\r\n* [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide\r\n* [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition\r\n* [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition\r\n* [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition\r\n* [StructureMap](structuremap.html): The human-friendly name of the structure map\r\n* [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities\r\n* [ValueSet](valueset.html): The human-friendly name of the value set\r\n", + "code": "title", + "base": [ "CapabilityStatement", "CodeSystem", "ConceptMap", "ImplementationGuide", "MessageDefinition", "OperationDefinition", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "string", + "expression": "CapabilityStatement.title | CodeSystem.title | ConceptMap.title | ImplementationGuide.title | MessageDefinition.title | OperationDefinition.title | StructureDefinition.title | StructureMap.title | TerminologyCapabilities.title | ValueSet.title", + "xpath": "f:CapabilityStatement/f:title | f:CodeSystem/f:title | f:ConceptMap/f:title | f:ImplementationGuide/f:title | f:MessageDefinition/f:title | f:OperationDefinition/f:title | f:StructureDefinition/f:title | f:StructureMap/f:title | f:TerminologyCapabilities/f:title | f:ValueSet/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-url", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement\r\n* [CodeSystem](codesystem.html): The uri that identifies the code system\r\n* [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition\r\n* [ConceptMap](conceptmap.html): The uri that identifies the concept map\r\n* [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition\r\n* [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide\r\n* [MessageDefinition](messagedefinition.html): The uri that identifies the message definition\r\n* [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition\r\n* [SearchParameter](searchparameter.html): The uri that identifies the search parameter\r\n* [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition\r\n* [StructureMap](structuremap.html): The uri that identifies the structure map\r\n* [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities\r\n* [ValueSet](valueset.html): The uri that identifies the value set\r\n", + "code": "url", + "base": [ "CapabilityStatement", "CodeSystem", "CompartmentDefinition", "ConceptMap", "GraphDefinition", "ImplementationGuide", "MessageDefinition", "OperationDefinition", "SearchParameter", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "uri", + "expression": "CapabilityStatement.url | CodeSystem.url | CompartmentDefinition.url | ConceptMap.url | GraphDefinition.url | ImplementationGuide.url | MessageDefinition.url | OperationDefinition.url | SearchParameter.url | StructureDefinition.url | StructureMap.url | TerminologyCapabilities.url | ValueSet.url", + "xpath": "f:CapabilityStatement/f:url | f:CodeSystem/f:url | f:CompartmentDefinition/f:url | f:ConceptMap/f:url | f:GraphDefinition/f:url | f:ImplementationGuide/f:url | f:MessageDefinition/f:url | f:OperationDefinition/f:url | f:SearchParameter/f:url | f:StructureDefinition/f:url | f:StructureMap/f:url | f:TerminologyCapabilities/f:url | f:ValueSet/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-version", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): The business version of the capability statement\r\n* [CodeSystem](codesystem.html): The business version of the code system\r\n* [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition\r\n* [ConceptMap](conceptmap.html): The business version of the concept map\r\n* [GraphDefinition](graphdefinition.html): The business version of the graph definition\r\n* [ImplementationGuide](implementationguide.html): The business version of the implementation guide\r\n* [MessageDefinition](messagedefinition.html): The business version of the message definition\r\n* [OperationDefinition](operationdefinition.html): The business version of the operation definition\r\n* [SearchParameter](searchparameter.html): The business version of the search parameter\r\n* [StructureDefinition](structuredefinition.html): The business version of the structure definition\r\n* [StructureMap](structuremap.html): The business version of the structure map\r\n* [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities\r\n* [ValueSet](valueset.html): The business version of the value set\r\n", + "code": "version", + "base": [ "CapabilityStatement", "CodeSystem", "CompartmentDefinition", "ConceptMap", "GraphDefinition", "ImplementationGuide", "MessageDefinition", "OperationDefinition", "SearchParameter", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "token", + "expression": "CapabilityStatement.version | CodeSystem.version | CompartmentDefinition.version | ConceptMap.version | GraphDefinition.version | ImplementationGuide.version | MessageDefinition.version | OperationDefinition.version | SearchParameter.version | StructureDefinition.version | StructureMap.version | TerminologyCapabilities.version | ValueSet.version", + "xpath": "f:CapabilityStatement/f:version | f:CodeSystem/f:version | f:CompartmentDefinition/f:version | f:ConceptMap/f:version | f:GraphDefinition/f:version | f:ImplementationGuide/f:version | f:MessageDefinition/f:version | f:OperationDefinition/f:version | f:SearchParameter/f:version | f:StructureDefinition/f:version | f:StructureMap/f:version | f:TerminologyCapabilities/f:version | f:ValueSet/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement\r\n* [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system\r\n* [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition\r\n* [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map\r\n* [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition\r\n* [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide\r\n* [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition\r\n* [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system\r\n* [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition\r\n* [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter\r\n* [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition\r\n* [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map\r\n* [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities\r\n* [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set\r\n", + "code": "context-type-quantity", + "base": [ "CapabilityStatement", "CodeSystem", "CompartmentDefinition", "ConceptMap", "GraphDefinition", "ImplementationGuide", "MessageDefinition", "NamingSystem", "OperationDefinition", "SearchParameter", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "composite", + "expression": "CapabilityStatement.useContext | CodeSystem.useContext | CompartmentDefinition.useContext | ConceptMap.useContext | GraphDefinition.useContext | ImplementationGuide.useContext | MessageDefinition.useContext | NamingSystem.useContext | OperationDefinition.useContext | SearchParameter.useContext | StructureDefinition.useContext | StructureMap.useContext | TerminologyCapabilities.useContext | ValueSet.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/conformance-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/conformance-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement\r\n* [CodeSystem](codesystem.html): A use context type and value assigned to the code system\r\n* [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition\r\n* [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map\r\n* [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition\r\n* [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide\r\n* [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition\r\n* [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system\r\n* [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition\r\n* [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter\r\n* [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition\r\n* [StructureMap](structuremap.html): A use context type and value assigned to the structure map\r\n* [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities\r\n* [ValueSet](valueset.html): A use context type and value assigned to the value set\r\n", + "code": "context-type-value", + "base": [ "CapabilityStatement", "CodeSystem", "CompartmentDefinition", "ConceptMap", "GraphDefinition", "ImplementationGuide", "MessageDefinition", "NamingSystem", "OperationDefinition", "SearchParameter", "StructureDefinition", "StructureMap", "TerminologyCapabilities", "ValueSet" ], + "type": "composite", + "expression": "CapabilityStatement.useContext | CodeSystem.useContext | CompartmentDefinition.useContext | ConceptMap.useContext | GraphDefinition.useContext | ImplementationGuide.useContext | MessageDefinition.useContext | NamingSystem.useContext | OperationDefinition.useContext | SearchParameter.useContext | StructureDefinition.useContext | StructureMap.useContext | TerminologyCapabilities.useContext | ValueSet.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/conformance-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/conformance-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-activity-code", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-activity-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-activity-code", + "version": "4.0.1", + "name": "activity-code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Detail type of activity", + "code": "activity-code", + "base": [ "CarePlan" ], + "type": "token", + "expression": "CarePlan.activity.detail.code", + "xpath": "f:CarePlan/f:activity/f:detail/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-activity-date", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-activity-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-activity-date", + "version": "4.0.1", + "name": "activity-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Specified date occurs within period specified by CarePlan.activity.detail.scheduled[x]", + "code": "activity-date", + "base": [ "CarePlan" ], + "type": "date", + "expression": "CarePlan.activity.detail.scheduled", + "xpath": "f:CarePlan/f:activity/f:detail/f:scheduledTiming | f:CarePlan/f:activity/f:detail/f:scheduledPeriod | f:CarePlan/f:activity/f:detail/f:scheduledString", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-activity-reference", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-activity-reference", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-activity-reference", + "version": "4.0.1", + "name": "activity-reference", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Activity details defined in specific resource", + "code": "activity-reference", + "base": [ "CarePlan" ], + "type": "reference", + "expression": "CarePlan.activity.reference", + "xpath": "f:CarePlan/f:activity/f:reference", + "xpathUsage": "normal", + "target": [ "Appointment", "MedicationRequest", "Task", "NutritionOrder", "RequestGroup", "VisionPrescription", "DeviceRequest", "ServiceRequest", "CommunicationRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-based-on", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-based-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-based-on", + "version": "4.0.1", + "name": "based-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Fulfills CarePlan", + "code": "based-on", + "base": [ "CarePlan" ], + "type": "reference", + "expression": "CarePlan.basedOn", + "xpath": "f:CarePlan/f:basedOn", + "xpathUsage": "normal", + "target": [ "CarePlan" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-care-team", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-care-team", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-care-team", + "version": "4.0.1", + "name": "care-team", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Who's involved in plan?", + "code": "care-team", + "base": [ "CarePlan" ], + "type": "reference", + "expression": "CarePlan.careTeam", + "xpath": "f:CarePlan/f:careTeam", + "xpathUsage": "normal", + "target": [ "CareTeam" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-category", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Type of plan", + "code": "category", + "base": [ "CarePlan" ], + "type": "token", + "expression": "CarePlan.category", + "xpath": "f:CarePlan/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-condition", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-condition", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-condition", + "version": "4.0.1", + "name": "condition", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Health issues this plan addresses", + "code": "condition", + "base": [ "CarePlan" ], + "type": "reference", + "expression": "CarePlan.addresses", + "xpath": "f:CarePlan/f:addresses", + "xpathUsage": "normal", + "target": [ "Condition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Encounter created as part of", + "code": "encounter", + "base": [ "CarePlan" ], + "type": "reference", + "expression": "CarePlan.encounter", + "xpath": "f:CarePlan/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-goal", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-goal", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-goal", + "version": "4.0.1", + "name": "goal", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Desired outcome of plan", + "code": "goal", + "base": [ "CarePlan" ], + "type": "reference", + "expression": "CarePlan.goal", + "xpath": "f:CarePlan/f:goal", + "xpathUsage": "normal", + "target": [ "Goal" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-instantiates-canonical", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-instantiates-canonical", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-instantiates-canonical", + "version": "4.0.1", + "name": "instantiates-canonical", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Instantiates FHIR protocol or definition", + "code": "instantiates-canonical", + "base": [ "CarePlan" ], + "type": "reference", + "expression": "CarePlan.instantiatesCanonical", + "xpath": "f:CarePlan/f:instantiatesCanonical", + "xpathUsage": "normal", + "target": [ "Questionnaire", "Measure", "PlanDefinition", "OperationDefinition", "ActivityDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-instantiates-uri", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-instantiates-uri", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-instantiates-uri", + "version": "4.0.1", + "name": "instantiates-uri", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Instantiates external protocol or definition", + "code": "instantiates-uri", + "base": [ "CarePlan" ], + "type": "uri", + "expression": "CarePlan.instantiatesUri", + "xpath": "f:CarePlan/f:instantiatesUri", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-intent", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-intent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-intent", + "version": "4.0.1", + "name": "intent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "proposal | plan | order | option", + "code": "intent", + "base": [ "CarePlan" ], + "type": "token", + "expression": "CarePlan.intent", + "xpath": "f:CarePlan/f:intent", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-part-of", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-part-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-part-of", + "version": "4.0.1", + "name": "part-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Part of referenced CarePlan", + "code": "part-of", + "base": [ "CarePlan" ], + "type": "reference", + "expression": "CarePlan.partOf", + "xpath": "f:CarePlan/f:partOf", + "xpathUsage": "normal", + "target": [ "CarePlan" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-performer", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-performer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-performer", + "version": "4.0.1", + "name": "performer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Matches if the practitioner is listed as a performer in any of the \"simple\" activities. (For performers of the detailed activities, chain through the activitydetail search parameter.)", + "code": "performer", + "base": [ "CarePlan" ], + "type": "reference", + "expression": "CarePlan.activity.detail.performer", + "xpath": "f:CarePlan/f:activity/f:detail/f:performer", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "CareTeam", "Device", "Patient", "HealthcareService", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-replaces", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-replaces", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-replaces", + "version": "4.0.1", + "name": "replaces", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "CarePlan replaced by this CarePlan", + "code": "replaces", + "base": [ "CarePlan" ], + "type": "reference", + "expression": "CarePlan.replaces", + "xpath": "f:CarePlan/f:replaces", + "xpathUsage": "normal", + "target": [ "CarePlan" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-status", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "draft | active | on-hold | revoked | completed | entered-in-error | unknown", + "code": "status", + "base": [ "CarePlan" ], + "type": "token", + "expression": "CarePlan.status", + "xpath": "f:CarePlan/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CarePlan-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "CarePlan-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CarePlan-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Who the care plan is for", + "code": "subject", + "base": [ "CarePlan" ], + "type": "reference", + "expression": "CarePlan.subject", + "xpath": "f:CarePlan/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CareTeam-category", + "resource": { + "resourceType": "SearchParameter", + "id": "CareTeam-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CareTeam-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Type of team", + "code": "category", + "base": [ "CareTeam" ], + "type": "token", + "expression": "CareTeam.category", + "xpath": "f:CareTeam/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CareTeam-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "CareTeam-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CareTeam-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Encounter created as part of", + "code": "encounter", + "base": [ "CareTeam" ], + "type": "reference", + "expression": "CareTeam.encounter", + "xpath": "f:CareTeam/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CareTeam-participant", + "resource": { + "resourceType": "SearchParameter", + "id": "CareTeam-participant", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CareTeam-participant", + "version": "4.0.1", + "name": "participant", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Who is involved", + "code": "participant", + "base": [ "CareTeam" ], + "type": "reference", + "expression": "CareTeam.participant.member", + "xpath": "f:CareTeam/f:participant/f:member", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "CareTeam", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CareTeam-status", + "resource": { + "resourceType": "SearchParameter", + "id": "CareTeam-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CareTeam-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "proposed | active | suspended | inactive | entered-in-error", + "code": "status", + "base": [ "CareTeam" ], + "type": "token", + "expression": "CareTeam.status", + "xpath": "f:CareTeam/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CareTeam-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "CareTeam-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CareTeam-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Who care team is for", + "code": "subject", + "base": [ "CareTeam" ], + "type": "reference", + "expression": "CareTeam.subject", + "xpath": "f:CareTeam/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-account", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-account", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-account", + "version": "4.0.1", + "name": "account", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Account to place this charge", + "code": "account", + "base": [ "ChargeItem" ], + "type": "reference", + "expression": "ChargeItem.account", + "xpath": "f:ChargeItem/f:account", + "xpathUsage": "normal", + "target": [ "Account" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-code", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A code that identifies the charge, like a billing code", + "code": "code", + "base": [ "ChargeItem" ], + "type": "token", + "expression": "ChargeItem.code", + "xpath": "f:ChargeItem/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-context", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Encounter / Episode associated with event", + "code": "context", + "base": [ "ChargeItem" ], + "type": "reference", + "expression": "ChargeItem.context", + "xpath": "f:ChargeItem/f:context", + "xpathUsage": "normal", + "target": [ "EpisodeOfCare", "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-entered-date", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-entered-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-entered-date", + "version": "4.0.1", + "name": "entered-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Date the charge item was entered", + "code": "entered-date", + "base": [ "ChargeItem" ], + "type": "date", + "expression": "ChargeItem.enteredDate", + "xpath": "f:ChargeItem/f:enteredDate", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-enterer", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-enterer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-enterer", + "version": "4.0.1", + "name": "enterer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Individual who was entering", + "code": "enterer", + "base": [ "ChargeItem" ], + "type": "reference", + "expression": "ChargeItem.enterer", + "xpath": "f:ChargeItem/f:enterer", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-factor-override", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-factor-override", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-factor-override", + "version": "4.0.1", + "name": "factor-override", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Factor overriding the associated rules", + "code": "factor-override", + "base": [ "ChargeItem" ], + "type": "number", + "expression": "ChargeItem.factorOverride", + "xpath": "f:ChargeItem/f:factorOverride", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Business Identifier for item", + "code": "identifier", + "base": [ "ChargeItem" ], + "type": "token", + "expression": "ChargeItem.identifier", + "xpath": "f:ChargeItem/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-occurrence", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-occurrence", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-occurrence", + "version": "4.0.1", + "name": "occurrence", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "When the charged service was applied", + "code": "occurrence", + "base": [ "ChargeItem" ], + "type": "date", + "expression": "ChargeItem.occurrence", + "xpath": "f:ChargeItem/f:occurrenceDateTime | f:ChargeItem/f:occurrencePeriod | f:ChargeItem/f:occurrenceTiming", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Individual service was done for/to", + "code": "patient", + "base": [ "ChargeItem" ], + "type": "reference", + "expression": "ChargeItem.subject.where(resolve() is Patient)", + "xpath": "f:ChargeItem/f:subject", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-performer-actor", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-performer-actor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-performer-actor", + "version": "4.0.1", + "name": "performer-actor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Individual who was performing", + "code": "performer-actor", + "base": [ "ChargeItem" ], + "type": "reference", + "expression": "ChargeItem.performer.actor", + "xpath": "f:ChargeItem/f:performer/f:actor", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "CareTeam", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-performer-function", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-performer-function", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-performer-function", + "version": "4.0.1", + "name": "performer-function", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "What type of performance was done", + "code": "performer-function", + "base": [ "ChargeItem" ], + "type": "token", + "expression": "ChargeItem.performer.function", + "xpath": "f:ChargeItem/f:performer/f:function", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-performing-organization", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-performing-organization", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-performing-organization", + "version": "4.0.1", + "name": "performing-organization", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Organization providing the charged service", + "code": "performing-organization", + "base": [ "ChargeItem" ], + "type": "reference", + "expression": "ChargeItem.performingOrganization", + "xpath": "f:ChargeItem/f:performingOrganization", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-price-override", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-price-override", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-price-override", + "version": "4.0.1", + "name": "price-override", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Price overriding the associated rules", + "code": "price-override", + "base": [ "ChargeItem" ], + "type": "quantity", + "expression": "ChargeItem.priceOverride", + "xpath": "f:ChargeItem/f:priceOverride", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-quantity", + "version": "4.0.1", + "name": "quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Quantity of which the charge item has been serviced", + "code": "quantity", + "base": [ "ChargeItem" ], + "type": "quantity", + "expression": "ChargeItem.quantity", + "xpath": "f:ChargeItem/f:quantity", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-requesting-organization", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-requesting-organization", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-requesting-organization", + "version": "4.0.1", + "name": "requesting-organization", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Organization requesting the charged service", + "code": "requesting-organization", + "base": [ "ChargeItem" ], + "type": "reference", + "expression": "ChargeItem.requestingOrganization", + "xpath": "f:ChargeItem/f:requestingOrganization", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-service", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-service", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-service", + "version": "4.0.1", + "name": "service", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Which rendered service is being charged?", + "code": "service", + "base": [ "ChargeItem" ], + "type": "reference", + "expression": "ChargeItem.service", + "xpath": "f:ChargeItem/f:service", + "xpathUsage": "normal", + "target": [ "Immunization", "MedicationDispense", "SupplyDelivery", "Observation", "DiagnosticReport", "ImagingStudy", "MedicationAdministration", "Procedure" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItem-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItem-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItem-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Individual service was done for/to", + "code": "subject", + "base": [ "ChargeItem" ], + "type": "reference", + "expression": "ChargeItem.subject", + "xpath": "f:ChargeItem/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A use context assigned to the charge item definition", + "code": "context", + "base": [ "ChargeItemDefinition" ], + "type": "token", + "expression": "(ChargeItemDefinition.useContext.value as CodeableConcept)", + "xpath": "f:ChargeItemDefinition/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the charge item definition", + "code": "context-quantity", + "base": [ "ChargeItemDefinition" ], + "type": "quantity", + "expression": "(ChargeItemDefinition.useContext.value as Quantity) | (ChargeItemDefinition.useContext.value as Range)", + "xpath": "f:ChargeItemDefinition/f:useContext/f:valueQuantity | f:ChargeItemDefinition/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the charge item definition", + "code": "context-type", + "base": [ "ChargeItemDefinition" ], + "type": "token", + "expression": "ChargeItemDefinition.useContext.code", + "xpath": "f:ChargeItemDefinition/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-date", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The charge item definition publication date", + "code": "date", + "base": [ "ChargeItemDefinition" ], + "type": "date", + "expression": "ChargeItemDefinition.date", + "xpath": "f:ChargeItemDefinition/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-description", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The description of the charge item definition", + "code": "description", + "base": [ "ChargeItemDefinition" ], + "type": "string", + "expression": "ChargeItemDefinition.description", + "xpath": "f:ChargeItemDefinition/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The time during which the charge item definition is intended to be in use", + "code": "effective", + "base": [ "ChargeItemDefinition" ], + "type": "date", + "expression": "ChargeItemDefinition.effectivePeriod", + "xpath": "f:ChargeItemDefinition/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "External identifier for the charge item definition", + "code": "identifier", + "base": [ "ChargeItemDefinition" ], + "type": "token", + "expression": "ChargeItemDefinition.identifier", + "xpath": "f:ChargeItemDefinition/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the charge item definition", + "code": "jurisdiction", + "base": [ "ChargeItemDefinition" ], + "type": "token", + "expression": "ChargeItemDefinition.jurisdiction", + "xpath": "f:ChargeItemDefinition/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Name of the publisher of the charge item definition", + "code": "publisher", + "base": [ "ChargeItemDefinition" ], + "type": "string", + "expression": "ChargeItemDefinition.publisher", + "xpath": "f:ChargeItemDefinition/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The current status of the charge item definition", + "code": "status", + "base": [ "ChargeItemDefinition" ], + "type": "token", + "expression": "ChargeItemDefinition.status", + "xpath": "f:ChargeItemDefinition/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-title", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The human-friendly name of the charge item definition", + "code": "title", + "base": [ "ChargeItemDefinition" ], + "type": "string", + "expression": "ChargeItemDefinition.title", + "xpath": "f:ChargeItemDefinition/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-url", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The uri that identifies the charge item definition", + "code": "url", + "base": [ "ChargeItemDefinition" ], + "type": "uri", + "expression": "ChargeItemDefinition.url", + "xpath": "f:ChargeItemDefinition/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-version", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The business version of the charge item definition", + "code": "version", + "base": [ "ChargeItemDefinition" ], + "type": "token", + "expression": "ChargeItemDefinition.version", + "xpath": "f:ChargeItemDefinition/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the charge item definition", + "code": "context-type-quantity", + "base": [ "ChargeItemDefinition" ], + "type": "composite", + "expression": "ChargeItemDefinition.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "ChargeItemDefinition-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the charge item definition", + "code": "context-type-value", + "base": [ "ChargeItemDefinition" ], + "type": "composite", + "expression": "ChargeItemDefinition.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-care-team", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-care-team", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-care-team", + "version": "4.0.1", + "name": "care-team", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Member of the CareTeam", + "code": "care-team", + "base": [ "Claim" ], + "type": "reference", + "expression": "Claim.careTeam.provider", + "xpath": "f:Claim/f:careTeam/f:provider", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-created", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-created", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-created", + "version": "4.0.1", + "name": "created", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The creation date for the Claim", + "code": "created", + "base": [ "Claim" ], + "type": "date", + "expression": "Claim.created", + "xpath": "f:Claim/f:created", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-detail-udi", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-detail-udi", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-detail-udi", + "version": "4.0.1", + "name": "detail-udi", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "UDI associated with a line item, detail product or service", + "code": "detail-udi", + "base": [ "Claim" ], + "type": "reference", + "expression": "Claim.item.detail.udi", + "xpath": "f:Claim/f:item/f:detail/f:udi", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Encounters associated with a billed line item", + "code": "encounter", + "base": [ "Claim" ], + "type": "reference", + "expression": "Claim.item.encounter", + "xpath": "f:Claim/f:item/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-enterer", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-enterer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-enterer", + "version": "4.0.1", + "name": "enterer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The party responsible for the entry of the Claim", + "code": "enterer", + "base": [ "Claim" ], + "type": "reference", + "expression": "Claim.enterer", + "xpath": "f:Claim/f:enterer", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-facility", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-facility", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-facility", + "version": "4.0.1", + "name": "facility", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Facility where the products or services have been or will be provided", + "code": "facility", + "base": [ "Claim" ], + "type": "reference", + "expression": "Claim.facility", + "xpath": "f:Claim/f:facility", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The primary identifier of the financial resource", + "code": "identifier", + "base": [ "Claim" ], + "type": "token", + "expression": "Claim.identifier", + "xpath": "f:Claim/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-insurer", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-insurer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-insurer", + "version": "4.0.1", + "name": "insurer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The target payor/insurer for the Claim", + "code": "insurer", + "base": [ "Claim" ], + "type": "reference", + "expression": "Claim.insurer", + "xpath": "f:Claim/f:insurer", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-item-udi", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-item-udi", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-item-udi", + "version": "4.0.1", + "name": "item-udi", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "UDI associated with a line item product or service", + "code": "item-udi", + "base": [ "Claim" ], + "type": "reference", + "expression": "Claim.item.udi", + "xpath": "f:Claim/f:item/f:udi", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Patient receiving the products or services", + "code": "patient", + "base": [ "Claim" ], + "type": "reference", + "expression": "Claim.patient", + "xpath": "f:Claim/f:patient", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-payee", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-payee", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-payee", + "version": "4.0.1", + "name": "payee", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The party receiving any payment for the Claim", + "code": "payee", + "base": [ "Claim" ], + "type": "reference", + "expression": "Claim.payee.party", + "xpath": "f:Claim/f:payee/f:party", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-priority", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-priority", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-priority", + "version": "4.0.1", + "name": "priority", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Processing priority requested", + "code": "priority", + "base": [ "Claim" ], + "type": "token", + "expression": "Claim.priority", + "xpath": "f:Claim/f:priority", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-procedure-udi", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-procedure-udi", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-procedure-udi", + "version": "4.0.1", + "name": "procedure-udi", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "UDI associated with a procedure", + "code": "procedure-udi", + "base": [ "Claim" ], + "type": "reference", + "expression": "Claim.procedure.udi", + "xpath": "f:Claim/f:procedure/f:udi", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-provider", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-provider", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-provider", + "version": "4.0.1", + "name": "provider", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Provider responsible for the Claim", + "code": "provider", + "base": [ "Claim" ], + "type": "reference", + "expression": "Claim.provider", + "xpath": "f:Claim/f:provider", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The status of the Claim instance.", + "code": "status", + "base": [ "Claim" ], + "type": "token", + "expression": "Claim.status", + "xpath": "f:Claim/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-subdetail-udi", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-subdetail-udi", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-subdetail-udi", + "version": "4.0.1", + "name": "subdetail-udi", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "UDI associated with a line item, detail, subdetail product or service", + "code": "subdetail-udi", + "base": [ "Claim" ], + "type": "reference", + "expression": "Claim.item.detail.subDetail.udi", + "xpath": "f:Claim/f:item/f:detail/f:subDetail/f:udi", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Claim-use", + "resource": { + "resourceType": "SearchParameter", + "id": "Claim-use", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Claim-use", + "version": "4.0.1", + "name": "use", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The kind of financial resource", + "code": "use", + "base": [ "Claim" ], + "type": "token", + "expression": "Claim.use", + "xpath": "f:Claim/f:use", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClaimResponse-created", + "resource": { + "resourceType": "SearchParameter", + "id": "ClaimResponse-created", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClaimResponse-created", + "version": "4.0.1", + "name": "created", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The creation date", + "code": "created", + "base": [ "ClaimResponse" ], + "type": "date", + "expression": "ClaimResponse.created", + "xpath": "f:ClaimResponse/f:created", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClaimResponse-disposition", + "resource": { + "resourceType": "SearchParameter", + "id": "ClaimResponse-disposition", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClaimResponse-disposition", + "version": "4.0.1", + "name": "disposition", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The contents of the disposition message", + "code": "disposition", + "base": [ "ClaimResponse" ], + "type": "string", + "expression": "ClaimResponse.disposition", + "xpath": "f:ClaimResponse/f:disposition", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClaimResponse-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "ClaimResponse-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClaimResponse-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The identity of the ClaimResponse", + "code": "identifier", + "base": [ "ClaimResponse" ], + "type": "token", + "expression": "ClaimResponse.identifier", + "xpath": "f:ClaimResponse/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClaimResponse-insurer", + "resource": { + "resourceType": "SearchParameter", + "id": "ClaimResponse-insurer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClaimResponse-insurer", + "version": "4.0.1", + "name": "insurer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The organization which generated this resource", + "code": "insurer", + "base": [ "ClaimResponse" ], + "type": "reference", + "expression": "ClaimResponse.insurer", + "xpath": "f:ClaimResponse/f:insurer", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClaimResponse-outcome", + "resource": { + "resourceType": "SearchParameter", + "id": "ClaimResponse-outcome", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClaimResponse-outcome", + "version": "4.0.1", + "name": "outcome", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The processing outcome", + "code": "outcome", + "base": [ "ClaimResponse" ], + "type": "token", + "expression": "ClaimResponse.outcome", + "xpath": "f:ClaimResponse/f:outcome", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClaimResponse-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "ClaimResponse-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClaimResponse-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The subject of care", + "code": "patient", + "base": [ "ClaimResponse" ], + "type": "reference", + "expression": "ClaimResponse.patient", + "xpath": "f:ClaimResponse/f:patient", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClaimResponse-payment-date", + "resource": { + "resourceType": "SearchParameter", + "id": "ClaimResponse-payment-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClaimResponse-payment-date", + "version": "4.0.1", + "name": "payment-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The expected payment date", + "code": "payment-date", + "base": [ "ClaimResponse" ], + "type": "date", + "expression": "ClaimResponse.payment.date", + "xpath": "f:ClaimResponse/f:payment/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClaimResponse-request", + "resource": { + "resourceType": "SearchParameter", + "id": "ClaimResponse-request", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClaimResponse-request", + "version": "4.0.1", + "name": "request", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The claim reference", + "code": "request", + "base": [ "ClaimResponse" ], + "type": "reference", + "expression": "ClaimResponse.request", + "xpath": "f:ClaimResponse/f:request", + "xpathUsage": "normal", + "target": [ "Claim" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClaimResponse-requestor", + "resource": { + "resourceType": "SearchParameter", + "id": "ClaimResponse-requestor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClaimResponse-requestor", + "version": "4.0.1", + "name": "requestor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The Provider of the claim", + "code": "requestor", + "base": [ "ClaimResponse" ], + "type": "reference", + "expression": "ClaimResponse.requestor", + "xpath": "f:ClaimResponse/f:requestor", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClaimResponse-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ClaimResponse-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClaimResponse-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The status of the ClaimResponse", + "code": "status", + "base": [ "ClaimResponse" ], + "type": "token", + "expression": "ClaimResponse.status", + "xpath": "f:ClaimResponse/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClaimResponse-use", + "resource": { + "resourceType": "SearchParameter", + "id": "ClaimResponse-use", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClaimResponse-use", + "version": "4.0.1", + "name": "use", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The type of claim", + "code": "use", + "base": [ "ClaimResponse" ], + "type": "token", + "expression": "ClaimResponse.use", + "xpath": "f:ClaimResponse/f:use", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-assessor", + "resource": { + "resourceType": "SearchParameter", + "id": "ClinicalImpression-assessor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-assessor", + "version": "4.0.1", + "name": "assessor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "The clinician performing the assessment", + "code": "assessor", + "base": [ "ClinicalImpression" ], + "type": "reference", + "expression": "ClinicalImpression.assessor", + "xpath": "f:ClinicalImpression/f:assessor", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "ClinicalImpression-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Encounter created as part of", + "code": "encounter", + "base": [ "ClinicalImpression" ], + "type": "reference", + "expression": "ClinicalImpression.encounter", + "xpath": "f:ClinicalImpression/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-finding-code", + "resource": { + "resourceType": "SearchParameter", + "id": "ClinicalImpression-finding-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-finding-code", + "version": "4.0.1", + "name": "finding-code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "What was found", + "code": "finding-code", + "base": [ "ClinicalImpression" ], + "type": "token", + "expression": "ClinicalImpression.finding.itemCodeableConcept", + "xpath": "f:ClinicalImpression/f:finding/f:itemCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-finding-ref", + "resource": { + "resourceType": "SearchParameter", + "id": "ClinicalImpression-finding-ref", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-finding-ref", + "version": "4.0.1", + "name": "finding-ref", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "What was found", + "code": "finding-ref", + "base": [ "ClinicalImpression" ], + "type": "reference", + "expression": "ClinicalImpression.finding.itemReference", + "xpath": "f:ClinicalImpression/f:finding/f:itemReference", + "xpathUsage": "normal", + "target": [ "Condition", "Observation", "Media" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "ClinicalImpression-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Business identifier", + "code": "identifier", + "base": [ "ClinicalImpression" ], + "type": "token", + "expression": "ClinicalImpression.identifier", + "xpath": "f:ClinicalImpression/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-investigation", + "resource": { + "resourceType": "SearchParameter", + "id": "ClinicalImpression-investigation", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-investigation", + "version": "4.0.1", + "name": "investigation", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Record of a specific investigation", + "code": "investigation", + "base": [ "ClinicalImpression" ], + "type": "reference", + "expression": "ClinicalImpression.investigation.item", + "xpath": "f:ClinicalImpression/f:investigation/f:item", + "xpathUsage": "normal", + "target": [ "RiskAssessment", "FamilyMemberHistory", "Observation", "Media", "DiagnosticReport", "ImagingStudy", "QuestionnaireResponse" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-previous", + "resource": { + "resourceType": "SearchParameter", + "id": "ClinicalImpression-previous", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-previous", + "version": "4.0.1", + "name": "previous", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Reference to last assessment", + "code": "previous", + "base": [ "ClinicalImpression" ], + "type": "reference", + "expression": "ClinicalImpression.previous", + "xpath": "f:ClinicalImpression/f:previous", + "xpathUsage": "normal", + "target": [ "ClinicalImpression" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-problem", + "resource": { + "resourceType": "SearchParameter", + "id": "ClinicalImpression-problem", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-problem", + "version": "4.0.1", + "name": "problem", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Relevant impressions of patient state", + "code": "problem", + "base": [ "ClinicalImpression" ], + "type": "reference", + "expression": "ClinicalImpression.problem", + "xpath": "f:ClinicalImpression/f:problem", + "xpathUsage": "normal", + "target": [ "Condition", "AllergyIntolerance" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ClinicalImpression-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "in-progress | completed | entered-in-error", + "code": "status", + "base": [ "ClinicalImpression" ], + "type": "token", + "expression": "ClinicalImpression.status", + "xpath": "f:ClinicalImpression/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "ClinicalImpression-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Patient or group assessed", + "code": "subject", + "base": [ "ClinicalImpression" ], + "type": "reference", + "expression": "ClinicalImpression.subject", + "xpath": "f:ClinicalImpression/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-supporting-info", + "resource": { + "resourceType": "SearchParameter", + "id": "ClinicalImpression-supporting-info", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ClinicalImpression-supporting-info", + "version": "4.0.1", + "name": "supporting-info", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Information supporting the clinical impression", + "code": "supporting-info", + "base": [ "ClinicalImpression" ], + "type": "reference", + "expression": "ClinicalImpression.supportingInfo", + "xpath": "f:ClinicalImpression/f:supportingInfo", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CodeSystem-code", + "resource": { + "resourceType": "SearchParameter", + "id": "CodeSystem-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CodeSystem-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "A code defined in the code system", + "code": "code", + "base": [ "CodeSystem" ], + "type": "token", + "expression": "CodeSystem.concept.code", + "xpath": "f:CodeSystem/f:concept/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CodeSystem-content-mode", + "resource": { + "resourceType": "SearchParameter", + "id": "CodeSystem-content-mode", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CodeSystem-content-mode", + "version": "4.0.1", + "name": "content-mode", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "not-present | example | fragment | complete | supplement", + "code": "content-mode", + "base": [ "CodeSystem" ], + "type": "token", + "expression": "CodeSystem.content", + "xpath": "f:CodeSystem/f:content", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/conformance-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "conformance-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/conformance-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [CodeSystem](codesystem.html): External identifier for the code system\r\n* [ConceptMap](conceptmap.html): External identifier for the concept map\r\n* [MessageDefinition](messagedefinition.html): External identifier for the message definition\r\n* [StructureDefinition](structuredefinition.html): External identifier for the structure definition\r\n* [StructureMap](structuremap.html): External identifier for the structure map\r\n* [ValueSet](valueset.html): External identifier for the value set\r\n", + "code": "identifier", + "base": [ "CodeSystem", "ConceptMap", "MessageDefinition", "StructureDefinition", "StructureMap", "ValueSet" ], + "type": "token", + "expression": "CodeSystem.identifier | ConceptMap.identifier | MessageDefinition.identifier | StructureDefinition.identifier | StructureMap.identifier | ValueSet.identifier", + "xpath": "f:CodeSystem/f:identifier | f:ConceptMap/f:identifier | f:MessageDefinition/f:identifier | f:StructureDefinition/f:identifier | f:StructureMap/f:identifier | f:ValueSet/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CodeSystem-language", + "resource": { + "resourceType": "SearchParameter", + "id": "CodeSystem-language", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CodeSystem-language", + "version": "4.0.1", + "name": "language", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "A language in which a designation is provided", + "code": "language", + "base": [ "CodeSystem" ], + "type": "token", + "expression": "CodeSystem.concept.designation.language", + "xpath": "f:CodeSystem/f:concept/f:designation/f:language", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CodeSystem-supplements", + "resource": { + "resourceType": "SearchParameter", + "id": "CodeSystem-supplements", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CodeSystem-supplements", + "version": "4.0.1", + "name": "supplements", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "Find code system supplements for the referenced code system", + "code": "supplements", + "base": [ "CodeSystem" ], + "type": "reference", + "expression": "CodeSystem.supplements", + "xpath": "f:CodeSystem/f:supplements", + "xpathUsage": "normal", + "target": [ "CodeSystem" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CodeSystem-system", + "resource": { + "resourceType": "SearchParameter", + "id": "CodeSystem-system", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CodeSystem-system", + "version": "4.0.1", + "name": "system", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "The system for any codes defined by this code system (same as 'url')", + "code": "system", + "base": [ "CodeSystem" ], + "type": "uri", + "expression": "CodeSystem.url", + "xpath": "f:CodeSystem/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-based-on", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-based-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-based-on", + "version": "4.0.1", + "name": "based-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Request fulfilled by this communication", + "code": "based-on", + "base": [ "Communication" ], + "type": "reference", + "expression": "Communication.basedOn", + "xpath": "f:Communication/f:basedOn", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-category", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Message category", + "code": "category", + "base": [ "Communication" ], + "type": "token", + "expression": "Communication.category", + "xpath": "f:Communication/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Encounter created as part of", + "code": "encounter", + "base": [ "Communication" ], + "type": "reference", + "expression": "Communication.encounter", + "xpath": "f:Communication/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Unique identifier", + "code": "identifier", + "base": [ "Communication" ], + "type": "token", + "expression": "Communication.identifier", + "xpath": "f:Communication/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-instantiates-canonical", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-instantiates-canonical", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-instantiates-canonical", + "version": "4.0.1", + "name": "instantiates-canonical", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Instantiates FHIR protocol or definition", + "code": "instantiates-canonical", + "base": [ "Communication" ], + "type": "reference", + "expression": "Communication.instantiatesCanonical", + "xpath": "f:Communication/f:instantiatesCanonical", + "xpathUsage": "normal", + "target": [ "Questionnaire", "Measure", "PlanDefinition", "OperationDefinition", "ActivityDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-instantiates-uri", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-instantiates-uri", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-instantiates-uri", + "version": "4.0.1", + "name": "instantiates-uri", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Instantiates external protocol or definition", + "code": "instantiates-uri", + "base": [ "Communication" ], + "type": "uri", + "expression": "Communication.instantiatesUri", + "xpath": "f:Communication/f:instantiatesUri", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-medium", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-medium", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-medium", + "version": "4.0.1", + "name": "medium", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "A channel of communication", + "code": "medium", + "base": [ "Communication" ], + "type": "token", + "expression": "Communication.medium", + "xpath": "f:Communication/f:medium", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-part-of", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-part-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-part-of", + "version": "4.0.1", + "name": "part-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Part of this action", + "code": "part-of", + "base": [ "Communication" ], + "type": "reference", + "expression": "Communication.partOf", + "xpath": "f:Communication/f:partOf", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Focus of message", + "code": "patient", + "base": [ "Communication" ], + "type": "reference", + "expression": "Communication.subject.where(resolve() is Patient)", + "xpath": "f:Communication/f:subject", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-received", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-received", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-received", + "version": "4.0.1", + "name": "received", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "When received", + "code": "received", + "base": [ "Communication" ], + "type": "date", + "expression": "Communication.received", + "xpath": "f:Communication/f:received", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-recipient", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-recipient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-recipient", + "version": "4.0.1", + "name": "recipient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Message recipient", + "code": "recipient", + "base": [ "Communication" ], + "type": "reference", + "expression": "Communication.recipient", + "xpath": "f:Communication/f:recipient", + "xpathUsage": "normal", + "target": [ "Practitioner", "Group", "Organization", "CareTeam", "Device", "Patient", "HealthcareService", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-sender", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-sender", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-sender", + "version": "4.0.1", + "name": "sender", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Message sender", + "code": "sender", + "base": [ "Communication" ], + "type": "reference", + "expression": "Communication.sender", + "xpath": "f:Communication/f:sender", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "HealthcareService", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-sent", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-sent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-sent", + "version": "4.0.1", + "name": "sent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "When sent", + "code": "sent", + "base": [ "Communication" ], + "type": "date", + "expression": "Communication.sent", + "xpath": "f:Communication/f:sent", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown", + "code": "status", + "base": [ "Communication" ], + "type": "token", + "expression": "Communication.status", + "xpath": "f:Communication/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Communication-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Communication-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Communication-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Focus of message", + "code": "subject", + "base": [ "Communication" ], + "type": "reference", + "expression": "Communication.subject", + "xpath": "f:Communication/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-authored", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-authored", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-authored", + "version": "4.0.1", + "name": "authored", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "When request transitioned to being actionable", + "code": "authored", + "base": [ "CommunicationRequest" ], + "type": "date", + "expression": "CommunicationRequest.authoredOn", + "xpath": "f:CommunicationRequest/f:authoredOn", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-based-on", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-based-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-based-on", + "version": "4.0.1", + "name": "based-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Fulfills plan or proposal", + "code": "based-on", + "base": [ "CommunicationRequest" ], + "type": "reference", + "expression": "CommunicationRequest.basedOn", + "xpath": "f:CommunicationRequest/f:basedOn", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-category", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Message category", + "code": "category", + "base": [ "CommunicationRequest" ], + "type": "token", + "expression": "CommunicationRequest.category", + "xpath": "f:CommunicationRequest/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Encounter created as part of", + "code": "encounter", + "base": [ "CommunicationRequest" ], + "type": "reference", + "expression": "CommunicationRequest.encounter", + "xpath": "f:CommunicationRequest/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-group-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-group-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-group-identifier", + "version": "4.0.1", + "name": "group-identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Composite request this is part of", + "code": "group-identifier", + "base": [ "CommunicationRequest" ], + "type": "token", + "expression": "CommunicationRequest.groupIdentifier", + "xpath": "f:CommunicationRequest/f:groupIdentifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Unique identifier", + "code": "identifier", + "base": [ "CommunicationRequest" ], + "type": "token", + "expression": "CommunicationRequest.identifier", + "xpath": "f:CommunicationRequest/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-medium", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-medium", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-medium", + "version": "4.0.1", + "name": "medium", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "A channel of communication", + "code": "medium", + "base": [ "CommunicationRequest" ], + "type": "token", + "expression": "CommunicationRequest.medium", + "xpath": "f:CommunicationRequest/f:medium", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-occurrence", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-occurrence", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-occurrence", + "version": "4.0.1", + "name": "occurrence", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "When scheduled", + "code": "occurrence", + "base": [ "CommunicationRequest" ], + "type": "date", + "expression": "(CommunicationRequest.occurrence as dateTime)", + "xpath": "f:CommunicationRequest/f:occurrenceDateTime", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Focus of message", + "code": "patient", + "base": [ "CommunicationRequest" ], + "type": "reference", + "expression": "CommunicationRequest.subject.where(resolve() is Patient)", + "xpath": "f:CommunicationRequest/f:subject", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-priority", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-priority", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-priority", + "version": "4.0.1", + "name": "priority", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "routine | urgent | asap | stat", + "code": "priority", + "base": [ "CommunicationRequest" ], + "type": "token", + "expression": "CommunicationRequest.priority", + "xpath": "f:CommunicationRequest/f:priority", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-recipient", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-recipient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-recipient", + "version": "4.0.1", + "name": "recipient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Message recipient", + "code": "recipient", + "base": [ "CommunicationRequest" ], + "type": "reference", + "expression": "CommunicationRequest.recipient", + "xpath": "f:CommunicationRequest/f:recipient", + "xpathUsage": "normal", + "target": [ "Practitioner", "Group", "Organization", "CareTeam", "Device", "Patient", "HealthcareService", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-replaces", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-replaces", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-replaces", + "version": "4.0.1", + "name": "replaces", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Request(s) replaced by this request", + "code": "replaces", + "base": [ "CommunicationRequest" ], + "type": "reference", + "expression": "CommunicationRequest.replaces", + "xpath": "f:CommunicationRequest/f:replaces", + "xpathUsage": "normal", + "target": [ "CommunicationRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-requester", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-requester", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-requester", + "version": "4.0.1", + "name": "requester", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Who/what is requesting service", + "code": "requester", + "base": [ "CommunicationRequest" ], + "type": "reference", + "expression": "CommunicationRequest.requester", + "xpath": "f:CommunicationRequest/f:requester", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-sender", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-sender", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-sender", + "version": "4.0.1", + "name": "sender", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Message sender", + "code": "sender", + "base": [ "CommunicationRequest" ], + "type": "reference", + "expression": "CommunicationRequest.sender", + "xpath": "f:CommunicationRequest/f:sender", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "HealthcareService", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-status", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "draft | active | on-hold | revoked | completed | entered-in-error | unknown", + "code": "status", + "base": [ "CommunicationRequest" ], + "type": "token", + "expression": "CommunicationRequest.status", + "xpath": "f:CommunicationRequest/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "CommunicationRequest-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CommunicationRequest-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Focus of message", + "code": "subject", + "base": [ "CommunicationRequest" ], + "type": "reference", + "expression": "CommunicationRequest.subject", + "xpath": "f:CommunicationRequest/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CompartmentDefinition-code", + "resource": { + "resourceType": "SearchParameter", + "id": "CompartmentDefinition-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CompartmentDefinition-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Patient | Encounter | RelatedPerson | Practitioner | Device", + "code": "code", + "base": [ "CompartmentDefinition" ], + "type": "token", + "expression": "CompartmentDefinition.code", + "xpath": "f:CompartmentDefinition/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CompartmentDefinition-resource", + "resource": { + "resourceType": "SearchParameter", + "id": "CompartmentDefinition-resource", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CompartmentDefinition-resource", + "version": "4.0.1", + "name": "resource", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Name of resource type", + "code": "resource", + "base": [ "CompartmentDefinition" ], + "type": "token", + "expression": "CompartmentDefinition.resource.code", + "xpath": "f:CompartmentDefinition/f:resource/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Composition-attester", + "resource": { + "resourceType": "SearchParameter", + "id": "Composition-attester", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Composition-attester", + "version": "4.0.1", + "name": "attester", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Who attested the composition", + "code": "attester", + "base": [ "Composition" ], + "type": "reference", + "expression": "Composition.attester.party", + "xpath": "f:Composition/f:attester/f:party", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Composition-author", + "resource": { + "resourceType": "SearchParameter", + "id": "Composition-author", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Composition-author", + "version": "4.0.1", + "name": "author", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Who and/or what authored the composition", + "code": "author", + "base": [ "Composition" ], + "type": "reference", + "expression": "Composition.author", + "xpath": "f:Composition/f:author", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Composition-category", + "resource": { + "resourceType": "SearchParameter", + "id": "Composition-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Composition-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Categorization of Composition", + "code": "category", + "base": [ "Composition" ], + "type": "token", + "expression": "Composition.category", + "xpath": "f:Composition/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Composition-confidentiality", + "resource": { + "resourceType": "SearchParameter", + "id": "Composition-confidentiality", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Composition-confidentiality", + "version": "4.0.1", + "name": "confidentiality", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "As defined by affinity domain", + "code": "confidentiality", + "base": [ "Composition" ], + "type": "token", + "expression": "Composition.confidentiality", + "xpath": "f:Composition/f:confidentiality", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Composition-context", + "resource": { + "resourceType": "SearchParameter", + "id": "Composition-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Composition-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Code(s) that apply to the event being documented", + "code": "context", + "base": [ "Composition" ], + "type": "token", + "expression": "Composition.event.code", + "xpath": "f:Composition/f:event/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/clinical-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "clinical-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/clinical-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Composition](composition.html): Context of the Composition\r\n* [DeviceRequest](devicerequest.html): Encounter during which request was created\r\n* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made\r\n* [DocumentReference](documentreference.html): Context of the document content\r\n* [Flag](flag.html): Alert relevant during encounter\r\n* [List](list.html): Context in which list created\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier\r\n* [Observation](observation.html): Encounter related to the observation\r\n* [Procedure](procedure.html): Encounter created as part of\r\n* [RiskAssessment](riskassessment.html): Where was assessment performed?\r\n* [ServiceRequest](servicerequest.html): An encounter in which this request is made\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier\r\n", + "code": "encounter", + "base": [ "Composition", "DeviceRequest", "DiagnosticReport", "DocumentReference", "Flag", "List", "NutritionOrder", "Observation", "Procedure", "RiskAssessment", "ServiceRequest", "VisionPrescription" ], + "type": "reference", + "expression": "Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter", + "xpath": "f:Composition/f:encounter | f:DeviceRequest/f:encounter | f:DiagnosticReport/f:encounter | f:DocumentReference/f:context/f:encounter | f:Flag/f:encounter | f:List/f:encounter | f:NutritionOrder/f:encounter | f:Observation/f:encounter | f:Procedure/f:encounter | f:RiskAssessment/f:encounter | f:ServiceRequest/f:encounter | f:VisionPrescription/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter", "EpisodeOfCare" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Composition-entry", + "resource": { + "resourceType": "SearchParameter", + "id": "Composition-entry", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Composition-entry", + "version": "4.0.1", + "name": "entry", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "A reference to data that supports this section", + "code": "entry", + "base": [ "Composition" ], + "type": "reference", + "expression": "Composition.section.entry", + "xpath": "f:Composition/f:section/f:entry", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Composition-period", + "resource": { + "resourceType": "SearchParameter", + "id": "Composition-period", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Composition-period", + "version": "4.0.1", + "name": "period", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "The period covered by the documentation", + "code": "period", + "base": [ "Composition" ], + "type": "date", + "expression": "Composition.event.period", + "xpath": "f:Composition/f:event/f:period", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Composition-related-id", + "resource": { + "resourceType": "SearchParameter", + "id": "Composition-related-id", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Composition-related-id", + "version": "4.0.1", + "name": "related-id", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Target of the relationship", + "code": "related-id", + "base": [ "Composition" ], + "type": "token", + "expression": "(Composition.relatesTo.target as Identifier)", + "xpath": "f:Composition/f:relatesTo/f:targetIdentifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Composition-related-ref", + "resource": { + "resourceType": "SearchParameter", + "id": "Composition-related-ref", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Composition-related-ref", + "version": "4.0.1", + "name": "related-ref", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Target of the relationship", + "code": "related-ref", + "base": [ "Composition" ], + "type": "reference", + "expression": "(Composition.relatesTo.target as Reference)", + "xpath": "f:Composition/f:relatesTo/f:targetReference", + "xpathUsage": "normal", + "target": [ "Composition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Composition-section", + "resource": { + "resourceType": "SearchParameter", + "id": "Composition-section", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Composition-section", + "version": "4.0.1", + "name": "section", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Classification of section (recommended)", + "code": "section", + "base": [ "Composition" ], + "type": "token", + "expression": "Composition.section.code", + "xpath": "f:Composition/f:section/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Composition-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Composition-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Composition-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "preliminary | final | amended | entered-in-error", + "code": "status", + "base": [ "Composition" ], + "type": "token", + "expression": "Composition.status", + "xpath": "f:Composition/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Composition-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Composition-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Composition-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Who and/or what the composition is about", + "code": "subject", + "base": [ "Composition" ], + "type": "reference", + "expression": "Composition.subject", + "xpath": "f:Composition/f:subject", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Composition-title", + "resource": { + "resourceType": "SearchParameter", + "id": "Composition-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Composition-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Human Readable name/title", + "code": "title", + "base": [ "Composition" ], + "type": "string", + "expression": "Composition.title", + "xpath": "f:Composition/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ConceptMap-dependson", + "resource": { + "resourceType": "SearchParameter", + "id": "ConceptMap-dependson", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ConceptMap-dependson", + "version": "4.0.1", + "name": "dependson", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "Reference to property mapping depends on", + "code": "dependson", + "base": [ "ConceptMap" ], + "type": "uri", + "expression": "ConceptMap.group.element.target.dependsOn.property", + "xpath": "f:ConceptMap/f:group/f:element/f:target/f:dependsOn/f:property", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ConceptMap-other", + "resource": { + "resourceType": "SearchParameter", + "id": "ConceptMap-other", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ConceptMap-other", + "version": "4.0.1", + "name": "other", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "canonical reference to an additional ConceptMap to use for mapping if the source concept is unmapped", + "code": "other", + "base": [ "ConceptMap" ], + "type": "reference", + "expression": "ConceptMap.group.unmapped.url", + "xpath": "f:ConceptMap/f:group/f:unmapped/f:url", + "xpathUsage": "normal", + "target": [ "ConceptMap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ConceptMap-product", + "resource": { + "resourceType": "SearchParameter", + "id": "ConceptMap-product", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ConceptMap-product", + "version": "4.0.1", + "name": "product", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "Reference to property mapping depends on", + "code": "product", + "base": [ "ConceptMap" ], + "type": "uri", + "expression": "ConceptMap.group.element.target.product.property", + "xpath": "f:ConceptMap/f:group/f:element/f:target/f:product/f:property", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ConceptMap-source", + "resource": { + "resourceType": "SearchParameter", + "id": "ConceptMap-source", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ConceptMap-source", + "version": "4.0.1", + "name": "source", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "The source value set that contains the concepts that are being mapped", + "code": "source", + "base": [ "ConceptMap" ], + "type": "reference", + "expression": "(ConceptMap.source as canonical)", + "xpath": "f:ConceptMap/f:sourceCanonical", + "xpathUsage": "normal", + "target": [ "ValueSet" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ConceptMap-source-code", + "resource": { + "resourceType": "SearchParameter", + "id": "ConceptMap-source-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ConceptMap-source-code", + "version": "4.0.1", + "name": "source-code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "Identifies element being mapped", + "code": "source-code", + "base": [ "ConceptMap" ], + "type": "token", + "expression": "ConceptMap.group.element.code", + "xpath": "f:ConceptMap/f:group/f:element/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ConceptMap-source-system", + "resource": { + "resourceType": "SearchParameter", + "id": "ConceptMap-source-system", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ConceptMap-source-system", + "version": "4.0.1", + "name": "source-system", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "Source system where concepts to be mapped are defined", + "code": "source-system", + "base": [ "ConceptMap" ], + "type": "uri", + "expression": "ConceptMap.group.source", + "xpath": "f:ConceptMap/f:group/f:source", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ConceptMap-source-uri", + "resource": { + "resourceType": "SearchParameter", + "id": "ConceptMap-source-uri", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ConceptMap-source-uri", + "version": "4.0.1", + "name": "source-uri", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "The source value set that contains the concepts that are being mapped", + "code": "source-uri", + "base": [ "ConceptMap" ], + "type": "reference", + "expression": "(ConceptMap.source as uri)", + "xpath": "f:ConceptMap/f:sourceUri", + "xpathUsage": "normal", + "target": [ "ValueSet" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ConceptMap-target", + "resource": { + "resourceType": "SearchParameter", + "id": "ConceptMap-target", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ConceptMap-target", + "version": "4.0.1", + "name": "target", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "The target value set which provides context for the mappings", + "code": "target", + "base": [ "ConceptMap" ], + "type": "reference", + "expression": "(ConceptMap.target as canonical)", + "xpath": "f:ConceptMap/f:targetCanonical", + "xpathUsage": "normal", + "target": [ "ValueSet" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ConceptMap-target-code", + "resource": { + "resourceType": "SearchParameter", + "id": "ConceptMap-target-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ConceptMap-target-code", + "version": "4.0.1", + "name": "target-code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "Code that identifies the target element", + "code": "target-code", + "base": [ "ConceptMap" ], + "type": "token", + "expression": "ConceptMap.group.element.target.code", + "xpath": "f:ConceptMap/f:group/f:element/f:target/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ConceptMap-target-system", + "resource": { + "resourceType": "SearchParameter", + "id": "ConceptMap-target-system", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ConceptMap-target-system", + "version": "4.0.1", + "name": "target-system", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "Target system that the concepts are to be mapped to", + "code": "target-system", + "base": [ "ConceptMap" ], + "type": "uri", + "expression": "ConceptMap.group.target", + "xpath": "f:ConceptMap/f:group/f:target", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ConceptMap-target-uri", + "resource": { + "resourceType": "SearchParameter", + "id": "ConceptMap-target-uri", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ConceptMap-target-uri", + "version": "4.0.1", + "name": "target-uri", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "The target value set which provides context for the mappings", + "code": "target-uri", + "base": [ "ConceptMap" ], + "type": "reference", + "expression": "(ConceptMap.target as uri)", + "xpath": "f:ConceptMap/f:targetUri", + "xpathUsage": "normal", + "target": [ "ValueSet" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-abatement-age", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-abatement-age", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-abatement-age", + "version": "4.0.1", + "name": "abatement-age", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Abatement as age or age range", + "code": "abatement-age", + "base": [ "Condition" ], + "type": "quantity", + "expression": "Condition.abatement.as(Age) | Condition.abatement.as(Range)", + "xpath": "f:Condition/f:abatementAge | f:Condition/f:abatementRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-abatement-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-abatement-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-abatement-date", + "version": "4.0.1", + "name": "abatement-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Date-related abatements (dateTime and period)", + "code": "abatement-date", + "base": [ "Condition" ], + "type": "date", + "expression": "Condition.abatement.as(dateTime) | Condition.abatement.as(Period)", + "xpath": "f:Condition/f:abatementDateTime | f:Condition/f:abatementPeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-abatement-string", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-abatement-string", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-abatement-string", + "version": "4.0.1", + "name": "abatement-string", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Abatement as a string", + "code": "abatement-string", + "base": [ "Condition" ], + "type": "string", + "expression": "Condition.abatement.as(string)", + "xpath": "f:Condition/f:abatementString", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-asserter", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-asserter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-asserter", + "version": "4.0.1", + "name": "asserter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Person who asserts this condition", + "code": "asserter", + "base": [ "Condition" ], + "type": "reference", + "expression": "Condition.asserter", + "xpath": "f:Condition/f:asserter", + "xpathUsage": "normal", + "target": [ "Practitioner", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-body-site", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-body-site", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-body-site", + "version": "4.0.1", + "name": "body-site", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Anatomical location, if relevant", + "code": "body-site", + "base": [ "Condition" ], + "type": "token", + "expression": "Condition.bodySite", + "xpath": "f:Condition/f:bodySite", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-category", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "The category of the condition", + "code": "category", + "base": [ "Condition" ], + "type": "token", + "expression": "Condition.category", + "xpath": "f:Condition/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-clinical-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-clinical-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-clinical-status", + "version": "4.0.1", + "name": "clinical-status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "The clinical status of the condition", + "code": "clinical-status", + "base": [ "Condition" ], + "type": "token", + "expression": "Condition.clinicalStatus", + "xpath": "f:Condition/f:clinicalStatus", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Encounter created as part of", + "code": "encounter", + "base": [ "Condition" ], + "type": "reference", + "expression": "Condition.encounter", + "xpath": "f:Condition/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-evidence", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-evidence", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-evidence", + "version": "4.0.1", + "name": "evidence", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Manifestation/symptom", + "code": "evidence", + "base": [ "Condition" ], + "type": "token", + "expression": "Condition.evidence.code", + "xpath": "f:Condition/f:evidence/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-evidence-detail", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-evidence-detail", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-evidence-detail", + "version": "4.0.1", + "name": "evidence-detail", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Supporting information found elsewhere", + "code": "evidence-detail", + "base": [ "Condition" ], + "type": "reference", + "expression": "Condition.evidence.detail", + "xpath": "f:Condition/f:evidence/f:detail", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-onset-age", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-onset-age", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-onset-age", + "version": "4.0.1", + "name": "onset-age", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Onsets as age or age range", + "code": "onset-age", + "base": [ "Condition" ], + "type": "quantity", + "expression": "Condition.onset.as(Age) | Condition.onset.as(Range)", + "xpath": "f:Condition/f:onsetAge | f:Condition/f:onsetRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-onset-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-onset-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-onset-date", + "version": "4.0.1", + "name": "onset-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Date related onsets (dateTime and Period)", + "code": "onset-date", + "base": [ "Condition" ], + "type": "date", + "expression": "Condition.onset.as(dateTime) | Condition.onset.as(Period)", + "xpath": "f:Condition/f:onsetDateTime | f:Condition/f:onsetPeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-onset-info", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-onset-info", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-onset-info", + "version": "4.0.1", + "name": "onset-info", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Onsets as a string", + "code": "onset-info", + "base": [ "Condition" ], + "type": "string", + "expression": "Condition.onset.as(string)", + "xpath": "f:Condition/f:onsetString", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-recorded-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-recorded-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-recorded-date", + "version": "4.0.1", + "name": "recorded-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Date record was first recorded", + "code": "recorded-date", + "base": [ "Condition" ], + "type": "date", + "expression": "Condition.recordedDate", + "xpath": "f:Condition/f:recordedDate", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-severity", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-severity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-severity", + "version": "4.0.1", + "name": "severity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "The severity of the condition", + "code": "severity", + "base": [ "Condition" ], + "type": "token", + "expression": "Condition.severity", + "xpath": "f:Condition/f:severity", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-stage", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-stage", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-stage", + "version": "4.0.1", + "name": "stage", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Simple summary (disease specific)", + "code": "stage", + "base": [ "Condition" ], + "type": "token", + "expression": "Condition.stage.summary", + "xpath": "f:Condition/f:stage/f:summary", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Who has the condition?", + "code": "subject", + "base": [ "Condition" ], + "type": "reference", + "expression": "Condition.subject", + "xpath": "f:Condition/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Condition-verification-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Condition-verification-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Condition-verification-status", + "version": "4.0.1", + "name": "verification-status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "unconfirmed | provisional | differential | confirmed | refuted | entered-in-error", + "code": "verification-status", + "base": [ "Condition" ], + "type": "token", + "expression": "Condition.verificationStatus", + "xpath": "f:Condition/f:verificationStatus", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Consent-action", + "resource": { + "resourceType": "SearchParameter", + "id": "Consent-action", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Consent-action", + "version": "4.0.1", + "name": "action", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Community Based Collaborative Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/homehealth/index.cfm" + } ] + } ], + "description": "Actions controlled by this rule", + "code": "action", + "base": [ "Consent" ], + "type": "token", + "expression": "Consent.provision.action", + "xpath": "f:Consent/f:provision/f:action", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Consent-actor", + "resource": { + "resourceType": "SearchParameter", + "id": "Consent-actor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Consent-actor", + "version": "4.0.1", + "name": "actor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Community Based Collaborative Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/homehealth/index.cfm" + } ] + } ], + "description": "Resource for the actor (or group, by role)", + "code": "actor", + "base": [ "Consent" ], + "type": "reference", + "expression": "Consent.provision.actor.reference", + "xpath": "f:Consent/f:provision/f:actor/f:reference", + "xpathUsage": "normal", + "target": [ "Practitioner", "Group", "Organization", "CareTeam", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Consent-category", + "resource": { + "resourceType": "SearchParameter", + "id": "Consent-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Consent-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Community Based Collaborative Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/homehealth/index.cfm" + } ] + } ], + "description": "Classification of the consent statement - for indexing/retrieval", + "code": "category", + "base": [ "Consent" ], + "type": "token", + "expression": "Consent.category", + "xpath": "f:Consent/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Consent-consentor", + "resource": { + "resourceType": "SearchParameter", + "id": "Consent-consentor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Consent-consentor", + "version": "4.0.1", + "name": "consentor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Community Based Collaborative Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/homehealth/index.cfm" + } ] + } ], + "description": "Who is agreeing to the policy and rules", + "code": "consentor", + "base": [ "Consent" ], + "type": "reference", + "expression": "Consent.performer", + "xpath": "f:Consent/f:performer", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Consent-data", + "resource": { + "resourceType": "SearchParameter", + "id": "Consent-data", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Consent-data", + "version": "4.0.1", + "name": "data", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Community Based Collaborative Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/homehealth/index.cfm" + } ] + } ], + "description": "The actual data reference", + "code": "data", + "base": [ "Consent" ], + "type": "reference", + "expression": "Consent.provision.data.reference", + "xpath": "f:Consent/f:provision/f:data/f:reference", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Consent-organization", + "resource": { + "resourceType": "SearchParameter", + "id": "Consent-organization", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Consent-organization", + "version": "4.0.1", + "name": "organization", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Community Based Collaborative Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/homehealth/index.cfm" + } ] + } ], + "description": "Custodian of the consent", + "code": "organization", + "base": [ "Consent" ], + "type": "reference", + "expression": "Consent.organization", + "xpath": "f:Consent/f:organization", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Consent-period", + "resource": { + "resourceType": "SearchParameter", + "id": "Consent-period", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Consent-period", + "version": "4.0.1", + "name": "period", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Community Based Collaborative Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/homehealth/index.cfm" + } ] + } ], + "description": "Timeframe for this rule", + "code": "period", + "base": [ "Consent" ], + "type": "date", + "expression": "Consent.provision.period", + "xpath": "f:Consent/f:provision/f:period", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Consent-purpose", + "resource": { + "resourceType": "SearchParameter", + "id": "Consent-purpose", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Consent-purpose", + "version": "4.0.1", + "name": "purpose", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Community Based Collaborative Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/homehealth/index.cfm" + } ] + } ], + "description": "Context of activities covered by this rule", + "code": "purpose", + "base": [ "Consent" ], + "type": "token", + "expression": "Consent.provision.purpose", + "xpath": "f:Consent/f:provision/f:purpose", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Consent-scope", + "resource": { + "resourceType": "SearchParameter", + "id": "Consent-scope", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Consent-scope", + "version": "4.0.1", + "name": "scope", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Community Based Collaborative Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/homehealth/index.cfm" + } ] + } ], + "description": "Which of the four areas this resource covers (extensible)", + "code": "scope", + "base": [ "Consent" ], + "type": "token", + "expression": "Consent.scope", + "xpath": "f:Consent/f:scope", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Consent-security-label", + "resource": { + "resourceType": "SearchParameter", + "id": "Consent-security-label", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Consent-security-label", + "version": "4.0.1", + "name": "security-label", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Community Based Collaborative Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/homehealth/index.cfm" + } ] + } ], + "description": "Security Labels that define affected resources", + "code": "security-label", + "base": [ "Consent" ], + "type": "token", + "expression": "Consent.provision.securityLabel", + "xpath": "f:Consent/f:provision/f:securityLabel", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Consent-source-reference", + "resource": { + "resourceType": "SearchParameter", + "id": "Consent-source-reference", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Consent-source-reference", + "version": "4.0.1", + "name": "source-reference", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Community Based Collaborative Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/homehealth/index.cfm" + } ] + } ], + "description": "Search by reference to a Consent, DocumentReference, Contract or QuestionnaireResponse", + "code": "source-reference", + "base": [ "Consent" ], + "type": "reference", + "expression": "Consent.source", + "xpath": "f:Consent/f:sourceAttachment | f:Consent/f:sourceReference", + "xpathUsage": "normal", + "target": [ "Consent", "Contract", "QuestionnaireResponse", "DocumentReference" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Consent-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Consent-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Consent-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Community Based Collaborative Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/homehealth/index.cfm" + } ] + } ], + "description": "draft | proposed | active | rejected | inactive | entered-in-error", + "code": "status", + "base": [ "Consent" ], + "type": "token", + "expression": "Consent.status", + "xpath": "f:Consent/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Contract-authority", + "resource": { + "resourceType": "SearchParameter", + "id": "Contract-authority", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Contract-authority", + "version": "4.0.1", + "name": "authority", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The authority of the contract", + "code": "authority", + "base": [ "Contract" ], + "type": "reference", + "expression": "Contract.authority", + "xpath": "f:Contract/f:authority", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Contract-domain", + "resource": { + "resourceType": "SearchParameter", + "id": "Contract-domain", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Contract-domain", + "version": "4.0.1", + "name": "domain", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The domain of the contract", + "code": "domain", + "base": [ "Contract" ], + "type": "reference", + "expression": "Contract.domain", + "xpath": "f:Contract/f:domain", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Contract-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Contract-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Contract-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The identity of the contract", + "code": "identifier", + "base": [ "Contract" ], + "type": "token", + "expression": "Contract.identifier", + "xpath": "f:Contract/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Contract-instantiates", + "resource": { + "resourceType": "SearchParameter", + "id": "Contract-instantiates", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Contract-instantiates", + "version": "4.0.1", + "name": "instantiates", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "A source definition of the contract", + "code": "instantiates", + "base": [ "Contract" ], + "type": "uri", + "expression": "Contract.instantiatesUri", + "xpath": "f:Contract/f:instantiatesUri", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Contract-issued", + "resource": { + "resourceType": "SearchParameter", + "id": "Contract-issued", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Contract-issued", + "version": "4.0.1", + "name": "issued", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The date/time the contract was issued", + "code": "issued", + "base": [ "Contract" ], + "type": "date", + "expression": "Contract.issued", + "xpath": "f:Contract/f:issued", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Contract-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Contract-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Contract-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The identity of the subject of the contract (if a patient)", + "code": "patient", + "base": [ "Contract" ], + "type": "reference", + "expression": "Contract.subject.where(resolve() is Patient)", + "xpath": "f:Contract/f:subject", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Contract-signer", + "resource": { + "resourceType": "SearchParameter", + "id": "Contract-signer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Contract-signer", + "version": "4.0.1", + "name": "signer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Contract Signatory Party", + "code": "signer", + "base": [ "Contract" ], + "type": "reference", + "expression": "Contract.signer.party", + "xpath": "f:Contract/f:signer/f:party", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Contract-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Contract-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Contract-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The status of the contract", + "code": "status", + "base": [ "Contract" ], + "type": "token", + "expression": "Contract.status", + "xpath": "f:Contract/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Contract-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Contract-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Contract-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The identity of the subject of the contract", + "code": "subject", + "base": [ "Contract" ], + "type": "reference", + "expression": "Contract.subject", + "xpath": "f:Contract/f:subject", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Contract-url", + "resource": { + "resourceType": "SearchParameter", + "id": "Contract-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Contract-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The basal contract definition", + "code": "url", + "base": [ "Contract" ], + "type": "uri", + "expression": "Contract.url", + "xpath": "f:Contract/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Coverage-beneficiary", + "resource": { + "resourceType": "SearchParameter", + "id": "Coverage-beneficiary", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Coverage-beneficiary", + "version": "4.0.1", + "name": "beneficiary", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Covered party", + "code": "beneficiary", + "base": [ "Coverage" ], + "type": "reference", + "expression": "Coverage.beneficiary", + "xpath": "f:Coverage/f:beneficiary", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Coverage-class-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Coverage-class-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Coverage-class-type", + "version": "4.0.1", + "name": "class-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Coverage class (eg. plan, group)", + "code": "class-type", + "base": [ "Coverage" ], + "type": "token", + "expression": "Coverage.class.type", + "xpath": "f:Coverage/f:class/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Coverage-class-value", + "resource": { + "resourceType": "SearchParameter", + "id": "Coverage-class-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Coverage-class-value", + "version": "4.0.1", + "name": "class-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Value of the class (eg. Plan number, group number)", + "code": "class-value", + "base": [ "Coverage" ], + "type": "string", + "expression": "Coverage.class.value", + "xpath": "f:Coverage/f:class/f:value", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Coverage-dependent", + "resource": { + "resourceType": "SearchParameter", + "id": "Coverage-dependent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Coverage-dependent", + "version": "4.0.1", + "name": "dependent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Dependent number", + "code": "dependent", + "base": [ "Coverage" ], + "type": "string", + "expression": "Coverage.dependent", + "xpath": "f:Coverage/f:dependent", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Coverage-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Coverage-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Coverage-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The primary identifier of the insured and the coverage", + "code": "identifier", + "base": [ "Coverage" ], + "type": "token", + "expression": "Coverage.identifier", + "xpath": "f:Coverage/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Coverage-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Coverage-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Coverage-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Retrieve coverages for a patient", + "code": "patient", + "base": [ "Coverage" ], + "type": "reference", + "expression": "Coverage.beneficiary", + "xpath": "f:Coverage/f:beneficiary", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Coverage-payor", + "resource": { + "resourceType": "SearchParameter", + "id": "Coverage-payor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Coverage-payor", + "version": "4.0.1", + "name": "payor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The identity of the insurer or party paying for services", + "code": "payor", + "base": [ "Coverage" ], + "type": "reference", + "expression": "Coverage.payor", + "xpath": "f:Coverage/f:payor", + "xpathUsage": "normal", + "target": [ "Organization", "Patient", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Coverage-policy-holder", + "resource": { + "resourceType": "SearchParameter", + "id": "Coverage-policy-holder", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Coverage-policy-holder", + "version": "4.0.1", + "name": "policy-holder", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Reference to the policyholder", + "code": "policy-holder", + "base": [ "Coverage" ], + "type": "reference", + "expression": "Coverage.policyHolder", + "xpath": "f:Coverage/f:policyHolder", + "xpathUsage": "normal", + "target": [ "Organization", "Patient", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Coverage-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Coverage-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Coverage-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The status of the Coverage", + "code": "status", + "base": [ "Coverage" ], + "type": "token", + "expression": "Coverage.status", + "xpath": "f:Coverage/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Coverage-subscriber", + "resource": { + "resourceType": "SearchParameter", + "id": "Coverage-subscriber", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Coverage-subscriber", + "version": "4.0.1", + "name": "subscriber", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Reference to the subscriber", + "code": "subscriber", + "base": [ "Coverage" ], + "type": "reference", + "expression": "Coverage.subscriber", + "xpath": "f:Coverage/f:subscriber", + "xpathUsage": "normal", + "target": [ "Patient", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Coverage-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Coverage-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Coverage-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The kind of coverage (health plan, auto, Workers Compensation)", + "code": "type", + "base": [ "Coverage" ], + "type": "token", + "expression": "Coverage.type", + "xpath": "f:Coverage/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-created", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityRequest-created", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-created", + "version": "4.0.1", + "name": "created", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The creation date for the EOB", + "code": "created", + "base": [ "CoverageEligibilityRequest" ], + "type": "date", + "expression": "CoverageEligibilityRequest.created", + "xpath": "f:CoverageEligibilityRequest/f:created", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-enterer", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityRequest-enterer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-enterer", + "version": "4.0.1", + "name": "enterer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The party who is responsible for the request", + "code": "enterer", + "base": [ "CoverageEligibilityRequest" ], + "type": "reference", + "expression": "CoverageEligibilityRequest.enterer", + "xpath": "f:CoverageEligibilityRequest/f:enterer", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-facility", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityRequest-facility", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-facility", + "version": "4.0.1", + "name": "facility", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Facility responsible for the goods and services", + "code": "facility", + "base": [ "CoverageEligibilityRequest" ], + "type": "reference", + "expression": "CoverageEligibilityRequest.facility", + "xpath": "f:CoverageEligibilityRequest/f:facility", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityRequest-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The business identifier of the Eligibility", + "code": "identifier", + "base": [ "CoverageEligibilityRequest" ], + "type": "token", + "expression": "CoverageEligibilityRequest.identifier", + "xpath": "f:CoverageEligibilityRequest/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityRequest-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The reference to the patient", + "code": "patient", + "base": [ "CoverageEligibilityRequest" ], + "type": "reference", + "expression": "CoverageEligibilityRequest.patient", + "xpath": "f:CoverageEligibilityRequest/f:patient", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-provider", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityRequest-provider", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-provider", + "version": "4.0.1", + "name": "provider", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The reference to the provider", + "code": "provider", + "base": [ "CoverageEligibilityRequest" ], + "type": "reference", + "expression": "CoverageEligibilityRequest.provider", + "xpath": "f:CoverageEligibilityRequest/f:provider", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-status", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityRequest-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The status of the EligibilityRequest", + "code": "status", + "base": [ "CoverageEligibilityRequest" ], + "type": "token", + "expression": "CoverageEligibilityRequest.status", + "xpath": "f:CoverageEligibilityRequest/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-created", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityResponse-created", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-created", + "version": "4.0.1", + "name": "created", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The creation date", + "code": "created", + "base": [ "CoverageEligibilityResponse" ], + "type": "date", + "expression": "CoverageEligibilityResponse.created", + "xpath": "f:CoverageEligibilityResponse/f:created", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-disposition", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityResponse-disposition", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-disposition", + "version": "4.0.1", + "name": "disposition", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The contents of the disposition message", + "code": "disposition", + "base": [ "CoverageEligibilityResponse" ], + "type": "string", + "expression": "CoverageEligibilityResponse.disposition", + "xpath": "f:CoverageEligibilityResponse/f:disposition", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityResponse-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The business identifier", + "code": "identifier", + "base": [ "CoverageEligibilityResponse" ], + "type": "token", + "expression": "CoverageEligibilityResponse.identifier", + "xpath": "f:CoverageEligibilityResponse/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-insurer", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityResponse-insurer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-insurer", + "version": "4.0.1", + "name": "insurer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The organization which generated this resource", + "code": "insurer", + "base": [ "CoverageEligibilityResponse" ], + "type": "reference", + "expression": "CoverageEligibilityResponse.insurer", + "xpath": "f:CoverageEligibilityResponse/f:insurer", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-outcome", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityResponse-outcome", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-outcome", + "version": "4.0.1", + "name": "outcome", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The processing outcome", + "code": "outcome", + "base": [ "CoverageEligibilityResponse" ], + "type": "token", + "expression": "CoverageEligibilityResponse.outcome", + "xpath": "f:CoverageEligibilityResponse/f:outcome", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityResponse-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The reference to the patient", + "code": "patient", + "base": [ "CoverageEligibilityResponse" ], + "type": "reference", + "expression": "CoverageEligibilityResponse.patient", + "xpath": "f:CoverageEligibilityResponse/f:patient", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-request", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityResponse-request", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-request", + "version": "4.0.1", + "name": "request", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The EligibilityRequest reference", + "code": "request", + "base": [ "CoverageEligibilityResponse" ], + "type": "reference", + "expression": "CoverageEligibilityResponse.request", + "xpath": "f:CoverageEligibilityResponse/f:request", + "xpathUsage": "normal", + "target": [ "CoverageEligibilityRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-requestor", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityResponse-requestor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-requestor", + "version": "4.0.1", + "name": "requestor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The EligibilityRequest provider", + "code": "requestor", + "base": [ "CoverageEligibilityResponse" ], + "type": "reference", + "expression": "CoverageEligibilityResponse.requestor", + "xpath": "f:CoverageEligibilityResponse/f:requestor", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-status", + "resource": { + "resourceType": "SearchParameter", + "id": "CoverageEligibilityResponse-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The EligibilityRequest status", + "code": "status", + "base": [ "CoverageEligibilityResponse" ], + "type": "token", + "expression": "CoverageEligibilityResponse.status", + "xpath": "f:CoverageEligibilityResponse/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DetectedIssue-author", + "resource": { + "resourceType": "SearchParameter", + "id": "DetectedIssue-author", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DetectedIssue-author", + "version": "4.0.1", + "name": "author", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The provider or device that identified the issue", + "code": "author", + "base": [ "DetectedIssue" ], + "type": "reference", + "expression": "DetectedIssue.author", + "xpath": "f:DetectedIssue/f:author", + "xpathUsage": "normal", + "target": [ "Practitioner", "Device", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DetectedIssue-code", + "resource": { + "resourceType": "SearchParameter", + "id": "DetectedIssue-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DetectedIssue-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Issue Category, e.g. drug-drug, duplicate therapy, etc.", + "code": "code", + "base": [ "DetectedIssue" ], + "type": "token", + "expression": "DetectedIssue.code", + "xpath": "f:DetectedIssue/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DetectedIssue-identified", + "resource": { + "resourceType": "SearchParameter", + "id": "DetectedIssue-identified", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DetectedIssue-identified", + "version": "4.0.1", + "name": "identified", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "When identified", + "code": "identified", + "base": [ "DetectedIssue" ], + "type": "date", + "expression": "DetectedIssue.identified", + "xpath": "f:DetectedIssue/f:identifiedDateTime | f:DetectedIssue/f:identifiedPeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DetectedIssue-implicated", + "resource": { + "resourceType": "SearchParameter", + "id": "DetectedIssue-implicated", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DetectedIssue-implicated", + "version": "4.0.1", + "name": "implicated", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Problem resource", + "code": "implicated", + "base": [ "DetectedIssue" ], + "type": "reference", + "expression": "DetectedIssue.implicated", + "xpath": "f:DetectedIssue/f:implicated", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Device-device-name", + "resource": { + "resourceType": "SearchParameter", + "id": "Device-device-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Device-device-name", + "version": "4.0.1", + "name": "device-name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "A server defined search that may match any of the string fields in Device.deviceName or Device.type.", + "code": "device-name", + "base": [ "Device" ], + "type": "string", + "expression": "Device.deviceName.name | Device.type.coding.display | Device.type.text", + "xpath": "f:Device/f:deviceName", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Device-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Device-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Device-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Instance id from manufacturer, owner, and others", + "code": "identifier", + "base": [ "Device" ], + "type": "token", + "expression": "Device.identifier", + "xpath": "f:Device/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Device-location", + "resource": { + "resourceType": "SearchParameter", + "id": "Device-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Device-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "A location, where the resource is found", + "code": "location", + "base": [ "Device" ], + "type": "reference", + "expression": "Device.location", + "xpath": "f:Device/f:location", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Device-manufacturer", + "resource": { + "resourceType": "SearchParameter", + "id": "Device-manufacturer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Device-manufacturer", + "version": "4.0.1", + "name": "manufacturer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The manufacturer of the device", + "code": "manufacturer", + "base": [ "Device" ], + "type": "string", + "expression": "Device.manufacturer", + "xpath": "f:Device/f:manufacturer", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Device-model", + "resource": { + "resourceType": "SearchParameter", + "id": "Device-model", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Device-model", + "version": "4.0.1", + "name": "model", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The model of the device", + "code": "model", + "base": [ "Device" ], + "type": "string", + "expression": "Device.modelNumber", + "xpath": "f:Device/f:modelNumber", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Device-organization", + "resource": { + "resourceType": "SearchParameter", + "id": "Device-organization", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Device-organization", + "version": "4.0.1", + "name": "organization", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The organization responsible for the device", + "code": "organization", + "base": [ "Device" ], + "type": "reference", + "expression": "Device.owner", + "xpath": "f:Device/f:owner", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Device-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Device-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Device-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Patient information, if the resource is affixed to a person", + "code": "patient", + "base": [ "Device" ], + "type": "reference", + "expression": "Device.patient", + "xpath": "f:Device/f:patient", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Device-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Device-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Device-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "active | inactive | entered-in-error | unknown", + "code": "status", + "base": [ "Device" ], + "type": "token", + "expression": "Device.status", + "xpath": "f:Device/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Device-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Device-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Device-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The type of the device", + "code": "type", + "base": [ "Device" ], + "type": "token", + "expression": "Device.type", + "xpath": "f:Device/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Device-udi-carrier", + "resource": { + "resourceType": "SearchParameter", + "id": "Device-udi-carrier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Device-udi-carrier", + "version": "4.0.1", + "name": "udi-carrier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "UDI Barcode (RFID or other technology) string in *HRF* format.", + "code": "udi-carrier", + "base": [ "Device" ], + "type": "string", + "expression": "Device.udiCarrier.carrierHRF", + "xpath": "f:Device/f:udiCarrier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Device-udi-di", + "resource": { + "resourceType": "SearchParameter", + "id": "Device-udi-di", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Device-udi-di", + "version": "4.0.1", + "name": "udi-di", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The udi Device Identifier (DI)", + "code": "udi-di", + "base": [ "Device" ], + "type": "string", + "expression": "Device.udiCarrier.deviceIdentifier", + "xpath": "f:Device/f:udiCarrier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Device-url", + "resource": { + "resourceType": "SearchParameter", + "id": "Device-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Device-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Network address to contact device", + "code": "url", + "base": [ "Device" ], + "type": "uri", + "expression": "Device.url", + "xpath": "f:Device/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceDefinition-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceDefinition-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceDefinition-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The identifier of the component", + "code": "identifier", + "base": [ "DeviceDefinition" ], + "type": "token", + "expression": "DeviceDefinition.identifier", + "xpath": "f:DeviceDefinition/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceDefinition-parent", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceDefinition-parent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceDefinition-parent", + "version": "4.0.1", + "name": "parent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The parent DeviceDefinition resource", + "code": "parent", + "base": [ "DeviceDefinition" ], + "type": "reference", + "expression": "DeviceDefinition.parentDevice", + "xpath": "f:DeviceDefinition/f:parentDevice", + "xpathUsage": "normal", + "target": [ "DeviceDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceDefinition-type", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceDefinition-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceDefinition-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The device component type", + "code": "type", + "base": [ "DeviceDefinition" ], + "type": "token", + "expression": "DeviceDefinition.type", + "xpath": "f:DeviceDefinition/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceMetric-category", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceMetric-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceMetric-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Health Care Devices)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/healthcaredevices/index.cfm" + } ] + } ], + "description": "The category of the metric", + "code": "category", + "base": [ "DeviceMetric" ], + "type": "token", + "expression": "DeviceMetric.category", + "xpath": "f:DeviceMetric/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceMetric-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceMetric-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceMetric-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Health Care Devices)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/healthcaredevices/index.cfm" + } ] + } ], + "description": "The identifier of the metric", + "code": "identifier", + "base": [ "DeviceMetric" ], + "type": "token", + "expression": "DeviceMetric.identifier", + "xpath": "f:DeviceMetric/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceMetric-parent", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceMetric-parent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceMetric-parent", + "version": "4.0.1", + "name": "parent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Health Care Devices)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/healthcaredevices/index.cfm" + } ] + } ], + "description": "The parent DeviceMetric resource", + "code": "parent", + "base": [ "DeviceMetric" ], + "type": "reference", + "expression": "DeviceMetric.parent", + "xpath": "f:DeviceMetric/f:parent", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceMetric-source", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceMetric-source", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceMetric-source", + "version": "4.0.1", + "name": "source", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Health Care Devices)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/healthcaredevices/index.cfm" + } ] + } ], + "description": "The device resource", + "code": "source", + "base": [ "DeviceMetric" ], + "type": "reference", + "expression": "DeviceMetric.source", + "xpath": "f:DeviceMetric/f:source", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceMetric-type", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceMetric-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceMetric-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Health Care Devices)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/healthcaredevices/index.cfm" + } ] + } ], + "description": "The component type", + "code": "type", + "base": [ "DeviceMetric" ], + "type": "token", + "expression": "DeviceMetric.type", + "xpath": "f:DeviceMetric/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-authored-on", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-authored-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-authored-on", + "version": "4.0.1", + "name": "authored-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "When the request transitioned to being actionable", + "code": "authored-on", + "base": [ "DeviceRequest" ], + "type": "date", + "expression": "DeviceRequest.authoredOn", + "xpath": "f:DeviceRequest/f:authoredOn", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-based-on", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-based-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-based-on", + "version": "4.0.1", + "name": "based-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Plan/proposal/order fulfilled by this request", + "code": "based-on", + "base": [ "DeviceRequest" ], + "type": "reference", + "expression": "DeviceRequest.basedOn", + "xpath": "f:DeviceRequest/f:basedOn", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-device", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-device", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-device", + "version": "4.0.1", + "name": "device", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Reference to resource that is being requested/ordered", + "code": "device", + "base": [ "DeviceRequest" ], + "type": "reference", + "expression": "(DeviceRequest.code as Reference)", + "xpath": "f:DeviceRequest/f:codeReference", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-event-date", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-event-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-event-date", + "version": "4.0.1", + "name": "event-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "When service should occur", + "code": "event-date", + "base": [ "DeviceRequest" ], + "type": "date", + "expression": "(DeviceRequest.occurrence as dateTime) | (DeviceRequest.occurrence as Period)", + "xpath": "f:DeviceRequest/f:occurrenceDateTime | f:DeviceRequest/f:occurrencePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-group-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-group-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-group-identifier", + "version": "4.0.1", + "name": "group-identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Composite request this is part of", + "code": "group-identifier", + "base": [ "DeviceRequest" ], + "type": "token", + "expression": "DeviceRequest.groupIdentifier", + "xpath": "f:DeviceRequest/f:groupIdentifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-instantiates-canonical", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-instantiates-canonical", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-instantiates-canonical", + "version": "4.0.1", + "name": "instantiates-canonical", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Instantiates FHIR protocol or definition", + "code": "instantiates-canonical", + "base": [ "DeviceRequest" ], + "type": "reference", + "expression": "DeviceRequest.instantiatesCanonical", + "xpath": "f:DeviceRequest/f:instantiatesCanonical", + "xpathUsage": "normal", + "target": [ "PlanDefinition", "ActivityDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-instantiates-uri", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-instantiates-uri", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-instantiates-uri", + "version": "4.0.1", + "name": "instantiates-uri", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Instantiates external protocol or definition", + "code": "instantiates-uri", + "base": [ "DeviceRequest" ], + "type": "uri", + "expression": "DeviceRequest.instantiatesUri", + "xpath": "f:DeviceRequest/f:instantiatesUri", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-insurance", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-insurance", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-insurance", + "version": "4.0.1", + "name": "insurance", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Associated insurance coverage", + "code": "insurance", + "base": [ "DeviceRequest" ], + "type": "reference", + "expression": "DeviceRequest.insurance", + "xpath": "f:DeviceRequest/f:insurance", + "xpathUsage": "normal", + "target": [ "ClaimResponse", "Coverage" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-intent", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-intent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-intent", + "version": "4.0.1", + "name": "intent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "proposal | plan | original-order |reflex-order", + "code": "intent", + "base": [ "DeviceRequest" ], + "type": "token", + "expression": "DeviceRequest.intent", + "xpath": "f:DeviceRequest/f:intent", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-performer", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-performer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-performer", + "version": "4.0.1", + "name": "performer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Desired performer for service", + "code": "performer", + "base": [ "DeviceRequest" ], + "type": "reference", + "expression": "DeviceRequest.performer", + "xpath": "f:DeviceRequest/f:performer", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "CareTeam", "Device", "Patient", "HealthcareService", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-prior-request", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-prior-request", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-prior-request", + "version": "4.0.1", + "name": "prior-request", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Request takes the place of referenced completed or terminated requests", + "code": "prior-request", + "base": [ "DeviceRequest" ], + "type": "reference", + "expression": "DeviceRequest.priorRequest", + "xpath": "f:DeviceRequest/f:priorRequest", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-requester", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-requester", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-requester", + "version": "4.0.1", + "name": "requester", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Who/what is requesting service", + "code": "requester", + "base": [ "DeviceRequest" ], + "type": "reference", + "expression": "DeviceRequest.requester", + "xpath": "f:DeviceRequest/f:requester", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-status", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "entered-in-error | draft | active |suspended | completed", + "code": "status", + "base": [ "DeviceRequest" ], + "type": "token", + "expression": "DeviceRequest.status", + "xpath": "f:DeviceRequest/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceRequest-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceRequest-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceRequest-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Individual the service is ordered for", + "code": "subject", + "base": [ "DeviceRequest" ], + "type": "reference", + "expression": "DeviceRequest.subject", + "xpath": "f:DeviceRequest/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Device", "Patient", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceUseStatement-device", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceUseStatement-device", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceUseStatement-device", + "version": "4.0.1", + "name": "device", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by device", + "code": "device", + "base": [ "DeviceUseStatement" ], + "type": "reference", + "expression": "DeviceUseStatement.device", + "xpath": "f:DeviceUseStatement/f:device", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceUseStatement-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceUseStatement-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceUseStatement-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by identifier", + "code": "identifier", + "base": [ "DeviceUseStatement" ], + "type": "token", + "expression": "DeviceUseStatement.identifier", + "xpath": "f:DeviceUseStatement/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DeviceUseStatement-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "DeviceUseStatement-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DeviceUseStatement-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by subject", + "code": "subject", + "base": [ "DeviceUseStatement" ], + "type": "reference", + "expression": "DeviceUseStatement.subject", + "xpath": "f:DeviceUseStatement/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-based-on", + "resource": { + "resourceType": "SearchParameter", + "id": "DiagnosticReport-based-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-based-on", + "version": "4.0.1", + "name": "based-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Reference to the service request.", + "code": "based-on", + "base": [ "DiagnosticReport" ], + "type": "reference", + "expression": "DiagnosticReport.basedOn", + "xpath": "f:DiagnosticReport/f:basedOn", + "xpathUsage": "normal", + "target": [ "CarePlan", "MedicationRequest", "NutritionOrder", "ServiceRequest", "ImmunizationRecommendation" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-category", + "resource": { + "resourceType": "SearchParameter", + "id": "DiagnosticReport-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Which diagnostic discipline/department created the report", + "code": "category", + "base": [ "DiagnosticReport" ], + "type": "token", + "expression": "DiagnosticReport.category", + "xpath": "f:DiagnosticReport/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-conclusion", + "resource": { + "resourceType": "SearchParameter", + "id": "DiagnosticReport-conclusion", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-conclusion", + "version": "4.0.1", + "name": "conclusion", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "A coded conclusion (interpretation/impression) on the report", + "code": "conclusion", + "base": [ "DiagnosticReport" ], + "type": "token", + "expression": "DiagnosticReport.conclusionCode", + "xpath": "f:DiagnosticReport/f:conclusionCode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-issued", + "resource": { + "resourceType": "SearchParameter", + "id": "DiagnosticReport-issued", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-issued", + "version": "4.0.1", + "name": "issued", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "When the report was issued", + "code": "issued", + "base": [ "DiagnosticReport" ], + "type": "date", + "expression": "DiagnosticReport.issued", + "xpath": "f:DiagnosticReport/f:issued", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-media", + "resource": { + "resourceType": "SearchParameter", + "id": "DiagnosticReport-media", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-media", + "version": "4.0.1", + "name": "media", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "A reference to the image source.", + "code": "media", + "base": [ "DiagnosticReport" ], + "type": "reference", + "expression": "DiagnosticReport.media.link", + "xpath": "f:DiagnosticReport/f:media/f:link", + "xpathUsage": "normal", + "target": [ "Media" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-performer", + "resource": { + "resourceType": "SearchParameter", + "id": "DiagnosticReport-performer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-performer", + "version": "4.0.1", + "name": "performer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Who is responsible for the report", + "code": "performer", + "base": [ "DiagnosticReport" ], + "type": "reference", + "expression": "DiagnosticReport.performer", + "xpath": "f:DiagnosticReport/f:performer", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "CareTeam", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-result", + "resource": { + "resourceType": "SearchParameter", + "id": "DiagnosticReport-result", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-result", + "version": "4.0.1", + "name": "result", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Link to an atomic result (observation resource)", + "code": "result", + "base": [ "DiagnosticReport" ], + "type": "reference", + "expression": "DiagnosticReport.result", + "xpath": "f:DiagnosticReport/f:result", + "xpathUsage": "normal", + "target": [ "Observation" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-results-interpreter", + "resource": { + "resourceType": "SearchParameter", + "id": "DiagnosticReport-results-interpreter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-results-interpreter", + "version": "4.0.1", + "name": "results-interpreter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Who was the source of the report", + "code": "results-interpreter", + "base": [ "DiagnosticReport" ], + "type": "reference", + "expression": "DiagnosticReport.resultsInterpreter", + "xpath": "f:DiagnosticReport/f:resultsInterpreter", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "CareTeam", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-specimen", + "resource": { + "resourceType": "SearchParameter", + "id": "DiagnosticReport-specimen", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-specimen", + "version": "4.0.1", + "name": "specimen", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The specimen details", + "code": "specimen", + "base": [ "DiagnosticReport" ], + "type": "reference", + "expression": "DiagnosticReport.specimen", + "xpath": "f:DiagnosticReport/f:specimen", + "xpathUsage": "normal", + "target": [ "Specimen" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-status", + "resource": { + "resourceType": "SearchParameter", + "id": "DiagnosticReport-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The status of the report", + "code": "status", + "base": [ "DiagnosticReport" ], + "type": "token", + "expression": "DiagnosticReport.status", + "xpath": "f:DiagnosticReport/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "DiagnosticReport-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DiagnosticReport-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The subject of the report", + "code": "subject", + "base": [ "DiagnosticReport" ], + "type": "reference", + "expression": "DiagnosticReport.subject", + "xpath": "f:DiagnosticReport/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Device", "Patient", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentManifest-author", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentManifest-author", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentManifest-author", + "version": "4.0.1", + "name": "author", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Who and/or what authored the DocumentManifest", + "code": "author", + "base": [ "DocumentManifest" ], + "type": "reference", + "expression": "DocumentManifest.author", + "xpath": "f:DocumentManifest/f:author", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentManifest-created", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentManifest-created", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentManifest-created", + "version": "4.0.1", + "name": "created", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "When this document manifest created", + "code": "created", + "base": [ "DocumentManifest" ], + "type": "date", + "expression": "DocumentManifest.created", + "xpath": "f:DocumentManifest/f:created", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentManifest-description", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentManifest-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentManifest-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Human-readable description (title)", + "code": "description", + "base": [ "DocumentManifest" ], + "type": "string", + "expression": "DocumentManifest.description", + "xpath": "f:DocumentManifest/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentManifest-item", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentManifest-item", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentManifest-item", + "version": "4.0.1", + "name": "item", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Items in manifest", + "code": "item", + "base": [ "DocumentManifest" ], + "type": "reference", + "expression": "DocumentManifest.content", + "xpath": "f:DocumentManifest/f:content", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentManifest-recipient", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentManifest-recipient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentManifest-recipient", + "version": "4.0.1", + "name": "recipient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Intended to get notified about this set of documents", + "code": "recipient", + "base": [ "DocumentManifest" ], + "type": "reference", + "expression": "DocumentManifest.recipient", + "xpath": "f:DocumentManifest/f:recipient", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentManifest-related-id", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentManifest-related-id", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentManifest-related-id", + "version": "4.0.1", + "name": "related-id", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Identifiers of things that are related", + "code": "related-id", + "base": [ "DocumentManifest" ], + "type": "token", + "expression": "DocumentManifest.related.identifier", + "xpath": "f:DocumentManifest/f:related/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentManifest-related-ref", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentManifest-related-ref", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentManifest-related-ref", + "version": "4.0.1", + "name": "related-ref", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Related Resource", + "code": "related-ref", + "base": [ "DocumentManifest" ], + "type": "reference", + "expression": "DocumentManifest.related.ref", + "xpath": "f:DocumentManifest/f:related/f:ref", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentManifest-source", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentManifest-source", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentManifest-source", + "version": "4.0.1", + "name": "source", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "The source system/application/software", + "code": "source", + "base": [ "DocumentManifest" ], + "type": "uri", + "expression": "DocumentManifest.source", + "xpath": "f:DocumentManifest/f:source", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentManifest-status", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentManifest-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentManifest-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "current | superseded | entered-in-error", + "code": "status", + "base": [ "DocumentManifest" ], + "type": "token", + "expression": "DocumentManifest.status", + "xpath": "f:DocumentManifest/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentManifest-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentManifest-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentManifest-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "The subject of the set of documents", + "code": "subject", + "base": [ "DocumentManifest" ], + "type": "reference", + "expression": "DocumentManifest.subject", + "xpath": "f:DocumentManifest/f:subject", + "xpathUsage": "normal", + "target": [ "Practitioner", "Group", "Device", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-authenticator", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-authenticator", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-authenticator", + "version": "4.0.1", + "name": "authenticator", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Who/what authenticated the document", + "code": "authenticator", + "base": [ "DocumentReference" ], + "type": "reference", + "expression": "DocumentReference.authenticator", + "xpath": "f:DocumentReference/f:authenticator", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-author", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-author", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-author", + "version": "4.0.1", + "name": "author", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Who and/or what authored the document", + "code": "author", + "base": [ "DocumentReference" ], + "type": "reference", + "expression": "DocumentReference.author", + "xpath": "f:DocumentReference/f:author", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-category", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Categorization of document", + "code": "category", + "base": [ "DocumentReference" ], + "type": "token", + "expression": "DocumentReference.category", + "xpath": "f:DocumentReference/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-contenttype", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-contenttype", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-contenttype", + "version": "4.0.1", + "name": "contenttype", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Mime type of the content, with charset etc.", + "code": "contenttype", + "base": [ "DocumentReference" ], + "type": "token", + "expression": "DocumentReference.content.attachment.contentType", + "xpath": "f:DocumentReference/f:content/f:attachment/f:contentType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-custodian", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-custodian", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-custodian", + "version": "4.0.1", + "name": "custodian", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Organization which maintains the document", + "code": "custodian", + "base": [ "DocumentReference" ], + "type": "reference", + "expression": "DocumentReference.custodian", + "xpath": "f:DocumentReference/f:custodian", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-date", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "When this document reference was created", + "code": "date", + "base": [ "DocumentReference" ], + "type": "date", + "expression": "DocumentReference.date", + "xpath": "f:DocumentReference/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-description", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Human-readable description", + "code": "description", + "base": [ "DocumentReference" ], + "type": "string", + "expression": "DocumentReference.description", + "xpath": "f:DocumentReference/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-event", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-event", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-event", + "version": "4.0.1", + "name": "event", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Main clinical acts documented", + "code": "event", + "base": [ "DocumentReference" ], + "type": "token", + "expression": "DocumentReference.context.event", + "xpath": "f:DocumentReference/f:context/f:event", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-facility", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-facility", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-facility", + "version": "4.0.1", + "name": "facility", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Kind of facility where patient was seen", + "code": "facility", + "base": [ "DocumentReference" ], + "type": "token", + "expression": "DocumentReference.context.facilityType", + "xpath": "f:DocumentReference/f:context/f:facilityType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-format", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-format", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-format", + "version": "4.0.1", + "name": "format", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Format/content rules for the document", + "code": "format", + "base": [ "DocumentReference" ], + "type": "token", + "expression": "DocumentReference.content.format", + "xpath": "f:DocumentReference/f:content/f:format", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-language", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-language", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-language", + "version": "4.0.1", + "name": "language", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Human language of the content (BCP-47)", + "code": "language", + "base": [ "DocumentReference" ], + "type": "token", + "expression": "DocumentReference.content.attachment.language", + "xpath": "f:DocumentReference/f:content/f:attachment/f:language", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-location", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Uri where the data can be found", + "code": "location", + "base": [ "DocumentReference" ], + "type": "uri", + "expression": "DocumentReference.content.attachment.url", + "xpath": "f:DocumentReference/f:content/f:attachment/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-period", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-period", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-period", + "version": "4.0.1", + "name": "period", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Time of service that is being documented", + "code": "period", + "base": [ "DocumentReference" ], + "type": "date", + "expression": "DocumentReference.context.period", + "xpath": "f:DocumentReference/f:context/f:period", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-related", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-related", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-related", + "version": "4.0.1", + "name": "related", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Related identifiers or resources", + "code": "related", + "base": [ "DocumentReference" ], + "type": "reference", + "expression": "DocumentReference.context.related", + "xpath": "f:DocumentReference/f:context/f:related", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-relatesto", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-relatesto", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-relatesto", + "version": "4.0.1", + "name": "relatesto", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Target of the relationship", + "code": "relatesto", + "base": [ "DocumentReference" ], + "type": "reference", + "expression": "DocumentReference.relatesTo.target", + "xpath": "f:DocumentReference/f:relatesTo/f:target", + "xpathUsage": "normal", + "target": [ "DocumentReference" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-relation", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-relation", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-relation", + "version": "4.0.1", + "name": "relation", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "replaces | transforms | signs | appends", + "code": "relation", + "base": [ "DocumentReference" ], + "type": "token", + "expression": "DocumentReference.relatesTo.code", + "xpath": "f:DocumentReference/f:relatesTo/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-security-label", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-security-label", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-security-label", + "version": "4.0.1", + "name": "security-label", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Document security-tags", + "code": "security-label", + "base": [ "DocumentReference" ], + "type": "token", + "expression": "DocumentReference.securityLabel", + "xpath": "f:DocumentReference/f:securityLabel", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-setting", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-setting", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-setting", + "version": "4.0.1", + "name": "setting", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Additional details about where the content was created (e.g. clinical specialty)", + "code": "setting", + "base": [ "DocumentReference" ], + "type": "token", + "expression": "DocumentReference.context.practiceSetting", + "xpath": "f:DocumentReference/f:context/f:practiceSetting", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-status", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "current | superseded | entered-in-error", + "code": "status", + "base": [ "DocumentReference" ], + "type": "token", + "expression": "DocumentReference.status", + "xpath": "f:DocumentReference/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Who/what is the subject of the document", + "code": "subject", + "base": [ "DocumentReference" ], + "type": "reference", + "expression": "DocumentReference.subject", + "xpath": "f:DocumentReference/f:subject", + "xpathUsage": "normal", + "target": [ "Practitioner", "Group", "Device", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/DocumentReference-relationship", + "resource": { + "resourceType": "SearchParameter", + "id": "DocumentReference-relationship", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/DocumentReference-relationship", + "version": "4.0.1", + "name": "relationship", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Structured Documents)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/structure/index.cfm" + } ] + } ], + "description": "Combination of relation and relatesTo", + "code": "relationship", + "base": [ "DocumentReference" ], + "type": "composite", + "expression": "DocumentReference.relatesTo", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/DocumentReference-relatesto", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/DocumentReference-relation", + "expression": "target" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context assigned to the effect evidence synthesis", + "code": "context", + "base": [ "EffectEvidenceSynthesis" ], + "type": "token", + "expression": "(EffectEvidenceSynthesis.useContext.value as CodeableConcept)", + "xpath": "f:EffectEvidenceSynthesis/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the effect evidence synthesis", + "code": "context-quantity", + "base": [ "EffectEvidenceSynthesis" ], + "type": "quantity", + "expression": "(EffectEvidenceSynthesis.useContext.value as Quantity) | (EffectEvidenceSynthesis.useContext.value as Range)", + "xpath": "f:EffectEvidenceSynthesis/f:useContext/f:valueQuantity | f:EffectEvidenceSynthesis/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the effect evidence synthesis", + "code": "context-type", + "base": [ "EffectEvidenceSynthesis" ], + "type": "token", + "expression": "EffectEvidenceSynthesis.useContext.code", + "xpath": "f:EffectEvidenceSynthesis/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-date", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The effect evidence synthesis publication date", + "code": "date", + "base": [ "EffectEvidenceSynthesis" ], + "type": "date", + "expression": "EffectEvidenceSynthesis.date", + "xpath": "f:EffectEvidenceSynthesis/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-description", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The description of the effect evidence synthesis", + "code": "description", + "base": [ "EffectEvidenceSynthesis" ], + "type": "string", + "expression": "EffectEvidenceSynthesis.description", + "xpath": "f:EffectEvidenceSynthesis/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The time during which the effect evidence synthesis is intended to be in use", + "code": "effective", + "base": [ "EffectEvidenceSynthesis" ], + "type": "date", + "expression": "EffectEvidenceSynthesis.effectivePeriod", + "xpath": "f:EffectEvidenceSynthesis/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "External identifier for the effect evidence synthesis", + "code": "identifier", + "base": [ "EffectEvidenceSynthesis" ], + "type": "token", + "expression": "EffectEvidenceSynthesis.identifier", + "xpath": "f:EffectEvidenceSynthesis/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the effect evidence synthesis", + "code": "jurisdiction", + "base": [ "EffectEvidenceSynthesis" ], + "type": "token", + "expression": "EffectEvidenceSynthesis.jurisdiction", + "xpath": "f:EffectEvidenceSynthesis/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-name", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the effect evidence synthesis", + "code": "name", + "base": [ "EffectEvidenceSynthesis" ], + "type": "string", + "expression": "EffectEvidenceSynthesis.name", + "xpath": "f:EffectEvidenceSynthesis/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Name of the publisher of the effect evidence synthesis", + "code": "publisher", + "base": [ "EffectEvidenceSynthesis" ], + "type": "string", + "expression": "EffectEvidenceSynthesis.publisher", + "xpath": "f:EffectEvidenceSynthesis/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-status", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The current status of the effect evidence synthesis", + "code": "status", + "base": [ "EffectEvidenceSynthesis" ], + "type": "token", + "expression": "EffectEvidenceSynthesis.status", + "xpath": "f:EffectEvidenceSynthesis/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-title", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The human-friendly name of the effect evidence synthesis", + "code": "title", + "base": [ "EffectEvidenceSynthesis" ], + "type": "string", + "expression": "EffectEvidenceSynthesis.title", + "xpath": "f:EffectEvidenceSynthesis/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-url", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The uri that identifies the effect evidence synthesis", + "code": "url", + "base": [ "EffectEvidenceSynthesis" ], + "type": "uri", + "expression": "EffectEvidenceSynthesis.url", + "xpath": "f:EffectEvidenceSynthesis/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-version", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The business version of the effect evidence synthesis", + "code": "version", + "base": [ "EffectEvidenceSynthesis" ], + "type": "token", + "expression": "EffectEvidenceSynthesis.version", + "xpath": "f:EffectEvidenceSynthesis/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the effect evidence synthesis", + "code": "context-type-quantity", + "base": [ "EffectEvidenceSynthesis" ], + "type": "composite", + "expression": "EffectEvidenceSynthesis.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "EffectEvidenceSynthesis-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the effect evidence synthesis", + "code": "context-type-value", + "base": [ "EffectEvidenceSynthesis" ], + "type": "composite", + "expression": "EffectEvidenceSynthesis.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-account", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-account", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-account", + "version": "4.0.1", + "name": "account", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The set of accounts that may be used for billing for this Encounter", + "code": "account", + "base": [ "Encounter" ], + "type": "reference", + "expression": "Encounter.account", + "xpath": "f:Encounter/f:account", + "xpathUsage": "normal", + "target": [ "Account" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-appointment", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-appointment", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-appointment", + "version": "4.0.1", + "name": "appointment", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The appointment that scheduled this encounter", + "code": "appointment", + "base": [ "Encounter" ], + "type": "reference", + "expression": "Encounter.appointment", + "xpath": "f:Encounter/f:appointment", + "xpathUsage": "normal", + "target": [ "Appointment" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-based-on", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-based-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-based-on", + "version": "4.0.1", + "name": "based-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The ServiceRequest that initiated this encounter", + "code": "based-on", + "base": [ "Encounter" ], + "type": "reference", + "expression": "Encounter.basedOn", + "xpath": "f:Encounter/f:basedOn", + "xpathUsage": "normal", + "target": [ "ServiceRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-class", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-class", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-class", + "version": "4.0.1", + "name": "class", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Classification of patient encounter", + "code": "class", + "base": [ "Encounter" ], + "type": "token", + "expression": "Encounter.class", + "xpath": "f:Encounter/f:class", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-diagnosis", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-diagnosis", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-diagnosis", + "version": "4.0.1", + "name": "diagnosis", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The diagnosis or procedure relevant to the encounter", + "code": "diagnosis", + "base": [ "Encounter" ], + "type": "reference", + "expression": "Encounter.diagnosis.condition", + "xpath": "f:Encounter/f:diagnosis/f:condition", + "xpathUsage": "normal", + "target": [ "Condition", "Procedure" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-episode-of-care", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-episode-of-care", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-episode-of-care", + "version": "4.0.1", + "name": "episode-of-care", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Episode(s) of care that this encounter should be recorded against", + "code": "episode-of-care", + "base": [ "Encounter" ], + "type": "reference", + "expression": "Encounter.episodeOfCare", + "xpath": "f:Encounter/f:episodeOfCare", + "xpathUsage": "normal", + "target": [ "EpisodeOfCare" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-length", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-length", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-length", + "version": "4.0.1", + "name": "length", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Length of encounter in days", + "code": "length", + "base": [ "Encounter" ], + "type": "quantity", + "expression": "Encounter.length", + "xpath": "f:Encounter/f:length", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-location", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Location the encounter takes place", + "code": "location", + "base": [ "Encounter" ], + "type": "reference", + "expression": "Encounter.location.location", + "xpath": "f:Encounter/f:location/f:location", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-location-period", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-location-period", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-location-period", + "version": "4.0.1", + "name": "location-period", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Time period during which the patient was present at the location", + "code": "location-period", + "base": [ "Encounter" ], + "type": "date", + "expression": "Encounter.location.period", + "xpath": "f:Encounter/f:location/f:period", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-part-of", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-part-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-part-of", + "version": "4.0.1", + "name": "part-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Another Encounter this encounter is part of", + "code": "part-of", + "base": [ "Encounter" ], + "type": "reference", + "expression": "Encounter.partOf", + "xpath": "f:Encounter/f:partOf", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-participant", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-participant", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-participant", + "version": "4.0.1", + "name": "participant", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Persons involved in the encounter other than the patient", + "code": "participant", + "base": [ "Encounter" ], + "type": "reference", + "expression": "Encounter.participant.individual", + "xpath": "f:Encounter/f:participant/f:individual", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-participant-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-participant-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-participant-type", + "version": "4.0.1", + "name": "participant-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Role of participant in encounter", + "code": "participant-type", + "base": [ "Encounter" ], + "type": "token", + "expression": "Encounter.participant.type", + "xpath": "f:Encounter/f:participant/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-practitioner", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-practitioner", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-practitioner", + "version": "4.0.1", + "name": "practitioner", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Persons involved in the encounter other than the patient", + "code": "practitioner", + "base": [ "Encounter" ], + "type": "reference", + "expression": "Encounter.participant.individual.where(resolve() is Practitioner)", + "xpath": "f:Encounter/f:participant/f:individual", + "xpathUsage": "normal", + "target": [ "Practitioner" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-reason-code", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-reason-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-reason-code", + "version": "4.0.1", + "name": "reason-code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Coded reason the encounter takes place", + "code": "reason-code", + "base": [ "Encounter" ], + "type": "token", + "expression": "Encounter.reasonCode", + "xpath": "f:Encounter/f:reasonCode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-reason-reference", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-reason-reference", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-reason-reference", + "version": "4.0.1", + "name": "reason-reference", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Reason the encounter takes place (reference)", + "code": "reason-reference", + "base": [ "Encounter" ], + "type": "reference", + "expression": "Encounter.reasonReference", + "xpath": "f:Encounter/f:reasonReference", + "xpathUsage": "normal", + "target": [ "Condition", "Observation", "Procedure", "ImmunizationRecommendation" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-service-provider", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-service-provider", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-service-provider", + "version": "4.0.1", + "name": "service-provider", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The organization (facility) responsible for this encounter", + "code": "service-provider", + "base": [ "Encounter" ], + "type": "reference", + "expression": "Encounter.serviceProvider", + "xpath": "f:Encounter/f:serviceProvider", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-special-arrangement", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-special-arrangement", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-special-arrangement", + "version": "4.0.1", + "name": "special-arrangement", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Wheelchair, translator, stretcher, etc.", + "code": "special-arrangement", + "base": [ "Encounter" ], + "type": "token", + "expression": "Encounter.hospitalization.specialArrangement", + "xpath": "f:Encounter/f:hospitalization/f:specialArrangement", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "planned | arrived | triaged | in-progress | onleave | finished | cancelled +", + "code": "status", + "base": [ "Encounter" ], + "type": "token", + "expression": "Encounter.status", + "xpath": "f:Encounter/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Encounter-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Encounter-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Encounter-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The patient or group present at the encounter", + "code": "subject", + "base": [ "Encounter" ], + "type": "reference", + "expression": "Encounter.subject", + "xpath": "f:Encounter/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Endpoint-connection-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Endpoint-connection-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Endpoint-connection-type", + "version": "4.0.1", + "name": "connection-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Protocol/Profile/Standard to be used with this endpoint connection", + "code": "connection-type", + "base": [ "Endpoint" ], + "type": "token", + "expression": "Endpoint.connectionType", + "xpath": "f:Endpoint/f:connectionType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Endpoint-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Endpoint-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Endpoint-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Identifies this endpoint across multiple systems", + "code": "identifier", + "base": [ "Endpoint" ], + "type": "token", + "expression": "Endpoint.identifier", + "xpath": "f:Endpoint/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Endpoint-name", + "resource": { + "resourceType": "SearchParameter", + "id": "Endpoint-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Endpoint-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A name that this endpoint can be identified by", + "code": "name", + "base": [ "Endpoint" ], + "type": "string", + "expression": "Endpoint.name", + "xpath": "f:Endpoint/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Endpoint-organization", + "resource": { + "resourceType": "SearchParameter", + "id": "Endpoint-organization", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Endpoint-organization", + "version": "4.0.1", + "name": "organization", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The organization that is managing the endpoint", + "code": "organization", + "base": [ "Endpoint" ], + "type": "reference", + "expression": "Endpoint.managingOrganization", + "xpath": "f:Endpoint/f:managingOrganization", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Endpoint-payload-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Endpoint-payload-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Endpoint-payload-type", + "version": "4.0.1", + "name": "payload-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The type of content that may be used at this endpoint (e.g. XDS Discharge summaries)", + "code": "payload-type", + "base": [ "Endpoint" ], + "type": "token", + "expression": "Endpoint.payloadType", + "xpath": "f:Endpoint/f:payloadType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Endpoint-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Endpoint-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Endpoint-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The current status of the Endpoint (usually expected to be active)", + "code": "status", + "base": [ "Endpoint" ], + "type": "token", + "expression": "Endpoint.status", + "xpath": "f:Endpoint/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EnrollmentRequest-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "EnrollmentRequest-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EnrollmentRequest-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The business identifier of the Enrollment", + "code": "identifier", + "base": [ "EnrollmentRequest" ], + "type": "token", + "expression": "EnrollmentRequest.identifier", + "xpath": "f:EnrollmentRequest/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EnrollmentRequest-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "EnrollmentRequest-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EnrollmentRequest-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The party to be enrolled", + "code": "patient", + "base": [ "EnrollmentRequest" ], + "type": "reference", + "expression": "EnrollmentRequest.candidate", + "xpath": "f:EnrollmentRequest/f:candidate", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EnrollmentRequest-status", + "resource": { + "resourceType": "SearchParameter", + "id": "EnrollmentRequest-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EnrollmentRequest-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The status of the enrollment", + "code": "status", + "base": [ "EnrollmentRequest" ], + "type": "token", + "expression": "EnrollmentRequest.status", + "xpath": "f:EnrollmentRequest/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EnrollmentRequest-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "EnrollmentRequest-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EnrollmentRequest-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The party to be enrolled", + "code": "subject", + "base": [ "EnrollmentRequest" ], + "type": "reference", + "expression": "EnrollmentRequest.candidate", + "xpath": "f:EnrollmentRequest/f:candidate", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EnrollmentResponse-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "EnrollmentResponse-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EnrollmentResponse-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The business identifier of the EnrollmentResponse", + "code": "identifier", + "base": [ "EnrollmentResponse" ], + "type": "token", + "expression": "EnrollmentResponse.identifier", + "xpath": "f:EnrollmentResponse/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EnrollmentResponse-request", + "resource": { + "resourceType": "SearchParameter", + "id": "EnrollmentResponse-request", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EnrollmentResponse-request", + "version": "4.0.1", + "name": "request", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The reference to the claim", + "code": "request", + "base": [ "EnrollmentResponse" ], + "type": "reference", + "expression": "EnrollmentResponse.request", + "xpath": "f:EnrollmentResponse/f:request", + "xpathUsage": "normal", + "target": [ "EnrollmentRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EnrollmentResponse-status", + "resource": { + "resourceType": "SearchParameter", + "id": "EnrollmentResponse-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EnrollmentResponse-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The status of the enrollment response", + "code": "status", + "base": [ "EnrollmentResponse" ], + "type": "token", + "expression": "EnrollmentResponse.status", + "xpath": "f:EnrollmentResponse/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EpisodeOfCare-care-manager", + "resource": { + "resourceType": "SearchParameter", + "id": "EpisodeOfCare-care-manager", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EpisodeOfCare-care-manager", + "version": "4.0.1", + "name": "care-manager", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Care manager/care coordinator for the patient", + "code": "care-manager", + "base": [ "EpisodeOfCare" ], + "type": "reference", + "expression": "EpisodeOfCare.careManager.where(resolve() is Practitioner)", + "xpath": "f:EpisodeOfCare/f:careManager", + "xpathUsage": "normal", + "target": [ "Practitioner" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EpisodeOfCare-condition", + "resource": { + "resourceType": "SearchParameter", + "id": "EpisodeOfCare-condition", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EpisodeOfCare-condition", + "version": "4.0.1", + "name": "condition", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Conditions/problems/diagnoses this episode of care is for", + "code": "condition", + "base": [ "EpisodeOfCare" ], + "type": "reference", + "expression": "EpisodeOfCare.diagnosis.condition", + "xpath": "f:EpisodeOfCare/f:diagnosis/f:condition", + "xpathUsage": "normal", + "target": [ "Condition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EpisodeOfCare-incoming-referral", + "resource": { + "resourceType": "SearchParameter", + "id": "EpisodeOfCare-incoming-referral", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EpisodeOfCare-incoming-referral", + "version": "4.0.1", + "name": "incoming-referral", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Incoming Referral Request", + "code": "incoming-referral", + "base": [ "EpisodeOfCare" ], + "type": "reference", + "expression": "EpisodeOfCare.referralRequest", + "xpath": "f:EpisodeOfCare/f:referralRequest", + "xpathUsage": "normal", + "target": [ "ServiceRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EpisodeOfCare-organization", + "resource": { + "resourceType": "SearchParameter", + "id": "EpisodeOfCare-organization", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EpisodeOfCare-organization", + "version": "4.0.1", + "name": "organization", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The organization that has assumed the specific responsibilities of this EpisodeOfCare", + "code": "organization", + "base": [ "EpisodeOfCare" ], + "type": "reference", + "expression": "EpisodeOfCare.managingOrganization", + "xpath": "f:EpisodeOfCare/f:managingOrganization", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EpisodeOfCare-status", + "resource": { + "resourceType": "SearchParameter", + "id": "EpisodeOfCare-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EpisodeOfCare-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The current status of the Episode of Care as provided (does not check the status history collection)", + "code": "status", + "base": [ "EpisodeOfCare" ], + "type": "token", + "expression": "EpisodeOfCare.status", + "xpath": "f:EpisodeOfCare/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-composed-of", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-composed-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-composed-of", + "version": "4.0.1", + "name": "composed-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "composed-of", + "base": [ "EventDefinition" ], + "type": "reference", + "expression": "EventDefinition.relatedArtifact.where(type='composed-of').resource", + "xpath": "f:EventDefinition/f:relatedArtifact[f:type/@value='composed-of']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-context", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context assigned to the event definition", + "code": "context", + "base": [ "EventDefinition" ], + "type": "token", + "expression": "(EventDefinition.useContext.value as CodeableConcept)", + "xpath": "f:EventDefinition/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the event definition", + "code": "context-quantity", + "base": [ "EventDefinition" ], + "type": "quantity", + "expression": "(EventDefinition.useContext.value as Quantity) | (EventDefinition.useContext.value as Range)", + "xpath": "f:EventDefinition/f:useContext/f:valueQuantity | f:EventDefinition/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the event definition", + "code": "context-type", + "base": [ "EventDefinition" ], + "type": "token", + "expression": "EventDefinition.useContext.code", + "xpath": "f:EventDefinition/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-date", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The event definition publication date", + "code": "date", + "base": [ "EventDefinition" ], + "type": "date", + "expression": "EventDefinition.date", + "xpath": "f:EventDefinition/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-depends-on", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-depends-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-depends-on", + "version": "4.0.1", + "name": "depends-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "depends-on", + "base": [ "EventDefinition" ], + "type": "reference", + "expression": "EventDefinition.relatedArtifact.where(type='depends-on').resource", + "xpath": "f:EventDefinition/f:relatedArtifact[f:type/@value='depends-on']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-derived-from", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-derived-from", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-derived-from", + "version": "4.0.1", + "name": "derived-from", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "derived-from", + "base": [ "EventDefinition" ], + "type": "reference", + "expression": "EventDefinition.relatedArtifact.where(type='derived-from').resource", + "xpath": "f:EventDefinition/f:relatedArtifact[f:type/@value='derived-from']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-description", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The description of the event definition", + "code": "description", + "base": [ "EventDefinition" ], + "type": "string", + "expression": "EventDefinition.description", + "xpath": "f:EventDefinition/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The time during which the event definition is intended to be in use", + "code": "effective", + "base": [ "EventDefinition" ], + "type": "date", + "expression": "EventDefinition.effectivePeriod", + "xpath": "f:EventDefinition/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "External identifier for the event definition", + "code": "identifier", + "base": [ "EventDefinition" ], + "type": "token", + "expression": "EventDefinition.identifier", + "xpath": "f:EventDefinition/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the event definition", + "code": "jurisdiction", + "base": [ "EventDefinition" ], + "type": "token", + "expression": "EventDefinition.jurisdiction", + "xpath": "f:EventDefinition/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-name", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the event definition", + "code": "name", + "base": [ "EventDefinition" ], + "type": "string", + "expression": "EventDefinition.name", + "xpath": "f:EventDefinition/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-predecessor", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-predecessor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-predecessor", + "version": "4.0.1", + "name": "predecessor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "predecessor", + "base": [ "EventDefinition" ], + "type": "reference", + "expression": "EventDefinition.relatedArtifact.where(type='predecessor').resource", + "xpath": "f:EventDefinition/f:relatedArtifact[f:type/@value='predecessor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Name of the publisher of the event definition", + "code": "publisher", + "base": [ "EventDefinition" ], + "type": "string", + "expression": "EventDefinition.publisher", + "xpath": "f:EventDefinition/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-status", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The current status of the event definition", + "code": "status", + "base": [ "EventDefinition" ], + "type": "token", + "expression": "EventDefinition.status", + "xpath": "f:EventDefinition/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-successor", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-successor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-successor", + "version": "4.0.1", + "name": "successor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "successor", + "base": [ "EventDefinition" ], + "type": "reference", + "expression": "EventDefinition.relatedArtifact.where(type='successor').resource", + "xpath": "f:EventDefinition/f:relatedArtifact[f:type/@value='successor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-title", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The human-friendly name of the event definition", + "code": "title", + "base": [ "EventDefinition" ], + "type": "string", + "expression": "EventDefinition.title", + "xpath": "f:EventDefinition/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-topic", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-topic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-topic", + "version": "4.0.1", + "name": "topic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Topics associated with the module", + "code": "topic", + "base": [ "EventDefinition" ], + "type": "token", + "expression": "EventDefinition.topic", + "xpath": "f:EventDefinition/f:topic", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-url", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The uri that identifies the event definition", + "code": "url", + "base": [ "EventDefinition" ], + "type": "uri", + "expression": "EventDefinition.url", + "xpath": "f:EventDefinition/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-version", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The business version of the event definition", + "code": "version", + "base": [ "EventDefinition" ], + "type": "token", + "expression": "EventDefinition.version", + "xpath": "f:EventDefinition/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the event definition", + "code": "context-type-quantity", + "base": [ "EventDefinition" ], + "type": "composite", + "expression": "EventDefinition.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/EventDefinition-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/EventDefinition-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EventDefinition-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "EventDefinition-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EventDefinition-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the event definition", + "code": "context-type-value", + "base": [ "EventDefinition" ], + "type": "composite", + "expression": "EventDefinition.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/EventDefinition-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/EventDefinition-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-composed-of", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-composed-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-composed-of", + "version": "4.0.1", + "name": "composed-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "composed-of", + "base": [ "Evidence" ], + "type": "reference", + "expression": "Evidence.relatedArtifact.where(type='composed-of').resource", + "xpath": "f:Evidence/f:relatedArtifact[f:type/@value='composed-of']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-context", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context assigned to the evidence", + "code": "context", + "base": [ "Evidence" ], + "type": "token", + "expression": "(Evidence.useContext.value as CodeableConcept)", + "xpath": "f:Evidence/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the evidence", + "code": "context-quantity", + "base": [ "Evidence" ], + "type": "quantity", + "expression": "(Evidence.useContext.value as Quantity) | (Evidence.useContext.value as Range)", + "xpath": "f:Evidence/f:useContext/f:valueQuantity | f:Evidence/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the evidence", + "code": "context-type", + "base": [ "Evidence" ], + "type": "token", + "expression": "Evidence.useContext.code", + "xpath": "f:Evidence/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The evidence publication date", + "code": "date", + "base": [ "Evidence" ], + "type": "date", + "expression": "Evidence.date", + "xpath": "f:Evidence/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-depends-on", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-depends-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-depends-on", + "version": "4.0.1", + "name": "depends-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "depends-on", + "base": [ "Evidence" ], + "type": "reference", + "expression": "Evidence.relatedArtifact.where(type='depends-on').resource", + "xpath": "f:Evidence/f:relatedArtifact[f:type/@value='depends-on']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-derived-from", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-derived-from", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-derived-from", + "version": "4.0.1", + "name": "derived-from", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "derived-from", + "base": [ "Evidence" ], + "type": "reference", + "expression": "Evidence.relatedArtifact.where(type='derived-from').resource", + "xpath": "f:Evidence/f:relatedArtifact[f:type/@value='derived-from']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-description", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The description of the evidence", + "code": "description", + "base": [ "Evidence" ], + "type": "string", + "expression": "Evidence.description", + "xpath": "f:Evidence/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The time during which the evidence is intended to be in use", + "code": "effective", + "base": [ "Evidence" ], + "type": "date", + "expression": "Evidence.effectivePeriod", + "xpath": "f:Evidence/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "External identifier for the evidence", + "code": "identifier", + "base": [ "Evidence" ], + "type": "token", + "expression": "Evidence.identifier", + "xpath": "f:Evidence/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the evidence", + "code": "jurisdiction", + "base": [ "Evidence" ], + "type": "token", + "expression": "Evidence.jurisdiction", + "xpath": "f:Evidence/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-name", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the evidence", + "code": "name", + "base": [ "Evidence" ], + "type": "string", + "expression": "Evidence.name", + "xpath": "f:Evidence/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-predecessor", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-predecessor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-predecessor", + "version": "4.0.1", + "name": "predecessor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "predecessor", + "base": [ "Evidence" ], + "type": "reference", + "expression": "Evidence.relatedArtifact.where(type='predecessor').resource", + "xpath": "f:Evidence/f:relatedArtifact[f:type/@value='predecessor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Name of the publisher of the evidence", + "code": "publisher", + "base": [ "Evidence" ], + "type": "string", + "expression": "Evidence.publisher", + "xpath": "f:Evidence/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The current status of the evidence", + "code": "status", + "base": [ "Evidence" ], + "type": "token", + "expression": "Evidence.status", + "xpath": "f:Evidence/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-successor", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-successor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-successor", + "version": "4.0.1", + "name": "successor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "successor", + "base": [ "Evidence" ], + "type": "reference", + "expression": "Evidence.relatedArtifact.where(type='successor').resource", + "xpath": "f:Evidence/f:relatedArtifact[f:type/@value='successor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-title", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The human-friendly name of the evidence", + "code": "title", + "base": [ "Evidence" ], + "type": "string", + "expression": "Evidence.title", + "xpath": "f:Evidence/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-topic", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-topic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-topic", + "version": "4.0.1", + "name": "topic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Topics associated with the Evidence", + "code": "topic", + "base": [ "Evidence" ], + "type": "token", + "expression": "Evidence.topic", + "xpath": "f:Evidence/f:topic", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-url", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The uri that identifies the evidence", + "code": "url", + "base": [ "Evidence" ], + "type": "uri", + "expression": "Evidence.url", + "xpath": "f:Evidence/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-version", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The business version of the evidence", + "code": "version", + "base": [ "Evidence" ], + "type": "token", + "expression": "Evidence.version", + "xpath": "f:Evidence/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the evidence", + "code": "context-type-quantity", + "base": [ "Evidence" ], + "type": "composite", + "expression": "Evidence.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/Evidence-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Evidence-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Evidence-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "Evidence-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Evidence-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the evidence", + "code": "context-type-value", + "base": [ "Evidence" ], + "type": "composite", + "expression": "Evidence.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/Evidence-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Evidence-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-composed-of", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-composed-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-composed-of", + "version": "4.0.1", + "name": "composed-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "composed-of", + "base": [ "EvidenceVariable" ], + "type": "reference", + "expression": "EvidenceVariable.relatedArtifact.where(type='composed-of').resource", + "xpath": "f:EvidenceVariable/f:relatedArtifact[f:type/@value='composed-of']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context assigned to the evidence variable", + "code": "context", + "base": [ "EvidenceVariable" ], + "type": "token", + "expression": "(EvidenceVariable.useContext.value as CodeableConcept)", + "xpath": "f:EvidenceVariable/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the evidence variable", + "code": "context-quantity", + "base": [ "EvidenceVariable" ], + "type": "quantity", + "expression": "(EvidenceVariable.useContext.value as Quantity) | (EvidenceVariable.useContext.value as Range)", + "xpath": "f:EvidenceVariable/f:useContext/f:valueQuantity | f:EvidenceVariable/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the evidence variable", + "code": "context-type", + "base": [ "EvidenceVariable" ], + "type": "token", + "expression": "EvidenceVariable.useContext.code", + "xpath": "f:EvidenceVariable/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-date", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The evidence variable publication date", + "code": "date", + "base": [ "EvidenceVariable" ], + "type": "date", + "expression": "EvidenceVariable.date", + "xpath": "f:EvidenceVariable/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-depends-on", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-depends-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-depends-on", + "version": "4.0.1", + "name": "depends-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "depends-on", + "base": [ "EvidenceVariable" ], + "type": "reference", + "expression": "EvidenceVariable.relatedArtifact.where(type='depends-on').resource", + "xpath": "f:EvidenceVariable/f:relatedArtifact[f:type/@value='depends-on']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-derived-from", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-derived-from", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-derived-from", + "version": "4.0.1", + "name": "derived-from", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "derived-from", + "base": [ "EvidenceVariable" ], + "type": "reference", + "expression": "EvidenceVariable.relatedArtifact.where(type='derived-from').resource", + "xpath": "f:EvidenceVariable/f:relatedArtifact[f:type/@value='derived-from']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-description", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The description of the evidence variable", + "code": "description", + "base": [ "EvidenceVariable" ], + "type": "string", + "expression": "EvidenceVariable.description", + "xpath": "f:EvidenceVariable/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The time during which the evidence variable is intended to be in use", + "code": "effective", + "base": [ "EvidenceVariable" ], + "type": "date", + "expression": "EvidenceVariable.effectivePeriod", + "xpath": "f:EvidenceVariable/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "External identifier for the evidence variable", + "code": "identifier", + "base": [ "EvidenceVariable" ], + "type": "token", + "expression": "EvidenceVariable.identifier", + "xpath": "f:EvidenceVariable/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the evidence variable", + "code": "jurisdiction", + "base": [ "EvidenceVariable" ], + "type": "token", + "expression": "EvidenceVariable.jurisdiction", + "xpath": "f:EvidenceVariable/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-name", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the evidence variable", + "code": "name", + "base": [ "EvidenceVariable" ], + "type": "string", + "expression": "EvidenceVariable.name", + "xpath": "f:EvidenceVariable/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-predecessor", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-predecessor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-predecessor", + "version": "4.0.1", + "name": "predecessor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "predecessor", + "base": [ "EvidenceVariable" ], + "type": "reference", + "expression": "EvidenceVariable.relatedArtifact.where(type='predecessor').resource", + "xpath": "f:EvidenceVariable/f:relatedArtifact[f:type/@value='predecessor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Name of the publisher of the evidence variable", + "code": "publisher", + "base": [ "EvidenceVariable" ], + "type": "string", + "expression": "EvidenceVariable.publisher", + "xpath": "f:EvidenceVariable/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-status", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The current status of the evidence variable", + "code": "status", + "base": [ "EvidenceVariable" ], + "type": "token", + "expression": "EvidenceVariable.status", + "xpath": "f:EvidenceVariable/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-successor", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-successor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-successor", + "version": "4.0.1", + "name": "successor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "successor", + "base": [ "EvidenceVariable" ], + "type": "reference", + "expression": "EvidenceVariable.relatedArtifact.where(type='successor').resource", + "xpath": "f:EvidenceVariable/f:relatedArtifact[f:type/@value='successor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-title", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The human-friendly name of the evidence variable", + "code": "title", + "base": [ "EvidenceVariable" ], + "type": "string", + "expression": "EvidenceVariable.title", + "xpath": "f:EvidenceVariable/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-topic", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-topic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-topic", + "version": "4.0.1", + "name": "topic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Topics associated with the EvidenceVariable", + "code": "topic", + "base": [ "EvidenceVariable" ], + "type": "token", + "expression": "EvidenceVariable.topic", + "xpath": "f:EvidenceVariable/f:topic", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-url", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The uri that identifies the evidence variable", + "code": "url", + "base": [ "EvidenceVariable" ], + "type": "uri", + "expression": "EvidenceVariable.url", + "xpath": "f:EvidenceVariable/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-version", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The business version of the evidence variable", + "code": "version", + "base": [ "EvidenceVariable" ], + "type": "token", + "expression": "EvidenceVariable.version", + "xpath": "f:EvidenceVariable/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the evidence variable", + "code": "context-type-quantity", + "base": [ "EvidenceVariable" ], + "type": "composite", + "expression": "EvidenceVariable.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "EvidenceVariable-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the evidence variable", + "code": "context-type-value", + "base": [ "EvidenceVariable" ], + "type": "composite", + "expression": "EvidenceVariable.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/EvidenceVariable-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context", + "resource": { + "resourceType": "SearchParameter", + "id": "ExampleScenario-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A use context assigned to the example scenario", + "code": "context", + "base": [ "ExampleScenario" ], + "type": "token", + "expression": "(ExampleScenario.useContext.value as CodeableConcept)", + "xpath": "f:ExampleScenario/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "ExampleScenario-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the example scenario", + "code": "context-quantity", + "base": [ "ExampleScenario" ], + "type": "quantity", + "expression": "(ExampleScenario.useContext.value as Quantity) | (ExampleScenario.useContext.value as Range)", + "xpath": "f:ExampleScenario/f:useContext/f:valueQuantity | f:ExampleScenario/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "ExampleScenario-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the example scenario", + "code": "context-type", + "base": [ "ExampleScenario" ], + "type": "token", + "expression": "ExampleScenario.useContext.code", + "xpath": "f:ExampleScenario/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExampleScenario-date", + "resource": { + "resourceType": "SearchParameter", + "id": "ExampleScenario-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExampleScenario-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The example scenario publication date", + "code": "date", + "base": [ "ExampleScenario" ], + "type": "date", + "expression": "ExampleScenario.date", + "xpath": "f:ExampleScenario/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExampleScenario-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "ExampleScenario-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExampleScenario-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "External identifier for the example scenario", + "code": "identifier", + "base": [ "ExampleScenario" ], + "type": "token", + "expression": "ExampleScenario.identifier", + "xpath": "f:ExampleScenario/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExampleScenario-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "ExampleScenario-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExampleScenario-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the example scenario", + "code": "jurisdiction", + "base": [ "ExampleScenario" ], + "type": "token", + "expression": "ExampleScenario.jurisdiction", + "xpath": "f:ExampleScenario/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExampleScenario-name", + "resource": { + "resourceType": "SearchParameter", + "id": "ExampleScenario-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExampleScenario-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the example scenario", + "code": "name", + "base": [ "ExampleScenario" ], + "type": "string", + "expression": "ExampleScenario.name", + "xpath": "f:ExampleScenario/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExampleScenario-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "ExampleScenario-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExampleScenario-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Name of the publisher of the example scenario", + "code": "publisher", + "base": [ "ExampleScenario" ], + "type": "string", + "expression": "ExampleScenario.publisher", + "xpath": "f:ExampleScenario/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExampleScenario-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ExampleScenario-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExampleScenario-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The current status of the example scenario", + "code": "status", + "base": [ "ExampleScenario" ], + "type": "token", + "expression": "ExampleScenario.status", + "xpath": "f:ExampleScenario/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExampleScenario-url", + "resource": { + "resourceType": "SearchParameter", + "id": "ExampleScenario-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExampleScenario-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The uri that identifies the example scenario", + "code": "url", + "base": [ "ExampleScenario" ], + "type": "uri", + "expression": "ExampleScenario.url", + "xpath": "f:ExampleScenario/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExampleScenario-version", + "resource": { + "resourceType": "SearchParameter", + "id": "ExampleScenario-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExampleScenario-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The business version of the example scenario", + "code": "version", + "base": [ "ExampleScenario" ], + "type": "token", + "expression": "ExampleScenario.version", + "xpath": "f:ExampleScenario/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "ExampleScenario-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the example scenario", + "code": "context-type-quantity", + "base": [ "ExampleScenario" ], + "type": "composite", + "expression": "ExampleScenario.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "ExampleScenario-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the example scenario", + "code": "context-type-value", + "base": [ "ExampleScenario" ], + "type": "composite", + "expression": "ExampleScenario.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/ExampleScenario-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-care-team", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-care-team", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-care-team", + "version": "4.0.1", + "name": "care-team", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Member of the CareTeam", + "code": "care-team", + "base": [ "ExplanationOfBenefit" ], + "type": "reference", + "expression": "ExplanationOfBenefit.careTeam.provider", + "xpath": "f:ExplanationOfBenefit/f:careTeam/f:provider", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-claim", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-claim", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-claim", + "version": "4.0.1", + "name": "claim", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The reference to the claim", + "code": "claim", + "base": [ "ExplanationOfBenefit" ], + "type": "reference", + "expression": "ExplanationOfBenefit.claim", + "xpath": "f:ExplanationOfBenefit/f:claim", + "xpathUsage": "normal", + "target": [ "Claim" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-coverage", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-coverage", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-coverage", + "version": "4.0.1", + "name": "coverage", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The plan under which the claim was adjudicated", + "code": "coverage", + "base": [ "ExplanationOfBenefit" ], + "type": "reference", + "expression": "ExplanationOfBenefit.insurance.coverage", + "xpath": "f:ExplanationOfBenefit/f:insurance/f:coverage", + "xpathUsage": "normal", + "target": [ "Coverage" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-created", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-created", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-created", + "version": "4.0.1", + "name": "created", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The creation date for the EOB", + "code": "created", + "base": [ "ExplanationOfBenefit" ], + "type": "date", + "expression": "ExplanationOfBenefit.created", + "xpath": "f:ExplanationOfBenefit/f:created", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-detail-udi", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-detail-udi", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-detail-udi", + "version": "4.0.1", + "name": "detail-udi", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "UDI associated with a line item detail product or service", + "code": "detail-udi", + "base": [ "ExplanationOfBenefit" ], + "type": "reference", + "expression": "ExplanationOfBenefit.item.detail.udi", + "xpath": "f:ExplanationOfBenefit/f:item/f:detail/f:udi", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-disposition", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-disposition", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-disposition", + "version": "4.0.1", + "name": "disposition", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The contents of the disposition message", + "code": "disposition", + "base": [ "ExplanationOfBenefit" ], + "type": "string", + "expression": "ExplanationOfBenefit.disposition", + "xpath": "f:ExplanationOfBenefit/f:disposition", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Encounters associated with a billed line item", + "code": "encounter", + "base": [ "ExplanationOfBenefit" ], + "type": "reference", + "expression": "ExplanationOfBenefit.item.encounter", + "xpath": "f:ExplanationOfBenefit/f:item/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-enterer", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-enterer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-enterer", + "version": "4.0.1", + "name": "enterer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The party responsible for the entry of the Claim", + "code": "enterer", + "base": [ "ExplanationOfBenefit" ], + "type": "reference", + "expression": "ExplanationOfBenefit.enterer", + "xpath": "f:ExplanationOfBenefit/f:enterer", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-facility", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-facility", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-facility", + "version": "4.0.1", + "name": "facility", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Facility responsible for the goods and services", + "code": "facility", + "base": [ "ExplanationOfBenefit" ], + "type": "reference", + "expression": "ExplanationOfBenefit.facility", + "xpath": "f:ExplanationOfBenefit/f:facility", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The business identifier of the Explanation of Benefit", + "code": "identifier", + "base": [ "ExplanationOfBenefit" ], + "type": "token", + "expression": "ExplanationOfBenefit.identifier", + "xpath": "f:ExplanationOfBenefit/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-item-udi", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-item-udi", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-item-udi", + "version": "4.0.1", + "name": "item-udi", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "UDI associated with a line item product or service", + "code": "item-udi", + "base": [ "ExplanationOfBenefit" ], + "type": "reference", + "expression": "ExplanationOfBenefit.item.udi", + "xpath": "f:ExplanationOfBenefit/f:item/f:udi", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The reference to the patient", + "code": "patient", + "base": [ "ExplanationOfBenefit" ], + "type": "reference", + "expression": "ExplanationOfBenefit.patient", + "xpath": "f:ExplanationOfBenefit/f:patient", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-payee", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-payee", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-payee", + "version": "4.0.1", + "name": "payee", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The party receiving any payment for the Claim", + "code": "payee", + "base": [ "ExplanationOfBenefit" ], + "type": "reference", + "expression": "ExplanationOfBenefit.payee.party", + "xpath": "f:ExplanationOfBenefit/f:payee/f:party", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-procedure-udi", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-procedure-udi", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-procedure-udi", + "version": "4.0.1", + "name": "procedure-udi", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "UDI associated with a procedure", + "code": "procedure-udi", + "base": [ "ExplanationOfBenefit" ], + "type": "reference", + "expression": "ExplanationOfBenefit.procedure.udi", + "xpath": "f:ExplanationOfBenefit/f:procedure/f:udi", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-provider", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-provider", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-provider", + "version": "4.0.1", + "name": "provider", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The reference to the provider", + "code": "provider", + "base": [ "ExplanationOfBenefit" ], + "type": "reference", + "expression": "ExplanationOfBenefit.provider", + "xpath": "f:ExplanationOfBenefit/f:provider", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Status of the instance", + "code": "status", + "base": [ "ExplanationOfBenefit" ], + "type": "token", + "expression": "ExplanationOfBenefit.status", + "xpath": "f:ExplanationOfBenefit/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-subdetail-udi", + "resource": { + "resourceType": "SearchParameter", + "id": "ExplanationOfBenefit-subdetail-udi", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-subdetail-udi", + "version": "4.0.1", + "name": "subdetail-udi", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "UDI associated with a line item detail subdetail product or service", + "code": "subdetail-udi", + "base": [ "ExplanationOfBenefit" ], + "type": "reference", + "expression": "ExplanationOfBenefit.item.detail.subDetail.udi", + "xpath": "f:ExplanationOfBenefit/f:item/f:detail/f:subDetail/f:udi", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-instantiates-canonical", + "resource": { + "resourceType": "SearchParameter", + "id": "FamilyMemberHistory-instantiates-canonical", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-instantiates-canonical", + "version": "4.0.1", + "name": "instantiates-canonical", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Instantiates FHIR protocol or definition", + "code": "instantiates-canonical", + "base": [ "FamilyMemberHistory" ], + "type": "reference", + "expression": "FamilyMemberHistory.instantiatesCanonical", + "xpath": "f:FamilyMemberHistory/f:instantiatesCanonical", + "xpathUsage": "normal", + "target": [ "Questionnaire", "Measure", "PlanDefinition", "OperationDefinition", "ActivityDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-instantiates-uri", + "resource": { + "resourceType": "SearchParameter", + "id": "FamilyMemberHistory-instantiates-uri", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-instantiates-uri", + "version": "4.0.1", + "name": "instantiates-uri", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Instantiates external protocol or definition", + "code": "instantiates-uri", + "base": [ "FamilyMemberHistory" ], + "type": "uri", + "expression": "FamilyMemberHistory.instantiatesUri", + "xpath": "f:FamilyMemberHistory/f:instantiatesUri", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-relationship", + "resource": { + "resourceType": "SearchParameter", + "id": "FamilyMemberHistory-relationship", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-relationship", + "version": "4.0.1", + "name": "relationship", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "A search by a relationship type", + "code": "relationship", + "base": [ "FamilyMemberHistory" ], + "type": "token", + "expression": "FamilyMemberHistory.relationship", + "xpath": "f:FamilyMemberHistory/f:relationship", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-sex", + "resource": { + "resourceType": "SearchParameter", + "id": "FamilyMemberHistory-sex", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-sex", + "version": "4.0.1", + "name": "sex", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "A search by a sex code of a family member", + "code": "sex", + "base": [ "FamilyMemberHistory" ], + "type": "token", + "expression": "FamilyMemberHistory.sex", + "xpath": "f:FamilyMemberHistory/f:sex", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-status", + "resource": { + "resourceType": "SearchParameter", + "id": "FamilyMemberHistory-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "partial | completed | entered-in-error | health-unknown", + "code": "status", + "base": [ "FamilyMemberHistory" ], + "type": "token", + "expression": "FamilyMemberHistory.status", + "xpath": "f:FamilyMemberHistory/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Flag-author", + "resource": { + "resourceType": "SearchParameter", + "id": "Flag-author", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Flag-author", + "version": "4.0.1", + "name": "author", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Flag creator", + "code": "author", + "base": [ "Flag" ], + "type": "reference", + "expression": "Flag.author", + "xpath": "f:Flag/f:author", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Flag-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Flag-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Flag-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Business identifier", + "code": "identifier", + "base": [ "Flag" ], + "type": "token", + "expression": "Flag.identifier", + "xpath": "f:Flag/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Flag-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Flag-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Flag-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "The identity of a subject to list flags for", + "code": "subject", + "base": [ "Flag" ], + "type": "reference", + "expression": "Flag.subject", + "xpath": "f:Flag/f:subject", + "xpathUsage": "normal", + "target": [ "Practitioner", "Group", "Organization", "Medication", "Patient", "PlanDefinition", "Procedure", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Goal-achievement-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Goal-achievement-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Goal-achievement-status", + "version": "4.0.1", + "name": "achievement-status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable", + "code": "achievement-status", + "base": [ "Goal" ], + "type": "token", + "expression": "Goal.achievementStatus", + "xpath": "f:Goal/f:achievementStatus", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Goal-category", + "resource": { + "resourceType": "SearchParameter", + "id": "Goal-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Goal-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "E.g. Treatment, dietary, behavioral, etc.", + "code": "category", + "base": [ "Goal" ], + "type": "token", + "expression": "Goal.category", + "xpath": "f:Goal/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Goal-lifecycle-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Goal-lifecycle-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Goal-lifecycle-status", + "version": "4.0.1", + "name": "lifecycle-status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected", + "code": "lifecycle-status", + "base": [ "Goal" ], + "type": "token", + "expression": "Goal.lifecycleStatus", + "xpath": "f:Goal/f:lifecycleStatus", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Goal-start-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Goal-start-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Goal-start-date", + "version": "4.0.1", + "name": "start-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "When goal pursuit begins", + "code": "start-date", + "base": [ "Goal" ], + "type": "date", + "expression": "(Goal.start as date)", + "xpath": "f:Goal/f:startDate", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Goal-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Goal-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Goal-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Who this goal is intended for", + "code": "subject", + "base": [ "Goal" ], + "type": "reference", + "expression": "Goal.subject", + "xpath": "f:Goal/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Organization", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Goal-target-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Goal-target-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Goal-target-date", + "version": "4.0.1", + "name": "target-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Reach goal on or before", + "code": "target-date", + "base": [ "Goal" ], + "type": "date", + "expression": "(Goal.target.due as date)", + "xpath": "f:Goal/f:target/f:dueDate", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/GraphDefinition-start", + "resource": { + "resourceType": "SearchParameter", + "id": "GraphDefinition-start", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/GraphDefinition-start", + "version": "4.0.1", + "name": "start", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Type of resource at which the graph starts", + "code": "start", + "base": [ "GraphDefinition" ], + "type": "token", + "expression": "GraphDefinition.start", + "xpath": "f:GraphDefinition/f:start", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Group-actual", + "resource": { + "resourceType": "SearchParameter", + "id": "Group-actual", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Group-actual", + "version": "4.0.1", + "name": "actual", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Descriptive or actual", + "code": "actual", + "base": [ "Group" ], + "type": "token", + "expression": "Group.actual", + "xpath": "f:Group/f:actual", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Group-characteristic", + "resource": { + "resourceType": "SearchParameter", + "id": "Group-characteristic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Group-characteristic", + "version": "4.0.1", + "name": "characteristic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Kind of characteristic", + "code": "characteristic", + "base": [ "Group" ], + "type": "token", + "expression": "Group.characteristic.code", + "xpath": "f:Group/f:characteristic/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Group-code", + "resource": { + "resourceType": "SearchParameter", + "id": "Group-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Group-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The kind of resources contained", + "code": "code", + "base": [ "Group" ], + "type": "token", + "expression": "Group.code", + "xpath": "f:Group/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Group-exclude", + "resource": { + "resourceType": "SearchParameter", + "id": "Group-exclude", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Group-exclude", + "version": "4.0.1", + "name": "exclude", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Group includes or excludes", + "code": "exclude", + "base": [ "Group" ], + "type": "token", + "expression": "Group.characteristic.exclude", + "xpath": "f:Group/f:characteristic/f:exclude", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Group-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Group-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Group-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Unique id", + "code": "identifier", + "base": [ "Group" ], + "type": "token", + "expression": "Group.identifier", + "xpath": "f:Group/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Group-managing-entity", + "resource": { + "resourceType": "SearchParameter", + "id": "Group-managing-entity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Group-managing-entity", + "version": "4.0.1", + "name": "managing-entity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Entity that is the custodian of the Group's definition", + "code": "managing-entity", + "base": [ "Group" ], + "type": "reference", + "expression": "Group.managingEntity", + "xpath": "f:Group/f:managingEntity", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Group-member", + "resource": { + "resourceType": "SearchParameter", + "id": "Group-member", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Group-member", + "version": "4.0.1", + "name": "member", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Reference to the group member", + "code": "member", + "base": [ "Group" ], + "type": "reference", + "expression": "Group.member.entity", + "xpath": "f:Group/f:member/f:entity", + "xpathUsage": "normal", + "target": [ "Practitioner", "Group", "Device", "Medication", "Patient", "Substance", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Group-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Group-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Group-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The type of resources the group contains", + "code": "type", + "base": [ "Group" ], + "type": "token", + "expression": "Group.type", + "xpath": "f:Group/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Group-value", + "resource": { + "resourceType": "SearchParameter", + "id": "Group-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Group-value", + "version": "4.0.1", + "name": "value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Value held by characteristic", + "code": "value", + "base": [ "Group" ], + "type": "token", + "expression": "(Group.characteristic.value as CodeableConcept) | (Group.characteristic.value as boolean)", + "xpath": "f:Group/f:characteristic/f:valueCodeableConcept | f:Group/f:characteristic/f:valueBoolean | f:Group/f:characteristic/f:valueQuantity | f:Group/f:characteristic/f:valueRange | f:Group/f:characteristic/f:valueReference", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Group-characteristic-value", + "resource": { + "resourceType": "SearchParameter", + "id": "Group-characteristic-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Group-characteristic-value", + "version": "4.0.1", + "name": "characteristic-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A composite of both characteristic and value", + "code": "characteristic-value", + "base": [ "Group" ], + "type": "composite", + "expression": "Group.characteristic", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/Group-characteristic", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Group-value", + "expression": "value" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/GuidanceResponse-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "GuidanceResponse-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/GuidanceResponse-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The identifier of the guidance response", + "code": "identifier", + "base": [ "GuidanceResponse" ], + "type": "token", + "expression": "GuidanceResponse.identifier", + "xpath": "f:GuidanceResponse/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/GuidanceResponse-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "GuidanceResponse-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/GuidanceResponse-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The identity of a patient to search for guidance response results", + "code": "patient", + "base": [ "GuidanceResponse" ], + "type": "reference", + "expression": "GuidanceResponse.subject.where(resolve() is Patient)", + "xpath": "f:GuidanceResponse/f:subject", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/GuidanceResponse-request", + "resource": { + "resourceType": "SearchParameter", + "id": "GuidanceResponse-request", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/GuidanceResponse-request", + "version": "4.0.1", + "name": "request", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The identifier of the request associated with the response", + "code": "request", + "base": [ "GuidanceResponse" ], + "type": "token", + "expression": "GuidanceResponse.requestIdentifier", + "xpath": "f:GuidanceResponse/f:requestIdentifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/GuidanceResponse-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "GuidanceResponse-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/GuidanceResponse-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The subject that the guidance response is about", + "code": "subject", + "base": [ "GuidanceResponse" ], + "type": "reference", + "expression": "GuidanceResponse.subject", + "xpath": "f:GuidanceResponse/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/HealthcareService-active", + "resource": { + "resourceType": "SearchParameter", + "id": "HealthcareService-active", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/HealthcareService-active", + "version": "4.0.1", + "name": "active", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The Healthcare Service is currently marked as active", + "code": "active", + "base": [ "HealthcareService" ], + "type": "token", + "expression": "HealthcareService.active", + "xpath": "f:HealthcareService/f:active", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/HealthcareService-characteristic", + "resource": { + "resourceType": "SearchParameter", + "id": "HealthcareService-characteristic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/HealthcareService-characteristic", + "version": "4.0.1", + "name": "characteristic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "One of the HealthcareService's characteristics", + "code": "characteristic", + "base": [ "HealthcareService" ], + "type": "token", + "expression": "HealthcareService.characteristic", + "xpath": "f:HealthcareService/f:characteristic", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/HealthcareService-coverage-area", + "resource": { + "resourceType": "SearchParameter", + "id": "HealthcareService-coverage-area", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/HealthcareService-coverage-area", + "version": "4.0.1", + "name": "coverage-area", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Location(s) service is intended for/available to", + "code": "coverage-area", + "base": [ "HealthcareService" ], + "type": "reference", + "expression": "HealthcareService.coverageArea", + "xpath": "f:HealthcareService/f:coverageArea", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/HealthcareService-endpoint", + "resource": { + "resourceType": "SearchParameter", + "id": "HealthcareService-endpoint", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/HealthcareService-endpoint", + "version": "4.0.1", + "name": "endpoint", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Technical endpoints providing access to electronic services operated for the healthcare service", + "code": "endpoint", + "base": [ "HealthcareService" ], + "type": "reference", + "expression": "HealthcareService.endpoint", + "xpath": "f:HealthcareService/f:endpoint", + "xpathUsage": "normal", + "target": [ "Endpoint" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/HealthcareService-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "HealthcareService-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/HealthcareService-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "External identifiers for this item", + "code": "identifier", + "base": [ "HealthcareService" ], + "type": "token", + "expression": "HealthcareService.identifier", + "xpath": "f:HealthcareService/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/HealthcareService-location", + "resource": { + "resourceType": "SearchParameter", + "id": "HealthcareService-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/HealthcareService-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The location of the Healthcare Service", + "code": "location", + "base": [ "HealthcareService" ], + "type": "reference", + "expression": "HealthcareService.location", + "xpath": "f:HealthcareService/f:location", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/HealthcareService-name", + "resource": { + "resourceType": "SearchParameter", + "id": "HealthcareService-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/HealthcareService-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A portion of the Healthcare service name", + "code": "name", + "base": [ "HealthcareService" ], + "type": "string", + "expression": "HealthcareService.name", + "xpath": "f:HealthcareService/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/HealthcareService-organization", + "resource": { + "resourceType": "SearchParameter", + "id": "HealthcareService-organization", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/HealthcareService-organization", + "version": "4.0.1", + "name": "organization", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The organization that provides this Healthcare Service", + "code": "organization", + "base": [ "HealthcareService" ], + "type": "reference", + "expression": "HealthcareService.providedBy", + "xpath": "f:HealthcareService/f:providedBy", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/HealthcareService-program", + "resource": { + "resourceType": "SearchParameter", + "id": "HealthcareService-program", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/HealthcareService-program", + "version": "4.0.1", + "name": "program", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "One of the Programs supported by this HealthcareService", + "code": "program", + "base": [ "HealthcareService" ], + "type": "token", + "expression": "HealthcareService.program", + "xpath": "f:HealthcareService/f:program", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/HealthcareService-service-category", + "resource": { + "resourceType": "SearchParameter", + "id": "HealthcareService-service-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/HealthcareService-service-category", + "version": "4.0.1", + "name": "service-category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Service Category of the Healthcare Service", + "code": "service-category", + "base": [ "HealthcareService" ], + "type": "token", + "expression": "HealthcareService.category", + "xpath": "f:HealthcareService/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/HealthcareService-service-type", + "resource": { + "resourceType": "SearchParameter", + "id": "HealthcareService-service-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/HealthcareService-service-type", + "version": "4.0.1", + "name": "service-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The type of service provided by this healthcare service", + "code": "service-type", + "base": [ "HealthcareService" ], + "type": "token", + "expression": "HealthcareService.type", + "xpath": "f:HealthcareService/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/HealthcareService-specialty", + "resource": { + "resourceType": "SearchParameter", + "id": "HealthcareService-specialty", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/HealthcareService-specialty", + "version": "4.0.1", + "name": "specialty", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The specialty of the service provided by this healthcare service", + "code": "specialty", + "base": [ "HealthcareService" ], + "type": "token", + "expression": "HealthcareService.specialty", + "xpath": "f:HealthcareService/f:specialty", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-basedon", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-basedon", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-basedon", + "version": "4.0.1", + "name": "basedon", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "The order for the image", + "code": "basedon", + "base": [ "ImagingStudy" ], + "type": "reference", + "expression": "ImagingStudy.basedOn", + "xpath": "f:ImagingStudy/f:basedOn", + "xpathUsage": "normal", + "target": [ "Appointment", "AppointmentResponse", "CarePlan", "Task", "ServiceRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-bodysite", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-bodysite", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-bodysite", + "version": "4.0.1", + "name": "bodysite", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "The body site studied", + "code": "bodysite", + "base": [ "ImagingStudy" ], + "type": "token", + "expression": "ImagingStudy.series.bodySite", + "xpath": "f:ImagingStudy/f:series/f:bodySite", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-dicom-class", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-dicom-class", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-dicom-class", + "version": "4.0.1", + "name": "dicom-class", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "The type of the instance", + "code": "dicom-class", + "base": [ "ImagingStudy" ], + "type": "token", + "expression": "ImagingStudy.series.instance.sopClass", + "xpath": "f:ImagingStudy/f:series/f:instance/f:sopClass", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "The context of the study", + "code": "encounter", + "base": [ "ImagingStudy" ], + "type": "reference", + "expression": "ImagingStudy.encounter", + "xpath": "f:ImagingStudy/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-endpoint", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-endpoint", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-endpoint", + "version": "4.0.1", + "name": "endpoint", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "The endpoint for the study or series", + "code": "endpoint", + "base": [ "ImagingStudy" ], + "type": "reference", + "expression": "ImagingStudy.endpoint | ImagingStudy.series.endpoint", + "xpath": "f:ImagingStudy/f:endpoint | f:ImagingStudy/f:series/f:endpoint", + "xpathUsage": "normal", + "target": [ "Endpoint" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-instance", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-instance", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-instance", + "version": "4.0.1", + "name": "instance", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "SOP Instance UID for an instance", + "code": "instance", + "base": [ "ImagingStudy" ], + "type": "token", + "expression": "ImagingStudy.series.instance.uid", + "xpath": "f:ImagingStudy/f:series/f:instance/f:uid", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-interpreter", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-interpreter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-interpreter", + "version": "4.0.1", + "name": "interpreter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "Who interpreted the images", + "code": "interpreter", + "base": [ "ImagingStudy" ], + "type": "reference", + "expression": "ImagingStudy.interpreter", + "xpath": "f:ImagingStudy/f:interpreter", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-modality", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-modality", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-modality", + "version": "4.0.1", + "name": "modality", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "The modality of the series", + "code": "modality", + "base": [ "ImagingStudy" ], + "type": "token", + "expression": "ImagingStudy.series.modality", + "xpath": "f:ImagingStudy/f:series/f:modality", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-performer", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-performer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-performer", + "version": "4.0.1", + "name": "performer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "The person who performed the study", + "code": "performer", + "base": [ "ImagingStudy" ], + "type": "reference", + "expression": "ImagingStudy.series.performer.actor", + "xpath": "f:ImagingStudy/f:series/f:performer/f:actor", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "CareTeam", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-reason", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-reason", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-reason", + "version": "4.0.1", + "name": "reason", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "The reason for the study", + "code": "reason", + "base": [ "ImagingStudy" ], + "type": "token", + "expression": "ImagingStudy.reasonCode", + "xpath": "f:ImagingStudy/f:reasonCode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-referrer", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-referrer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-referrer", + "version": "4.0.1", + "name": "referrer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "The referring physician", + "code": "referrer", + "base": [ "ImagingStudy" ], + "type": "reference", + "expression": "ImagingStudy.referrer", + "xpath": "f:ImagingStudy/f:referrer", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-series", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-series", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-series", + "version": "4.0.1", + "name": "series", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "DICOM Series Instance UID for a series", + "code": "series", + "base": [ "ImagingStudy" ], + "type": "token", + "expression": "ImagingStudy.series.uid", + "xpath": "f:ImagingStudy/f:series/f:uid", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-started", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-started", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-started", + "version": "4.0.1", + "name": "started", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "When the study was started", + "code": "started", + "base": [ "ImagingStudy" ], + "type": "date", + "expression": "ImagingStudy.started", + "xpath": "f:ImagingStudy/f:started", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "The status of the study", + "code": "status", + "base": [ "ImagingStudy" ], + "type": "token", + "expression": "ImagingStudy.status", + "xpath": "f:ImagingStudy/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImagingStudy-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "ImagingStudy-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImagingStudy-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Imaging Integration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/imagemgt/index.cfm" + } ] + } ], + "description": "Who the study is about", + "code": "subject", + "base": [ "ImagingStudy" ], + "type": "reference", + "expression": "ImagingStudy.subject", + "xpath": "f:ImagingStudy/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Device", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Immunization-location", + "resource": { + "resourceType": "SearchParameter", + "id": "Immunization-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Immunization-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "The service delivery location or facility in which the vaccine was / was to be administered", + "code": "location", + "base": [ "Immunization" ], + "type": "reference", + "expression": "Immunization.location", + "xpath": "f:Immunization/f:location", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Immunization-lot-number", + "resource": { + "resourceType": "SearchParameter", + "id": "Immunization-lot-number", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Immunization-lot-number", + "version": "4.0.1", + "name": "lot-number", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Vaccine Lot Number", + "code": "lot-number", + "base": [ "Immunization" ], + "type": "string", + "expression": "Immunization.lotNumber", + "xpath": "f:Immunization/f:lotNumber", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Immunization-manufacturer", + "resource": { + "resourceType": "SearchParameter", + "id": "Immunization-manufacturer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Immunization-manufacturer", + "version": "4.0.1", + "name": "manufacturer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Vaccine Manufacturer", + "code": "manufacturer", + "base": [ "Immunization" ], + "type": "reference", + "expression": "Immunization.manufacturer", + "xpath": "f:Immunization/f:manufacturer", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Immunization-performer", + "resource": { + "resourceType": "SearchParameter", + "id": "Immunization-performer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Immunization-performer", + "version": "4.0.1", + "name": "performer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "The practitioner or organization who played a role in the vaccination", + "code": "performer", + "base": [ "Immunization" ], + "type": "reference", + "expression": "Immunization.performer.actor", + "xpath": "f:Immunization/f:performer/f:actor", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Immunization-reaction", + "resource": { + "resourceType": "SearchParameter", + "id": "Immunization-reaction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Immunization-reaction", + "version": "4.0.1", + "name": "reaction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Additional information on reaction", + "code": "reaction", + "base": [ "Immunization" ], + "type": "reference", + "expression": "Immunization.reaction.detail", + "xpath": "f:Immunization/f:reaction/f:detail", + "xpathUsage": "normal", + "target": [ "Observation" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Immunization-reaction-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Immunization-reaction-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Immunization-reaction-date", + "version": "4.0.1", + "name": "reaction-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "When reaction started", + "code": "reaction-date", + "base": [ "Immunization" ], + "type": "date", + "expression": "Immunization.reaction.date", + "xpath": "f:Immunization/f:reaction/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Immunization-reason-code", + "resource": { + "resourceType": "SearchParameter", + "id": "Immunization-reason-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Immunization-reason-code", + "version": "4.0.1", + "name": "reason-code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Reason why the vaccine was administered", + "code": "reason-code", + "base": [ "Immunization" ], + "type": "token", + "expression": "Immunization.reasonCode", + "xpath": "f:Immunization/f:reasonCode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Immunization-reason-reference", + "resource": { + "resourceType": "SearchParameter", + "id": "Immunization-reason-reference", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Immunization-reason-reference", + "version": "4.0.1", + "name": "reason-reference", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Why immunization occurred", + "code": "reason-reference", + "base": [ "Immunization" ], + "type": "reference", + "expression": "Immunization.reasonReference", + "xpath": "f:Immunization/f:reasonReference", + "xpathUsage": "normal", + "target": [ "Condition", "Observation", "DiagnosticReport" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Immunization-series", + "resource": { + "resourceType": "SearchParameter", + "id": "Immunization-series", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Immunization-series", + "version": "4.0.1", + "name": "series", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "The series being followed by the provider", + "code": "series", + "base": [ "Immunization" ], + "type": "string", + "expression": "Immunization.protocolApplied.series", + "xpath": "f:Immunization/f:protocolApplied/f:series", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Immunization-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Immunization-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Immunization-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Immunization event status", + "code": "status", + "base": [ "Immunization" ], + "type": "token", + "expression": "Immunization.status", + "xpath": "f:Immunization/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Immunization-status-reason", + "resource": { + "resourceType": "SearchParameter", + "id": "Immunization-status-reason", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Immunization-status-reason", + "version": "4.0.1", + "name": "status-reason", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Reason why the vaccine was not administered", + "code": "status-reason", + "base": [ "Immunization" ], + "type": "token", + "expression": "Immunization.statusReason", + "xpath": "f:Immunization/f:statusReason", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Immunization-target-disease", + "resource": { + "resourceType": "SearchParameter", + "id": "Immunization-target-disease", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Immunization-target-disease", + "version": "4.0.1", + "name": "target-disease", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "The target disease the dose is being administered against", + "code": "target-disease", + "base": [ "Immunization" ], + "type": "token", + "expression": "Immunization.protocolApplied.targetDisease", + "xpath": "f:Immunization/f:protocolApplied/f:targetDisease", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Immunization-vaccine-code", + "resource": { + "resourceType": "SearchParameter", + "id": "Immunization-vaccine-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Immunization-vaccine-code", + "version": "4.0.1", + "name": "vaccine-code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Vaccine Product Administered", + "code": "vaccine-code", + "base": [ "Immunization" ], + "type": "token", + "expression": "Immunization.vaccineCode", + "xpath": "f:Immunization/f:vaccineCode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-date", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationEvaluation-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Date the evaluation was generated", + "code": "date", + "base": [ "ImmunizationEvaluation" ], + "type": "date", + "expression": "ImmunizationEvaluation.date", + "xpath": "f:ImmunizationEvaluation/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-dose-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationEvaluation-dose-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-dose-status", + "version": "4.0.1", + "name": "dose-status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "The status of the dose relative to published recommendations", + "code": "dose-status", + "base": [ "ImmunizationEvaluation" ], + "type": "token", + "expression": "ImmunizationEvaluation.doseStatus", + "xpath": "f:ImmunizationEvaluation/f:doseStatus", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationEvaluation-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "ID of the evaluation", + "code": "identifier", + "base": [ "ImmunizationEvaluation" ], + "type": "token", + "expression": "ImmunizationEvaluation.identifier", + "xpath": "f:ImmunizationEvaluation/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-immunization-event", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationEvaluation-immunization-event", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-immunization-event", + "version": "4.0.1", + "name": "immunization-event", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "The vaccine administration event being evaluated", + "code": "immunization-event", + "base": [ "ImmunizationEvaluation" ], + "type": "reference", + "expression": "ImmunizationEvaluation.immunizationEvent", + "xpath": "f:ImmunizationEvaluation/f:immunizationEvent", + "xpathUsage": "normal", + "target": [ "Immunization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationEvaluation-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "The patient being evaluated", + "code": "patient", + "base": [ "ImmunizationEvaluation" ], + "type": "reference", + "expression": "ImmunizationEvaluation.patient", + "xpath": "f:ImmunizationEvaluation/f:patient", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationEvaluation-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Immunization evaluation status", + "code": "status", + "base": [ "ImmunizationEvaluation" ], + "type": "token", + "expression": "ImmunizationEvaluation.status", + "xpath": "f:ImmunizationEvaluation/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-target-disease", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationEvaluation-target-disease", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-target-disease", + "version": "4.0.1", + "name": "target-disease", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "The vaccine preventable disease being evaluated against", + "code": "target-disease", + "base": [ "ImmunizationEvaluation" ], + "type": "token", + "expression": "ImmunizationEvaluation.targetDisease", + "xpath": "f:ImmunizationEvaluation/f:targetDisease", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-date", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationRecommendation-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Date recommendation(s) created", + "code": "date", + "base": [ "ImmunizationRecommendation" ], + "type": "date", + "expression": "ImmunizationRecommendation.date", + "xpath": "f:ImmunizationRecommendation/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationRecommendation-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Business identifier", + "code": "identifier", + "base": [ "ImmunizationRecommendation" ], + "type": "token", + "expression": "ImmunizationRecommendation.identifier", + "xpath": "f:ImmunizationRecommendation/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-information", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationRecommendation-information", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-information", + "version": "4.0.1", + "name": "information", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Patient observations supporting recommendation", + "code": "information", + "base": [ "ImmunizationRecommendation" ], + "type": "reference", + "expression": "ImmunizationRecommendation.recommendation.supportingPatientInformation", + "xpath": "f:ImmunizationRecommendation/f:recommendation/f:supportingPatientInformation", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationRecommendation-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Who this profile is for", + "code": "patient", + "base": [ "ImmunizationRecommendation" ], + "type": "reference", + "expression": "ImmunizationRecommendation.patient", + "xpath": "f:ImmunizationRecommendation/f:patient", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationRecommendation-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Vaccine recommendation status", + "code": "status", + "base": [ "ImmunizationRecommendation" ], + "type": "token", + "expression": "ImmunizationRecommendation.recommendation.forecastStatus", + "xpath": "f:ImmunizationRecommendation/f:recommendation/f:forecastStatus", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-support", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationRecommendation-support", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-support", + "version": "4.0.1", + "name": "support", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Past immunizations supporting recommendation", + "code": "support", + "base": [ "ImmunizationRecommendation" ], + "type": "reference", + "expression": "ImmunizationRecommendation.recommendation.supportingImmunization", + "xpath": "f:ImmunizationRecommendation/f:recommendation/f:supportingImmunization", + "xpathUsage": "normal", + "target": [ "Immunization", "ImmunizationEvaluation" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-target-disease", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationRecommendation-target-disease", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-target-disease", + "version": "4.0.1", + "name": "target-disease", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Disease to be immunized against", + "code": "target-disease", + "base": [ "ImmunizationRecommendation" ], + "type": "token", + "expression": "ImmunizationRecommendation.recommendation.targetDisease", + "xpath": "f:ImmunizationRecommendation/f:recommendation/f:targetDisease", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-vaccine-type", + "resource": { + "resourceType": "SearchParameter", + "id": "ImmunizationRecommendation-vaccine-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-vaccine-type", + "version": "4.0.1", + "name": "vaccine-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Public Health and Emergency Response)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pher/index.cfm" + } ] + } ], + "description": "Vaccine or vaccine group recommendation applies to", + "code": "vaccine-type", + "base": [ "ImmunizationRecommendation" ], + "type": "token", + "expression": "ImmunizationRecommendation.recommendation.vaccineCode", + "xpath": "f:ImmunizationRecommendation/f:recommendation/f:vaccineCode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImplementationGuide-depends-on", + "resource": { + "resourceType": "SearchParameter", + "id": "ImplementationGuide-depends-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImplementationGuide-depends-on", + "version": "4.0.1", + "name": "depends-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Identity of the IG that this depends on", + "code": "depends-on", + "base": [ "ImplementationGuide" ], + "type": "reference", + "expression": "ImplementationGuide.dependsOn.uri", + "xpath": "f:ImplementationGuide/f:dependsOn/f:uri", + "xpathUsage": "normal", + "target": [ "ImplementationGuide" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImplementationGuide-experimental", + "resource": { + "resourceType": "SearchParameter", + "id": "ImplementationGuide-experimental", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImplementationGuide-experimental", + "version": "4.0.1", + "name": "experimental", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "For testing purposes, not real usage", + "code": "experimental", + "base": [ "ImplementationGuide" ], + "type": "token", + "expression": "ImplementationGuide.experimental", + "xpath": "f:ImplementationGuide/f:experimental", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImplementationGuide-global", + "resource": { + "resourceType": "SearchParameter", + "id": "ImplementationGuide-global", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImplementationGuide-global", + "version": "4.0.1", + "name": "global", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Profile that all resources must conform to", + "code": "global", + "base": [ "ImplementationGuide" ], + "type": "reference", + "expression": "ImplementationGuide.global.profile", + "xpath": "f:ImplementationGuide/f:global/f:profile", + "xpathUsage": "normal", + "target": [ "StructureDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ImplementationGuide-resource", + "resource": { + "resourceType": "SearchParameter", + "id": "ImplementationGuide-resource", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ImplementationGuide-resource", + "version": "4.0.1", + "name": "resource", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Location of the resource", + "code": "resource", + "base": [ "ImplementationGuide" ], + "type": "reference", + "expression": "ImplementationGuide.definition.resource.reference", + "xpath": "f:ImplementationGuide/f:definition/f:resource/f:reference", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-address", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-address", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-address", + "version": "4.0.1", + "name": "address", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text", + "code": "address", + "base": [ "InsurancePlan" ], + "type": "string", + "expression": "InsurancePlan.contact.address", + "xpath": "f:InsurancePlan/f:contact/f:address", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-address-city", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-address-city", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-address-city", + "version": "4.0.1", + "name": "address-city", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A city specified in an address", + "code": "address-city", + "base": [ "InsurancePlan" ], + "type": "string", + "expression": "InsurancePlan.contact.address.city", + "xpath": "f:InsurancePlan/f:contact/f:address/f:city", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-address-country", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-address-country", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-address-country", + "version": "4.0.1", + "name": "address-country", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A country specified in an address", + "code": "address-country", + "base": [ "InsurancePlan" ], + "type": "string", + "expression": "InsurancePlan.contact.address.country", + "xpath": "f:InsurancePlan/f:contact/f:address/f:country", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-address-postalcode", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-address-postalcode", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-address-postalcode", + "version": "4.0.1", + "name": "address-postalcode", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A postal code specified in an address", + "code": "address-postalcode", + "base": [ "InsurancePlan" ], + "type": "string", + "expression": "InsurancePlan.contact.address.postalCode", + "xpath": "f:InsurancePlan/f:contact/f:address/f:postalCode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-address-state", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-address-state", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-address-state", + "version": "4.0.1", + "name": "address-state", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A state specified in an address", + "code": "address-state", + "base": [ "InsurancePlan" ], + "type": "string", + "expression": "InsurancePlan.contact.address.state", + "xpath": "f:InsurancePlan/f:contact/f:address/f:state", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-address-use", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-address-use", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-address-use", + "version": "4.0.1", + "name": "address-use", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A use code specified in an address", + "code": "address-use", + "base": [ "InsurancePlan" ], + "type": "token", + "expression": "InsurancePlan.contact.address.use", + "xpath": "f:InsurancePlan/f:contact/f:address/f:use", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-administered-by", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-administered-by", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-administered-by", + "version": "4.0.1", + "name": "administered-by", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Product administrator", + "code": "administered-by", + "base": [ "InsurancePlan" ], + "type": "reference", + "expression": "InsurancePlan.administeredBy", + "xpath": "f:InsurancePlan/f:administeredBy", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-endpoint", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-endpoint", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-endpoint", + "version": "4.0.1", + "name": "endpoint", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Technical endpoint", + "code": "endpoint", + "base": [ "InsurancePlan" ], + "type": "reference", + "expression": "InsurancePlan.endpoint", + "xpath": "f:InsurancePlan/f:endpoint", + "xpathUsage": "normal", + "target": [ "Endpoint" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Any identifier for the organization (not the accreditation issuer's identifier)", + "code": "identifier", + "base": [ "InsurancePlan" ], + "type": "token", + "expression": "InsurancePlan.identifier", + "xpath": "f:InsurancePlan/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-name", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A portion of the organization's name or alias", + "code": "name", + "base": [ "InsurancePlan" ], + "type": "string", + "expression": "name | alias", + "xpath": "f:InsurancePlan/f:name | f:InsurancePlan/f:alias", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-owned-by", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-owned-by", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-owned-by", + "version": "4.0.1", + "name": "owned-by", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "An organization of which this organization forms a part", + "code": "owned-by", + "base": [ "InsurancePlan" ], + "type": "reference", + "expression": "InsurancePlan.ownedBy", + "xpath": "f:InsurancePlan/f:ownedBy", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-phonetic", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-phonetic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-phonetic", + "version": "4.0.1", + "name": "phonetic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A portion of the organization's name using some kind of phonetic matching algorithm", + "code": "phonetic", + "base": [ "InsurancePlan" ], + "type": "string", + "expression": "InsurancePlan.name", + "xpath": "f:InsurancePlan/f:name", + "xpathUsage": "phonetic" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-status", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Is the Organization record active", + "code": "status", + "base": [ "InsurancePlan" ], + "type": "token", + "expression": "InsurancePlan.status", + "xpath": "f:InsurancePlan/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/InsurancePlan-type", + "resource": { + "resourceType": "SearchParameter", + "id": "InsurancePlan-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/InsurancePlan-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A code for the type of organization", + "code": "type", + "base": [ "InsurancePlan" ], + "type": "token", + "expression": "InsurancePlan.type", + "xpath": "f:InsurancePlan/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Invoice-account", + "resource": { + "resourceType": "SearchParameter", + "id": "Invoice-account", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Invoice-account", + "version": "4.0.1", + "name": "account", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Account that is being balanced", + "code": "account", + "base": [ "Invoice" ], + "type": "reference", + "expression": "Invoice.account", + "xpath": "f:Invoice/f:account", + "xpathUsage": "normal", + "target": [ "Account" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Invoice-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Invoice-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Invoice-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Invoice date / posting date", + "code": "date", + "base": [ "Invoice" ], + "type": "date", + "expression": "Invoice.date", + "xpath": "f:Invoice/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Invoice-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Invoice-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Invoice-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Business Identifier for item", + "code": "identifier", + "base": [ "Invoice" ], + "type": "token", + "expression": "Invoice.identifier", + "xpath": "f:Invoice/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Invoice-issuer", + "resource": { + "resourceType": "SearchParameter", + "id": "Invoice-issuer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Invoice-issuer", + "version": "4.0.1", + "name": "issuer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Issuing Organization of Invoice", + "code": "issuer", + "base": [ "Invoice" ], + "type": "reference", + "expression": "Invoice.issuer", + "xpath": "f:Invoice/f:issuer", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Invoice-participant", + "resource": { + "resourceType": "SearchParameter", + "id": "Invoice-participant", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Invoice-participant", + "version": "4.0.1", + "name": "participant", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Individual who was involved", + "code": "participant", + "base": [ "Invoice" ], + "type": "reference", + "expression": "Invoice.participant.actor", + "xpath": "f:Invoice/f:participant/f:actor", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Invoice-participant-role", + "resource": { + "resourceType": "SearchParameter", + "id": "Invoice-participant-role", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Invoice-participant-role", + "version": "4.0.1", + "name": "participant-role", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Type of involvement in creation of this Invoice", + "code": "participant-role", + "base": [ "Invoice" ], + "type": "token", + "expression": "Invoice.participant.role", + "xpath": "f:Invoice/f:participant/f:role", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Invoice-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Invoice-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Invoice-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Recipient(s) of goods and services", + "code": "patient", + "base": [ "Invoice" ], + "type": "reference", + "expression": "Invoice.subject.where(resolve() is Patient)", + "xpath": "f:Invoice/f:subject", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Invoice-recipient", + "resource": { + "resourceType": "SearchParameter", + "id": "Invoice-recipient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Invoice-recipient", + "version": "4.0.1", + "name": "recipient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Recipient of this invoice", + "code": "recipient", + "base": [ "Invoice" ], + "type": "reference", + "expression": "Invoice.recipient", + "xpath": "f:Invoice/f:recipient", + "xpathUsage": "normal", + "target": [ "Organization", "Patient", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Invoice-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Invoice-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Invoice-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "draft | issued | balanced | cancelled | entered-in-error", + "code": "status", + "base": [ "Invoice" ], + "type": "token", + "expression": "Invoice.status", + "xpath": "f:Invoice/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Invoice-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Invoice-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Invoice-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Recipient(s) of goods and services", + "code": "subject", + "base": [ "Invoice" ], + "type": "reference", + "expression": "Invoice.subject", + "xpath": "f:Invoice/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Invoice-totalgross", + "resource": { + "resourceType": "SearchParameter", + "id": "Invoice-totalgross", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Invoice-totalgross", + "version": "4.0.1", + "name": "totalgross", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Gross total of this Invoice", + "code": "totalgross", + "base": [ "Invoice" ], + "type": "quantity", + "expression": "Invoice.totalGross", + "xpath": "f:Invoice/f:totalGross", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Invoice-totalnet", + "resource": { + "resourceType": "SearchParameter", + "id": "Invoice-totalnet", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Invoice-totalnet", + "version": "4.0.1", + "name": "totalnet", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Net total of this Invoice", + "code": "totalnet", + "base": [ "Invoice" ], + "type": "quantity", + "expression": "Invoice.totalNet", + "xpath": "f:Invoice/f:totalNet", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Invoice-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Invoice-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Invoice-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Type of Invoice", + "code": "type", + "base": [ "Invoice" ], + "type": "token", + "expression": "Invoice.type", + "xpath": "f:Invoice/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-composed-of", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-composed-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-composed-of", + "version": "4.0.1", + "name": "composed-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "composed-of", + "base": [ "Library" ], + "type": "reference", + "expression": "Library.relatedArtifact.where(type='composed-of').resource", + "xpath": "f:Library/f:relatedArtifact[f:type/@value='composed-of']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-content-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-content-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-content-type", + "version": "4.0.1", + "name": "content-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The type of content in the library (e.g. text/cql)", + "code": "content-type", + "base": [ "Library" ], + "type": "token", + "expression": "Library.content.contentType", + "xpath": "f:Library/f:content/f:contentType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-context", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context assigned to the library", + "code": "context", + "base": [ "Library" ], + "type": "token", + "expression": "(Library.useContext.value as CodeableConcept)", + "xpath": "f:Library/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the library", + "code": "context-quantity", + "base": [ "Library" ], + "type": "quantity", + "expression": "(Library.useContext.value as Quantity) | (Library.useContext.value as Range)", + "xpath": "f:Library/f:useContext/f:valueQuantity | f:Library/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the library", + "code": "context-type", + "base": [ "Library" ], + "type": "token", + "expression": "Library.useContext.code", + "xpath": "f:Library/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The library publication date", + "code": "date", + "base": [ "Library" ], + "type": "date", + "expression": "Library.date", + "xpath": "f:Library/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-depends-on", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-depends-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-depends-on", + "version": "4.0.1", + "name": "depends-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "depends-on", + "base": [ "Library" ], + "type": "reference", + "expression": "Library.relatedArtifact.where(type='depends-on').resource", + "xpath": "f:Library/f:relatedArtifact[f:type/@value='depends-on']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-derived-from", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-derived-from", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-derived-from", + "version": "4.0.1", + "name": "derived-from", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "derived-from", + "base": [ "Library" ], + "type": "reference", + "expression": "Library.relatedArtifact.where(type='derived-from').resource", + "xpath": "f:Library/f:relatedArtifact[f:type/@value='derived-from']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-description", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The description of the library", + "code": "description", + "base": [ "Library" ], + "type": "string", + "expression": "Library.description", + "xpath": "f:Library/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The time during which the library is intended to be in use", + "code": "effective", + "base": [ "Library" ], + "type": "date", + "expression": "Library.effectivePeriod", + "xpath": "f:Library/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "External identifier for the library", + "code": "identifier", + "base": [ "Library" ], + "type": "token", + "expression": "Library.identifier", + "xpath": "f:Library/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the library", + "code": "jurisdiction", + "base": [ "Library" ], + "type": "token", + "expression": "Library.jurisdiction", + "xpath": "f:Library/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-name", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the library", + "code": "name", + "base": [ "Library" ], + "type": "string", + "expression": "Library.name", + "xpath": "f:Library/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-predecessor", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-predecessor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-predecessor", + "version": "4.0.1", + "name": "predecessor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "predecessor", + "base": [ "Library" ], + "type": "reference", + "expression": "Library.relatedArtifact.where(type='predecessor').resource", + "xpath": "f:Library/f:relatedArtifact[f:type/@value='predecessor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Name of the publisher of the library", + "code": "publisher", + "base": [ "Library" ], + "type": "string", + "expression": "Library.publisher", + "xpath": "f:Library/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The current status of the library", + "code": "status", + "base": [ "Library" ], + "type": "token", + "expression": "Library.status", + "xpath": "f:Library/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-successor", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-successor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-successor", + "version": "4.0.1", + "name": "successor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "successor", + "base": [ "Library" ], + "type": "reference", + "expression": "Library.relatedArtifact.where(type='successor').resource", + "xpath": "f:Library/f:relatedArtifact[f:type/@value='successor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-title", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The human-friendly name of the library", + "code": "title", + "base": [ "Library" ], + "type": "string", + "expression": "Library.title", + "xpath": "f:Library/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-topic", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-topic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-topic", + "version": "4.0.1", + "name": "topic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Topics associated with the module", + "code": "topic", + "base": [ "Library" ], + "type": "token", + "expression": "Library.topic", + "xpath": "f:Library/f:topic", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The type of the library (e.g. logic-library, model-definition, asset-collection, module-definition)", + "code": "type", + "base": [ "Library" ], + "type": "token", + "expression": "Library.type", + "xpath": "f:Library/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-url", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The uri that identifies the library", + "code": "url", + "base": [ "Library" ], + "type": "uri", + "expression": "Library.url", + "xpath": "f:Library/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-version", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The business version of the library", + "code": "version", + "base": [ "Library" ], + "type": "token", + "expression": "Library.version", + "xpath": "f:Library/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the library", + "code": "context-type-quantity", + "base": [ "Library" ], + "type": "composite", + "expression": "Library.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/Library-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Library-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Library-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "Library-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Library-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the library", + "code": "context-type-value", + "base": [ "Library" ], + "type": "composite", + "expression": "Library.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/Library-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Library-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Linkage-author", + "resource": { + "resourceType": "SearchParameter", + "id": "Linkage-author", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Linkage-author", + "version": "4.0.1", + "name": "author", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Author of the Linkage", + "code": "author", + "base": [ "Linkage" ], + "type": "reference", + "expression": "Linkage.author", + "xpath": "f:Linkage/f:author", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Linkage-item", + "resource": { + "resourceType": "SearchParameter", + "id": "Linkage-item", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Linkage-item", + "version": "4.0.1", + "name": "item", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Matches on any item in the Linkage", + "code": "item", + "base": [ "Linkage" ], + "type": "reference", + "expression": "Linkage.item.resource", + "xpath": "f:Linkage/f:item/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Linkage-source", + "resource": { + "resourceType": "SearchParameter", + "id": "Linkage-source", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Linkage-source", + "version": "4.0.1", + "name": "source", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Matches on any item in the Linkage with a type of 'source'", + "code": "source", + "base": [ "Linkage" ], + "type": "reference", + "expression": "Linkage.item.resource", + "xpath": "f:Linkage/f:item/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/List-empty-reason", + "resource": { + "resourceType": "SearchParameter", + "id": "List-empty-reason", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/List-empty-reason", + "version": "4.0.1", + "name": "empty-reason", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Why list is empty", + "code": "empty-reason", + "base": [ "List" ], + "type": "token", + "expression": "List.emptyReason", + "xpath": "f:List/f:emptyReason", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/List-item", + "resource": { + "resourceType": "SearchParameter", + "id": "List-item", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/List-item", + "version": "4.0.1", + "name": "item", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Actual entry", + "code": "item", + "base": [ "List" ], + "type": "reference", + "expression": "List.entry.item", + "xpath": "f:List/f:entry/f:item", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/List-notes", + "resource": { + "resourceType": "SearchParameter", + "id": "List-notes", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/List-notes", + "version": "4.0.1", + "name": "notes", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The annotation - text content (as markdown)", + "code": "notes", + "base": [ "List" ], + "type": "string", + "expression": "List.note.text", + "xpath": "f:List/f:note/f:text", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/List-source", + "resource": { + "resourceType": "SearchParameter", + "id": "List-source", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/List-source", + "version": "4.0.1", + "name": "source", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Who and/or what defined the list contents (aka Author)", + "code": "source", + "base": [ "List" ], + "type": "reference", + "expression": "List.source", + "xpath": "f:List/f:source", + "xpathUsage": "normal", + "target": [ "Practitioner", "Device", "Patient", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/List-status", + "resource": { + "resourceType": "SearchParameter", + "id": "List-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/List-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "current | retired | entered-in-error", + "code": "status", + "base": [ "List" ], + "type": "token", + "expression": "List.status", + "xpath": "f:List/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/List-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "List-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/List-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "If all resources have the same subject", + "code": "subject", + "base": [ "List" ], + "type": "reference", + "expression": "List.subject", + "xpath": "f:List/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Device", "Patient", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/List-title", + "resource": { + "resourceType": "SearchParameter", + "id": "List-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/List-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Descriptive name for the list", + "code": "title", + "base": [ "List" ], + "type": "string", + "expression": "List.title", + "xpath": "f:List/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-address", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-address", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-address", + "version": "4.0.1", + "name": "address", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A (part of the) address of the location", + "code": "address", + "base": [ "Location" ], + "type": "string", + "expression": "Location.address", + "xpath": "f:Location/f:address", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-address-city", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-address-city", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-address-city", + "version": "4.0.1", + "name": "address-city", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A city specified in an address", + "code": "address-city", + "base": [ "Location" ], + "type": "string", + "expression": "Location.address.city", + "xpath": "f:Location/f:address/f:city", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-address-country", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-address-country", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-address-country", + "version": "4.0.1", + "name": "address-country", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A country specified in an address", + "code": "address-country", + "base": [ "Location" ], + "type": "string", + "expression": "Location.address.country", + "xpath": "f:Location/f:address/f:country", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-address-postalcode", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-address-postalcode", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-address-postalcode", + "version": "4.0.1", + "name": "address-postalcode", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A postal code specified in an address", + "code": "address-postalcode", + "base": [ "Location" ], + "type": "string", + "expression": "Location.address.postalCode", + "xpath": "f:Location/f:address/f:postalCode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-address-state", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-address-state", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-address-state", + "version": "4.0.1", + "name": "address-state", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A state specified in an address", + "code": "address-state", + "base": [ "Location" ], + "type": "string", + "expression": "Location.address.state", + "xpath": "f:Location/f:address/f:state", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-address-use", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-address-use", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-address-use", + "version": "4.0.1", + "name": "address-use", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A use code specified in an address", + "code": "address-use", + "base": [ "Location" ], + "type": "token", + "expression": "Location.address.use", + "xpath": "f:Location/f:address/f:use", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-endpoint", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-endpoint", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-endpoint", + "version": "4.0.1", + "name": "endpoint", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Technical endpoints providing access to services operated for the location", + "code": "endpoint", + "base": [ "Location" ], + "type": "reference", + "expression": "Location.endpoint", + "xpath": "f:Location/f:endpoint", + "xpathUsage": "normal", + "target": [ "Endpoint" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "An identifier for the location", + "code": "identifier", + "base": [ "Location" ], + "type": "token", + "expression": "Location.identifier", + "xpath": "f:Location/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-name", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A portion of the location's name or alias", + "code": "name", + "base": [ "Location" ], + "type": "string", + "expression": "Location.name | Location.alias", + "xpath": "f:Location/f:name | f:Location/f:alias", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-near", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-near", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-near", + "version": "4.0.1", + "name": "near", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Search for locations where the location.position is near to, or within a specified distance of, the provided coordinates expressed as [latitude]|[longitude]|[distance]|[units] (using the WGS84 datum, see notes).\nIf the units are omitted, then kms should be assumed. If the distance is omitted, then the server can use its own discretion as to what distances should be considered near (and units are irrelevant)\n\nServers may search using various techniques that might have differing accuracies, depending on implementation efficiency.\n\nRequires the near-distance parameter to be provided also", + "code": "near", + "base": [ "Location" ], + "type": "special", + "expression": "Location.position", + "xpath": "f:Location/f:position", + "xpathUsage": "nearby" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-operational-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-operational-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-operational-status", + "version": "4.0.1", + "name": "operational-status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)", + "code": "operational-status", + "base": [ "Location" ], + "type": "token", + "expression": "Location.operationalStatus", + "xpath": "f:Location/f:operationalStatus", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-organization", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-organization", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-organization", + "version": "4.0.1", + "name": "organization", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Searches for locations that are managed by the provided organization", + "code": "organization", + "base": [ "Location" ], + "type": "reference", + "expression": "Location.managingOrganization", + "xpath": "f:Location/f:managingOrganization", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-partof", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-partof", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-partof", + "version": "4.0.1", + "name": "partof", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A location of which this location is a part", + "code": "partof", + "base": [ "Location" ], + "type": "reference", + "expression": "Location.partOf", + "xpath": "f:Location/f:partOf", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Searches for locations with a specific kind of status", + "code": "status", + "base": [ "Location" ], + "type": "token", + "expression": "Location.status", + "xpath": "f:Location/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Location-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Location-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Location-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A code for the type of location", + "code": "type", + "base": [ "Location" ], + "type": "token", + "expression": "Location.type", + "xpath": "f:Location/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-composed-of", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-composed-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-composed-of", + "version": "4.0.1", + "name": "composed-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "composed-of", + "base": [ "Measure" ], + "type": "reference", + "expression": "Measure.relatedArtifact.where(type='composed-of').resource", + "xpath": "f:Measure/f:relatedArtifact[f:type/@value='composed-of']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-context", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "A use context assigned to the measure", + "code": "context", + "base": [ "Measure" ], + "type": "token", + "expression": "(Measure.useContext.value as CodeableConcept)", + "xpath": "f:Measure/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the measure", + "code": "context-quantity", + "base": [ "Measure" ], + "type": "quantity", + "expression": "(Measure.useContext.value as Quantity) | (Measure.useContext.value as Range)", + "xpath": "f:Measure/f:useContext/f:valueQuantity | f:Measure/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the measure", + "code": "context-type", + "base": [ "Measure" ], + "type": "token", + "expression": "Measure.useContext.code", + "xpath": "f:Measure/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The measure publication date", + "code": "date", + "base": [ "Measure" ], + "type": "date", + "expression": "Measure.date", + "xpath": "f:Measure/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-depends-on", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-depends-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-depends-on", + "version": "4.0.1", + "name": "depends-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "depends-on", + "base": [ "Measure" ], + "type": "reference", + "expression": "Measure.relatedArtifact.where(type='depends-on').resource | Measure.library", + "xpath": "f:Measure/f:relatedArtifact[f:type/@value='depends-on']/f:resource | f:Measure/f:library", + "xpathUsage": "normal", + "target": [ "Library", "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-derived-from", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-derived-from", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-derived-from", + "version": "4.0.1", + "name": "derived-from", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "derived-from", + "base": [ "Measure" ], + "type": "reference", + "expression": "Measure.relatedArtifact.where(type='derived-from').resource", + "xpath": "f:Measure/f:relatedArtifact[f:type/@value='derived-from']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-description", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The description of the measure", + "code": "description", + "base": [ "Measure" ], + "type": "string", + "expression": "Measure.description", + "xpath": "f:Measure/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The time during which the measure is intended to be in use", + "code": "effective", + "base": [ "Measure" ], + "type": "date", + "expression": "Measure.effectivePeriod", + "xpath": "f:Measure/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "External identifier for the measure", + "code": "identifier", + "base": [ "Measure" ], + "type": "token", + "expression": "Measure.identifier", + "xpath": "f:Measure/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the measure", + "code": "jurisdiction", + "base": [ "Measure" ], + "type": "token", + "expression": "Measure.jurisdiction", + "xpath": "f:Measure/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-name", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the measure", + "code": "name", + "base": [ "Measure" ], + "type": "string", + "expression": "Measure.name", + "xpath": "f:Measure/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-predecessor", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-predecessor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-predecessor", + "version": "4.0.1", + "name": "predecessor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "predecessor", + "base": [ "Measure" ], + "type": "reference", + "expression": "Measure.relatedArtifact.where(type='predecessor').resource", + "xpath": "f:Measure/f:relatedArtifact[f:type/@value='predecessor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "Name of the publisher of the measure", + "code": "publisher", + "base": [ "Measure" ], + "type": "string", + "expression": "Measure.publisher", + "xpath": "f:Measure/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The current status of the measure", + "code": "status", + "base": [ "Measure" ], + "type": "token", + "expression": "Measure.status", + "xpath": "f:Measure/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-successor", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-successor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-successor", + "version": "4.0.1", + "name": "successor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "successor", + "base": [ "Measure" ], + "type": "reference", + "expression": "Measure.relatedArtifact.where(type='successor').resource", + "xpath": "f:Measure/f:relatedArtifact[f:type/@value='successor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-title", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The human-friendly name of the measure", + "code": "title", + "base": [ "Measure" ], + "type": "string", + "expression": "Measure.title", + "xpath": "f:Measure/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-topic", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-topic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-topic", + "version": "4.0.1", + "name": "topic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "Topics associated with the measure", + "code": "topic", + "base": [ "Measure" ], + "type": "token", + "expression": "Measure.topic", + "xpath": "f:Measure/f:topic", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-url", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The uri that identifies the measure", + "code": "url", + "base": [ "Measure" ], + "type": "uri", + "expression": "Measure.url", + "xpath": "f:Measure/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-version", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The business version of the measure", + "code": "version", + "base": [ "Measure" ], + "type": "token", + "expression": "Measure.version", + "xpath": "f:Measure/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the measure", + "code": "context-type-quantity", + "base": [ "Measure" ], + "type": "composite", + "expression": "Measure.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/Measure-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Measure-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Measure-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "Measure-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Measure-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the measure", + "code": "context-type-value", + "base": [ "Measure" ], + "type": "composite", + "expression": "Measure.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/Measure-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Measure-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MeasureReport-date", + "resource": { + "resourceType": "SearchParameter", + "id": "MeasureReport-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MeasureReport-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The date of the measure report", + "code": "date", + "base": [ "MeasureReport" ], + "type": "date", + "expression": "MeasureReport.date", + "xpath": "f:MeasureReport/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MeasureReport-evaluated-resource", + "resource": { + "resourceType": "SearchParameter", + "id": "MeasureReport-evaluated-resource", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MeasureReport-evaluated-resource", + "version": "4.0.1", + "name": "evaluated-resource", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "An evaluated resource referenced by the measure report", + "code": "evaluated-resource", + "base": [ "MeasureReport" ], + "type": "reference", + "expression": "MeasureReport.evaluatedResource", + "xpath": "f:MeasureReport/f:evaluatedResource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MeasureReport-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "MeasureReport-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MeasureReport-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "External identifier of the measure report to be returned", + "code": "identifier", + "base": [ "MeasureReport" ], + "type": "token", + "expression": "MeasureReport.identifier", + "xpath": "f:MeasureReport/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MeasureReport-measure", + "resource": { + "resourceType": "SearchParameter", + "id": "MeasureReport-measure", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MeasureReport-measure", + "version": "4.0.1", + "name": "measure", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The measure to return measure report results for", + "code": "measure", + "base": [ "MeasureReport" ], + "type": "reference", + "expression": "MeasureReport.measure", + "xpath": "f:MeasureReport/f:measure", + "xpathUsage": "normal", + "target": [ "Measure" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MeasureReport-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "MeasureReport-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MeasureReport-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The identity of a patient to search for individual measure report results for", + "code": "patient", + "base": [ "MeasureReport" ], + "type": "reference", + "expression": "MeasureReport.subject.where(resolve() is Patient)", + "xpath": "f:MeasureReport/f:subject", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MeasureReport-period", + "resource": { + "resourceType": "SearchParameter", + "id": "MeasureReport-period", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MeasureReport-period", + "version": "4.0.1", + "name": "period", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The period of the measure report", + "code": "period", + "base": [ "MeasureReport" ], + "type": "date", + "expression": "MeasureReport.period", + "xpath": "f:MeasureReport/f:period", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MeasureReport-reporter", + "resource": { + "resourceType": "SearchParameter", + "id": "MeasureReport-reporter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MeasureReport-reporter", + "version": "4.0.1", + "name": "reporter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The reporter to return measure report results for", + "code": "reporter", + "base": [ "MeasureReport" ], + "type": "reference", + "expression": "MeasureReport.reporter", + "xpath": "f:MeasureReport/f:reporter", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MeasureReport-status", + "resource": { + "resourceType": "SearchParameter", + "id": "MeasureReport-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MeasureReport-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The status of the measure report", + "code": "status", + "base": [ "MeasureReport" ], + "type": "token", + "expression": "MeasureReport.status", + "xpath": "f:MeasureReport/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MeasureReport-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "MeasureReport-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MeasureReport-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Quality Information)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/cqi/index.cfm" + } ] + } ], + "description": "The identity of a subject to search for individual measure report results for", + "code": "subject", + "base": [ "MeasureReport" ], + "type": "reference", + "expression": "MeasureReport.subject", + "xpath": "f:MeasureReport/f:subject", + "xpathUsage": "normal", + "target": [ "Practitioner", "Group", "Device", "Patient", "PractitionerRole", "RelatedPerson", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Media-based-on", + "resource": { + "resourceType": "SearchParameter", + "id": "Media-based-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Media-based-on", + "version": "4.0.1", + "name": "based-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Procedure that caused this media to be created", + "code": "based-on", + "base": [ "Media" ], + "type": "reference", + "expression": "Media.basedOn", + "xpath": "f:Media/f:basedOn", + "xpathUsage": "normal", + "target": [ "CarePlan", "ServiceRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Media-created", + "resource": { + "resourceType": "SearchParameter", + "id": "Media-created", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Media-created", + "version": "4.0.1", + "name": "created", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "When Media was collected", + "code": "created", + "base": [ "Media" ], + "type": "date", + "expression": "Media.created", + "xpath": "f:Media/f:createdDateTime | f:Media/f:createdPeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Media-device", + "resource": { + "resourceType": "SearchParameter", + "id": "Media-device", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Media-device", + "version": "4.0.1", + "name": "device", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Observing Device", + "code": "device", + "base": [ "Media" ], + "type": "reference", + "expression": "Media.device", + "xpath": "f:Media/f:device", + "xpathUsage": "normal", + "target": [ "Device", "DeviceMetric" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Media-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "Media-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Media-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Encounter associated with media", + "code": "encounter", + "base": [ "Media" ], + "type": "reference", + "expression": "Media.encounter", + "xpath": "f:Media/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Media-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Media-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Media-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Identifier(s) for the image", + "code": "identifier", + "base": [ "Media" ], + "type": "token", + "expression": "Media.identifier", + "xpath": "f:Media/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Media-modality", + "resource": { + "resourceType": "SearchParameter", + "id": "Media-modality", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Media-modality", + "version": "4.0.1", + "name": "modality", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The type of acquisition equipment/process", + "code": "modality", + "base": [ "Media" ], + "type": "token", + "expression": "Media.modality", + "xpath": "f:Media/f:modality", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Media-operator", + "resource": { + "resourceType": "SearchParameter", + "id": "Media-operator", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Media-operator", + "version": "4.0.1", + "name": "operator", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The person who generated the image", + "code": "operator", + "base": [ "Media" ], + "type": "reference", + "expression": "Media.operator", + "xpath": "f:Media/f:operator", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "CareTeam", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Media-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Media-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Media-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Who/What this Media is a record of", + "code": "patient", + "base": [ "Media" ], + "type": "reference", + "expression": "Media.subject.where(resolve() is Patient)", + "xpath": "f:Media/f:subject", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Media-site", + "resource": { + "resourceType": "SearchParameter", + "id": "Media-site", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Media-site", + "version": "4.0.1", + "name": "site", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Observed body part", + "code": "site", + "base": [ "Media" ], + "type": "token", + "expression": "Media.bodySite", + "xpath": "f:Media/f:bodySite", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Media-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Media-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Media-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown", + "code": "status", + "base": [ "Media" ], + "type": "token", + "expression": "Media.status", + "xpath": "f:Media/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Media-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Media-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Media-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Who/What this Media is a record of", + "code": "subject", + "base": [ "Media" ], + "type": "reference", + "expression": "Media.subject", + "xpath": "f:Media/f:subject", + "xpathUsage": "normal", + "target": [ "Practitioner", "Group", "Specimen", "Device", "Patient", "PractitionerRole", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Media-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Media-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Media-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Classification of media as image, video, or audio", + "code": "type", + "base": [ "Media" ], + "type": "token", + "expression": "Media.type", + "xpath": "f:Media/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Media-view", + "resource": { + "resourceType": "SearchParameter", + "id": "Media-view", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Media-view", + "version": "4.0.1", + "name": "view", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Imaging view, e.g. Lateral or Antero-posterior", + "code": "view", + "base": [ "Media" ], + "type": "token", + "expression": "Media.view", + "xpath": "f:Media/f:view", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Medication-expiration-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Medication-expiration-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Medication-expiration-date", + "version": "4.0.1", + "name": "expiration-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns medications in a batch with this expiration date", + "code": "expiration-date", + "base": [ "Medication" ], + "type": "date", + "expression": "Medication.batch.expirationDate", + "xpath": "f:Medication/f:batch/f:expirationDate", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Medication-form", + "resource": { + "resourceType": "SearchParameter", + "id": "Medication-form", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Medication-form", + "version": "4.0.1", + "name": "form", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns medications for a specific dose form", + "code": "form", + "base": [ "Medication" ], + "type": "token", + "expression": "Medication.form", + "xpath": "f:Medication/f:form", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Medication-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Medication-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Medication-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns medications with this external identifier", + "code": "identifier", + "base": [ "Medication" ], + "type": "token", + "expression": "Medication.identifier", + "xpath": "f:Medication/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Medication-ingredient", + "resource": { + "resourceType": "SearchParameter", + "id": "Medication-ingredient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Medication-ingredient", + "version": "4.0.1", + "name": "ingredient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns medications for this ingredient reference", + "code": "ingredient", + "base": [ "Medication" ], + "type": "reference", + "expression": "(Medication.ingredient.item as Reference)", + "xpath": "f:Medication/f:ingredient/f:itemReference", + "xpathUsage": "normal", + "target": [ "Medication", "Substance" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Medication-ingredient-code", + "resource": { + "resourceType": "SearchParameter", + "id": "Medication-ingredient-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Medication-ingredient-code", + "version": "4.0.1", + "name": "ingredient-code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns medications for this ingredient code", + "code": "ingredient-code", + "base": [ "Medication" ], + "type": "token", + "expression": "(Medication.ingredient.item as CodeableConcept)", + "xpath": "f:Medication/f:ingredient/f:itemCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Medication-lot-number", + "resource": { + "resourceType": "SearchParameter", + "id": "Medication-lot-number", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Medication-lot-number", + "version": "4.0.1", + "name": "lot-number", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns medications in a batch with this lot number", + "code": "lot-number", + "base": [ "Medication" ], + "type": "token", + "expression": "Medication.batch.lotNumber", + "xpath": "f:Medication/f:batch/f:lotNumber", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Medication-manufacturer", + "resource": { + "resourceType": "SearchParameter", + "id": "Medication-manufacturer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Medication-manufacturer", + "version": "4.0.1", + "name": "manufacturer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns medications made or sold for this manufacturer", + "code": "manufacturer", + "base": [ "Medication" ], + "type": "reference", + "expression": "Medication.manufacturer", + "xpath": "f:Medication/f:manufacturer", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Medication-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Medication-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Medication-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns medications for this status", + "code": "status", + "base": [ "Medication" ], + "type": "token", + "expression": "Medication.status", + "xpath": "f:Medication/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-context", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationAdministration-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Return administrations that share this encounter or episode of care", + "code": "context", + "base": [ "MedicationAdministration" ], + "type": "reference", + "expression": "MedicationAdministration.context", + "xpath": "f:MedicationAdministration/f:context", + "xpathUsage": "normal", + "target": [ "EpisodeOfCare", "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-device", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationAdministration-device", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-device", + "version": "4.0.1", + "name": "device", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Return administrations with this administration device identity", + "code": "device", + "base": [ "MedicationAdministration" ], + "type": "reference", + "expression": "MedicationAdministration.device", + "xpath": "f:MedicationAdministration/f:device", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-effective-time", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationAdministration-effective-time", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-effective-time", + "version": "4.0.1", + "name": "effective-time", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Date administration happened (or did not happen)", + "code": "effective-time", + "base": [ "MedicationAdministration" ], + "type": "date", + "expression": "MedicationAdministration.effective", + "xpath": "f:MedicationAdministration/f:effectiveDateTime | f:MedicationAdministration/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/medications-medication", + "resource": { + "resourceType": "SearchParameter", + "id": "medications-medication", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/medications-medication", + "version": "4.0.1", + "name": "medication", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication resource\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication reference\r\n", + "code": "medication", + "base": [ "MedicationAdministration", "MedicationDispense", "MedicationRequest", "MedicationStatement" ], + "type": "reference", + "expression": "(MedicationAdministration.medication as Reference) | (MedicationDispense.medication as Reference) | (MedicationRequest.medication as Reference) | (MedicationStatement.medication as Reference)", + "xpath": "f:MedicationAdministration/f:medicationReference | f:MedicationDispense/f:medicationReference | f:MedicationRequest/f:medicationReference | f:MedicationStatement/f:medicationReference", + "xpathUsage": "normal", + "target": [ "Medication" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-performer", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationAdministration-performer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-performer", + "version": "4.0.1", + "name": "performer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "The identity of the individual who administered the medication", + "code": "performer", + "base": [ "MedicationAdministration" ], + "type": "reference", + "expression": "MedicationAdministration.performer.actor", + "xpath": "f:MedicationAdministration/f:performer/f:actor", + "xpathUsage": "normal", + "target": [ "Practitioner", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-reason-given", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationAdministration-reason-given", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-reason-given", + "version": "4.0.1", + "name": "reason-given", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Reasons for administering the medication", + "code": "reason-given", + "base": [ "MedicationAdministration" ], + "type": "token", + "expression": "MedicationAdministration.reasonCode", + "xpath": "f:MedicationAdministration/f:reasonCode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-reason-not-given", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationAdministration-reason-not-given", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-reason-not-given", + "version": "4.0.1", + "name": "reason-not-given", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Reasons for not administering the medication", + "code": "reason-not-given", + "base": [ "MedicationAdministration" ], + "type": "token", + "expression": "MedicationAdministration.statusReason", + "xpath": "f:MedicationAdministration/f:statusReason", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-request", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationAdministration-request", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-request", + "version": "4.0.1", + "name": "request", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "The identity of a request to list administrations from", + "code": "request", + "base": [ "MedicationAdministration" ], + "type": "reference", + "expression": "MedicationAdministration.request", + "xpath": "f:MedicationAdministration/f:request", + "xpathUsage": "normal", + "target": [ "MedicationRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/medications-status", + "resource": { + "resourceType": "SearchParameter", + "id": "medications-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/medications-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified)\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status\r\n* [MedicationRequest](medicationrequest.html): Status of the prescription\r\n* [MedicationStatement](medicationstatement.html): Return statements that match the given status\r\n", + "code": "status", + "base": [ "MedicationAdministration", "MedicationDispense", "MedicationRequest", "MedicationStatement" ], + "type": "token", + "expression": "MedicationAdministration.status | MedicationDispense.status | MedicationRequest.status | MedicationStatement.status", + "xpath": "f:MedicationAdministration/f:status | f:MedicationDispense/f:status | f:MedicationRequest/f:status | f:MedicationStatement/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationAdministration-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationAdministration-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "The identity of the individual or group to list administrations for", + "code": "subject", + "base": [ "MedicationAdministration" ], + "type": "reference", + "expression": "MedicationAdministration.subject", + "xpath": "f:MedicationAdministration/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationDispense-context", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationDispense-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationDispense-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns dispenses with a specific context (episode or episode of care)", + "code": "context", + "base": [ "MedicationDispense" ], + "type": "reference", + "expression": "MedicationDispense.context", + "xpath": "f:MedicationDispense/f:context", + "xpathUsage": "normal", + "target": [ "EpisodeOfCare", "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationDispense-destination", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationDispense-destination", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationDispense-destination", + "version": "4.0.1", + "name": "destination", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns dispenses that should be sent to a specific destination", + "code": "destination", + "base": [ "MedicationDispense" ], + "type": "reference", + "expression": "MedicationDispense.destination", + "xpath": "f:MedicationDispense/f:destination", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationDispense-performer", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationDispense-performer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationDispense-performer", + "version": "4.0.1", + "name": "performer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns dispenses performed by a specific individual", + "code": "performer", + "base": [ "MedicationDispense" ], + "type": "reference", + "expression": "MedicationDispense.performer.actor", + "xpath": "f:MedicationDispense/f:performer/f:actor", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/medications-prescription", + "resource": { + "resourceType": "SearchParameter", + "id": "medications-prescription", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/medications-prescription", + "version": "4.0.1", + "name": "prescription", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [MedicationDispense](medicationdispense.html): The identity of a prescription to list dispenses from\r\n", + "code": "prescription", + "base": [ "MedicationDispense" ], + "type": "reference", + "expression": "MedicationDispense.authorizingPrescription", + "xpath": "f:MedicationDispense/f:authorizingPrescription", + "xpathUsage": "normal", + "target": [ "MedicationRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationDispense-receiver", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationDispense-receiver", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationDispense-receiver", + "version": "4.0.1", + "name": "receiver", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "The identity of a receiver to list dispenses for", + "code": "receiver", + "base": [ "MedicationDispense" ], + "type": "reference", + "expression": "MedicationDispense.receiver", + "xpath": "f:MedicationDispense/f:receiver", + "xpathUsage": "normal", + "target": [ "Practitioner", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationDispense-responsibleparty", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationDispense-responsibleparty", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationDispense-responsibleparty", + "version": "4.0.1", + "name": "responsibleparty", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns dispenses with the specified responsible party", + "code": "responsibleparty", + "base": [ "MedicationDispense" ], + "type": "reference", + "expression": "MedicationDispense.substitution.responsibleParty", + "xpath": "f:MedicationDispense/f:substitution/f:responsibleParty", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationDispense-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationDispense-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationDispense-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "The identity of a patient for whom to list dispenses", + "code": "subject", + "base": [ "MedicationDispense" ], + "type": "reference", + "expression": "MedicationDispense.subject", + "xpath": "f:MedicationDispense/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationDispense-type", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationDispense-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationDispense-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns dispenses of a specific type", + "code": "type", + "base": [ "MedicationDispense" ], + "type": "token", + "expression": "MedicationDispense.type", + "xpath": "f:MedicationDispense/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationDispense-whenhandedover", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationDispense-whenhandedover", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationDispense-whenhandedover", + "version": "4.0.1", + "name": "whenhandedover", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns dispenses handed over on this date", + "code": "whenhandedover", + "base": [ "MedicationDispense" ], + "type": "date", + "expression": "MedicationDispense.whenHandedOver", + "xpath": "f:MedicationDispense/f:whenHandedOver", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationDispense-whenprepared", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationDispense-whenprepared", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationDispense-whenprepared", + "version": "4.0.1", + "name": "whenprepared", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns dispenses prepared on this date", + "code": "whenprepared", + "base": [ "MedicationDispense" ], + "type": "date", + "expression": "MedicationDispense.whenPrepared", + "xpath": "f:MedicationDispense/f:whenPrepared", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-classification", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationKnowledge-classification", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-classification", + "version": "4.0.1", + "name": "classification", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Specific category assigned to the medication", + "code": "classification", + "base": [ "MedicationKnowledge" ], + "type": "token", + "expression": "MedicationKnowledge.medicineClassification.classification", + "xpath": "f:MedicationKnowledge/f:medicineClassification/f:classification", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-classification-type", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationKnowledge-classification-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-classification-type", + "version": "4.0.1", + "name": "classification-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "The type of category for the medication (for example, therapeutic classification, therapeutic sub-classification)", + "code": "classification-type", + "base": [ "MedicationKnowledge" ], + "type": "token", + "expression": "MedicationKnowledge.medicineClassification.type", + "xpath": "f:MedicationKnowledge/f:medicineClassification/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-code", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationKnowledge-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Code that identifies this medication", + "code": "code", + "base": [ "MedicationKnowledge" ], + "type": "token", + "expression": "MedicationKnowledge.code", + "xpath": "f:MedicationKnowledge/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-doseform", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationKnowledge-doseform", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-doseform", + "version": "4.0.1", + "name": "doseform", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "powder | tablets | capsule +", + "code": "doseform", + "base": [ "MedicationKnowledge" ], + "type": "token", + "expression": "MedicationKnowledge.doseForm", + "xpath": "f:MedicationKnowledge/f:doseForm", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-ingredient", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationKnowledge-ingredient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-ingredient", + "version": "4.0.1", + "name": "ingredient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Medication(s) or substance(s) contained in the medication", + "code": "ingredient", + "base": [ "MedicationKnowledge" ], + "type": "reference", + "expression": "(MedicationKnowledge.ingredient.item as Reference)", + "xpath": "f:MedicationKnowledge/f:ingredient/f:itemReference", + "xpathUsage": "normal", + "target": [ "Substance" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-ingredient-code", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationKnowledge-ingredient-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-ingredient-code", + "version": "4.0.1", + "name": "ingredient-code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Medication(s) or substance(s) contained in the medication", + "code": "ingredient-code", + "base": [ "MedicationKnowledge" ], + "type": "token", + "expression": "(MedicationKnowledge.ingredient.item as CodeableConcept)", + "xpath": "f:MedicationKnowledge/f:ingredient/f:itemCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-manufacturer", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationKnowledge-manufacturer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-manufacturer", + "version": "4.0.1", + "name": "manufacturer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Manufacturer of the item", + "code": "manufacturer", + "base": [ "MedicationKnowledge" ], + "type": "reference", + "expression": "MedicationKnowledge.manufacturer", + "xpath": "f:MedicationKnowledge/f:manufacturer", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-monitoring-program-name", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationKnowledge-monitoring-program-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-monitoring-program-name", + "version": "4.0.1", + "name": "monitoring-program-name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Name of the reviewing program", + "code": "monitoring-program-name", + "base": [ "MedicationKnowledge" ], + "type": "token", + "expression": "MedicationKnowledge.monitoringProgram.name", + "xpath": "f:MedicationKnowledge/f:monitoringProgram/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-monitoring-program-type", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationKnowledge-monitoring-program-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-monitoring-program-type", + "version": "4.0.1", + "name": "monitoring-program-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Type of program under which the medication is monitored", + "code": "monitoring-program-type", + "base": [ "MedicationKnowledge" ], + "type": "token", + "expression": "MedicationKnowledge.monitoringProgram.type", + "xpath": "f:MedicationKnowledge/f:monitoringProgram/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-monograph", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationKnowledge-monograph", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-monograph", + "version": "4.0.1", + "name": "monograph", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Associated documentation about the medication", + "code": "monograph", + "base": [ "MedicationKnowledge" ], + "type": "reference", + "expression": "MedicationKnowledge.monograph.source", + "xpath": "f:MedicationKnowledge/f:monograph/f:source", + "xpathUsage": "normal", + "target": [ "Media", "DocumentReference" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-monograph-type", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationKnowledge-monograph-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-monograph-type", + "version": "4.0.1", + "name": "monograph-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "The category of medication document", + "code": "monograph-type", + "base": [ "MedicationKnowledge" ], + "type": "token", + "expression": "MedicationKnowledge.monograph.type", + "xpath": "f:MedicationKnowledge/f:monograph/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-source-cost", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationKnowledge-source-cost", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-source-cost", + "version": "4.0.1", + "name": "source-cost", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "The source or owner for the price information", + "code": "source-cost", + "base": [ "MedicationKnowledge" ], + "type": "token", + "expression": "MedicationKnowledge.cost.source", + "xpath": "f:MedicationKnowledge/f:cost/f:source", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-status", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationKnowledge-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "active | inactive | entered-in-error", + "code": "status", + "base": [ "MedicationKnowledge" ], + "type": "token", + "expression": "MedicationKnowledge.status", + "xpath": "f:MedicationKnowledge/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationRequest-authoredon", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationRequest-authoredon", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationRequest-authoredon", + "version": "4.0.1", + "name": "authoredon", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Return prescriptions written on this date", + "code": "authoredon", + "base": [ "MedicationRequest" ], + "type": "date", + "expression": "MedicationRequest.authoredOn", + "xpath": "f:MedicationRequest/f:authoredOn", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationRequest-category", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationRequest-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationRequest-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns prescriptions with different categories", + "code": "category", + "base": [ "MedicationRequest" ], + "type": "token", + "expression": "MedicationRequest.category", + "xpath": "f:MedicationRequest/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/medications-date", + "resource": { + "resourceType": "SearchParameter", + "id": "medications-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/medications-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [MedicationRequest](medicationrequest.html): Returns medication request to be administered on a specific date\r\n", + "code": "date", + "base": [ "MedicationRequest" ], + "type": "date", + "expression": "MedicationRequest.dosageInstruction.timing.event", + "xpath": "f:MedicationRequest/f:dosageInstruction/f:timing/f:event", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/medications-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "medications-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/medications-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this encounter identifier\r\n", + "code": "encounter", + "base": [ "MedicationRequest" ], + "type": "reference", + "expression": "MedicationRequest.encounter", + "xpath": "f:MedicationRequest/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationRequest-intended-dispenser", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationRequest-intended-dispenser", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationRequest-intended-dispenser", + "version": "4.0.1", + "name": "intended-dispenser", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns prescriptions intended to be dispensed by this Organization", + "code": "intended-dispenser", + "base": [ "MedicationRequest" ], + "type": "reference", + "expression": "MedicationRequest.dispenseRequest.performer", + "xpath": "f:MedicationRequest/f:dispenseRequest/f:performer", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationRequest-intended-performer", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationRequest-intended-performer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationRequest-intended-performer", + "version": "4.0.1", + "name": "intended-performer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns the intended performer of the administration of the medication request", + "code": "intended-performer", + "base": [ "MedicationRequest" ], + "type": "reference", + "expression": "MedicationRequest.performer", + "xpath": "f:MedicationRequest/f:performer", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "CareTeam", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationRequest-intended-performertype", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationRequest-intended-performertype", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationRequest-intended-performertype", + "version": "4.0.1", + "name": "intended-performertype", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns requests for a specific type of performer", + "code": "intended-performertype", + "base": [ "MedicationRequest" ], + "type": "token", + "expression": "MedicationRequest.performerType", + "xpath": "f:MedicationRequest/f:performerType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationRequest-intent", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationRequest-intent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationRequest-intent", + "version": "4.0.1", + "name": "intent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns prescriptions with different intents", + "code": "intent", + "base": [ "MedicationRequest" ], + "type": "token", + "expression": "MedicationRequest.intent", + "xpath": "f:MedicationRequest/f:intent", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationRequest-priority", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationRequest-priority", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationRequest-priority", + "version": "4.0.1", + "name": "priority", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns prescriptions with different priorities", + "code": "priority", + "base": [ "MedicationRequest" ], + "type": "token", + "expression": "MedicationRequest.priority", + "xpath": "f:MedicationRequest/f:priority", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationRequest-requester", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationRequest-requester", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationRequest-requester", + "version": "4.0.1", + "name": "requester", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns prescriptions prescribed by this prescriber", + "code": "requester", + "base": [ "MedicationRequest" ], + "type": "reference", + "expression": "MedicationRequest.requester", + "xpath": "f:MedicationRequest/f:requester", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationRequest-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationRequest-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationRequest-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "The identity of a patient to list orders for", + "code": "subject", + "base": [ "MedicationRequest" ], + "type": "reference", + "expression": "MedicationRequest.subject", + "xpath": "f:MedicationRequest/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationStatement-category", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationStatement-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationStatement-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns statements of this category of medicationstatement", + "code": "category", + "base": [ "MedicationStatement" ], + "type": "token", + "expression": "MedicationStatement.category", + "xpath": "f:MedicationStatement/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationStatement-context", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationStatement-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationStatement-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns statements for a specific context (episode or episode of Care).", + "code": "context", + "base": [ "MedicationStatement" ], + "type": "reference", + "expression": "MedicationStatement.context", + "xpath": "f:MedicationStatement/f:context", + "xpathUsage": "normal", + "target": [ "EpisodeOfCare", "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationStatement-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationStatement-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationStatement-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Date when patient was taking (or not taking) the medication", + "code": "effective", + "base": [ "MedicationStatement" ], + "type": "date", + "expression": "MedicationStatement.effective", + "xpath": "f:MedicationStatement/f:effectiveDateTime | f:MedicationStatement/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationStatement-part-of", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationStatement-part-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationStatement-part-of", + "version": "4.0.1", + "name": "part-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Returns statements that are part of another event.", + "code": "part-of", + "base": [ "MedicationStatement" ], + "type": "reference", + "expression": "MedicationStatement.partOf", + "xpath": "f:MedicationStatement/f:partOf", + "xpathUsage": "normal", + "target": [ "MedicationDispense", "Observation", "MedicationAdministration", "Procedure", "MedicationStatement" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationStatement-source", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationStatement-source", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationStatement-source", + "version": "4.0.1", + "name": "source", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "Who or where the information in the statement came from", + "code": "source", + "base": [ "MedicationStatement" ], + "type": "reference", + "expression": "MedicationStatement.informationSource", + "xpath": "f:MedicationStatement/f:informationSource", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicationStatement-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicationStatement-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicationStatement-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Pharmacy)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/medication/index.cfm" + } ] + } ], + "description": "The identity of a patient, animal or group to list statements for", + "code": "subject", + "base": [ "MedicationStatement" ], + "type": "reference", + "expression": "MedicationStatement.subject", + "xpath": "f:MedicationStatement/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProduct-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProduct-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProduct-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Business identifier for this product. Could be an MPID", + "code": "identifier", + "base": [ "MedicinalProduct" ], + "type": "token", + "expression": "MedicinalProduct.identifier", + "xpath": "f:MedicinalProduct/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProduct-name", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProduct-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProduct-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "The full product name", + "code": "name", + "base": [ "MedicinalProduct" ], + "type": "string", + "expression": "MedicinalProduct.name.productName", + "xpath": "f:MedicinalProduct/f:name/f:productName", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProduct-name-language", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProduct-name-language", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProduct-name-language", + "version": "4.0.1", + "name": "name-language", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Language code for this name", + "code": "name-language", + "base": [ "MedicinalProduct" ], + "type": "token", + "expression": "MedicinalProduct.name.countryLanguage.language", + "xpath": "f:MedicinalProduct/f:name/f:countryLanguage/f:language", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-country", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductAuthorization-country", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-country", + "version": "4.0.1", + "name": "country", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "The country in which the marketing authorization has been granted", + "code": "country", + "base": [ "MedicinalProductAuthorization" ], + "type": "token", + "expression": "MedicinalProductAuthorization.country", + "xpath": "f:MedicinalProductAuthorization/f:country", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-holder", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductAuthorization-holder", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-holder", + "version": "4.0.1", + "name": "holder", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Marketing Authorization Holder", + "code": "holder", + "base": [ "MedicinalProductAuthorization" ], + "type": "reference", + "expression": "MedicinalProductAuthorization.holder", + "xpath": "f:MedicinalProductAuthorization/f:holder", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductAuthorization-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Business identifier for the marketing authorization, as assigned by a regulator", + "code": "identifier", + "base": [ "MedicinalProductAuthorization" ], + "type": "token", + "expression": "MedicinalProductAuthorization.identifier", + "xpath": "f:MedicinalProductAuthorization/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-status", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductAuthorization-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "The status of the marketing authorization", + "code": "status", + "base": [ "MedicinalProductAuthorization" ], + "type": "token", + "expression": "MedicinalProductAuthorization.status", + "xpath": "f:MedicinalProductAuthorization/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductAuthorization-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "The medicinal product that is being authorized", + "code": "subject", + "base": [ "MedicinalProductAuthorization" ], + "type": "reference", + "expression": "MedicinalProductAuthorization.subject", + "xpath": "f:MedicinalProductAuthorization/f:subject", + "xpathUsage": "normal", + "target": [ "MedicinalProductPackaged", "MedicinalProduct" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductContraindication-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductContraindication-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductContraindication-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "The medication for which this is an contraindication", + "code": "subject", + "base": [ "MedicinalProductContraindication" ], + "type": "reference", + "expression": "MedicinalProductContraindication.subject", + "xpath": "f:MedicinalProductContraindication/f:subject", + "xpathUsage": "normal", + "target": [ "Medication", "MedicinalProduct" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductIndication-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductIndication-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductIndication-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "The medication for which this is an indication", + "code": "subject", + "base": [ "MedicinalProductIndication" ], + "type": "reference", + "expression": "MedicinalProductIndication.subject", + "xpath": "f:MedicinalProductIndication/f:subject", + "xpathUsage": "normal", + "target": [ "Medication", "MedicinalProduct" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductInteraction-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductInteraction-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductInteraction-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "The medication for which this is an interaction", + "code": "subject", + "base": [ "MedicinalProductInteraction" ], + "type": "reference", + "expression": "MedicinalProductInteraction.subject", + "xpath": "f:MedicinalProductInteraction/f:subject", + "xpathUsage": "normal", + "target": [ "Medication", "Substance", "MedicinalProduct" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductPackaged-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductPackaged-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductPackaged-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Unique identifier", + "code": "identifier", + "base": [ "MedicinalProductPackaged" ], + "type": "token", + "expression": "MedicinalProductPackaged.identifier", + "xpath": "f:MedicinalProductPackaged/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductPackaged-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductPackaged-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductPackaged-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "The product with this is a pack for", + "code": "subject", + "base": [ "MedicinalProductPackaged" ], + "type": "reference", + "expression": "MedicinalProductPackaged.subject", + "xpath": "f:MedicinalProductPackaged/f:subject", + "xpathUsage": "normal", + "target": [ "MedicinalProduct" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductPharmaceutical-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductPharmaceutical-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductPharmaceutical-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "An identifier for the pharmaceutical medicinal product", + "code": "identifier", + "base": [ "MedicinalProductPharmaceutical" ], + "type": "token", + "expression": "MedicinalProductPharmaceutical.identifier", + "xpath": "f:MedicinalProductPharmaceutical/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductPharmaceutical-route", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductPharmaceutical-route", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductPharmaceutical-route", + "version": "4.0.1", + "name": "route", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Coded expression for the route", + "code": "route", + "base": [ "MedicinalProductPharmaceutical" ], + "type": "token", + "expression": "MedicinalProductPharmaceutical.routeOfAdministration.code", + "xpath": "f:MedicinalProductPharmaceutical/f:routeOfAdministration/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductPharmaceutical-target-species", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductPharmaceutical-target-species", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductPharmaceutical-target-species", + "version": "4.0.1", + "name": "target-species", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Coded expression for the species", + "code": "target-species", + "base": [ "MedicinalProductPharmaceutical" ], + "type": "token", + "expression": "MedicinalProductPharmaceutical.routeOfAdministration.targetSpecies.code", + "xpath": "f:MedicinalProductPharmaceutical/f:routeOfAdministration/f:targetSpecies/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MedicinalProductUndesirableEffect-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "MedicinalProductUndesirableEffect-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MedicinalProductUndesirableEffect-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "The medication for which this is an undesirable effect", + "code": "subject", + "base": [ "MedicinalProductUndesirableEffect" ], + "type": "reference", + "expression": "MedicinalProductUndesirableEffect.subject", + "xpath": "f:MedicinalProductUndesirableEffect/f:subject", + "xpathUsage": "normal", + "target": [ "Medication", "MedicinalProduct" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageDefinition-category", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageDefinition-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageDefinition-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "The behavior associated with the message", + "code": "category", + "base": [ "MessageDefinition" ], + "type": "token", + "expression": "MessageDefinition.category", + "xpath": "f:MessageDefinition/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageDefinition-event", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageDefinition-event", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageDefinition-event", + "version": "4.0.1", + "name": "event", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "The event that triggers the message or link to the event definition.", + "code": "event", + "base": [ "MessageDefinition" ], + "type": "token", + "expression": "MessageDefinition.event", + "xpath": "f:MessageDefinition/f:eventCoding | f:MessageDefinition/f:eventUri", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageDefinition-focus", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageDefinition-focus", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageDefinition-focus", + "version": "4.0.1", + "name": "focus", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "A resource that is a permitted focus of the message", + "code": "focus", + "base": [ "MessageDefinition" ], + "type": "token", + "expression": "MessageDefinition.focus.code", + "xpath": "f:MessageDefinition/f:focus/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageDefinition-parent", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageDefinition-parent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageDefinition-parent", + "version": "4.0.1", + "name": "parent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "A resource that is the parent of the definition", + "code": "parent", + "base": [ "MessageDefinition" ], + "type": "reference", + "expression": "MessageDefinition.parent", + "xpath": "f:MessageDefinition/f:parent", + "xpathUsage": "normal", + "target": [ "PlanDefinition", "ActivityDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-author", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-author", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-author", + "version": "4.0.1", + "name": "author", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "The source of the decision", + "code": "author", + "base": [ "MessageHeader" ], + "type": "reference", + "expression": "MessageHeader.author", + "xpath": "f:MessageHeader/f:author", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-code", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "ok | transient-error | fatal-error", + "code": "code", + "base": [ "MessageHeader" ], + "type": "token", + "expression": "MessageHeader.response.code", + "xpath": "f:MessageHeader/f:response/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-destination", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-destination", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-destination", + "version": "4.0.1", + "name": "destination", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "Name of system", + "code": "destination", + "base": [ "MessageHeader" ], + "type": "string", + "expression": "MessageHeader.destination.name", + "xpath": "f:MessageHeader/f:destination/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-destination-uri", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-destination-uri", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-destination-uri", + "version": "4.0.1", + "name": "destination-uri", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "Actual destination address or id", + "code": "destination-uri", + "base": [ "MessageHeader" ], + "type": "uri", + "expression": "MessageHeader.destination.endpoint", + "xpath": "f:MessageHeader/f:destination/f:endpoint", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-enterer", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-enterer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-enterer", + "version": "4.0.1", + "name": "enterer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "The source of the data entry", + "code": "enterer", + "base": [ "MessageHeader" ], + "type": "reference", + "expression": "MessageHeader.enterer", + "xpath": "f:MessageHeader/f:enterer", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-event", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-event", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-event", + "version": "4.0.1", + "name": "event", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "Code for the event this message represents or link to event definition", + "code": "event", + "base": [ "MessageHeader" ], + "type": "token", + "expression": "MessageHeader.event", + "xpath": "f:MessageHeader/f:eventCoding | f:MessageHeader/f:eventUri", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-focus", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-focus", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-focus", + "version": "4.0.1", + "name": "focus", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "The actual content of the message", + "code": "focus", + "base": [ "MessageHeader" ], + "type": "reference", + "expression": "MessageHeader.focus", + "xpath": "f:MessageHeader/f:focus", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-receiver", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-receiver", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-receiver", + "version": "4.0.1", + "name": "receiver", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "Intended \"real-world\" recipient for the data", + "code": "receiver", + "base": [ "MessageHeader" ], + "type": "reference", + "expression": "MessageHeader.destination.receiver", + "xpath": "f:MessageHeader/f:destination/f:receiver", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-response-id", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-response-id", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-response-id", + "version": "4.0.1", + "name": "response-id", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "Id of original message", + "code": "response-id", + "base": [ "MessageHeader" ], + "type": "token", + "expression": "MessageHeader.response.identifier", + "xpath": "f:MessageHeader/f:response/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-responsible", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-responsible", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-responsible", + "version": "4.0.1", + "name": "responsible", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "Final responsibility for event", + "code": "responsible", + "base": [ "MessageHeader" ], + "type": "reference", + "expression": "MessageHeader.responsible", + "xpath": "f:MessageHeader/f:responsible", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-sender", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-sender", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-sender", + "version": "4.0.1", + "name": "sender", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "Real world sender of the message", + "code": "sender", + "base": [ "MessageHeader" ], + "type": "reference", + "expression": "MessageHeader.sender", + "xpath": "f:MessageHeader/f:sender", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-source", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-source", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-source", + "version": "4.0.1", + "name": "source", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "Name of system", + "code": "source", + "base": [ "MessageHeader" ], + "type": "string", + "expression": "MessageHeader.source.name", + "xpath": "f:MessageHeader/f:source/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-source-uri", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-source-uri", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-source-uri", + "version": "4.0.1", + "name": "source-uri", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "Actual message source address or id", + "code": "source-uri", + "base": [ "MessageHeader" ], + "type": "uri", + "expression": "MessageHeader.source.endpoint", + "xpath": "f:MessageHeader/f:source/f:endpoint", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MessageHeader-target", + "resource": { + "resourceType": "SearchParameter", + "id": "MessageHeader-target", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MessageHeader-target", + "version": "4.0.1", + "name": "target", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Infrastructure And Messaging)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/special/committees/inm/index.cfm" + } ] + } ], + "description": "Particular delivery destination within the destination", + "code": "target", + "base": [ "MessageHeader" ], + "type": "reference", + "expression": "MessageHeader.destination.target", + "xpath": "f:MessageHeader/f:destination/f:target", + "xpathUsage": "normal", + "target": [ "Device" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome", + "resource": { + "resourceType": "SearchParameter", + "id": "MolecularSequence-chromosome", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome", + "version": "4.0.1", + "name": "chromosome", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Genomics)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/clingenomics/index.cfm" + } ] + } ], + "description": "Chromosome number of the reference sequence", + "code": "chromosome", + "base": [ "MolecularSequence" ], + "type": "token", + "expression": "MolecularSequence.referenceSeq.chromosome", + "xpath": "f:MolecularSequence/f:referenceSeq/f:chromosome", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MolecularSequence-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "MolecularSequence-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MolecularSequence-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Genomics)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/clingenomics/index.cfm" + } ] + } ], + "description": "The unique identity for a particular sequence", + "code": "identifier", + "base": [ "MolecularSequence" ], + "type": "token", + "expression": "MolecularSequence.identifier", + "xpath": "f:MolecularSequence/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MolecularSequence-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "MolecularSequence-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MolecularSequence-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Genomics)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/clingenomics/index.cfm" + } ] + } ], + "description": "The subject that the observation is about", + "code": "patient", + "base": [ "MolecularSequence" ], + "type": "reference", + "expression": "MolecularSequence.patient", + "xpath": "f:MolecularSequence/f:patient", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MolecularSequence-referenceseqid", + "resource": { + "resourceType": "SearchParameter", + "id": "MolecularSequence-referenceseqid", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MolecularSequence-referenceseqid", + "version": "4.0.1", + "name": "referenceseqid", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Genomics)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/clingenomics/index.cfm" + } ] + } ], + "description": "Reference Sequence of the sequence", + "code": "referenceseqid", + "base": [ "MolecularSequence" ], + "type": "token", + "expression": "MolecularSequence.referenceSeq.referenceSeqId", + "xpath": "f:MolecularSequence/f:referenceSeq/f:referenceSeqId", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MolecularSequence-type", + "resource": { + "resourceType": "SearchParameter", + "id": "MolecularSequence-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MolecularSequence-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Genomics)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/clingenomics/index.cfm" + } ] + } ], + "description": "Amino Acid Sequence/ DNA Sequence / RNA Sequence", + "code": "type", + "base": [ "MolecularSequence" ], + "type": "token", + "expression": "MolecularSequence.type", + "xpath": "f:MolecularSequence/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MolecularSequence-variant-end", + "resource": { + "resourceType": "SearchParameter", + "id": "MolecularSequence-variant-end", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MolecularSequence-variant-end", + "version": "4.0.1", + "name": "variant-end", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Genomics)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/clingenomics/index.cfm" + } ] + } ], + "description": "End position (0-based exclusive, which menas the acid at this position will not be included, 1-based inclusive, which means the acid at this position will be included) of the variant.", + "code": "variant-end", + "base": [ "MolecularSequence" ], + "type": "number", + "expression": "MolecularSequence.variant.end", + "xpath": "f:MolecularSequence/f:variant/f:end", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MolecularSequence-variant-start", + "resource": { + "resourceType": "SearchParameter", + "id": "MolecularSequence-variant-start", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MolecularSequence-variant-start", + "version": "4.0.1", + "name": "variant-start", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Genomics)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/clingenomics/index.cfm" + } ] + } ], + "description": "Start position (0-based inclusive, 1-based inclusive, that means the nucleic acid or amino acid at this position will be included) of the variant.", + "code": "variant-start", + "base": [ "MolecularSequence" ], + "type": "number", + "expression": "MolecularSequence.variant.start", + "xpath": "f:MolecularSequence/f:variant/f:start", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MolecularSequence-window-end", + "resource": { + "resourceType": "SearchParameter", + "id": "MolecularSequence-window-end", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MolecularSequence-window-end", + "version": "4.0.1", + "name": "window-end", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Genomics)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/clingenomics/index.cfm" + } ] + } ], + "description": "End position (0-based exclusive, which menas the acid at this position will not be included, 1-based inclusive, which means the acid at this position will be included) of the reference sequence.", + "code": "window-end", + "base": [ "MolecularSequence" ], + "type": "number", + "expression": "MolecularSequence.referenceSeq.windowEnd", + "xpath": "f:MolecularSequence/f:referenceSeq/f:windowEnd", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MolecularSequence-window-start", + "resource": { + "resourceType": "SearchParameter", + "id": "MolecularSequence-window-start", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MolecularSequence-window-start", + "version": "4.0.1", + "name": "window-start", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Genomics)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/clingenomics/index.cfm" + } ] + } ], + "description": "Start position (0-based inclusive, 1-based inclusive, that means the nucleic acid or amino acid at this position will be included) of the reference sequence.", + "code": "window-start", + "base": [ "MolecularSequence" ], + "type": "number", + "expression": "MolecularSequence.referenceSeq.windowStart", + "xpath": "f:MolecularSequence/f:referenceSeq/f:windowStart", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome-variant-coordinate", + "resource": { + "resourceType": "SearchParameter", + "id": "MolecularSequence-chromosome-variant-coordinate", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome-variant-coordinate", + "version": "4.0.1", + "name": "chromosome-variant-coordinate", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Genomics)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/clingenomics/index.cfm" + } ] + } ], + "description": "Search parameter by chromosome and variant coordinate. This will refer to part of a locus or part of a gene where search region will be represented in 1-based system. Since the coordinateSystem can either be 0-based or 1-based, this search query will include the result of both coordinateSystem that contains the equivalent segment of the gene or whole genome sequence. For example, a search for sequence can be represented as `chromosome-variant-coordinate=1$lt345$gt123`, this means it will search for the MolecularSequence resource with variants on chromosome 1 and with position >123 and <345, where in 1-based system resource, all strings within region 1:124-344 will be revealed, while in 0-based system resource, all strings within region 1:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.", + "code": "chromosome-variant-coordinate", + "base": [ "MolecularSequence" ], + "type": "composite", + "expression": "MolecularSequence.variant", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome", + "expression": "%resource.referenceSeq.chromosome" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/MolecularSequence-variant-start", + "expression": "start" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/MolecularSequence-variant-end", + "expression": "end" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome-window-coordinate", + "resource": { + "resourceType": "SearchParameter", + "id": "MolecularSequence-chromosome-window-coordinate", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome-window-coordinate", + "version": "4.0.1", + "name": "chromosome-window-coordinate", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Genomics)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/clingenomics/index.cfm" + } ] + } ], + "description": "Search parameter by chromosome and window. This will refer to part of a locus or part of a gene where search region will be represented in 1-based system. Since the coordinateSystem can either be 0-based or 1-based, this search query will include the result of both coordinateSystem that contains the equivalent segment of the gene or whole genome sequence. For example, a search for sequence can be represented as `chromosome-window-coordinate=1$lt345$gt123`, this means it will search for the MolecularSequence resource with a window on chromosome 1 and with position >123 and <345, where in 1-based system resource, all strings within region 1:124-344 will be revealed, while in 0-based system resource, all strings within region 1:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.", + "code": "chromosome-window-coordinate", + "base": [ "MolecularSequence" ], + "type": "composite", + "expression": "MolecularSequence.referenceSeq", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome", + "expression": "chromosome" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/MolecularSequence-window-start", + "expression": "windowStart" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/MolecularSequence-window-end", + "expression": "windowEnd" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MolecularSequence-referenceseqid-variant-coordinate", + "resource": { + "resourceType": "SearchParameter", + "id": "MolecularSequence-referenceseqid-variant-coordinate", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MolecularSequence-referenceseqid-variant-coordinate", + "version": "4.0.1", + "name": "referenceseqid-variant-coordinate", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Genomics)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/clingenomics/index.cfm" + } ] + } ], + "description": "Search parameter by reference sequence and variant coordinate. This will refer to part of a locus or part of a gene where search region will be represented in 1-based system. Since the coordinateSystem can either be 0-based or 1-based, this search query will include the result of both coordinateSystem that contains the equivalent segment of the gene or whole genome sequence. For example, a search for sequence can be represented as `referenceSeqId-variant-coordinate=NC_000001.11$lt345$gt123`, this means it will search for the MolecularSequence resource with variants on NC_000001.11 and with position >123 and <345, where in 1-based system resource, all strings within region NC_000001.11:124-344 will be revealed, while in 0-based system resource, all strings within region NC_000001.11:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.", + "code": "referenceseqid-variant-coordinate", + "base": [ "MolecularSequence" ], + "type": "composite", + "expression": "MolecularSequence.variant", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/MolecularSequence-referenceseqid", + "expression": "%resource.referenceSeq.referenceSeqId" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/MolecularSequence-variant-start", + "expression": "start" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/MolecularSequence-variant-end", + "expression": "end" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/MolecularSequence-referenceseqid-window-coordinate", + "resource": { + "resourceType": "SearchParameter", + "id": "MolecularSequence-referenceseqid-window-coordinate", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/MolecularSequence-referenceseqid-window-coordinate", + "version": "4.0.1", + "name": "referenceseqid-window-coordinate", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Genomics)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/clingenomics/index.cfm" + } ] + } ], + "description": "Search parameter by reference sequence and window. This will refer to part of a locus or part of a gene where search region will be represented in 1-based system. Since the coordinateSystem can either be 0-based or 1-based, this search query will include the result of both coordinateSystem that contains the equivalent segment of the gene or whole genome sequence. For example, a search for sequence can be represented as `referenceSeqId-window-coordinate=NC_000001.11$lt345$gt123`, this means it will search for the MolecularSequence resource with a window on NC_000001.11 and with position >123 and <345, where in 1-based system resource, all strings within region NC_000001.11:124-344 will be revealed, while in 0-based system resource, all strings within region NC_000001.11:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.", + "code": "referenceseqid-window-coordinate", + "base": [ "MolecularSequence" ], + "type": "composite", + "expression": "MolecularSequence.referenceSeq", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/MolecularSequence-referenceseqid", + "expression": "referenceSeqId" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/MolecularSequence-window-start", + "expression": "windowStart" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/MolecularSequence-window-end", + "expression": "windowEnd" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NamingSystem-contact", + "resource": { + "resourceType": "SearchParameter", + "id": "NamingSystem-contact", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NamingSystem-contact", + "version": "4.0.1", + "name": "contact", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Name of an individual to contact", + "code": "contact", + "base": [ "NamingSystem" ], + "type": "string", + "expression": "NamingSystem.contact.name", + "xpath": "f:NamingSystem/f:contact/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NamingSystem-id-type", + "resource": { + "resourceType": "SearchParameter", + "id": "NamingSystem-id-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NamingSystem-id-type", + "version": "4.0.1", + "name": "id-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "oid | uuid | uri | other", + "code": "id-type", + "base": [ "NamingSystem" ], + "type": "token", + "expression": "NamingSystem.uniqueId.type", + "xpath": "f:NamingSystem/f:uniqueId/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NamingSystem-kind", + "resource": { + "resourceType": "SearchParameter", + "id": "NamingSystem-kind", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NamingSystem-kind", + "version": "4.0.1", + "name": "kind", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "codesystem | identifier | root", + "code": "kind", + "base": [ "NamingSystem" ], + "type": "token", + "expression": "NamingSystem.kind", + "xpath": "f:NamingSystem/f:kind", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NamingSystem-period", + "resource": { + "resourceType": "SearchParameter", + "id": "NamingSystem-period", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NamingSystem-period", + "version": "4.0.1", + "name": "period", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "When is identifier valid?", + "code": "period", + "base": [ "NamingSystem" ], + "type": "date", + "expression": "NamingSystem.uniqueId.period", + "xpath": "f:NamingSystem/f:uniqueId/f:period", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NamingSystem-responsible", + "resource": { + "resourceType": "SearchParameter", + "id": "NamingSystem-responsible", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NamingSystem-responsible", + "version": "4.0.1", + "name": "responsible", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Who maintains system namespace?", + "code": "responsible", + "base": [ "NamingSystem" ], + "type": "string", + "expression": "NamingSystem.responsible", + "xpath": "f:NamingSystem/f:responsible", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NamingSystem-telecom", + "resource": { + "resourceType": "SearchParameter", + "id": "NamingSystem-telecom", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NamingSystem-telecom", + "version": "4.0.1", + "name": "telecom", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Contact details for individual or organization", + "code": "telecom", + "base": [ "NamingSystem" ], + "type": "token", + "expression": "NamingSystem.contact.telecom", + "xpath": "f:NamingSystem/f:contact/f:telecom", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NamingSystem-type", + "resource": { + "resourceType": "SearchParameter", + "id": "NamingSystem-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NamingSystem-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "e.g. driver, provider, patient, bank etc.", + "code": "type", + "base": [ "NamingSystem" ], + "type": "token", + "expression": "NamingSystem.type", + "xpath": "f:NamingSystem/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NamingSystem-value", + "resource": { + "resourceType": "SearchParameter", + "id": "NamingSystem-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NamingSystem-value", + "version": "4.0.1", + "name": "value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The unique identifier", + "code": "value", + "base": [ "NamingSystem" ], + "type": "string", + "expression": "NamingSystem.uniqueId.value", + "xpath": "f:NamingSystem/f:uniqueId/f:value", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NutritionOrder-additive", + "resource": { + "resourceType": "SearchParameter", + "id": "NutritionOrder-additive", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NutritionOrder-additive", + "version": "4.0.1", + "name": "additive", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Type of module component to add to the feeding", + "code": "additive", + "base": [ "NutritionOrder" ], + "type": "token", + "expression": "NutritionOrder.enteralFormula.additiveType", + "xpath": "f:NutritionOrder/f:enteralFormula/f:additiveType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NutritionOrder-datetime", + "resource": { + "resourceType": "SearchParameter", + "id": "NutritionOrder-datetime", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NutritionOrder-datetime", + "version": "4.0.1", + "name": "datetime", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Return nutrition orders requested on this date", + "code": "datetime", + "base": [ "NutritionOrder" ], + "type": "date", + "expression": "NutritionOrder.dateTime", + "xpath": "f:NutritionOrder/f:dateTime", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NutritionOrder-formula", + "resource": { + "resourceType": "SearchParameter", + "id": "NutritionOrder-formula", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NutritionOrder-formula", + "version": "4.0.1", + "name": "formula", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Type of enteral or infant formula", + "code": "formula", + "base": [ "NutritionOrder" ], + "type": "token", + "expression": "NutritionOrder.enteralFormula.baseFormulaType", + "xpath": "f:NutritionOrder/f:enteralFormula/f:baseFormulaType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NutritionOrder-instantiates-canonical", + "resource": { + "resourceType": "SearchParameter", + "id": "NutritionOrder-instantiates-canonical", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NutritionOrder-instantiates-canonical", + "version": "4.0.1", + "name": "instantiates-canonical", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Instantiates FHIR protocol or definition", + "code": "instantiates-canonical", + "base": [ "NutritionOrder" ], + "type": "reference", + "expression": "NutritionOrder.instantiatesCanonical", + "xpath": "f:NutritionOrder/f:instantiatesCanonical", + "xpathUsage": "normal", + "target": [ "PlanDefinition", "ActivityDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NutritionOrder-instantiates-uri", + "resource": { + "resourceType": "SearchParameter", + "id": "NutritionOrder-instantiates-uri", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NutritionOrder-instantiates-uri", + "version": "4.0.1", + "name": "instantiates-uri", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Instantiates external protocol or definition", + "code": "instantiates-uri", + "base": [ "NutritionOrder" ], + "type": "uri", + "expression": "NutritionOrder.instantiatesUri", + "xpath": "f:NutritionOrder/f:instantiatesUri", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NutritionOrder-oraldiet", + "resource": { + "resourceType": "SearchParameter", + "id": "NutritionOrder-oraldiet", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NutritionOrder-oraldiet", + "version": "4.0.1", + "name": "oraldiet", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Type of diet that can be consumed orally (i.e., take via the mouth).", + "code": "oraldiet", + "base": [ "NutritionOrder" ], + "type": "token", + "expression": "NutritionOrder.oralDiet.type", + "xpath": "f:NutritionOrder/f:oralDiet/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NutritionOrder-provider", + "resource": { + "resourceType": "SearchParameter", + "id": "NutritionOrder-provider", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NutritionOrder-provider", + "version": "4.0.1", + "name": "provider", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The identity of the provider who placed the nutrition order", + "code": "provider", + "base": [ "NutritionOrder" ], + "type": "reference", + "expression": "NutritionOrder.orderer", + "xpath": "f:NutritionOrder/f:orderer", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NutritionOrder-status", + "resource": { + "resourceType": "SearchParameter", + "id": "NutritionOrder-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NutritionOrder-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Status of the nutrition order.", + "code": "status", + "base": [ "NutritionOrder" ], + "type": "token", + "expression": "NutritionOrder.status", + "xpath": "f:NutritionOrder/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/NutritionOrder-supplement", + "resource": { + "resourceType": "SearchParameter", + "id": "NutritionOrder-supplement", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/NutritionOrder-supplement", + "version": "4.0.1", + "name": "supplement", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Type of supplement product requested", + "code": "supplement", + "base": [ "NutritionOrder" ], + "type": "token", + "expression": "NutritionOrder.supplement.type", + "xpath": "f:NutritionOrder/f:supplement/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-based-on", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-based-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-based-on", + "version": "4.0.1", + "name": "based-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Reference to the service request.", + "code": "based-on", + "base": [ "Observation" ], + "type": "reference", + "expression": "Observation.basedOn", + "xpath": "f:Observation/f:basedOn", + "xpathUsage": "normal", + "target": [ "CarePlan", "MedicationRequest", "NutritionOrder", "DeviceRequest", "ServiceRequest", "ImmunizationRecommendation" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-category", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The classification of the type of observation", + "code": "category", + "base": [ "Observation" ], + "type": "token", + "expression": "Observation.category", + "xpath": "f:Observation/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-combo-code", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-combo-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-combo-code", + "version": "4.0.1", + "name": "combo-code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The code of the observation type or component type", + "code": "combo-code", + "base": [ "Observation" ], + "type": "token", + "expression": "Observation.code | Observation.component.code", + "xpath": "f:Observation/f:code | f:Observation/f:component/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-combo-data-absent-reason", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-combo-data-absent-reason", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-combo-data-absent-reason", + "version": "4.0.1", + "name": "combo-data-absent-reason", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The reason why the expected value in the element Observation.value[x] or Observation.component.value[x] is missing.", + "code": "combo-data-absent-reason", + "base": [ "Observation" ], + "type": "token", + "expression": "Observation.dataAbsentReason | Observation.component.dataAbsentReason", + "xpath": "f:Observation/f:dataAbsentReason | f:Observation/f:component/f:dataAbsentReason", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-combo-value-concept", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-combo-value-concept", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-combo-value-concept", + "version": "4.0.1", + "name": "combo-value-concept", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The value or component value of the observation, if the value is a CodeableConcept", + "code": "combo-value-concept", + "base": [ "Observation" ], + "type": "token", + "expression": "(Observation.value as CodeableConcept) | (Observation.component.value as CodeableConcept)", + "xpath": "f:Observation/f:valueCodeableConcept | f:Observation/f:component/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-combo-value-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-combo-value-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-combo-value-quantity", + "version": "4.0.1", + "name": "combo-value-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The value or component value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", + "code": "combo-value-quantity", + "base": [ "Observation" ], + "type": "quantity", + "expression": "(Observation.value as Quantity) | (Observation.value as SampledData) | (Observation.component.value as Quantity) | (Observation.component.value as SampledData)", + "xpath": "f:Observation/f:valueQuantity | f:Observation/f:valueCodeableConcept | f:Observation/f:valueString | f:Observation/f:valueBoolean | f:Observation/f:valueInteger | f:Observation/f:valueRange | f:Observation/f:valueRatio | f:Observation/f:valueSampledData | f:Observation/f:valueTime | f:Observation/f:valueDateTime | f:Observation/f:valuePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-component-code", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-component-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-component-code", + "version": "4.0.1", + "name": "component-code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The component code of the observation type", + "code": "component-code", + "base": [ "Observation" ], + "type": "token", + "expression": "Observation.component.code", + "xpath": "f:Observation/f:component/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-component-data-absent-reason", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-component-data-absent-reason", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-component-data-absent-reason", + "version": "4.0.1", + "name": "component-data-absent-reason", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The reason why the expected value in the element Observation.component.value[x] is missing.", + "code": "component-data-absent-reason", + "base": [ "Observation" ], + "type": "token", + "expression": "Observation.component.dataAbsentReason", + "xpath": "f:Observation/f:component/f:dataAbsentReason", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-component-value-concept", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-component-value-concept", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-component-value-concept", + "version": "4.0.1", + "name": "component-value-concept", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The value of the component observation, if the value is a CodeableConcept", + "code": "component-value-concept", + "base": [ "Observation" ], + "type": "token", + "expression": "(Observation.component.value as CodeableConcept)", + "xpath": "f:Observation/f:component/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-component-value-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-component-value-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-component-value-quantity", + "version": "4.0.1", + "name": "component-value-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", + "code": "component-value-quantity", + "base": [ "Observation" ], + "type": "quantity", + "expression": "(Observation.component.value as Quantity) | (Observation.component.value as SampledData)", + "xpath": "f:Observation/f:component/f:valueQuantity | f:Observation/f:component/f:valueCodeableConcept | f:Observation/f:component/f:valueString | f:Observation/f:component/f:valueBoolean | f:Observation/f:component/f:valueInteger | f:Observation/f:component/f:valueRange | f:Observation/f:component/f:valueRatio | f:Observation/f:component/f:valueSampledData | f:Observation/f:component/f:valueTime | f:Observation/f:component/f:valueDateTime | f:Observation/f:component/f:valuePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-data-absent-reason", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-data-absent-reason", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-data-absent-reason", + "version": "4.0.1", + "name": "data-absent-reason", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The reason why the expected value in the element Observation.value[x] is missing.", + "code": "data-absent-reason", + "base": [ "Observation" ], + "type": "token", + "expression": "Observation.dataAbsentReason", + "xpath": "f:Observation/f:dataAbsentReason", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-derived-from", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-derived-from", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-derived-from", + "version": "4.0.1", + "name": "derived-from", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Related measurements the observation is made from", + "code": "derived-from", + "base": [ "Observation" ], + "type": "reference", + "expression": "Observation.derivedFrom", + "xpath": "f:Observation/f:derivedFrom", + "xpathUsage": "normal", + "target": [ "Media", "Observation", "ImagingStudy", "MolecularSequence", "QuestionnaireResponse", "DocumentReference" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-device", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-device", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-device", + "version": "4.0.1", + "name": "device", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The Device that generated the observation data.", + "code": "device", + "base": [ "Observation" ], + "type": "reference", + "expression": "Observation.device", + "xpath": "f:Observation/f:device", + "xpathUsage": "normal", + "target": [ "Device", "DeviceMetric" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-focus", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-focus", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-focus", + "version": "4.0.1", + "name": "focus", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The focus of an observation when the focus is not the patient of record.", + "code": "focus", + "base": [ "Observation" ], + "type": "reference", + "expression": "Observation.focus", + "xpath": "f:Observation/f:focus", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-has-member", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-has-member", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-has-member", + "version": "4.0.1", + "name": "has-member", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Related resource that belongs to the Observation group", + "code": "has-member", + "base": [ "Observation" ], + "type": "reference", + "expression": "Observation.hasMember", + "xpath": "f:Observation/f:hasMember", + "xpathUsage": "normal", + "target": [ "Observation", "MolecularSequence", "QuestionnaireResponse" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-method", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-method", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-method", + "version": "4.0.1", + "name": "method", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The method used for the observation", + "code": "method", + "base": [ "Observation" ], + "type": "token", + "expression": "Observation.method", + "xpath": "f:Observation/f:method", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-part-of", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-part-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-part-of", + "version": "4.0.1", + "name": "part-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Part of referenced event", + "code": "part-of", + "base": [ "Observation" ], + "type": "reference", + "expression": "Observation.partOf", + "xpath": "f:Observation/f:partOf", + "xpathUsage": "normal", + "target": [ "Immunization", "MedicationDispense", "MedicationAdministration", "Procedure", "ImagingStudy", "MedicationStatement" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-performer", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-performer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-performer", + "version": "4.0.1", + "name": "performer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Who performed the observation", + "code": "performer", + "base": [ "Observation" ], + "type": "reference", + "expression": "Observation.performer", + "xpath": "f:Observation/f:performer", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "CareTeam", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-specimen", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-specimen", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-specimen", + "version": "4.0.1", + "name": "specimen", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Specimen used for this observation", + "code": "specimen", + "base": [ "Observation" ], + "type": "reference", + "expression": "Observation.specimen", + "xpath": "f:Observation/f:specimen", + "xpathUsage": "normal", + "target": [ "Specimen" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The status of the observation", + "code": "status", + "base": [ "Observation" ], + "type": "token", + "expression": "Observation.status", + "xpath": "f:Observation/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The subject that the observation is about", + "code": "subject", + "base": [ "Observation" ], + "type": "reference", + "expression": "Observation.subject", + "xpath": "f:Observation/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Device", "Patient", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-value-concept", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-value-concept", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-value-concept", + "version": "4.0.1", + "name": "value-concept", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The value of the observation, if the value is a CodeableConcept", + "code": "value-concept", + "base": [ "Observation" ], + "type": "token", + "expression": "(Observation.value as CodeableConcept)", + "xpath": "f:Observation/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-value-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-value-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-value-date", + "version": "4.0.1", + "name": "value-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The value of the observation, if the value is a date or period of time", + "code": "value-date", + "base": [ "Observation" ], + "type": "date", + "expression": "(Observation.value as dateTime) | (Observation.value as Period)", + "xpath": "f:Observation/f:valueDateTime | f:Observation/f:valuePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-value-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-value-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-value-quantity", + "version": "4.0.1", + "name": "value-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", + "code": "value-quantity", + "base": [ "Observation" ], + "type": "quantity", + "expression": "(Observation.value as Quantity) | (Observation.value as SampledData)", + "xpath": "f:Observation/f:valueQuantity | f:Observation/f:valueCodeableConcept | f:Observation/f:valueString | f:Observation/f:valueBoolean | f:Observation/f:valueInteger | f:Observation/f:valueRange | f:Observation/f:valueRatio | f:Observation/f:valueSampledData | f:Observation/f:valueTime | f:Observation/f:valueDateTime | f:Observation/f:valuePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-value-string", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-value-string", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-value-string", + "version": "4.0.1", + "name": "value-string", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The value of the observation, if the value is a string, and also searches in CodeableConcept.text", + "code": "value-string", + "base": [ "Observation" ], + "type": "string", + "expression": "(Observation.value as string) | (Observation.value as CodeableConcept).text", + "xpath": "f:Observation/f:valueQuantity | f:Observation/f:valueCodeableConcept | f:Observation/f:valueString | f:Observation/f:valueBoolean | f:Observation/f:valueInteger | f:Observation/f:valueRange | f:Observation/f:valueRatio | f:Observation/f:valueSampledData | f:Observation/f:valueTime | f:Observation/f:valueDateTime | f:Observation/f:valuePeriod", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-code-value-concept", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-code-value-concept", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-code-value-concept", + "version": "4.0.1", + "name": "code-value-concept", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Code and coded value parameter pair", + "code": "code-value-concept", + "base": [ "Observation" ], + "type": "composite", + "expression": "Observation", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/clinical-code", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Observation-value-concept", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-code-value-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-code-value-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-code-value-date", + "version": "4.0.1", + "name": "code-value-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Code and date/time value parameter pair", + "code": "code-value-date", + "base": [ "Observation" ], + "type": "composite", + "expression": "Observation", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/clinical-code", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Observation-value-date", + "expression": "value.as(DateTime) | value.as(Period)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-code-value-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-code-value-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-code-value-quantity", + "version": "4.0.1", + "name": "code-value-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Code and quantity value parameter pair", + "code": "code-value-quantity", + "base": [ "Observation" ], + "type": "composite", + "expression": "Observation", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/clinical-code", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Observation-value-quantity", + "expression": "value.as(Quantity)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-code-value-string", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-code-value-string", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-code-value-string", + "version": "4.0.1", + "name": "code-value-string", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Code and string value parameter pair", + "code": "code-value-string", + "base": [ "Observation" ], + "type": "composite", + "expression": "Observation", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/clinical-code", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Observation-value-string", + "expression": "value.as(string)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-combo-code-value-concept", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-combo-code-value-concept", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-combo-code-value-concept", + "version": "4.0.1", + "name": "combo-code-value-concept", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Code and coded value parameter pair, including in components", + "code": "combo-code-value-concept", + "base": [ "Observation" ], + "type": "composite", + "expression": "Observation | Observation.component", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/Observation-combo-code", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Observation-combo-value-concept", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-combo-code-value-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-combo-code-value-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-combo-code-value-quantity", + "version": "4.0.1", + "name": "combo-code-value-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Code and quantity value parameter pair, including in components", + "code": "combo-code-value-quantity", + "base": [ "Observation" ], + "type": "composite", + "expression": "Observation | Observation.component", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/Observation-combo-code", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Observation-combo-value-quantity", + "expression": "value.as(Quantity)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-component-code-value-concept", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-component-code-value-concept", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-component-code-value-concept", + "version": "4.0.1", + "name": "component-code-value-concept", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Component code and component coded value parameter pair", + "code": "component-code-value-concept", + "base": [ "Observation" ], + "type": "composite", + "expression": "Observation.component", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/Observation-component-code", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Observation-component-value-concept", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Observation-component-code-value-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Observation-component-code-value-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Observation-component-code-value-quantity", + "version": "4.0.1", + "name": "component-code-value-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Component code and component quantity value parameter pair", + "code": "component-code-value-quantity", + "base": [ "Observation" ], + "type": "composite", + "expression": "Observation.component", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/Observation-component-code", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Observation-component-value-quantity", + "expression": "value.as(Quantity)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OperationDefinition-base", + "resource": { + "resourceType": "SearchParameter", + "id": "OperationDefinition-base", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OperationDefinition-base", + "version": "4.0.1", + "name": "base", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Marks this as a profile of the base", + "code": "base", + "base": [ "OperationDefinition" ], + "type": "reference", + "expression": "OperationDefinition.base", + "xpath": "f:OperationDefinition/f:base", + "xpathUsage": "normal", + "target": [ "OperationDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OperationDefinition-code", + "resource": { + "resourceType": "SearchParameter", + "id": "OperationDefinition-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OperationDefinition-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Name used to invoke the operation", + "code": "code", + "base": [ "OperationDefinition" ], + "type": "token", + "expression": "OperationDefinition.code", + "xpath": "f:OperationDefinition/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OperationDefinition-input-profile", + "resource": { + "resourceType": "SearchParameter", + "id": "OperationDefinition-input-profile", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OperationDefinition-input-profile", + "version": "4.0.1", + "name": "input-profile", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Validation information for in parameters", + "code": "input-profile", + "base": [ "OperationDefinition" ], + "type": "reference", + "expression": "OperationDefinition.inputProfile", + "xpath": "f:OperationDefinition/f:inputProfile", + "xpathUsage": "normal", + "target": [ "StructureDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OperationDefinition-instance", + "resource": { + "resourceType": "SearchParameter", + "id": "OperationDefinition-instance", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OperationDefinition-instance", + "version": "4.0.1", + "name": "instance", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Invoke on an instance?", + "code": "instance", + "base": [ "OperationDefinition" ], + "type": "token", + "expression": "OperationDefinition.instance", + "xpath": "f:OperationDefinition/f:instance", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OperationDefinition-kind", + "resource": { + "resourceType": "SearchParameter", + "id": "OperationDefinition-kind", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OperationDefinition-kind", + "version": "4.0.1", + "name": "kind", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "operation | query", + "code": "kind", + "base": [ "OperationDefinition" ], + "type": "token", + "expression": "OperationDefinition.kind", + "xpath": "f:OperationDefinition/f:kind", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OperationDefinition-output-profile", + "resource": { + "resourceType": "SearchParameter", + "id": "OperationDefinition-output-profile", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OperationDefinition-output-profile", + "version": "4.0.1", + "name": "output-profile", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Validation information for out parameters", + "code": "output-profile", + "base": [ "OperationDefinition" ], + "type": "reference", + "expression": "OperationDefinition.outputProfile", + "xpath": "f:OperationDefinition/f:outputProfile", + "xpathUsage": "normal", + "target": [ "StructureDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OperationDefinition-system", + "resource": { + "resourceType": "SearchParameter", + "id": "OperationDefinition-system", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OperationDefinition-system", + "version": "4.0.1", + "name": "system", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Invoke at the system level?", + "code": "system", + "base": [ "OperationDefinition" ], + "type": "token", + "expression": "OperationDefinition.system", + "xpath": "f:OperationDefinition/f:system", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OperationDefinition-type", + "resource": { + "resourceType": "SearchParameter", + "id": "OperationDefinition-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OperationDefinition-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Invoke at the type level?", + "code": "type", + "base": [ "OperationDefinition" ], + "type": "token", + "expression": "OperationDefinition.type", + "xpath": "f:OperationDefinition/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Organization-active", + "resource": { + "resourceType": "SearchParameter", + "id": "Organization-active", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Organization-active", + "version": "4.0.1", + "name": "active", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Is the Organization record active", + "code": "active", + "base": [ "Organization" ], + "type": "token", + "expression": "Organization.active", + "xpath": "f:Organization/f:active", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Organization-address", + "resource": { + "resourceType": "SearchParameter", + "id": "Organization-address", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Organization-address", + "version": "4.0.1", + "name": "address", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text", + "code": "address", + "base": [ "Organization" ], + "type": "string", + "expression": "Organization.address", + "xpath": "f:Organization/f:address", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Organization-address-city", + "resource": { + "resourceType": "SearchParameter", + "id": "Organization-address-city", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Organization-address-city", + "version": "4.0.1", + "name": "address-city", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A city specified in an address", + "code": "address-city", + "base": [ "Organization" ], + "type": "string", + "expression": "Organization.address.city", + "xpath": "f:Organization/f:address/f:city", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Organization-address-country", + "resource": { + "resourceType": "SearchParameter", + "id": "Organization-address-country", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Organization-address-country", + "version": "4.0.1", + "name": "address-country", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A country specified in an address", + "code": "address-country", + "base": [ "Organization" ], + "type": "string", + "expression": "Organization.address.country", + "xpath": "f:Organization/f:address/f:country", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Organization-address-postalcode", + "resource": { + "resourceType": "SearchParameter", + "id": "Organization-address-postalcode", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Organization-address-postalcode", + "version": "4.0.1", + "name": "address-postalcode", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A postal code specified in an address", + "code": "address-postalcode", + "base": [ "Organization" ], + "type": "string", + "expression": "Organization.address.postalCode", + "xpath": "f:Organization/f:address/f:postalCode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Organization-address-state", + "resource": { + "resourceType": "SearchParameter", + "id": "Organization-address-state", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Organization-address-state", + "version": "4.0.1", + "name": "address-state", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A state specified in an address", + "code": "address-state", + "base": [ "Organization" ], + "type": "string", + "expression": "Organization.address.state", + "xpath": "f:Organization/f:address/f:state", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Organization-address-use", + "resource": { + "resourceType": "SearchParameter", + "id": "Organization-address-use", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Organization-address-use", + "version": "4.0.1", + "name": "address-use", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A use code specified in an address", + "code": "address-use", + "base": [ "Organization" ], + "type": "token", + "expression": "Organization.address.use", + "xpath": "f:Organization/f:address/f:use", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Organization-endpoint", + "resource": { + "resourceType": "SearchParameter", + "id": "Organization-endpoint", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Organization-endpoint", + "version": "4.0.1", + "name": "endpoint", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Technical endpoints providing access to services operated for the organization", + "code": "endpoint", + "base": [ "Organization" ], + "type": "reference", + "expression": "Organization.endpoint", + "xpath": "f:Organization/f:endpoint", + "xpathUsage": "normal", + "target": [ "Endpoint" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Organization-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Organization-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Organization-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Any identifier for the organization (not the accreditation issuer's identifier)", + "code": "identifier", + "base": [ "Organization" ], + "type": "token", + "expression": "Organization.identifier", + "xpath": "f:Organization/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Organization-name", + "resource": { + "resourceType": "SearchParameter", + "id": "Organization-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Organization-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A portion of the organization's name or alias", + "code": "name", + "base": [ "Organization" ], + "type": "string", + "expression": "Organization.name | Organization.alias", + "xpath": "f:Organization/f:name | f:Organization/f:alias", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Organization-partof", + "resource": { + "resourceType": "SearchParameter", + "id": "Organization-partof", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Organization-partof", + "version": "4.0.1", + "name": "partof", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "An organization of which this organization forms a part", + "code": "partof", + "base": [ "Organization" ], + "type": "reference", + "expression": "Organization.partOf", + "xpath": "f:Organization/f:partOf", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Organization-phonetic", + "resource": { + "resourceType": "SearchParameter", + "id": "Organization-phonetic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Organization-phonetic", + "version": "4.0.1", + "name": "phonetic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A portion of the organization's name using some kind of phonetic matching algorithm", + "code": "phonetic", + "base": [ "Organization" ], + "type": "string", + "expression": "Organization.name", + "xpath": "f:Organization/f:name", + "xpathUsage": "phonetic" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Organization-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Organization-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Organization-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A code for the type of organization", + "code": "type", + "base": [ "Organization" ], + "type": "token", + "expression": "Organization.type", + "xpath": "f:Organization/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-active", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-active", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-active", + "version": "4.0.1", + "name": "active", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Whether this organization affiliation record is in active use", + "code": "active", + "base": [ "OrganizationAffiliation" ], + "type": "token", + "expression": "OrganizationAffiliation.active", + "xpath": "f:OrganizationAffiliation/f:active", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-date", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The period during which the participatingOrganization is affiliated with the primary organization", + "code": "date", + "base": [ "OrganizationAffiliation" ], + "type": "date", + "expression": "OrganizationAffiliation.period", + "xpath": "f:OrganizationAffiliation/f:period", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-email", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-email", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-email", + "version": "4.0.1", + "name": "email", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A value in an email contact", + "code": "email", + "base": [ "OrganizationAffiliation" ], + "type": "token", + "expression": "OrganizationAffiliation.telecom.where(system='email')", + "xpath": "f:OrganizationAffiliation/f:telecom[system/@value='email']", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-endpoint", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-endpoint", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-endpoint", + "version": "4.0.1", + "name": "endpoint", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Technical endpoints providing access to services operated for this role", + "code": "endpoint", + "base": [ "OrganizationAffiliation" ], + "type": "reference", + "expression": "OrganizationAffiliation.endpoint", + "xpath": "f:OrganizationAffiliation/f:endpoint", + "xpathUsage": "normal", + "target": [ "Endpoint" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "An organization affiliation's Identifier", + "code": "identifier", + "base": [ "OrganizationAffiliation" ], + "type": "token", + "expression": "OrganizationAffiliation.identifier", + "xpath": "f:OrganizationAffiliation/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-location", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The location(s) at which the role occurs", + "code": "location", + "base": [ "OrganizationAffiliation" ], + "type": "reference", + "expression": "OrganizationAffiliation.location", + "xpath": "f:OrganizationAffiliation/f:location", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-network", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-network", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-network", + "version": "4.0.1", + "name": "network", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Health insurance provider network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined)", + "code": "network", + "base": [ "OrganizationAffiliation" ], + "type": "reference", + "expression": "OrganizationAffiliation.network", + "xpath": "f:OrganizationAffiliation/f:network", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-participating-organization", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-participating-organization", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-participating-organization", + "version": "4.0.1", + "name": "participating-organization", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The organization that provides services to the primary organization", + "code": "participating-organization", + "base": [ "OrganizationAffiliation" ], + "type": "reference", + "expression": "OrganizationAffiliation.participatingOrganization", + "xpath": "f:OrganizationAffiliation/f:participatingOrganization", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-phone", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-phone", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-phone", + "version": "4.0.1", + "name": "phone", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A value in a phone contact", + "code": "phone", + "base": [ "OrganizationAffiliation" ], + "type": "token", + "expression": "OrganizationAffiliation.telecom.where(system='phone')", + "xpath": "f:OrganizationAffiliation/f:telecom[system/@value='phone']", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-primary-organization", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-primary-organization", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-primary-organization", + "version": "4.0.1", + "name": "primary-organization", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The organization that receives the services from the participating organization", + "code": "primary-organization", + "base": [ "OrganizationAffiliation" ], + "type": "reference", + "expression": "OrganizationAffiliation.organization", + "xpath": "f:OrganizationAffiliation/f:organization", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-role", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-role", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-role", + "version": "4.0.1", + "name": "role", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Definition of the role the participatingOrganization plays", + "code": "role", + "base": [ "OrganizationAffiliation" ], + "type": "token", + "expression": "OrganizationAffiliation.code", + "xpath": "f:OrganizationAffiliation/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-service", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-service", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-service", + "version": "4.0.1", + "name": "service", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Healthcare services provided through the role", + "code": "service", + "base": [ "OrganizationAffiliation" ], + "type": "reference", + "expression": "OrganizationAffiliation.healthcareService", + "xpath": "f:OrganizationAffiliation/f:healthcareService", + "xpathUsage": "normal", + "target": [ "HealthcareService" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-specialty", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-specialty", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-specialty", + "version": "4.0.1", + "name": "specialty", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Specific specialty of the participatingOrganization in the context of the role", + "code": "specialty", + "base": [ "OrganizationAffiliation" ], + "type": "token", + "expression": "OrganizationAffiliation.specialty", + "xpath": "f:OrganizationAffiliation/f:specialty", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-telecom", + "resource": { + "resourceType": "SearchParameter", + "id": "OrganizationAffiliation-telecom", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-telecom", + "version": "4.0.1", + "name": "telecom", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The value in any kind of contact", + "code": "telecom", + "base": [ "OrganizationAffiliation" ], + "type": "token", + "expression": "OrganizationAffiliation.telecom", + "xpath": "f:OrganizationAffiliation/f:telecom", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Patient-active", + "resource": { + "resourceType": "SearchParameter", + "id": "Patient-active", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Patient-active", + "version": "4.0.1", + "name": "active", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Whether the patient record is active", + "code": "active", + "base": [ "Patient" ], + "type": "token", + "expression": "Patient.active", + "xpath": "f:Patient/f:active", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-address", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-address", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-address", + "version": "4.0.1", + "name": "address", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text\r\n* [Person](person.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text\r\n* [Practitioner](practitioner.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text\r\n* [RelatedPerson](relatedperson.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text\r\n", + "code": "address", + "base": [ "Patient", "Person", "Practitioner", "RelatedPerson" ], + "type": "string", + "expression": "Patient.address | Person.address | Practitioner.address | RelatedPerson.address", + "xpath": "f:Patient/f:address | f:Person/f:address | f:Practitioner/f:address | f:RelatedPerson/f:address", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-address-city", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-address-city", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-address-city", + "version": "4.0.1", + "name": "address-city", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): A city specified in an address\r\n* [Person](person.html): A city specified in an address\r\n* [Practitioner](practitioner.html): A city specified in an address\r\n* [RelatedPerson](relatedperson.html): A city specified in an address\r\n", + "code": "address-city", + "base": [ "Patient", "Person", "Practitioner", "RelatedPerson" ], + "type": "string", + "expression": "Patient.address.city | Person.address.city | Practitioner.address.city | RelatedPerson.address.city", + "xpath": "f:Patient/f:address/f:city | f:Person/f:address/f:city | f:Practitioner/f:address/f:city | f:RelatedPerson/f:address/f:city", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-address-country", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-address-country", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-address-country", + "version": "4.0.1", + "name": "address-country", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): A country specified in an address\r\n* [Person](person.html): A country specified in an address\r\n* [Practitioner](practitioner.html): A country specified in an address\r\n* [RelatedPerson](relatedperson.html): A country specified in an address\r\n", + "code": "address-country", + "base": [ "Patient", "Person", "Practitioner", "RelatedPerson" ], + "type": "string", + "expression": "Patient.address.country | Person.address.country | Practitioner.address.country | RelatedPerson.address.country", + "xpath": "f:Patient/f:address/f:country | f:Person/f:address/f:country | f:Practitioner/f:address/f:country | f:RelatedPerson/f:address/f:country", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-address-postalcode", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-address-postalcode", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-address-postalcode", + "version": "4.0.1", + "name": "address-postalcode", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): A postalCode specified in an address\r\n* [Person](person.html): A postal code specified in an address\r\n* [Practitioner](practitioner.html): A postalCode specified in an address\r\n* [RelatedPerson](relatedperson.html): A postal code specified in an address\r\n", + "code": "address-postalcode", + "base": [ "Patient", "Person", "Practitioner", "RelatedPerson" ], + "type": "string", + "expression": "Patient.address.postalCode | Person.address.postalCode | Practitioner.address.postalCode | RelatedPerson.address.postalCode", + "xpath": "f:Patient/f:address/f:postalCode | f:Person/f:address/f:postalCode | f:Practitioner/f:address/f:postalCode | f:RelatedPerson/f:address/f:postalCode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-address-state", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-address-state", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-address-state", + "version": "4.0.1", + "name": "address-state", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): A state specified in an address\r\n* [Person](person.html): A state specified in an address\r\n* [Practitioner](practitioner.html): A state specified in an address\r\n* [RelatedPerson](relatedperson.html): A state specified in an address\r\n", + "code": "address-state", + "base": [ "Patient", "Person", "Practitioner", "RelatedPerson" ], + "type": "string", + "expression": "Patient.address.state | Person.address.state | Practitioner.address.state | RelatedPerson.address.state", + "xpath": "f:Patient/f:address/f:state | f:Person/f:address/f:state | f:Practitioner/f:address/f:state | f:RelatedPerson/f:address/f:state", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-address-use", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-address-use", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-address-use", + "version": "4.0.1", + "name": "address-use", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): A use code specified in an address\r\n* [Person](person.html): A use code specified in an address\r\n* [Practitioner](practitioner.html): A use code specified in an address\r\n* [RelatedPerson](relatedperson.html): A use code specified in an address\r\n", + "code": "address-use", + "base": [ "Patient", "Person", "Practitioner", "RelatedPerson" ], + "type": "token", + "expression": "Patient.address.use | Person.address.use | Practitioner.address.use | RelatedPerson.address.use", + "xpath": "f:Patient/f:address/f:use | f:Person/f:address/f:use | f:Practitioner/f:address/f:use | f:RelatedPerson/f:address/f:use", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-birthdate", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-birthdate", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-birthdate", + "version": "4.0.1", + "name": "birthdate", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): The patient's date of birth\r\n* [Person](person.html): The person's date of birth\r\n* [RelatedPerson](relatedperson.html): The Related Person's date of birth\r\n", + "code": "birthdate", + "base": [ "Patient", "Person", "RelatedPerson" ], + "type": "date", + "expression": "Patient.birthDate | Person.birthDate | RelatedPerson.birthDate", + "xpath": "f:Patient/f:birthDate | f:Person/f:birthDate | f:RelatedPerson/f:birthDate", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Patient-death-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Patient-death-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Patient-death-date", + "version": "4.0.1", + "name": "death-date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The date of death has been provided and satisfies this search value", + "code": "death-date", + "base": [ "Patient" ], + "type": "date", + "expression": "(Patient.deceased as dateTime)", + "xpath": "f:Patient/f:deceasedDateTime", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Patient-deceased", + "resource": { + "resourceType": "SearchParameter", + "id": "Patient-deceased", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Patient-deceased", + "version": "4.0.1", + "name": "deceased", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "This patient has been marked as deceased, or as a death date entered", + "code": "deceased", + "base": [ "Patient" ], + "type": "token", + "expression": "Patient.deceased.exists() and Patient.deceased != false", + "xpath": "f:Patient/f:deceasedBoolean | f:Patient/f:deceasedDateTime", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-email", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-email", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-email", + "version": "4.0.1", + "name": "email", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): A value in an email contact\r\n* [Person](person.html): A value in an email contact\r\n* [Practitioner](practitioner.html): A value in an email contact\r\n* [PractitionerRole](practitionerrole.html): A value in an email contact\r\n* [RelatedPerson](relatedperson.html): A value in an email contact\r\n", + "code": "email", + "base": [ "Patient", "Person", "Practitioner", "PractitionerRole", "RelatedPerson" ], + "type": "token", + "expression": "Patient.telecom.where(system='email') | Person.telecom.where(system='email') | Practitioner.telecom.where(system='email') | PractitionerRole.telecom.where(system='email') | RelatedPerson.telecom.where(system='email')", + "xpath": "f:Patient/f:telecom[system/@value='email'] | f:Person/f:telecom[system/@value='email'] | f:Practitioner/f:telecom[system/@value='email'] | f:PractitionerRole/f:telecom[system/@value='email'] | f:RelatedPerson/f:telecom[system/@value='email']", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-family", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-family", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-family", + "version": "4.0.1", + "name": "family", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): A portion of the family name of the patient\r\n* [Practitioner](practitioner.html): A portion of the family name\r\n", + "code": "family", + "base": [ "Patient", "Practitioner" ], + "type": "string", + "expression": "Patient.name.family | Practitioner.name.family", + "xpath": "f:Patient/f:name/f:family | f:Practitioner/f:name/f:family", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-gender", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-gender", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-gender", + "version": "4.0.1", + "name": "gender", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): Gender of the patient\r\n* [Person](person.html): The gender of the person\r\n* [Practitioner](practitioner.html): Gender of the practitioner\r\n* [RelatedPerson](relatedperson.html): Gender of the related person\r\n", + "code": "gender", + "base": [ "Patient", "Person", "Practitioner", "RelatedPerson" ], + "type": "token", + "expression": "Patient.gender | Person.gender | Practitioner.gender | RelatedPerson.gender", + "xpath": "f:Patient/f:gender | f:Person/f:gender | f:Practitioner/f:gender | f:RelatedPerson/f:gender", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Patient-general-practitioner", + "resource": { + "resourceType": "SearchParameter", + "id": "Patient-general-practitioner", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Patient-general-practitioner", + "version": "4.0.1", + "name": "general-practitioner", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Patient's nominated general practitioner, not the organization that manages the record", + "code": "general-practitioner", + "base": [ "Patient" ], + "type": "reference", + "expression": "Patient.generalPractitioner", + "xpath": "f:Patient/f:generalPractitioner", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-given", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-given", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-given", + "version": "4.0.1", + "name": "given", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): A portion of the given name of the patient\r\n* [Practitioner](practitioner.html): A portion of the given name\r\n", + "code": "given", + "base": [ "Patient", "Practitioner" ], + "type": "string", + "expression": "Patient.name.given | Practitioner.name.given", + "xpath": "f:Patient/f:name/f:given | f:Practitioner/f:name/f:given", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Patient-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Patient-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Patient-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A patient identifier", + "code": "identifier", + "base": [ "Patient" ], + "type": "token", + "expression": "Patient.identifier", + "xpath": "f:Patient/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Patient-language", + "resource": { + "resourceType": "SearchParameter", + "id": "Patient-language", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Patient-language", + "version": "4.0.1", + "name": "language", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Language code (irrespective of use value)", + "code": "language", + "base": [ "Patient" ], + "type": "token", + "expression": "Patient.communication.language", + "xpath": "f:Patient/f:communication/f:language", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Patient-link", + "resource": { + "resourceType": "SearchParameter", + "id": "Patient-link", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Patient-link", + "version": "4.0.1", + "name": "link", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "All patients linked to the given patient", + "code": "link", + "base": [ "Patient" ], + "type": "reference", + "expression": "Patient.link.other", + "xpath": "f:Patient/f:link/f:other", + "xpathUsage": "normal", + "target": [ "Patient", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Patient-name", + "resource": { + "resourceType": "SearchParameter", + "id": "Patient-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Patient-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text", + "code": "name", + "base": [ "Patient" ], + "type": "string", + "expression": "Patient.name", + "xpath": "f:Patient/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Patient-organization", + "resource": { + "resourceType": "SearchParameter", + "id": "Patient-organization", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Patient-organization", + "version": "4.0.1", + "name": "organization", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The organization that is the custodian of the patient record", + "code": "organization", + "base": [ "Patient" ], + "type": "reference", + "expression": "Patient.managingOrganization", + "xpath": "f:Patient/f:managingOrganization", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-phone", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-phone", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-phone", + "version": "4.0.1", + "name": "phone", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): A value in a phone contact\r\n* [Person](person.html): A value in a phone contact\r\n* [Practitioner](practitioner.html): A value in a phone contact\r\n* [PractitionerRole](practitionerrole.html): A value in a phone contact\r\n* [RelatedPerson](relatedperson.html): A value in a phone contact\r\n", + "code": "phone", + "base": [ "Patient", "Person", "Practitioner", "PractitionerRole", "RelatedPerson" ], + "type": "token", + "expression": "Patient.telecom.where(system='phone') | Person.telecom.where(system='phone') | Practitioner.telecom.where(system='phone') | PractitionerRole.telecom.where(system='phone') | RelatedPerson.telecom.where(system='phone')", + "xpath": "f:Patient/f:telecom[system/@value='phone'] | f:Person/f:telecom[system/@value='phone'] | f:Practitioner/f:telecom[system/@value='phone'] | f:PractitionerRole/f:telecom[system/@value='phone'] | f:RelatedPerson/f:telecom[system/@value='phone']", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-phonetic", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-phonetic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-phonetic", + "version": "4.0.1", + "name": "phonetic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): A portion of either family or given name using some kind of phonetic matching algorithm\r\n* [Person](person.html): A portion of name using some kind of phonetic matching algorithm\r\n* [Practitioner](practitioner.html): A portion of either family or given name using some kind of phonetic matching algorithm\r\n* [RelatedPerson](relatedperson.html): A portion of name using some kind of phonetic matching algorithm\r\n", + "code": "phonetic", + "base": [ "Patient", "Person", "Practitioner", "RelatedPerson" ], + "type": "string", + "expression": "Patient.name | Person.name | Practitioner.name | RelatedPerson.name", + "xpath": "f:Patient/f:name | f:Person/f:name | f:Practitioner/f:name | f:RelatedPerson/f:name", + "xpathUsage": "phonetic" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/individual-telecom", + "resource": { + "resourceType": "SearchParameter", + "id": "individual-telecom", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/individual-telecom", + "version": "4.0.1", + "name": "telecom", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Multiple Resources: \r\n\r\n* [Patient](patient.html): The value in any kind of telecom details of the patient\r\n* [Person](person.html): The value in any kind of contact\r\n* [Practitioner](practitioner.html): The value in any kind of contact\r\n* [PractitionerRole](practitionerrole.html): The value in any kind of contact\r\n* [RelatedPerson](relatedperson.html): The value in any kind of contact\r\n", + "code": "telecom", + "base": [ "Patient", "Person", "Practitioner", "PractitionerRole", "RelatedPerson" ], + "type": "token", + "expression": "Patient.telecom | Person.telecom | Practitioner.telecom | PractitionerRole.telecom | RelatedPerson.telecom", + "xpath": "f:Patient/f:telecom | f:Person/f:telecom | f:Practitioner/f:telecom | f:PractitionerRole/f:telecom | f:RelatedPerson/f:telecom", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentNotice-created", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentNotice-created", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentNotice-created", + "version": "4.0.1", + "name": "created", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Creation date fro the notice", + "code": "created", + "base": [ "PaymentNotice" ], + "type": "date", + "expression": "PaymentNotice.created", + "xpath": "f:PaymentNotice/f:created", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentNotice-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentNotice-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentNotice-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The business identifier of the notice", + "code": "identifier", + "base": [ "PaymentNotice" ], + "type": "token", + "expression": "PaymentNotice.identifier", + "xpath": "f:PaymentNotice/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentNotice-payment-status", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentNotice-payment-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentNotice-payment-status", + "version": "4.0.1", + "name": "payment-status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The type of payment notice", + "code": "payment-status", + "base": [ "PaymentNotice" ], + "type": "token", + "expression": "PaymentNotice.paymentStatus", + "xpath": "f:PaymentNotice/f:paymentStatus", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentNotice-provider", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentNotice-provider", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentNotice-provider", + "version": "4.0.1", + "name": "provider", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The reference to the provider", + "code": "provider", + "base": [ "PaymentNotice" ], + "type": "reference", + "expression": "PaymentNotice.provider", + "xpath": "f:PaymentNotice/f:provider", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentNotice-request", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentNotice-request", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentNotice-request", + "version": "4.0.1", + "name": "request", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The Claim", + "code": "request", + "base": [ "PaymentNotice" ], + "type": "reference", + "expression": "PaymentNotice.request", + "xpath": "f:PaymentNotice/f:request", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentNotice-response", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentNotice-response", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentNotice-response", + "version": "4.0.1", + "name": "response", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The ClaimResponse", + "code": "response", + "base": [ "PaymentNotice" ], + "type": "reference", + "expression": "PaymentNotice.response", + "xpath": "f:PaymentNotice/f:response", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentNotice-status", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentNotice-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentNotice-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The status of the payment notice", + "code": "status", + "base": [ "PaymentNotice" ], + "type": "token", + "expression": "PaymentNotice.status", + "xpath": "f:PaymentNotice/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-created", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentReconciliation-created", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-created", + "version": "4.0.1", + "name": "created", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The creation date", + "code": "created", + "base": [ "PaymentReconciliation" ], + "type": "date", + "expression": "PaymentReconciliation.created", + "xpath": "f:PaymentReconciliation/f:created", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-disposition", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentReconciliation-disposition", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-disposition", + "version": "4.0.1", + "name": "disposition", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The contents of the disposition message", + "code": "disposition", + "base": [ "PaymentReconciliation" ], + "type": "string", + "expression": "PaymentReconciliation.disposition", + "xpath": "f:PaymentReconciliation/f:disposition", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentReconciliation-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The business identifier of the ExplanationOfBenefit", + "code": "identifier", + "base": [ "PaymentReconciliation" ], + "type": "token", + "expression": "PaymentReconciliation.identifier", + "xpath": "f:PaymentReconciliation/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-outcome", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentReconciliation-outcome", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-outcome", + "version": "4.0.1", + "name": "outcome", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The processing outcome", + "code": "outcome", + "base": [ "PaymentReconciliation" ], + "type": "token", + "expression": "PaymentReconciliation.outcome", + "xpath": "f:PaymentReconciliation/f:outcome", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-payment-issuer", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentReconciliation-payment-issuer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-payment-issuer", + "version": "4.0.1", + "name": "payment-issuer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The organization which generated this resource", + "code": "payment-issuer", + "base": [ "PaymentReconciliation" ], + "type": "reference", + "expression": "PaymentReconciliation.paymentIssuer", + "xpath": "f:PaymentReconciliation/f:paymentIssuer", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-request", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentReconciliation-request", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-request", + "version": "4.0.1", + "name": "request", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The reference to the claim", + "code": "request", + "base": [ "PaymentReconciliation" ], + "type": "reference", + "expression": "PaymentReconciliation.request", + "xpath": "f:PaymentReconciliation/f:request", + "xpathUsage": "normal", + "target": [ "Task" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-requestor", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentReconciliation-requestor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-requestor", + "version": "4.0.1", + "name": "requestor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The reference to the provider who submitted the claim", + "code": "requestor", + "base": [ "PaymentReconciliation" ], + "type": "reference", + "expression": "PaymentReconciliation.requestor", + "xpath": "f:PaymentReconciliation/f:requestor", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-status", + "resource": { + "resourceType": "SearchParameter", + "id": "PaymentReconciliation-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PaymentReconciliation-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The status of the payment reconciliation", + "code": "status", + "base": [ "PaymentReconciliation" ], + "type": "token", + "expression": "PaymentReconciliation.status", + "xpath": "f:PaymentReconciliation/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Person-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Person-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Person-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A person Identifier", + "code": "identifier", + "base": [ "Person" ], + "type": "token", + "expression": "Person.identifier", + "xpath": "f:Person/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Person-link", + "resource": { + "resourceType": "SearchParameter", + "id": "Person-link", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Person-link", + "version": "4.0.1", + "name": "link", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Any link has this Patient, Person, RelatedPerson or Practitioner reference", + "code": "link", + "base": [ "Person" ], + "type": "reference", + "expression": "Person.link.target", + "xpath": "f:Person/f:link/f:target", + "xpathUsage": "normal", + "target": [ "Practitioner", "Patient", "Person", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Person-name", + "resource": { + "resourceType": "SearchParameter", + "id": "Person-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Person-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text", + "code": "name", + "base": [ "Person" ], + "type": "string", + "expression": "Person.name", + "xpath": "f:Person/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Person-organization", + "resource": { + "resourceType": "SearchParameter", + "id": "Person-organization", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Person-organization", + "version": "4.0.1", + "name": "organization", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The organization at which this person record is being managed", + "code": "organization", + "base": [ "Person" ], + "type": "reference", + "expression": "Person.managingOrganization", + "xpath": "f:Person/f:managingOrganization", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Person-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Person-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Person-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The Person links to this Patient", + "code": "patient", + "base": [ "Person" ], + "type": "reference", + "expression": "Person.link.target.where(resolve() is Patient)", + "xpath": "f:Person/f:link/f:target", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Person-practitioner", + "resource": { + "resourceType": "SearchParameter", + "id": "Person-practitioner", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Person-practitioner", + "version": "4.0.1", + "name": "practitioner", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The Person links to this Practitioner", + "code": "practitioner", + "base": [ "Person" ], + "type": "reference", + "expression": "Person.link.target.where(resolve() is Practitioner)", + "xpath": "f:Person/f:link/f:target", + "xpathUsage": "normal", + "target": [ "Practitioner" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Person-relatedperson", + "resource": { + "resourceType": "SearchParameter", + "id": "Person-relatedperson", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Person-relatedperson", + "version": "4.0.1", + "name": "relatedperson", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The Person links to this RelatedPerson", + "code": "relatedperson", + "base": [ "Person" ], + "type": "reference", + "expression": "Person.link.target.where(resolve() is RelatedPerson)", + "xpath": "f:Person/f:link/f:target", + "xpathUsage": "normal", + "target": [ "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-composed-of", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-composed-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-composed-of", + "version": "4.0.1", + "name": "composed-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "composed-of", + "base": [ "PlanDefinition" ], + "type": "reference", + "expression": "PlanDefinition.relatedArtifact.where(type='composed-of').resource", + "xpath": "f:PlanDefinition/f:relatedArtifact[f:type/@value='composed-of']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context assigned to the plan definition", + "code": "context", + "base": [ "PlanDefinition" ], + "type": "token", + "expression": "(PlanDefinition.useContext.value as CodeableConcept)", + "xpath": "f:PlanDefinition/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the plan definition", + "code": "context-quantity", + "base": [ "PlanDefinition" ], + "type": "quantity", + "expression": "(PlanDefinition.useContext.value as Quantity) | (PlanDefinition.useContext.value as Range)", + "xpath": "f:PlanDefinition/f:useContext/f:valueQuantity | f:PlanDefinition/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the plan definition", + "code": "context-type", + "base": [ "PlanDefinition" ], + "type": "token", + "expression": "PlanDefinition.useContext.code", + "xpath": "f:PlanDefinition/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-date", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The plan definition publication date", + "code": "date", + "base": [ "PlanDefinition" ], + "type": "date", + "expression": "PlanDefinition.date", + "xpath": "f:PlanDefinition/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-definition", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-definition", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-definition", + "version": "4.0.1", + "name": "definition", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Activity or plan definitions used by plan definition", + "code": "definition", + "base": [ "PlanDefinition" ], + "type": "reference", + "expression": "PlanDefinition.action.definition", + "xpath": "f:PlanDefinition/f:action/f:definitionCanonical | f:PlanDefinition/f:action/f:definitionUri", + "xpathUsage": "normal", + "target": [ "Questionnaire", "PlanDefinition", "ActivityDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-depends-on", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-depends-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-depends-on", + "version": "4.0.1", + "name": "depends-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "depends-on", + "base": [ "PlanDefinition" ], + "type": "reference", + "expression": "PlanDefinition.relatedArtifact.where(type='depends-on').resource | PlanDefinition.library", + "xpath": "f:PlanDefinition/f:relatedArtifact[f:type/@value='depends-on']/f:resource | f:PlanDefinition/f:library", + "xpathUsage": "normal", + "target": [ "Library", "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-derived-from", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-derived-from", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-derived-from", + "version": "4.0.1", + "name": "derived-from", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "derived-from", + "base": [ "PlanDefinition" ], + "type": "reference", + "expression": "PlanDefinition.relatedArtifact.where(type='derived-from').resource", + "xpath": "f:PlanDefinition/f:relatedArtifact[f:type/@value='derived-from']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-description", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The description of the plan definition", + "code": "description", + "base": [ "PlanDefinition" ], + "type": "string", + "expression": "PlanDefinition.description", + "xpath": "f:PlanDefinition/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The time during which the plan definition is intended to be in use", + "code": "effective", + "base": [ "PlanDefinition" ], + "type": "date", + "expression": "PlanDefinition.effectivePeriod", + "xpath": "f:PlanDefinition/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "External identifier for the plan definition", + "code": "identifier", + "base": [ "PlanDefinition" ], + "type": "token", + "expression": "PlanDefinition.identifier", + "xpath": "f:PlanDefinition/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the plan definition", + "code": "jurisdiction", + "base": [ "PlanDefinition" ], + "type": "token", + "expression": "PlanDefinition.jurisdiction", + "xpath": "f:PlanDefinition/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-name", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the plan definition", + "code": "name", + "base": [ "PlanDefinition" ], + "type": "string", + "expression": "PlanDefinition.name", + "xpath": "f:PlanDefinition/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-predecessor", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-predecessor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-predecessor", + "version": "4.0.1", + "name": "predecessor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "predecessor", + "base": [ "PlanDefinition" ], + "type": "reference", + "expression": "PlanDefinition.relatedArtifact.where(type='predecessor').resource", + "xpath": "f:PlanDefinition/f:relatedArtifact[f:type/@value='predecessor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Name of the publisher of the plan definition", + "code": "publisher", + "base": [ "PlanDefinition" ], + "type": "string", + "expression": "PlanDefinition.publisher", + "xpath": "f:PlanDefinition/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-status", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The current status of the plan definition", + "code": "status", + "base": [ "PlanDefinition" ], + "type": "token", + "expression": "PlanDefinition.status", + "xpath": "f:PlanDefinition/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-successor", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-successor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-successor", + "version": "4.0.1", + "name": "successor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "successor", + "base": [ "PlanDefinition" ], + "type": "reference", + "expression": "PlanDefinition.relatedArtifact.where(type='successor').resource", + "xpath": "f:PlanDefinition/f:relatedArtifact[f:type/@value='successor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-title", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The human-friendly name of the plan definition", + "code": "title", + "base": [ "PlanDefinition" ], + "type": "string", + "expression": "PlanDefinition.title", + "xpath": "f:PlanDefinition/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-topic", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-topic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-topic", + "version": "4.0.1", + "name": "topic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Topics associated with the module", + "code": "topic", + "base": [ "PlanDefinition" ], + "type": "token", + "expression": "PlanDefinition.topic", + "xpath": "f:PlanDefinition/f:topic", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-type", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The type of artifact the plan (e.g. order-set, eca-rule, protocol)", + "code": "type", + "base": [ "PlanDefinition" ], + "type": "token", + "expression": "PlanDefinition.type", + "xpath": "f:PlanDefinition/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-url", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The uri that identifies the plan definition", + "code": "url", + "base": [ "PlanDefinition" ], + "type": "uri", + "expression": "PlanDefinition.url", + "xpath": "f:PlanDefinition/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-version", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The business version of the plan definition", + "code": "version", + "base": [ "PlanDefinition" ], + "type": "token", + "expression": "PlanDefinition.version", + "xpath": "f:PlanDefinition/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the plan definition", + "code": "context-type-quantity", + "base": [ "PlanDefinition" ], + "type": "composite", + "expression": "PlanDefinition.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "PlanDefinition-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the plan definition", + "code": "context-type-value", + "base": [ "PlanDefinition" ], + "type": "composite", + "expression": "PlanDefinition.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/PlanDefinition-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Practitioner-active", + "resource": { + "resourceType": "SearchParameter", + "id": "Practitioner-active", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Practitioner-active", + "version": "4.0.1", + "name": "active", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Whether the practitioner record is active", + "code": "active", + "base": [ "Practitioner" ], + "type": "token", + "expression": "Practitioner.active", + "xpath": "f:Practitioner/f:active", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Practitioner-communication", + "resource": { + "resourceType": "SearchParameter", + "id": "Practitioner-communication", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Practitioner-communication", + "version": "4.0.1", + "name": "communication", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "One of the languages that the practitioner can communicate with", + "code": "communication", + "base": [ "Practitioner" ], + "type": "token", + "expression": "Practitioner.communication", + "xpath": "f:Practitioner/f:communication", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Practitioner-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Practitioner-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Practitioner-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A practitioner's Identifier", + "code": "identifier", + "base": [ "Practitioner" ], + "type": "token", + "expression": "Practitioner.identifier", + "xpath": "f:Practitioner/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Practitioner-name", + "resource": { + "resourceType": "SearchParameter", + "id": "Practitioner-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Practitioner-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text", + "code": "name", + "base": [ "Practitioner" ], + "type": "string", + "expression": "Practitioner.name", + "xpath": "f:Practitioner/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PractitionerRole-active", + "resource": { + "resourceType": "SearchParameter", + "id": "PractitionerRole-active", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PractitionerRole-active", + "version": "4.0.1", + "name": "active", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Whether this practitioner role record is in active use", + "code": "active", + "base": [ "PractitionerRole" ], + "type": "token", + "expression": "PractitionerRole.active", + "xpath": "f:PractitionerRole/f:active", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PractitionerRole-date", + "resource": { + "resourceType": "SearchParameter", + "id": "PractitionerRole-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PractitionerRole-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The period during which the practitioner is authorized to perform in these role(s)", + "code": "date", + "base": [ "PractitionerRole" ], + "type": "date", + "expression": "PractitionerRole.period", + "xpath": "f:PractitionerRole/f:period", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PractitionerRole-endpoint", + "resource": { + "resourceType": "SearchParameter", + "id": "PractitionerRole-endpoint", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PractitionerRole-endpoint", + "version": "4.0.1", + "name": "endpoint", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Technical endpoints providing access to services operated for the practitioner with this role", + "code": "endpoint", + "base": [ "PractitionerRole" ], + "type": "reference", + "expression": "PractitionerRole.endpoint", + "xpath": "f:PractitionerRole/f:endpoint", + "xpathUsage": "normal", + "target": [ "Endpoint" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PractitionerRole-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "PractitionerRole-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PractitionerRole-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A practitioner's Identifier", + "code": "identifier", + "base": [ "PractitionerRole" ], + "type": "token", + "expression": "PractitionerRole.identifier", + "xpath": "f:PractitionerRole/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PractitionerRole-location", + "resource": { + "resourceType": "SearchParameter", + "id": "PractitionerRole-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PractitionerRole-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "One of the locations at which this practitioner provides care", + "code": "location", + "base": [ "PractitionerRole" ], + "type": "reference", + "expression": "PractitionerRole.location", + "xpath": "f:PractitionerRole/f:location", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PractitionerRole-organization", + "resource": { + "resourceType": "SearchParameter", + "id": "PractitionerRole-organization", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PractitionerRole-organization", + "version": "4.0.1", + "name": "organization", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The identity of the organization the practitioner represents / acts on behalf of", + "code": "organization", + "base": [ "PractitionerRole" ], + "type": "reference", + "expression": "PractitionerRole.organization", + "xpath": "f:PractitionerRole/f:organization", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PractitionerRole-practitioner", + "resource": { + "resourceType": "SearchParameter", + "id": "PractitionerRole-practitioner", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PractitionerRole-practitioner", + "version": "4.0.1", + "name": "practitioner", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Practitioner that is able to provide the defined services for the organization", + "code": "practitioner", + "base": [ "PractitionerRole" ], + "type": "reference", + "expression": "PractitionerRole.practitioner", + "xpath": "f:PractitionerRole/f:practitioner", + "xpathUsage": "normal", + "target": [ "Practitioner" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PractitionerRole-role", + "resource": { + "resourceType": "SearchParameter", + "id": "PractitionerRole-role", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PractitionerRole-role", + "version": "4.0.1", + "name": "role", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The practitioner can perform this role at for the organization", + "code": "role", + "base": [ "PractitionerRole" ], + "type": "token", + "expression": "PractitionerRole.code", + "xpath": "f:PractitionerRole/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PractitionerRole-service", + "resource": { + "resourceType": "SearchParameter", + "id": "PractitionerRole-service", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PractitionerRole-service", + "version": "4.0.1", + "name": "service", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The list of healthcare services that this worker provides for this role's Organization/Location(s)", + "code": "service", + "base": [ "PractitionerRole" ], + "type": "reference", + "expression": "PractitionerRole.healthcareService", + "xpath": "f:PractitionerRole/f:healthcareService", + "xpathUsage": "normal", + "target": [ "HealthcareService" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/PractitionerRole-specialty", + "resource": { + "resourceType": "SearchParameter", + "id": "PractitionerRole-specialty", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/PractitionerRole-specialty", + "version": "4.0.1", + "name": "specialty", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The practitioner has this specialty at an organization", + "code": "specialty", + "base": [ "PractitionerRole" ], + "type": "token", + "expression": "PractitionerRole.specialty", + "xpath": "f:PractitionerRole/f:specialty", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Procedure-based-on", + "resource": { + "resourceType": "SearchParameter", + "id": "Procedure-based-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Procedure-based-on", + "version": "4.0.1", + "name": "based-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "A request for this procedure", + "code": "based-on", + "base": [ "Procedure" ], + "type": "reference", + "expression": "Procedure.basedOn", + "xpath": "f:Procedure/f:basedOn", + "xpathUsage": "normal", + "target": [ "CarePlan", "ServiceRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Procedure-category", + "resource": { + "resourceType": "SearchParameter", + "id": "Procedure-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Procedure-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Classification of the procedure", + "code": "category", + "base": [ "Procedure" ], + "type": "token", + "expression": "Procedure.category", + "xpath": "f:Procedure/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Procedure-instantiates-canonical", + "resource": { + "resourceType": "SearchParameter", + "id": "Procedure-instantiates-canonical", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Procedure-instantiates-canonical", + "version": "4.0.1", + "name": "instantiates-canonical", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Instantiates FHIR protocol or definition", + "code": "instantiates-canonical", + "base": [ "Procedure" ], + "type": "reference", + "expression": "Procedure.instantiatesCanonical", + "xpath": "f:Procedure/f:instantiatesCanonical", + "xpathUsage": "normal", + "target": [ "Questionnaire", "Measure", "PlanDefinition", "OperationDefinition", "ActivityDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Procedure-instantiates-uri", + "resource": { + "resourceType": "SearchParameter", + "id": "Procedure-instantiates-uri", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Procedure-instantiates-uri", + "version": "4.0.1", + "name": "instantiates-uri", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Instantiates external protocol or definition", + "code": "instantiates-uri", + "base": [ "Procedure" ], + "type": "uri", + "expression": "Procedure.instantiatesUri", + "xpath": "f:Procedure/f:instantiatesUri", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Procedure-location", + "resource": { + "resourceType": "SearchParameter", + "id": "Procedure-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Procedure-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Where the procedure happened", + "code": "location", + "base": [ "Procedure" ], + "type": "reference", + "expression": "Procedure.location", + "xpath": "f:Procedure/f:location", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Procedure-part-of", + "resource": { + "resourceType": "SearchParameter", + "id": "Procedure-part-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Procedure-part-of", + "version": "4.0.1", + "name": "part-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Part of referenced event", + "code": "part-of", + "base": [ "Procedure" ], + "type": "reference", + "expression": "Procedure.partOf", + "xpath": "f:Procedure/f:partOf", + "xpathUsage": "normal", + "target": [ "Observation", "Procedure", "MedicationAdministration" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Procedure-performer", + "resource": { + "resourceType": "SearchParameter", + "id": "Procedure-performer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Procedure-performer", + "version": "4.0.1", + "name": "performer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "The reference to the practitioner", + "code": "performer", + "base": [ "Procedure" ], + "type": "reference", + "expression": "Procedure.performer.actor", + "xpath": "f:Procedure/f:performer/f:actor", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Procedure-reason-code", + "resource": { + "resourceType": "SearchParameter", + "id": "Procedure-reason-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Procedure-reason-code", + "version": "4.0.1", + "name": "reason-code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Coded reason procedure performed", + "code": "reason-code", + "base": [ "Procedure" ], + "type": "token", + "expression": "Procedure.reasonCode", + "xpath": "f:Procedure/f:reasonCode", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Procedure-reason-reference", + "resource": { + "resourceType": "SearchParameter", + "id": "Procedure-reason-reference", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Procedure-reason-reference", + "version": "4.0.1", + "name": "reason-reference", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "The justification that the procedure was performed", + "code": "reason-reference", + "base": [ "Procedure" ], + "type": "reference", + "expression": "Procedure.reasonReference", + "xpath": "f:Procedure/f:reasonReference", + "xpathUsage": "normal", + "target": [ "Condition", "Observation", "Procedure", "DiagnosticReport", "DocumentReference" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Procedure-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Procedure-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Procedure-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown", + "code": "status", + "base": [ "Procedure" ], + "type": "token", + "expression": "Procedure.status", + "xpath": "f:Procedure/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Procedure-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Procedure-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Procedure-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Care)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm" + } ] + } ], + "description": "Search by subject", + "code": "subject", + "base": [ "Procedure" ], + "type": "reference", + "expression": "Procedure.subject", + "xpath": "f:Procedure/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Provenance-agent", + "resource": { + "resourceType": "SearchParameter", + "id": "Provenance-agent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Provenance-agent", + "version": "4.0.1", + "name": "agent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Who participated", + "code": "agent", + "base": [ "Provenance" ], + "type": "reference", + "expression": "Provenance.agent.who", + "xpath": "f:Provenance/f:agent/f:who", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Provenance-agent-role", + "resource": { + "resourceType": "SearchParameter", + "id": "Provenance-agent-role", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Provenance-agent-role", + "version": "4.0.1", + "name": "agent-role", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "What the agents role was", + "code": "agent-role", + "base": [ "Provenance" ], + "type": "token", + "expression": "Provenance.agent.role", + "xpath": "f:Provenance/f:agent/f:role", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Provenance-agent-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Provenance-agent-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Provenance-agent-type", + "version": "4.0.1", + "name": "agent-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "How the agent participated", + "code": "agent-type", + "base": [ "Provenance" ], + "type": "token", + "expression": "Provenance.agent.type", + "xpath": "f:Provenance/f:agent/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Provenance-entity", + "resource": { + "resourceType": "SearchParameter", + "id": "Provenance-entity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Provenance-entity", + "version": "4.0.1", + "name": "entity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Identity of entity", + "code": "entity", + "base": [ "Provenance" ], + "type": "reference", + "expression": "Provenance.entity.what", + "xpath": "f:Provenance/f:entity/f:what", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Provenance-location", + "resource": { + "resourceType": "SearchParameter", + "id": "Provenance-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Provenance-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Where the activity occurred, if relevant", + "code": "location", + "base": [ "Provenance" ], + "type": "reference", + "expression": "Provenance.location", + "xpath": "f:Provenance/f:location", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Provenance-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Provenance-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Provenance-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Target Reference(s) (usually version specific)", + "code": "patient", + "base": [ "Provenance" ], + "type": "reference", + "expression": "Provenance.target.where(resolve() is Patient)", + "xpath": "f:Provenance/f:target", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Provenance-recorded", + "resource": { + "resourceType": "SearchParameter", + "id": "Provenance-recorded", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Provenance-recorded", + "version": "4.0.1", + "name": "recorded", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "When the activity was recorded / updated", + "code": "recorded", + "base": [ "Provenance" ], + "type": "date", + "expression": "Provenance.recorded", + "xpath": "f:Provenance/f:recorded", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Provenance-signature-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Provenance-signature-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Provenance-signature-type", + "version": "4.0.1", + "name": "signature-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Indication of the reason the entity signed the object(s)", + "code": "signature-type", + "base": [ "Provenance" ], + "type": "token", + "expression": "Provenance.signature.type", + "xpath": "f:Provenance/f:signature/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Provenance-target", + "resource": { + "resourceType": "SearchParameter", + "id": "Provenance-target", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Provenance-target", + "version": "4.0.1", + "name": "target", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "Target Reference(s) (usually version specific)", + "code": "target", + "base": [ "Provenance" ], + "type": "reference", + "expression": "Provenance.target", + "xpath": "f:Provenance/f:target", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Provenance-when", + "resource": { + "resourceType": "SearchParameter", + "id": "Provenance-when", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Provenance-when", + "version": "4.0.1", + "name": "when", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Security)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/secure/index.cfm" + } ] + } ], + "description": "When the activity occurred", + "code": "when", + "base": [ "Provenance" ], + "type": "date", + "expression": "(Provenance.occurred as dateTime)", + "xpath": "f:Provenance/f:occurredDateTime", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-code", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A code that corresponds to one of its items in the questionnaire", + "code": "code", + "base": [ "Questionnaire" ], + "type": "token", + "expression": "Questionnaire.item.code", + "xpath": "f:Questionnaire/f:item/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-context", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A use context assigned to the questionnaire", + "code": "context", + "base": [ "Questionnaire" ], + "type": "token", + "expression": "(Questionnaire.useContext.value as CodeableConcept)", + "xpath": "f:Questionnaire/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the questionnaire", + "code": "context-quantity", + "base": [ "Questionnaire" ], + "type": "quantity", + "expression": "(Questionnaire.useContext.value as Quantity) | (Questionnaire.useContext.value as Range)", + "xpath": "f:Questionnaire/f:useContext/f:valueQuantity | f:Questionnaire/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the questionnaire", + "code": "context-type", + "base": [ "Questionnaire" ], + "type": "token", + "expression": "Questionnaire.useContext.code", + "xpath": "f:Questionnaire/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The questionnaire publication date", + "code": "date", + "base": [ "Questionnaire" ], + "type": "date", + "expression": "Questionnaire.date", + "xpath": "f:Questionnaire/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-definition", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-definition", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-definition", + "version": "4.0.1", + "name": "definition", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "ElementDefinition - details for the item", + "code": "definition", + "base": [ "Questionnaire" ], + "type": "uri", + "expression": "Questionnaire.item.definition", + "xpath": "f:Questionnaire/f:item/f:definition", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-description", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The description of the questionnaire", + "code": "description", + "base": [ "Questionnaire" ], + "type": "string", + "expression": "Questionnaire.description", + "xpath": "f:Questionnaire/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The time during which the questionnaire is intended to be in use", + "code": "effective", + "base": [ "Questionnaire" ], + "type": "date", + "expression": "Questionnaire.effectivePeriod", + "xpath": "f:Questionnaire/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "External identifier for the questionnaire", + "code": "identifier", + "base": [ "Questionnaire" ], + "type": "token", + "expression": "Questionnaire.identifier", + "xpath": "f:Questionnaire/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the questionnaire", + "code": "jurisdiction", + "base": [ "Questionnaire" ], + "type": "token", + "expression": "Questionnaire.jurisdiction", + "xpath": "f:Questionnaire/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-name", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the questionnaire", + "code": "name", + "base": [ "Questionnaire" ], + "type": "string", + "expression": "Questionnaire.name", + "xpath": "f:Questionnaire/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Name of the publisher of the questionnaire", + "code": "publisher", + "base": [ "Questionnaire" ], + "type": "string", + "expression": "Questionnaire.publisher", + "xpath": "f:Questionnaire/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The current status of the questionnaire", + "code": "status", + "base": [ "Questionnaire" ], + "type": "token", + "expression": "Questionnaire.status", + "xpath": "f:Questionnaire/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-subject-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-subject-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-subject-type", + "version": "4.0.1", + "name": "subject-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Resource that can be subject of QuestionnaireResponse", + "code": "subject-type", + "base": [ "Questionnaire" ], + "type": "token", + "expression": "Questionnaire.subjectType", + "xpath": "f:Questionnaire/f:subjectType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-title", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The human-friendly name of the questionnaire", + "code": "title", + "base": [ "Questionnaire" ], + "type": "string", + "expression": "Questionnaire.title", + "xpath": "f:Questionnaire/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-url", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The uri that identifies the questionnaire", + "code": "url", + "base": [ "Questionnaire" ], + "type": "uri", + "expression": "Questionnaire.url", + "xpath": "f:Questionnaire/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-version", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The business version of the questionnaire", + "code": "version", + "base": [ "Questionnaire" ], + "type": "token", + "expression": "Questionnaire.version", + "xpath": "f:Questionnaire/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the questionnaire", + "code": "context-type-quantity", + "base": [ "Questionnaire" ], + "type": "composite", + "expression": "Questionnaire.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/Questionnaire-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Questionnaire-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Questionnaire-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "Questionnaire-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Questionnaire-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the questionnaire", + "code": "context-type-value", + "base": [ "Questionnaire" ], + "type": "composite", + "expression": "Questionnaire.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/Questionnaire-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/Questionnaire-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-author", + "resource": { + "resourceType": "SearchParameter", + "id": "QuestionnaireResponse-author", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-author", + "version": "4.0.1", + "name": "author", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The author of the questionnaire response", + "code": "author", + "base": [ "QuestionnaireResponse" ], + "type": "reference", + "expression": "QuestionnaireResponse.author", + "xpath": "f:QuestionnaireResponse/f:author", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-authored", + "resource": { + "resourceType": "SearchParameter", + "id": "QuestionnaireResponse-authored", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-authored", + "version": "4.0.1", + "name": "authored", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "When the questionnaire response was last changed", + "code": "authored", + "base": [ "QuestionnaireResponse" ], + "type": "date", + "expression": "QuestionnaireResponse.authored", + "xpath": "f:QuestionnaireResponse/f:authored", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-based-on", + "resource": { + "resourceType": "SearchParameter", + "id": "QuestionnaireResponse-based-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-based-on", + "version": "4.0.1", + "name": "based-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Plan/proposal/order fulfilled by this questionnaire response", + "code": "based-on", + "base": [ "QuestionnaireResponse" ], + "type": "reference", + "expression": "QuestionnaireResponse.basedOn", + "xpath": "f:QuestionnaireResponse/f:basedOn", + "xpathUsage": "normal", + "target": [ "CarePlan", "ServiceRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "QuestionnaireResponse-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Encounter associated with the questionnaire response", + "code": "encounter", + "base": [ "QuestionnaireResponse" ], + "type": "reference", + "expression": "QuestionnaireResponse.encounter", + "xpath": "f:QuestionnaireResponse/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "QuestionnaireResponse-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The unique identifier for the questionnaire response", + "code": "identifier", + "base": [ "QuestionnaireResponse" ], + "type": "token", + "expression": "QuestionnaireResponse.identifier", + "xpath": "f:QuestionnaireResponse/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-part-of", + "resource": { + "resourceType": "SearchParameter", + "id": "QuestionnaireResponse-part-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-part-of", + "version": "4.0.1", + "name": "part-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Procedure or observation this questionnaire response was performed as a part of", + "code": "part-of", + "base": [ "QuestionnaireResponse" ], + "type": "reference", + "expression": "QuestionnaireResponse.partOf", + "xpath": "f:QuestionnaireResponse/f:partOf", + "xpathUsage": "normal", + "target": [ "Observation", "Procedure" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "QuestionnaireResponse-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The patient that is the subject of the questionnaire response", + "code": "patient", + "base": [ "QuestionnaireResponse" ], + "type": "reference", + "expression": "QuestionnaireResponse.subject.where(resolve() is Patient)", + "xpath": "f:QuestionnaireResponse/f:subject", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-questionnaire", + "resource": { + "resourceType": "SearchParameter", + "id": "QuestionnaireResponse-questionnaire", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-questionnaire", + "version": "4.0.1", + "name": "questionnaire", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The questionnaire the answers are provided for", + "code": "questionnaire", + "base": [ "QuestionnaireResponse" ], + "type": "reference", + "expression": "QuestionnaireResponse.questionnaire", + "xpath": "f:QuestionnaireResponse/f:questionnaire", + "xpathUsage": "normal", + "target": [ "Questionnaire" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-source", + "resource": { + "resourceType": "SearchParameter", + "id": "QuestionnaireResponse-source", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-source", + "version": "4.0.1", + "name": "source", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The individual providing the information reflected in the questionnaire respose", + "code": "source", + "base": [ "QuestionnaireResponse" ], + "type": "reference", + "expression": "QuestionnaireResponse.source", + "xpath": "f:QuestionnaireResponse/f:source", + "xpathUsage": "normal", + "target": [ "Practitioner", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-status", + "resource": { + "resourceType": "SearchParameter", + "id": "QuestionnaireResponse-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The status of the questionnaire response", + "code": "status", + "base": [ "QuestionnaireResponse" ], + "type": "token", + "expression": "QuestionnaireResponse.status", + "xpath": "f:QuestionnaireResponse/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "QuestionnaireResponse-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The subject of the questionnaire response", + "code": "subject", + "base": [ "QuestionnaireResponse" ], + "type": "reference", + "expression": "QuestionnaireResponse.subject", + "xpath": "f:QuestionnaireResponse/f:subject", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RelatedPerson-active", + "resource": { + "resourceType": "SearchParameter", + "id": "RelatedPerson-active", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RelatedPerson-active", + "version": "4.0.1", + "name": "active", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Indicates if the related person record is active", + "code": "active", + "base": [ "RelatedPerson" ], + "type": "token", + "expression": "RelatedPerson.active", + "xpath": "f:RelatedPerson/f:active", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RelatedPerson-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "RelatedPerson-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RelatedPerson-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "An Identifier of the RelatedPerson", + "code": "identifier", + "base": [ "RelatedPerson" ], + "type": "token", + "expression": "RelatedPerson.identifier", + "xpath": "f:RelatedPerson/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RelatedPerson-name", + "resource": { + "resourceType": "SearchParameter", + "id": "RelatedPerson-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RelatedPerson-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text", + "code": "name", + "base": [ "RelatedPerson" ], + "type": "string", + "expression": "RelatedPerson.name", + "xpath": "f:RelatedPerson/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RelatedPerson-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "RelatedPerson-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RelatedPerson-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The patient this related person is related to", + "code": "patient", + "base": [ "RelatedPerson" ], + "type": "reference", + "expression": "RelatedPerson.patient", + "xpath": "f:RelatedPerson/f:patient", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RelatedPerson-relationship", + "resource": { + "resourceType": "SearchParameter", + "id": "RelatedPerson-relationship", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RelatedPerson-relationship", + "version": "4.0.1", + "name": "relationship", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The relationship between the patient and the relatedperson", + "code": "relationship", + "base": [ "RelatedPerson" ], + "type": "token", + "expression": "RelatedPerson.relationship", + "xpath": "f:RelatedPerson/f:relationship", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-author", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-author", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-author", + "version": "4.0.1", + "name": "author", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The author of the request group", + "code": "author", + "base": [ "RequestGroup" ], + "type": "reference", + "expression": "RequestGroup.author", + "xpath": "f:RequestGroup/f:author", + "xpathUsage": "normal", + "target": [ "Practitioner", "Device", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-authored", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-authored", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-authored", + "version": "4.0.1", + "name": "authored", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The date the request group was authored", + "code": "authored", + "base": [ "RequestGroup" ], + "type": "date", + "expression": "RequestGroup.authoredOn", + "xpath": "f:RequestGroup/f:authoredOn", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-code", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The code of the request group", + "code": "code", + "base": [ "RequestGroup" ], + "type": "token", + "expression": "RequestGroup.code", + "xpath": "f:RequestGroup/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The encounter the request group applies to", + "code": "encounter", + "base": [ "RequestGroup" ], + "type": "reference", + "expression": "RequestGroup.encounter", + "xpath": "f:RequestGroup/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-group-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-group-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-group-identifier", + "version": "4.0.1", + "name": "group-identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The group identifier for the request group", + "code": "group-identifier", + "base": [ "RequestGroup" ], + "type": "token", + "expression": "RequestGroup.groupIdentifier", + "xpath": "f:RequestGroup/f:groupIdentifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "External identifiers for the request group", + "code": "identifier", + "base": [ "RequestGroup" ], + "type": "token", + "expression": "RequestGroup.identifier", + "xpath": "f:RequestGroup/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-instantiates-canonical", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-instantiates-canonical", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-instantiates-canonical", + "version": "4.0.1", + "name": "instantiates-canonical", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The FHIR-based definition from which the request group is realized", + "code": "instantiates-canonical", + "base": [ "RequestGroup" ], + "type": "reference", + "expression": "RequestGroup.instantiatesCanonical", + "xpath": "f:RequestGroup/f:instantiatesCanonical", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-instantiates-uri", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-instantiates-uri", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-instantiates-uri", + "version": "4.0.1", + "name": "instantiates-uri", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The external definition from which the request group is realized", + "code": "instantiates-uri", + "base": [ "RequestGroup" ], + "type": "uri", + "expression": "RequestGroup.instantiatesUri", + "xpath": "f:RequestGroup/f:instantiatesUri", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-intent", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-intent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-intent", + "version": "4.0.1", + "name": "intent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The intent of the request group", + "code": "intent", + "base": [ "RequestGroup" ], + "type": "token", + "expression": "RequestGroup.intent", + "xpath": "f:RequestGroup/f:intent", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-participant", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-participant", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-participant", + "version": "4.0.1", + "name": "participant", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The participant in the requests in the group", + "code": "participant", + "base": [ "RequestGroup" ], + "type": "reference", + "expression": "RequestGroup.action.participant", + "xpath": "f:RequestGroup/f:action/f:participant", + "xpathUsage": "normal", + "target": [ "Practitioner", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The identity of a patient to search for request groups", + "code": "patient", + "base": [ "RequestGroup" ], + "type": "reference", + "expression": "RequestGroup.subject.where(resolve() is Patient)", + "xpath": "f:RequestGroup/f:subject", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-priority", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-priority", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-priority", + "version": "4.0.1", + "name": "priority", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The priority of the request group", + "code": "priority", + "base": [ "RequestGroup" ], + "type": "token", + "expression": "RequestGroup.priority", + "xpath": "f:RequestGroup/f:priority", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-status", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The status of the request group", + "code": "status", + "base": [ "RequestGroup" ], + "type": "token", + "expression": "RequestGroup.status", + "xpath": "f:RequestGroup/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RequestGroup-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "RequestGroup-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RequestGroup-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The subject that the request group is about", + "code": "subject", + "base": [ "RequestGroup" ], + "type": "reference", + "expression": "RequestGroup.subject", + "xpath": "f:RequestGroup/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-composed-of", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-composed-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-composed-of", + "version": "4.0.1", + "name": "composed-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "composed-of", + "base": [ "ResearchDefinition" ], + "type": "reference", + "expression": "ResearchDefinition.relatedArtifact.where(type='composed-of').resource", + "xpath": "f:ResearchDefinition/f:relatedArtifact[f:type/@value='composed-of']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context assigned to the research definition", + "code": "context", + "base": [ "ResearchDefinition" ], + "type": "token", + "expression": "(ResearchDefinition.useContext.value as CodeableConcept)", + "xpath": "f:ResearchDefinition/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the research definition", + "code": "context-quantity", + "base": [ "ResearchDefinition" ], + "type": "quantity", + "expression": "(ResearchDefinition.useContext.value as Quantity) | (ResearchDefinition.useContext.value as Range)", + "xpath": "f:ResearchDefinition/f:useContext/f:valueQuantity | f:ResearchDefinition/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the research definition", + "code": "context-type", + "base": [ "ResearchDefinition" ], + "type": "token", + "expression": "ResearchDefinition.useContext.code", + "xpath": "f:ResearchDefinition/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-date", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The research definition publication date", + "code": "date", + "base": [ "ResearchDefinition" ], + "type": "date", + "expression": "ResearchDefinition.date", + "xpath": "f:ResearchDefinition/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-depends-on", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-depends-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-depends-on", + "version": "4.0.1", + "name": "depends-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "depends-on", + "base": [ "ResearchDefinition" ], + "type": "reference", + "expression": "ResearchDefinition.relatedArtifact.where(type='depends-on').resource | ResearchDefinition.library", + "xpath": "f:ResearchDefinition/f:relatedArtifact[f:type/@value='depends-on']/f:resource | f:ResearchDefinition/f:library", + "xpathUsage": "normal", + "target": [ "Library", "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-derived-from", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-derived-from", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-derived-from", + "version": "4.0.1", + "name": "derived-from", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "derived-from", + "base": [ "ResearchDefinition" ], + "type": "reference", + "expression": "ResearchDefinition.relatedArtifact.where(type='derived-from').resource", + "xpath": "f:ResearchDefinition/f:relatedArtifact[f:type/@value='derived-from']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-description", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The description of the research definition", + "code": "description", + "base": [ "ResearchDefinition" ], + "type": "string", + "expression": "ResearchDefinition.description", + "xpath": "f:ResearchDefinition/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The time during which the research definition is intended to be in use", + "code": "effective", + "base": [ "ResearchDefinition" ], + "type": "date", + "expression": "ResearchDefinition.effectivePeriod", + "xpath": "f:ResearchDefinition/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "External identifier for the research definition", + "code": "identifier", + "base": [ "ResearchDefinition" ], + "type": "token", + "expression": "ResearchDefinition.identifier", + "xpath": "f:ResearchDefinition/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the research definition", + "code": "jurisdiction", + "base": [ "ResearchDefinition" ], + "type": "token", + "expression": "ResearchDefinition.jurisdiction", + "xpath": "f:ResearchDefinition/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-name", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the research definition", + "code": "name", + "base": [ "ResearchDefinition" ], + "type": "string", + "expression": "ResearchDefinition.name", + "xpath": "f:ResearchDefinition/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-predecessor", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-predecessor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-predecessor", + "version": "4.0.1", + "name": "predecessor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "predecessor", + "base": [ "ResearchDefinition" ], + "type": "reference", + "expression": "ResearchDefinition.relatedArtifact.where(type='predecessor').resource", + "xpath": "f:ResearchDefinition/f:relatedArtifact[f:type/@value='predecessor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Name of the publisher of the research definition", + "code": "publisher", + "base": [ "ResearchDefinition" ], + "type": "string", + "expression": "ResearchDefinition.publisher", + "xpath": "f:ResearchDefinition/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The current status of the research definition", + "code": "status", + "base": [ "ResearchDefinition" ], + "type": "token", + "expression": "ResearchDefinition.status", + "xpath": "f:ResearchDefinition/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-successor", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-successor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-successor", + "version": "4.0.1", + "name": "successor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "successor", + "base": [ "ResearchDefinition" ], + "type": "reference", + "expression": "ResearchDefinition.relatedArtifact.where(type='successor').resource", + "xpath": "f:ResearchDefinition/f:relatedArtifact[f:type/@value='successor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-title", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The human-friendly name of the research definition", + "code": "title", + "base": [ "ResearchDefinition" ], + "type": "string", + "expression": "ResearchDefinition.title", + "xpath": "f:ResearchDefinition/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-topic", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-topic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-topic", + "version": "4.0.1", + "name": "topic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Topics associated with the ResearchDefinition", + "code": "topic", + "base": [ "ResearchDefinition" ], + "type": "token", + "expression": "ResearchDefinition.topic", + "xpath": "f:ResearchDefinition/f:topic", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-url", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The uri that identifies the research definition", + "code": "url", + "base": [ "ResearchDefinition" ], + "type": "uri", + "expression": "ResearchDefinition.url", + "xpath": "f:ResearchDefinition/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-version", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The business version of the research definition", + "code": "version", + "base": [ "ResearchDefinition" ], + "type": "token", + "expression": "ResearchDefinition.version", + "xpath": "f:ResearchDefinition/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the research definition", + "code": "context-type-quantity", + "base": [ "ResearchDefinition" ], + "type": "composite", + "expression": "ResearchDefinition.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchDefinition-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the research definition", + "code": "context-type-value", + "base": [ "ResearchDefinition" ], + "type": "composite", + "expression": "ResearchDefinition.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/ResearchDefinition-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-composed-of", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-composed-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-composed-of", + "version": "4.0.1", + "name": "composed-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "composed-of", + "base": [ "ResearchElementDefinition" ], + "type": "reference", + "expression": "ResearchElementDefinition.relatedArtifact.where(type='composed-of').resource", + "xpath": "f:ResearchElementDefinition/f:relatedArtifact[f:type/@value='composed-of']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context assigned to the research element definition", + "code": "context", + "base": [ "ResearchElementDefinition" ], + "type": "token", + "expression": "(ResearchElementDefinition.useContext.value as CodeableConcept)", + "xpath": "f:ResearchElementDefinition/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the research element definition", + "code": "context-quantity", + "base": [ "ResearchElementDefinition" ], + "type": "quantity", + "expression": "(ResearchElementDefinition.useContext.value as Quantity) | (ResearchElementDefinition.useContext.value as Range)", + "xpath": "f:ResearchElementDefinition/f:useContext/f:valueQuantity | f:ResearchElementDefinition/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the research element definition", + "code": "context-type", + "base": [ "ResearchElementDefinition" ], + "type": "token", + "expression": "ResearchElementDefinition.useContext.code", + "xpath": "f:ResearchElementDefinition/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-date", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The research element definition publication date", + "code": "date", + "base": [ "ResearchElementDefinition" ], + "type": "date", + "expression": "ResearchElementDefinition.date", + "xpath": "f:ResearchElementDefinition/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-depends-on", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-depends-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-depends-on", + "version": "4.0.1", + "name": "depends-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "depends-on", + "base": [ "ResearchElementDefinition" ], + "type": "reference", + "expression": "ResearchElementDefinition.relatedArtifact.where(type='depends-on').resource | ResearchElementDefinition.library", + "xpath": "f:ResearchElementDefinition/f:relatedArtifact[f:type/@value='depends-on']/f:resource | f:ResearchElementDefinition/f:library", + "xpathUsage": "normal", + "target": [ "Library", "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-derived-from", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-derived-from", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-derived-from", + "version": "4.0.1", + "name": "derived-from", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "derived-from", + "base": [ "ResearchElementDefinition" ], + "type": "reference", + "expression": "ResearchElementDefinition.relatedArtifact.where(type='derived-from').resource", + "xpath": "f:ResearchElementDefinition/f:relatedArtifact[f:type/@value='derived-from']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-description", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The description of the research element definition", + "code": "description", + "base": [ "ResearchElementDefinition" ], + "type": "string", + "expression": "ResearchElementDefinition.description", + "xpath": "f:ResearchElementDefinition/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The time during which the research element definition is intended to be in use", + "code": "effective", + "base": [ "ResearchElementDefinition" ], + "type": "date", + "expression": "ResearchElementDefinition.effectivePeriod", + "xpath": "f:ResearchElementDefinition/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "External identifier for the research element definition", + "code": "identifier", + "base": [ "ResearchElementDefinition" ], + "type": "token", + "expression": "ResearchElementDefinition.identifier", + "xpath": "f:ResearchElementDefinition/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the research element definition", + "code": "jurisdiction", + "base": [ "ResearchElementDefinition" ], + "type": "token", + "expression": "ResearchElementDefinition.jurisdiction", + "xpath": "f:ResearchElementDefinition/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-name", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the research element definition", + "code": "name", + "base": [ "ResearchElementDefinition" ], + "type": "string", + "expression": "ResearchElementDefinition.name", + "xpath": "f:ResearchElementDefinition/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-predecessor", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-predecessor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-predecessor", + "version": "4.0.1", + "name": "predecessor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "predecessor", + "base": [ "ResearchElementDefinition" ], + "type": "reference", + "expression": "ResearchElementDefinition.relatedArtifact.where(type='predecessor').resource", + "xpath": "f:ResearchElementDefinition/f:relatedArtifact[f:type/@value='predecessor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Name of the publisher of the research element definition", + "code": "publisher", + "base": [ "ResearchElementDefinition" ], + "type": "string", + "expression": "ResearchElementDefinition.publisher", + "xpath": "f:ResearchElementDefinition/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The current status of the research element definition", + "code": "status", + "base": [ "ResearchElementDefinition" ], + "type": "token", + "expression": "ResearchElementDefinition.status", + "xpath": "f:ResearchElementDefinition/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-successor", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-successor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-successor", + "version": "4.0.1", + "name": "successor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "What resource is being referenced", + "code": "successor", + "base": [ "ResearchElementDefinition" ], + "type": "reference", + "expression": "ResearchElementDefinition.relatedArtifact.where(type='successor').resource", + "xpath": "f:ResearchElementDefinition/f:relatedArtifact[f:type/@value='successor']/f:resource", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-title", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The human-friendly name of the research element definition", + "code": "title", + "base": [ "ResearchElementDefinition" ], + "type": "string", + "expression": "ResearchElementDefinition.title", + "xpath": "f:ResearchElementDefinition/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-topic", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-topic", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-topic", + "version": "4.0.1", + "name": "topic", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Topics associated with the ResearchElementDefinition", + "code": "topic", + "base": [ "ResearchElementDefinition" ], + "type": "token", + "expression": "ResearchElementDefinition.topic", + "xpath": "f:ResearchElementDefinition/f:topic", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-url", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The uri that identifies the research element definition", + "code": "url", + "base": [ "ResearchElementDefinition" ], + "type": "uri", + "expression": "ResearchElementDefinition.url", + "xpath": "f:ResearchElementDefinition/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-version", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The business version of the research element definition", + "code": "version", + "base": [ "ResearchElementDefinition" ], + "type": "token", + "expression": "ResearchElementDefinition.version", + "xpath": "f:ResearchElementDefinition/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the research element definition", + "code": "context-type-quantity", + "base": [ "ResearchElementDefinition" ], + "type": "composite", + "expression": "ResearchElementDefinition.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchElementDefinition-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the research element definition", + "code": "context-type-value", + "base": [ "ResearchElementDefinition" ], + "type": "composite", + "expression": "ResearchElementDefinition.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchStudy-category", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchStudy-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchStudy-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Classifications for the study", + "code": "category", + "base": [ "ResearchStudy" ], + "type": "token", + "expression": "ResearchStudy.category", + "xpath": "f:ResearchStudy/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchStudy-date", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchStudy-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchStudy-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "When the study began and ended", + "code": "date", + "base": [ "ResearchStudy" ], + "type": "date", + "expression": "ResearchStudy.period", + "xpath": "f:ResearchStudy/f:period", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchStudy-focus", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchStudy-focus", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchStudy-focus", + "version": "4.0.1", + "name": "focus", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Drugs, devices, etc. under study", + "code": "focus", + "base": [ "ResearchStudy" ], + "type": "token", + "expression": "ResearchStudy.focus", + "xpath": "f:ResearchStudy/f:focus", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchStudy-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchStudy-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchStudy-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Business Identifier for study", + "code": "identifier", + "base": [ "ResearchStudy" ], + "type": "token", + "expression": "ResearchStudy.identifier", + "xpath": "f:ResearchStudy/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchStudy-keyword", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchStudy-keyword", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchStudy-keyword", + "version": "4.0.1", + "name": "keyword", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Used to search for the study", + "code": "keyword", + "base": [ "ResearchStudy" ], + "type": "token", + "expression": "ResearchStudy.keyword", + "xpath": "f:ResearchStudy/f:keyword", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchStudy-location", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchStudy-location", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchStudy-location", + "version": "4.0.1", + "name": "location", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Geographic region(s) for study", + "code": "location", + "base": [ "ResearchStudy" ], + "type": "token", + "expression": "ResearchStudy.location", + "xpath": "f:ResearchStudy/f:location", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchStudy-partof", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchStudy-partof", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchStudy-partof", + "version": "4.0.1", + "name": "partof", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Part of larger study", + "code": "partof", + "base": [ "ResearchStudy" ], + "type": "reference", + "expression": "ResearchStudy.partOf", + "xpath": "f:ResearchStudy/f:partOf", + "xpathUsage": "normal", + "target": [ "ResearchStudy" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchStudy-principalinvestigator", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchStudy-principalinvestigator", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchStudy-principalinvestigator", + "version": "4.0.1", + "name": "principalinvestigator", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Researcher who oversees multiple aspects of the study", + "code": "principalinvestigator", + "base": [ "ResearchStudy" ], + "type": "reference", + "expression": "ResearchStudy.principalInvestigator", + "xpath": "f:ResearchStudy/f:principalInvestigator", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchStudy-protocol", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchStudy-protocol", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchStudy-protocol", + "version": "4.0.1", + "name": "protocol", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Steps followed in executing study", + "code": "protocol", + "base": [ "ResearchStudy" ], + "type": "reference", + "expression": "ResearchStudy.protocol", + "xpath": "f:ResearchStudy/f:protocol", + "xpathUsage": "normal", + "target": [ "PlanDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchStudy-site", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchStudy-site", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchStudy-site", + "version": "4.0.1", + "name": "site", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Facility where study activities are conducted", + "code": "site", + "base": [ "ResearchStudy" ], + "type": "reference", + "expression": "ResearchStudy.site", + "xpath": "f:ResearchStudy/f:site", + "xpathUsage": "normal", + "target": [ "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchStudy-sponsor", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchStudy-sponsor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchStudy-sponsor", + "version": "4.0.1", + "name": "sponsor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Organization that initiates and is legally responsible for the study", + "code": "sponsor", + "base": [ "ResearchStudy" ], + "type": "reference", + "expression": "ResearchStudy.sponsor", + "xpath": "f:ResearchStudy/f:sponsor", + "xpathUsage": "normal", + "target": [ "Organization" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchStudy-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchStudy-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchStudy-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "active | administratively-completed | approved | closed-to-accrual | closed-to-accrual-and-intervention | completed | disapproved | in-review | temporarily-closed-to-accrual | temporarily-closed-to-accrual-and-intervention | withdrawn", + "code": "status", + "base": [ "ResearchStudy" ], + "type": "token", + "expression": "ResearchStudy.status", + "xpath": "f:ResearchStudy/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchStudy-title", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchStudy-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchStudy-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Name for this study", + "code": "title", + "base": [ "ResearchStudy" ], + "type": "string", + "expression": "ResearchStudy.title", + "xpath": "f:ResearchStudy/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchSubject-date", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchSubject-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchSubject-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Start and end of participation", + "code": "date", + "base": [ "ResearchSubject" ], + "type": "date", + "expression": "ResearchSubject.period", + "xpath": "f:ResearchSubject/f:period", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchSubject-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchSubject-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchSubject-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Business Identifier for research subject in a study", + "code": "identifier", + "base": [ "ResearchSubject" ], + "type": "token", + "expression": "ResearchSubject.identifier", + "xpath": "f:ResearchSubject/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchSubject-individual", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchSubject-individual", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchSubject-individual", + "version": "4.0.1", + "name": "individual", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Who is part of study", + "code": "individual", + "base": [ "ResearchSubject" ], + "type": "reference", + "expression": "ResearchSubject.individual", + "xpath": "f:ResearchSubject/f:individual", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchSubject-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchSubject-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchSubject-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Who is part of study", + "code": "patient", + "base": [ "ResearchSubject" ], + "type": "reference", + "expression": "ResearchSubject.individual", + "xpath": "f:ResearchSubject/f:individual", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchSubject-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchSubject-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchSubject-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "candidate | eligible | follow-up | ineligible | not-registered | off-study | on-study | on-study-intervention | on-study-observation | pending-on-study | potential-candidate | screening | withdrawn", + "code": "status", + "base": [ "ResearchSubject" ], + "type": "token", + "expression": "ResearchSubject.status", + "xpath": "f:ResearchSubject/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ResearchSubject-study", + "resource": { + "resourceType": "SearchParameter", + "id": "ResearchSubject-study", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ResearchSubject-study", + "version": "4.0.1", + "name": "study", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "Study subject is part of", + "code": "study", + "base": [ "ResearchSubject" ], + "type": "reference", + "expression": "ResearchSubject.study", + "xpath": "f:ResearchSubject/f:study", + "xpathUsage": "normal", + "target": [ "ResearchStudy" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskAssessment-condition", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskAssessment-condition", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskAssessment-condition", + "version": "4.0.1", + "name": "condition", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Condition assessed", + "code": "condition", + "base": [ "RiskAssessment" ], + "type": "reference", + "expression": "RiskAssessment.condition", + "xpath": "f:RiskAssessment/f:condition", + "xpathUsage": "normal", + "target": [ "Condition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskAssessment-method", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskAssessment-method", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskAssessment-method", + "version": "4.0.1", + "name": "method", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Evaluation mechanism", + "code": "method", + "base": [ "RiskAssessment" ], + "type": "token", + "expression": "RiskAssessment.method", + "xpath": "f:RiskAssessment/f:method", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskAssessment-performer", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskAssessment-performer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskAssessment-performer", + "version": "4.0.1", + "name": "performer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Who did assessment?", + "code": "performer", + "base": [ "RiskAssessment" ], + "type": "reference", + "expression": "RiskAssessment.performer", + "xpath": "f:RiskAssessment/f:performer", + "xpathUsage": "normal", + "target": [ "Practitioner", "Device", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskAssessment-probability", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskAssessment-probability", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskAssessment-probability", + "version": "4.0.1", + "name": "probability", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Likelihood of specified outcome", + "code": "probability", + "base": [ "RiskAssessment" ], + "type": "number", + "expression": "RiskAssessment.prediction.probability", + "xpath": "f:RiskAssessment/f:prediction/f:probabilityDecimal | f:RiskAssessment/f:prediction/f:probabilityRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskAssessment-risk", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskAssessment-risk", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskAssessment-risk", + "version": "4.0.1", + "name": "risk", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Likelihood of specified outcome as a qualitative value", + "code": "risk", + "base": [ "RiskAssessment" ], + "type": "token", + "expression": "RiskAssessment.prediction.qualitativeRisk", + "xpath": "f:RiskAssessment/f:prediction/f:qualitativeRisk", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskAssessment-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskAssessment-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskAssessment-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Who/what does assessment apply to?", + "code": "subject", + "base": [ "RiskAssessment" ], + "type": "reference", + "expression": "RiskAssessment.subject", + "xpath": "f:RiskAssessment/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context assigned to the risk evidence synthesis", + "code": "context", + "base": [ "RiskEvidenceSynthesis" ], + "type": "token", + "expression": "(RiskEvidenceSynthesis.useContext.value as CodeableConcept)", + "xpath": "f:RiskEvidenceSynthesis/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the risk evidence synthesis", + "code": "context-quantity", + "base": [ "RiskEvidenceSynthesis" ], + "type": "quantity", + "expression": "(RiskEvidenceSynthesis.useContext.value as Quantity) | (RiskEvidenceSynthesis.useContext.value as Range)", + "xpath": "f:RiskEvidenceSynthesis/f:useContext/f:valueQuantity | f:RiskEvidenceSynthesis/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the risk evidence synthesis", + "code": "context-type", + "base": [ "RiskEvidenceSynthesis" ], + "type": "token", + "expression": "RiskEvidenceSynthesis.useContext.code", + "xpath": "f:RiskEvidenceSynthesis/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-date", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The risk evidence synthesis publication date", + "code": "date", + "base": [ "RiskEvidenceSynthesis" ], + "type": "date", + "expression": "RiskEvidenceSynthesis.date", + "xpath": "f:RiskEvidenceSynthesis/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-description", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The description of the risk evidence synthesis", + "code": "description", + "base": [ "RiskEvidenceSynthesis" ], + "type": "string", + "expression": "RiskEvidenceSynthesis.description", + "xpath": "f:RiskEvidenceSynthesis/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-effective", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-effective", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-effective", + "version": "4.0.1", + "name": "effective", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The time during which the risk evidence synthesis is intended to be in use", + "code": "effective", + "base": [ "RiskEvidenceSynthesis" ], + "type": "date", + "expression": "RiskEvidenceSynthesis.effectivePeriod", + "xpath": "f:RiskEvidenceSynthesis/f:effectivePeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "External identifier for the risk evidence synthesis", + "code": "identifier", + "base": [ "RiskEvidenceSynthesis" ], + "type": "token", + "expression": "RiskEvidenceSynthesis.identifier", + "xpath": "f:RiskEvidenceSynthesis/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the risk evidence synthesis", + "code": "jurisdiction", + "base": [ "RiskEvidenceSynthesis" ], + "type": "token", + "expression": "RiskEvidenceSynthesis.jurisdiction", + "xpath": "f:RiskEvidenceSynthesis/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-name", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the risk evidence synthesis", + "code": "name", + "base": [ "RiskEvidenceSynthesis" ], + "type": "string", + "expression": "RiskEvidenceSynthesis.name", + "xpath": "f:RiskEvidenceSynthesis/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "Name of the publisher of the risk evidence synthesis", + "code": "publisher", + "base": [ "RiskEvidenceSynthesis" ], + "type": "string", + "expression": "RiskEvidenceSynthesis.publisher", + "xpath": "f:RiskEvidenceSynthesis/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-status", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The current status of the risk evidence synthesis", + "code": "status", + "base": [ "RiskEvidenceSynthesis" ], + "type": "token", + "expression": "RiskEvidenceSynthesis.status", + "xpath": "f:RiskEvidenceSynthesis/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-title", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The human-friendly name of the risk evidence synthesis", + "code": "title", + "base": [ "RiskEvidenceSynthesis" ], + "type": "string", + "expression": "RiskEvidenceSynthesis.title", + "xpath": "f:RiskEvidenceSynthesis/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-url", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The uri that identifies the risk evidence synthesis", + "code": "url", + "base": [ "RiskEvidenceSynthesis" ], + "type": "uri", + "expression": "RiskEvidenceSynthesis.url", + "xpath": "f:RiskEvidenceSynthesis/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-version", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "The business version of the risk evidence synthesis", + "code": "version", + "base": [ "RiskEvidenceSynthesis" ], + "type": "token", + "expression": "RiskEvidenceSynthesis.version", + "xpath": "f:RiskEvidenceSynthesis/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the risk evidence synthesis", + "code": "context-type-quantity", + "base": [ "RiskEvidenceSynthesis" ], + "type": "composite", + "expression": "RiskEvidenceSynthesis.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "RiskEvidenceSynthesis-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Clinical Decision Support)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the risk evidence synthesis", + "code": "context-type-value", + "base": [ "RiskEvidenceSynthesis" ], + "type": "composite", + "expression": "RiskEvidenceSynthesis.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Schedule-active", + "resource": { + "resourceType": "SearchParameter", + "id": "Schedule-active", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Schedule-active", + "version": "4.0.1", + "name": "active", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Is the schedule in active use", + "code": "active", + "base": [ "Schedule" ], + "type": "token", + "expression": "Schedule.active", + "xpath": "f:Schedule/f:active", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Schedule-actor", + "resource": { + "resourceType": "SearchParameter", + "id": "Schedule-actor", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Schedule-actor", + "version": "4.0.1", + "name": "actor", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The individual(HealthcareService, Practitioner, Location, ...) to find a Schedule for", + "code": "actor", + "base": [ "Schedule" ], + "type": "reference", + "expression": "Schedule.actor", + "xpath": "f:Schedule/f:actor", + "xpathUsage": "normal", + "target": [ "Practitioner", "Device", "Patient", "HealthcareService", "PractitionerRole", "RelatedPerson", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Schedule-date", + "resource": { + "resourceType": "SearchParameter", + "id": "Schedule-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Schedule-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Search for Schedule resources that have a period that contains this date specified", + "code": "date", + "base": [ "Schedule" ], + "type": "date", + "expression": "Schedule.planningHorizon", + "xpath": "f:Schedule/f:planningHorizon", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Schedule-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Schedule-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Schedule-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A Schedule Identifier", + "code": "identifier", + "base": [ "Schedule" ], + "type": "token", + "expression": "Schedule.identifier", + "xpath": "f:Schedule/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Schedule-service-category", + "resource": { + "resourceType": "SearchParameter", + "id": "Schedule-service-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Schedule-service-category", + "version": "4.0.1", + "name": "service-category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "High-level category", + "code": "service-category", + "base": [ "Schedule" ], + "type": "token", + "expression": "Schedule.serviceCategory", + "xpath": "f:Schedule/f:serviceCategory", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Schedule-service-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Schedule-service-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Schedule-service-type", + "version": "4.0.1", + "name": "service-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The type of appointments that can be booked into associated slot(s)", + "code": "service-type", + "base": [ "Schedule" ], + "type": "token", + "expression": "Schedule.serviceType", + "xpath": "f:Schedule/f:serviceType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Schedule-specialty", + "resource": { + "resourceType": "SearchParameter", + "id": "Schedule-specialty", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Schedule-specialty", + "version": "4.0.1", + "name": "specialty", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Type of specialty needed", + "code": "specialty", + "base": [ "Schedule" ], + "type": "token", + "expression": "Schedule.specialty", + "xpath": "f:Schedule/f:specialty", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SearchParameter-base", + "resource": { + "resourceType": "SearchParameter", + "id": "SearchParameter-base", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SearchParameter-base", + "version": "4.0.1", + "name": "base", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The resource type(s) this search parameter applies to", + "code": "base", + "base": [ "SearchParameter" ], + "type": "token", + "expression": "SearchParameter.base", + "xpath": "f:SearchParameter/f:base", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SearchParameter-code", + "resource": { + "resourceType": "SearchParameter", + "id": "SearchParameter-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SearchParameter-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Code used in URL", + "code": "code", + "base": [ "SearchParameter" ], + "type": "token", + "expression": "SearchParameter.code", + "xpath": "f:SearchParameter/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SearchParameter-component", + "resource": { + "resourceType": "SearchParameter", + "id": "SearchParameter-component", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SearchParameter-component", + "version": "4.0.1", + "name": "component", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Defines how the part works", + "code": "component", + "base": [ "SearchParameter" ], + "type": "reference", + "expression": "SearchParameter.component.definition", + "xpath": "f:SearchParameter/f:component/f:definition", + "xpathUsage": "normal", + "target": [ "SearchParameter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SearchParameter-derived-from", + "resource": { + "resourceType": "SearchParameter", + "id": "SearchParameter-derived-from", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SearchParameter-derived-from", + "version": "4.0.1", + "name": "derived-from", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Original definition for the search parameter", + "code": "derived-from", + "base": [ "SearchParameter" ], + "type": "reference", + "expression": "SearchParameter.derivedFrom", + "xpath": "f:SearchParameter/f:derivedFrom", + "xpathUsage": "normal", + "target": [ "SearchParameter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SearchParameter-target", + "resource": { + "resourceType": "SearchParameter", + "id": "SearchParameter-target", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SearchParameter-target", + "version": "4.0.1", + "name": "target", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Types of resource (if a resource reference)", + "code": "target", + "base": [ "SearchParameter" ], + "type": "token", + "expression": "SearchParameter.target", + "xpath": "f:SearchParameter/f:target", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SearchParameter-type", + "resource": { + "resourceType": "SearchParameter", + "id": "SearchParameter-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SearchParameter-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "number | date | string | token | reference | composite | quantity | uri | special", + "code": "type", + "base": [ "SearchParameter" ], + "type": "token", + "expression": "SearchParameter.type", + "xpath": "f:SearchParameter/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-authored", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-authored", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-authored", + "version": "4.0.1", + "name": "authored", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Date request signed", + "code": "authored", + "base": [ "ServiceRequest" ], + "type": "date", + "expression": "ServiceRequest.authoredOn", + "xpath": "f:ServiceRequest/f:authoredOn", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-based-on", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-based-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-based-on", + "version": "4.0.1", + "name": "based-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "What request fulfills", + "code": "based-on", + "base": [ "ServiceRequest" ], + "type": "reference", + "expression": "ServiceRequest.basedOn", + "xpath": "f:ServiceRequest/f:basedOn", + "xpathUsage": "normal", + "target": [ "CarePlan", "MedicationRequest", "ServiceRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-body-site", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-body-site", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-body-site", + "version": "4.0.1", + "name": "body-site", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Where procedure is going to be done", + "code": "body-site", + "base": [ "ServiceRequest" ], + "type": "token", + "expression": "ServiceRequest.bodySite", + "xpath": "f:ServiceRequest/f:bodySite", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-category", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Classification of service", + "code": "category", + "base": [ "ServiceRequest" ], + "type": "token", + "expression": "ServiceRequest.category", + "xpath": "f:ServiceRequest/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-instantiates-canonical", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-instantiates-canonical", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-instantiates-canonical", + "version": "4.0.1", + "name": "instantiates-canonical", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Instantiates FHIR protocol or definition", + "code": "instantiates-canonical", + "base": [ "ServiceRequest" ], + "type": "reference", + "expression": "ServiceRequest.instantiatesCanonical", + "xpath": "f:ServiceRequest/f:instantiatesCanonical", + "xpathUsage": "normal", + "target": [ "PlanDefinition", "ActivityDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-instantiates-uri", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-instantiates-uri", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-instantiates-uri", + "version": "4.0.1", + "name": "instantiates-uri", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Instantiates external protocol or definition", + "code": "instantiates-uri", + "base": [ "ServiceRequest" ], + "type": "uri", + "expression": "ServiceRequest.instantiatesUri", + "xpath": "f:ServiceRequest/f:instantiatesUri", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-intent", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-intent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-intent", + "version": "4.0.1", + "name": "intent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option", + "code": "intent", + "base": [ "ServiceRequest" ], + "type": "token", + "expression": "ServiceRequest.intent", + "xpath": "f:ServiceRequest/f:intent", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-occurrence", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-occurrence", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-occurrence", + "version": "4.0.1", + "name": "occurrence", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "When service should occur", + "code": "occurrence", + "base": [ "ServiceRequest" ], + "type": "date", + "expression": "ServiceRequest.occurrence", + "xpath": "f:ServiceRequest/f:occurrenceDateTime | f:ServiceRequest/f:occurrencePeriod | f:ServiceRequest/f:occurrenceTiming", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-performer", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-performer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-performer", + "version": "4.0.1", + "name": "performer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Requested performer", + "code": "performer", + "base": [ "ServiceRequest" ], + "type": "reference", + "expression": "ServiceRequest.performer", + "xpath": "f:ServiceRequest/f:performer", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "CareTeam", "Device", "Patient", "HealthcareService", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-performer-type", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-performer-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-performer-type", + "version": "4.0.1", + "name": "performer-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Performer role", + "code": "performer-type", + "base": [ "ServiceRequest" ], + "type": "token", + "expression": "ServiceRequest.performerType", + "xpath": "f:ServiceRequest/f:performerType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-priority", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-priority", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-priority", + "version": "4.0.1", + "name": "priority", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "routine | urgent | asap | stat", + "code": "priority", + "base": [ "ServiceRequest" ], + "type": "token", + "expression": "ServiceRequest.priority", + "xpath": "f:ServiceRequest/f:priority", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-replaces", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-replaces", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-replaces", + "version": "4.0.1", + "name": "replaces", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "What request replaces", + "code": "replaces", + "base": [ "ServiceRequest" ], + "type": "reference", + "expression": "ServiceRequest.replaces", + "xpath": "f:ServiceRequest/f:replaces", + "xpathUsage": "normal", + "target": [ "ServiceRequest" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-requester", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-requester", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-requester", + "version": "4.0.1", + "name": "requester", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Who/what is requesting service", + "code": "requester", + "base": [ "ServiceRequest" ], + "type": "reference", + "expression": "ServiceRequest.requester", + "xpath": "f:ServiceRequest/f:requester", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-requisition", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-requisition", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-requisition", + "version": "4.0.1", + "name": "requisition", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Composite Request ID", + "code": "requisition", + "base": [ "ServiceRequest" ], + "type": "token", + "expression": "ServiceRequest.requisition", + "xpath": "f:ServiceRequest/f:requisition", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-specimen", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-specimen", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-specimen", + "version": "4.0.1", + "name": "specimen", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Specimen to be tested", + "code": "specimen", + "base": [ "ServiceRequest" ], + "type": "reference", + "expression": "ServiceRequest.specimen", + "xpath": "f:ServiceRequest/f:specimen", + "xpathUsage": "normal", + "target": [ "Specimen" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-status", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "draft | active | on-hold | revoked | completed | entered-in-error | unknown", + "code": "status", + "base": [ "ServiceRequest" ], + "type": "token", + "expression": "ServiceRequest.status", + "xpath": "f:ServiceRequest/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ServiceRequest-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "ServiceRequest-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ServiceRequest-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by subject", + "code": "subject", + "base": [ "ServiceRequest" ], + "type": "reference", + "expression": "ServiceRequest.subject", + "xpath": "f:ServiceRequest/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Device", "Patient", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Slot-appointment-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Slot-appointment-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Slot-appointment-type", + "version": "4.0.1", + "name": "appointment-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The style of appointment or patient that may be booked in the slot (not service type)", + "code": "appointment-type", + "base": [ "Slot" ], + "type": "token", + "expression": "Slot.appointmentType", + "xpath": "f:Slot/f:appointmentType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Slot-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Slot-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Slot-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A Slot Identifier", + "code": "identifier", + "base": [ "Slot" ], + "type": "token", + "expression": "Slot.identifier", + "xpath": "f:Slot/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Slot-schedule", + "resource": { + "resourceType": "SearchParameter", + "id": "Slot-schedule", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Slot-schedule", + "version": "4.0.1", + "name": "schedule", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The Schedule Resource that we are seeking a slot within", + "code": "schedule", + "base": [ "Slot" ], + "type": "reference", + "expression": "Slot.schedule", + "xpath": "f:Slot/f:schedule", + "xpathUsage": "normal", + "target": [ "Schedule" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Slot-service-category", + "resource": { + "resourceType": "SearchParameter", + "id": "Slot-service-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Slot-service-category", + "version": "4.0.1", + "name": "service-category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A broad categorization of the service that is to be performed during this appointment", + "code": "service-category", + "base": [ "Slot" ], + "type": "token", + "expression": "Slot.serviceCategory", + "xpath": "f:Slot/f:serviceCategory", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Slot-service-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Slot-service-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Slot-service-type", + "version": "4.0.1", + "name": "service-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The type of appointments that can be booked into the slot", + "code": "service-type", + "base": [ "Slot" ], + "type": "token", + "expression": "Slot.serviceType", + "xpath": "f:Slot/f:serviceType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Slot-specialty", + "resource": { + "resourceType": "SearchParameter", + "id": "Slot-specialty", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Slot-specialty", + "version": "4.0.1", + "name": "specialty", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The specialty of a practitioner that would be required to perform the service requested in this appointment", + "code": "specialty", + "base": [ "Slot" ], + "type": "token", + "expression": "Slot.specialty", + "xpath": "f:Slot/f:specialty", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Slot-start", + "resource": { + "resourceType": "SearchParameter", + "id": "Slot-start", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Slot-start", + "version": "4.0.1", + "name": "start", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "Appointment date/time.", + "code": "start", + "base": [ "Slot" ], + "type": "date", + "expression": "Slot.start", + "xpath": "f:Slot/f:start", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Slot-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Slot-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Slot-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "The free/busy status of the appointment", + "code": "status", + "base": [ "Slot" ], + "type": "token", + "expression": "Slot.status", + "xpath": "f:Slot/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Specimen-accession", + "resource": { + "resourceType": "SearchParameter", + "id": "Specimen-accession", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Specimen-accession", + "version": "4.0.1", + "name": "accession", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The accession number associated with the specimen", + "code": "accession", + "base": [ "Specimen" ], + "type": "token", + "expression": "Specimen.accessionIdentifier", + "xpath": "f:Specimen/f:accessionIdentifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Specimen-bodysite", + "resource": { + "resourceType": "SearchParameter", + "id": "Specimen-bodysite", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Specimen-bodysite", + "version": "4.0.1", + "name": "bodysite", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The code for the body site from where the specimen originated", + "code": "bodysite", + "base": [ "Specimen" ], + "type": "token", + "expression": "Specimen.collection.bodySite", + "xpath": "f:Specimen/f:collection/f:bodySite", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Specimen-collected", + "resource": { + "resourceType": "SearchParameter", + "id": "Specimen-collected", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Specimen-collected", + "version": "4.0.1", + "name": "collected", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The date the specimen was collected", + "code": "collected", + "base": [ "Specimen" ], + "type": "date", + "expression": "Specimen.collection.collected", + "xpath": "f:Specimen/f:collection/f:collectedDateTime | f:Specimen/f:collection/f:collectedPeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Specimen-collector", + "resource": { + "resourceType": "SearchParameter", + "id": "Specimen-collector", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Specimen-collector", + "version": "4.0.1", + "name": "collector", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Who collected the specimen", + "code": "collector", + "base": [ "Specimen" ], + "type": "reference", + "expression": "Specimen.collection.collector", + "xpath": "f:Specimen/f:collection/f:collector", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Specimen-container", + "resource": { + "resourceType": "SearchParameter", + "id": "Specimen-container", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Specimen-container", + "version": "4.0.1", + "name": "container", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The kind of specimen container", + "code": "container", + "base": [ "Specimen" ], + "type": "token", + "expression": "Specimen.container.type", + "xpath": "f:Specimen/f:container/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Specimen-container-id", + "resource": { + "resourceType": "SearchParameter", + "id": "Specimen-container-id", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Specimen-container-id", + "version": "4.0.1", + "name": "container-id", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The unique identifier associated with the specimen container", + "code": "container-id", + "base": [ "Specimen" ], + "type": "token", + "expression": "Specimen.container.identifier", + "xpath": "f:Specimen/f:container/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Specimen-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Specimen-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Specimen-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The unique identifier associated with the specimen", + "code": "identifier", + "base": [ "Specimen" ], + "type": "token", + "expression": "Specimen.identifier", + "xpath": "f:Specimen/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Specimen-parent", + "resource": { + "resourceType": "SearchParameter", + "id": "Specimen-parent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Specimen-parent", + "version": "4.0.1", + "name": "parent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The parent of the specimen", + "code": "parent", + "base": [ "Specimen" ], + "type": "reference", + "expression": "Specimen.parent", + "xpath": "f:Specimen/f:parent", + "xpathUsage": "normal", + "target": [ "Specimen" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Specimen-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Specimen-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Specimen-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The patient the specimen comes from", + "code": "patient", + "base": [ "Specimen" ], + "type": "reference", + "expression": "Specimen.subject.where(resolve() is Patient)", + "xpath": "f:Specimen/f:subject", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Specimen-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Specimen-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Specimen-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "available | unavailable | unsatisfactory | entered-in-error", + "code": "status", + "base": [ "Specimen" ], + "type": "token", + "expression": "Specimen.status", + "xpath": "f:Specimen/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Specimen-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Specimen-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Specimen-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The subject of the specimen", + "code": "subject", + "base": [ "Specimen" ], + "type": "reference", + "expression": "Specimen.subject", + "xpath": "f:Specimen/f:subject", + "xpathUsage": "normal", + "target": [ "Group", "Device", "Patient", "Substance", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Specimen-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Specimen-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Specimen-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The specimen type", + "code": "type", + "base": [ "Specimen" ], + "type": "token", + "expression": "Specimen.type", + "xpath": "f:Specimen/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SpecimenDefinition-container", + "resource": { + "resourceType": "SearchParameter", + "id": "SpecimenDefinition-container", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SpecimenDefinition-container", + "version": "4.0.1", + "name": "container", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The type of specimen conditioned in container expected by the lab", + "code": "container", + "base": [ "SpecimenDefinition" ], + "type": "token", + "expression": "SpecimenDefinition.typeTested.container.type", + "xpath": "f:SpecimenDefinition/f:typeTested/f:container/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SpecimenDefinition-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "SpecimenDefinition-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SpecimenDefinition-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The unique identifier associated with the specimen", + "code": "identifier", + "base": [ "SpecimenDefinition" ], + "type": "token", + "expression": "SpecimenDefinition.identifier", + "xpath": "f:SpecimenDefinition/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SpecimenDefinition-type", + "resource": { + "resourceType": "SearchParameter", + "id": "SpecimenDefinition-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SpecimenDefinition-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The type of collected specimen", + "code": "type", + "base": [ "SpecimenDefinition" ], + "type": "token", + "expression": "SpecimenDefinition.typeCollected", + "xpath": "f:SpecimenDefinition/f:typeCollected", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/StructureDefinition-abstract", + "resource": { + "resourceType": "SearchParameter", + "id": "StructureDefinition-abstract", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/StructureDefinition-abstract", + "version": "4.0.1", + "name": "abstract", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Whether the structure is abstract", + "code": "abstract", + "base": [ "StructureDefinition" ], + "type": "token", + "expression": "StructureDefinition.abstract", + "xpath": "f:StructureDefinition/f:abstract", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/StructureDefinition-base", + "resource": { + "resourceType": "SearchParameter", + "id": "StructureDefinition-base", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/StructureDefinition-base", + "version": "4.0.1", + "name": "base", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Definition that this type is constrained/specialized from", + "code": "base", + "base": [ "StructureDefinition" ], + "type": "reference", + "expression": "StructureDefinition.baseDefinition", + "xpath": "f:StructureDefinition/f:baseDefinition", + "xpathUsage": "normal", + "target": [ "StructureDefinition" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/StructureDefinition-base-path", + "resource": { + "resourceType": "SearchParameter", + "id": "StructureDefinition-base-path", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/StructureDefinition-base-path", + "version": "4.0.1", + "name": "base-path", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Path that identifies the base element", + "code": "base-path", + "base": [ "StructureDefinition" ], + "type": "token", + "expression": "StructureDefinition.snapshot.element.base.path | StructureDefinition.differential.element.base.path", + "xpath": "f:StructureDefinition/f:snapshot/f:element/f:base/f:path | f:StructureDefinition/f:differential/f:element/f:base/f:path", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/StructureDefinition-derivation", + "resource": { + "resourceType": "SearchParameter", + "id": "StructureDefinition-derivation", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/StructureDefinition-derivation", + "version": "4.0.1", + "name": "derivation", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "specialization | constraint - How relates to base definition", + "code": "derivation", + "base": [ "StructureDefinition" ], + "type": "token", + "expression": "StructureDefinition.derivation", + "xpath": "f:StructureDefinition/f:derivation", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/StructureDefinition-experimental", + "resource": { + "resourceType": "SearchParameter", + "id": "StructureDefinition-experimental", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/StructureDefinition-experimental", + "version": "4.0.1", + "name": "experimental", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "For testing purposes, not real usage", + "code": "experimental", + "base": [ "StructureDefinition" ], + "type": "token", + "expression": "StructureDefinition.experimental", + "xpath": "f:StructureDefinition/f:experimental", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/StructureDefinition-ext-context", + "resource": { + "resourceType": "SearchParameter", + "id": "StructureDefinition-ext-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/StructureDefinition-ext-context", + "version": "4.0.1", + "name": "ext-context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The system is the URL for the context-type: e.g. http://hl7.org/fhir/extension-context-type#element|CodeableConcept.text", + "code": "ext-context", + "base": [ "StructureDefinition" ], + "type": "token", + "expression": "StructureDefinition.context.type", + "xpath": "f:StructureDefinition/f:context/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/StructureDefinition-keyword", + "resource": { + "resourceType": "SearchParameter", + "id": "StructureDefinition-keyword", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/StructureDefinition-keyword", + "version": "4.0.1", + "name": "keyword", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A code for the StructureDefinition", + "code": "keyword", + "base": [ "StructureDefinition" ], + "type": "token", + "expression": "StructureDefinition.keyword", + "xpath": "f:StructureDefinition/f:keyword", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/StructureDefinition-kind", + "resource": { + "resourceType": "SearchParameter", + "id": "StructureDefinition-kind", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/StructureDefinition-kind", + "version": "4.0.1", + "name": "kind", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "primitive-type | complex-type | resource | logical", + "code": "kind", + "base": [ "StructureDefinition" ], + "type": "token", + "expression": "StructureDefinition.kind", + "xpath": "f:StructureDefinition/f:kind", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/StructureDefinition-path", + "resource": { + "resourceType": "SearchParameter", + "id": "StructureDefinition-path", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/StructureDefinition-path", + "version": "4.0.1", + "name": "path", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A path that is constrained in the StructureDefinition", + "code": "path", + "base": [ "StructureDefinition" ], + "type": "token", + "expression": "StructureDefinition.snapshot.element.path | StructureDefinition.differential.element.path", + "xpath": "f:StructureDefinition/f:snapshot/f:element/f:path | f:StructureDefinition/f:differential/f:element/f:path", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/StructureDefinition-type", + "resource": { + "resourceType": "SearchParameter", + "id": "StructureDefinition-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/StructureDefinition-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Type defined or constrained by this structure", + "code": "type", + "base": [ "StructureDefinition" ], + "type": "uri", + "expression": "StructureDefinition.type", + "xpath": "f:StructureDefinition/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/StructureDefinition-valueset", + "resource": { + "resourceType": "SearchParameter", + "id": "StructureDefinition-valueset", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/StructureDefinition-valueset", + "version": "4.0.1", + "name": "valueset", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A vocabulary binding reference", + "code": "valueset", + "base": [ "StructureDefinition" ], + "type": "reference", + "expression": "StructureDefinition.snapshot.element.binding.valueSet", + "xpath": "f:StructureDefinition/f:snapshot/f:element/f:binding/f:valueSet", + "xpathUsage": "normal", + "target": [ "ValueSet" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Subscription-contact", + "resource": { + "resourceType": "SearchParameter", + "id": "Subscription-contact", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Subscription-contact", + "version": "4.0.1", + "name": "contact", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Contact details for the subscription", + "code": "contact", + "base": [ "Subscription" ], + "type": "token", + "expression": "Subscription.contact", + "xpath": "f:Subscription/f:contact", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Subscription-criteria", + "resource": { + "resourceType": "SearchParameter", + "id": "Subscription-criteria", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Subscription-criteria", + "version": "4.0.1", + "name": "criteria", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The search rules used to determine when to send a notification", + "code": "criteria", + "base": [ "Subscription" ], + "type": "string", + "expression": "Subscription.criteria", + "xpath": "f:Subscription/f:criteria", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Subscription-payload", + "resource": { + "resourceType": "SearchParameter", + "id": "Subscription-payload", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Subscription-payload", + "version": "4.0.1", + "name": "payload", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The mime-type of the notification payload", + "code": "payload", + "base": [ "Subscription" ], + "type": "token", + "expression": "Subscription.channel.payload", + "xpath": "f:Subscription/f:channel/f:payload", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Subscription-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Subscription-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Subscription-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The current state of the subscription", + "code": "status", + "base": [ "Subscription" ], + "type": "token", + "expression": "Subscription.status", + "xpath": "f:Subscription/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Subscription-type", + "resource": { + "resourceType": "SearchParameter", + "id": "Subscription-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Subscription-type", + "version": "4.0.1", + "name": "type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The type of channel for the sent notifications", + "code": "type", + "base": [ "Subscription" ], + "type": "token", + "expression": "Subscription.channel.type", + "xpath": "f:Subscription/f:channel/f:type", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Subscription-url", + "resource": { + "resourceType": "SearchParameter", + "id": "Subscription-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Subscription-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The uri that will receive the notifications", + "code": "url", + "base": [ "Subscription" ], + "type": "uri", + "expression": "Subscription.channel.endpoint", + "xpath": "f:Subscription/f:channel/f:endpoint", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Substance-category", + "resource": { + "resourceType": "SearchParameter", + "id": "Substance-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Substance-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The category of the substance", + "code": "category", + "base": [ "Substance" ], + "type": "token", + "expression": "Substance.category", + "xpath": "f:Substance/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Substance-code", + "resource": { + "resourceType": "SearchParameter", + "id": "Substance-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Substance-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The code of the substance or ingredient", + "code": "code", + "base": [ "Substance" ], + "type": "token", + "expression": "Substance.code | (Substance.ingredient.substance as CodeableConcept)", + "xpath": "f:Substance/f:code | f:Substance/f:ingredient/f:substanceCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Substance-container-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Substance-container-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Substance-container-identifier", + "version": "4.0.1", + "name": "container-identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Identifier of the package/container", + "code": "container-identifier", + "base": [ "Substance" ], + "type": "token", + "expression": "Substance.instance.identifier", + "xpath": "f:Substance/f:instance/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Substance-expiry", + "resource": { + "resourceType": "SearchParameter", + "id": "Substance-expiry", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Substance-expiry", + "version": "4.0.1", + "name": "expiry", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Expiry date of package or container of substance", + "code": "expiry", + "base": [ "Substance" ], + "type": "date", + "expression": "Substance.instance.expiry", + "xpath": "f:Substance/f:instance/f:expiry", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Substance-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Substance-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Substance-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Unique identifier for the substance", + "code": "identifier", + "base": [ "Substance" ], + "type": "token", + "expression": "Substance.identifier", + "xpath": "f:Substance/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Substance-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "Substance-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Substance-quantity", + "version": "4.0.1", + "name": "quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Amount of substance in the package", + "code": "quantity", + "base": [ "Substance" ], + "type": "quantity", + "expression": "Substance.instance.quantity", + "xpath": "f:Substance/f:instance/f:quantity", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Substance-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Substance-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Substance-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "active | inactive | entered-in-error", + "code": "status", + "base": [ "Substance" ], + "type": "token", + "expression": "Substance.status", + "xpath": "f:Substance/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Substance-substance-reference", + "resource": { + "resourceType": "SearchParameter", + "id": "Substance-substance-reference", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Substance-substance-reference", + "version": "4.0.1", + "name": "substance-reference", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "A component of the substance", + "code": "substance-reference", + "base": [ "Substance" ], + "type": "reference", + "expression": "(Substance.ingredient.substance as Reference)", + "xpath": "f:Substance/f:ingredient/f:substanceReference", + "xpathUsage": "normal", + "target": [ "Substance" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SubstanceSpecification-code", + "resource": { + "resourceType": "SearchParameter", + "id": "SubstanceSpecification-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SubstanceSpecification-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Biomedical Research and Regulation)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/rcrim/index.cfm" + } ] + } ], + "description": "The specific code", + "code": "code", + "base": [ "SubstanceSpecification" ], + "type": "token", + "expression": "SubstanceSpecification.code.code", + "xpath": "f:SubstanceSpecification/f:code/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SupplyDelivery-receiver", + "resource": { + "resourceType": "SearchParameter", + "id": "SupplyDelivery-receiver", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SupplyDelivery-receiver", + "version": "4.0.1", + "name": "receiver", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Who collected the Supply", + "code": "receiver", + "base": [ "SupplyDelivery" ], + "type": "reference", + "expression": "SupplyDelivery.receiver", + "xpath": "f:SupplyDelivery/f:receiver", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SupplyDelivery-status", + "resource": { + "resourceType": "SearchParameter", + "id": "SupplyDelivery-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SupplyDelivery-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "in-progress | completed | abandoned | entered-in-error", + "code": "status", + "base": [ "SupplyDelivery" ], + "type": "token", + "expression": "SupplyDelivery.status", + "xpath": "f:SupplyDelivery/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SupplyDelivery-supplier", + "resource": { + "resourceType": "SearchParameter", + "id": "SupplyDelivery-supplier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SupplyDelivery-supplier", + "version": "4.0.1", + "name": "supplier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Dispenser", + "code": "supplier", + "base": [ "SupplyDelivery" ], + "type": "reference", + "expression": "SupplyDelivery.supplier", + "xpath": "f:SupplyDelivery/f:supplier", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SupplyRequest-category", + "resource": { + "resourceType": "SearchParameter", + "id": "SupplyRequest-category", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SupplyRequest-category", + "version": "4.0.1", + "name": "category", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The kind of supply (central, non-stock, etc.)", + "code": "category", + "base": [ "SupplyRequest" ], + "type": "token", + "expression": "SupplyRequest.category", + "xpath": "f:SupplyRequest/f:category", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SupplyRequest-requester", + "resource": { + "resourceType": "SearchParameter", + "id": "SupplyRequest-requester", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SupplyRequest-requester", + "version": "4.0.1", + "name": "requester", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Individual making the request", + "code": "requester", + "base": [ "SupplyRequest" ], + "type": "reference", + "expression": "SupplyRequest.requester", + "xpath": "f:SupplyRequest/f:requester", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SupplyRequest-status", + "resource": { + "resourceType": "SearchParameter", + "id": "SupplyRequest-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SupplyRequest-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "draft | active | suspended +", + "code": "status", + "base": [ "SupplyRequest" ], + "type": "token", + "expression": "SupplyRequest.status", + "xpath": "f:SupplyRequest/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SupplyRequest-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "SupplyRequest-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SupplyRequest-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "The destination of the supply", + "code": "subject", + "base": [ "SupplyRequest" ], + "type": "reference", + "expression": "SupplyRequest.deliverTo", + "xpath": "f:SupplyRequest/f:deliverTo", + "xpathUsage": "normal", + "target": [ "Organization", "Patient", "Location" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/SupplyRequest-supplier", + "resource": { + "resourceType": "SearchParameter", + "id": "SupplyRequest-supplier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/SupplyRequest-supplier", + "version": "4.0.1", + "name": "supplier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Who is intended to fulfill the request", + "code": "supplier", + "base": [ "SupplyRequest" ], + "type": "reference", + "expression": "SupplyRequest.supplier", + "xpath": "f:SupplyRequest/f:supplier", + "xpathUsage": "normal", + "target": [ "Organization", "HealthcareService" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-authored-on", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-authored-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-authored-on", + "version": "4.0.1", + "name": "authored-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by creation date", + "code": "authored-on", + "base": [ "Task" ], + "type": "date", + "expression": "Task.authoredOn", + "xpath": "f:Task/f:authoredOn", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-based-on", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-based-on", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-based-on", + "version": "4.0.1", + "name": "based-on", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by requests this task is based on", + "code": "based-on", + "base": [ "Task" ], + "type": "reference", + "expression": "Task.basedOn", + "xpath": "f:Task/f:basedOn", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-business-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-business-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-business-status", + "version": "4.0.1", + "name": "business-status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by business status", + "code": "business-status", + "base": [ "Task" ], + "type": "token", + "expression": "Task.businessStatus", + "xpath": "f:Task/f:businessStatus", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-code", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by task code", + "code": "code", + "base": [ "Task" ], + "type": "token", + "expression": "Task.code", + "xpath": "f:Task/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-encounter", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-encounter", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-encounter", + "version": "4.0.1", + "name": "encounter", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by encounter", + "code": "encounter", + "base": [ "Task" ], + "type": "reference", + "expression": "Task.encounter", + "xpath": "f:Task/f:encounter", + "xpathUsage": "normal", + "target": [ "Encounter" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-focus", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-focus", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-focus", + "version": "4.0.1", + "name": "focus", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by task focus", + "code": "focus", + "base": [ "Task" ], + "type": "reference", + "expression": "Task.focus", + "xpath": "f:Task/f:focus", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-group-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-group-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-group-identifier", + "version": "4.0.1", + "name": "group-identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by group identifier", + "code": "group-identifier", + "base": [ "Task" ], + "type": "token", + "expression": "Task.groupIdentifier", + "xpath": "f:Task/f:groupIdentifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search for a task instance by its business identifier", + "code": "identifier", + "base": [ "Task" ], + "type": "token", + "expression": "Task.identifier", + "xpath": "f:Task/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-intent", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-intent", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-intent", + "version": "4.0.1", + "name": "intent", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by task intent", + "code": "intent", + "base": [ "Task" ], + "type": "token", + "expression": "Task.intent", + "xpath": "f:Task/f:intent", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-modified", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-modified", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-modified", + "version": "4.0.1", + "name": "modified", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by last modification date", + "code": "modified", + "base": [ "Task" ], + "type": "date", + "expression": "Task.lastModified", + "xpath": "f:Task/f:lastModified", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-owner", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-owner", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-owner", + "version": "4.0.1", + "name": "owner", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by task owner", + "code": "owner", + "base": [ "Task" ], + "type": "reference", + "expression": "Task.owner", + "xpath": "f:Task/f:owner", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "CareTeam", "Device", "Patient", "HealthcareService", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-part-of", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-part-of", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-part-of", + "version": "4.0.1", + "name": "part-of", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by task this task is part of", + "code": "part-of", + "base": [ "Task" ], + "type": "reference", + "expression": "Task.partOf", + "xpath": "f:Task/f:partOf", + "xpathUsage": "normal", + "target": [ "Task" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-patient", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-patient", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-patient", + "version": "4.0.1", + "name": "patient", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by patient", + "code": "patient", + "base": [ "Task" ], + "type": "reference", + "expression": "Task.for.where(resolve() is Patient)", + "xpath": "f:Task/f:for", + "xpathUsage": "normal", + "target": [ "Patient" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-performer", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-performer", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-performer", + "version": "4.0.1", + "name": "performer", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by recommended type of performer (e.g., Requester, Performer, Scheduler).", + "code": "performer", + "base": [ "Task" ], + "type": "token", + "expression": "Task.performerType", + "xpath": "f:Task/f:performerType", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-period", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-period", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-period", + "version": "4.0.1", + "name": "period", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by period Task is/was underway", + "code": "period", + "base": [ "Task" ], + "type": "date", + "expression": "Task.executionPeriod", + "xpath": "f:Task/f:executionPeriod", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-priority", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-priority", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-priority", + "version": "4.0.1", + "name": "priority", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by task priority", + "code": "priority", + "base": [ "Task" ], + "type": "token", + "expression": "Task.priority", + "xpath": "f:Task/f:priority", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-requester", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-requester", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-requester", + "version": "4.0.1", + "name": "requester", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by task requester", + "code": "requester", + "base": [ "Task" ], + "type": "reference", + "expression": "Task.requester", + "xpath": "f:Task/f:requester", + "xpathUsage": "normal", + "target": [ "Practitioner", "Organization", "Device", "Patient", "PractitionerRole", "RelatedPerson" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-status", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by task status", + "code": "status", + "base": [ "Task" ], + "type": "token", + "expression": "Task.status", + "xpath": "f:Task/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/Task-subject", + "resource": { + "resourceType": "SearchParameter", + "id": "Task-subject", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/Task-subject", + "version": "4.0.1", + "name": "subject", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Orders and Observations)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/orders/index.cfm" + } ] + } ], + "description": "Search by subject", + "code": "subject", + "base": [ "Task" ], + "type": "reference", + "expression": "Task.for", + "xpath": "f:Task/f:for", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestReport-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "TestReport-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestReport-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "An external identifier for the test report", + "code": "identifier", + "base": [ "TestReport" ], + "type": "token", + "expression": "TestReport.identifier", + "xpath": "f:TestReport/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestReport-issued", + "resource": { + "resourceType": "SearchParameter", + "id": "TestReport-issued", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestReport-issued", + "version": "4.0.1", + "name": "issued", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The test report generation date", + "code": "issued", + "base": [ "TestReport" ], + "type": "date", + "expression": "TestReport.issued", + "xpath": "f:TestReport/f:issued", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestReport-participant", + "resource": { + "resourceType": "SearchParameter", + "id": "TestReport-participant", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestReport-participant", + "version": "4.0.1", + "name": "participant", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The reference to a participant in the test execution", + "code": "participant", + "base": [ "TestReport" ], + "type": "uri", + "expression": "TestReport.participant.uri", + "xpath": "f:TestReport/f:participant/f:uri", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestReport-result", + "resource": { + "resourceType": "SearchParameter", + "id": "TestReport-result", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestReport-result", + "version": "4.0.1", + "name": "result", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The result disposition of the test execution", + "code": "result", + "base": [ "TestReport" ], + "type": "token", + "expression": "TestReport.result", + "xpath": "f:TestReport/f:result", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestReport-tester", + "resource": { + "resourceType": "SearchParameter", + "id": "TestReport-tester", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestReport-tester", + "version": "4.0.1", + "name": "tester", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The name of the testing organization", + "code": "tester", + "base": [ "TestReport" ], + "type": "string", + "expression": "TestReport.tester", + "xpath": "f:TestReport/f:tester", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestReport-testscript", + "resource": { + "resourceType": "SearchParameter", + "id": "TestReport-testscript", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestReport-testscript", + "version": "4.0.1", + "name": "testscript", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The test script executed to produce this report", + "code": "testscript", + "base": [ "TestReport" ], + "type": "reference", + "expression": "TestReport.testScript", + "xpath": "f:TestReport/f:testScript", + "xpathUsage": "normal", + "target": [ "TestScript" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-context", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-context", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-context", + "version": "4.0.1", + "name": "context", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A use context assigned to the test script", + "code": "context", + "base": [ "TestScript" ], + "type": "token", + "expression": "(TestScript.useContext.value as CodeableConcept)", + "xpath": "f:TestScript/f:useContext/f:valueCodeableConcept", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-context-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-context-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-context-quantity", + "version": "4.0.1", + "name": "context-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A quantity- or range-valued use context assigned to the test script", + "code": "context-quantity", + "base": [ "TestScript" ], + "type": "quantity", + "expression": "(TestScript.useContext.value as Quantity) | (TestScript.useContext.value as Range)", + "xpath": "f:TestScript/f:useContext/f:valueQuantity | f:TestScript/f:useContext/f:valueRange", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-context-type", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-context-type", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-context-type", + "version": "4.0.1", + "name": "context-type", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A type of use context assigned to the test script", + "code": "context-type", + "base": [ "TestScript" ], + "type": "token", + "expression": "TestScript.useContext.code", + "xpath": "f:TestScript/f:useContext/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-date", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-date", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-date", + "version": "4.0.1", + "name": "date", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The test script publication date", + "code": "date", + "base": [ "TestScript" ], + "type": "date", + "expression": "TestScript.date", + "xpath": "f:TestScript/f:date", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-description", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-description", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-description", + "version": "4.0.1", + "name": "description", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The description of the test script", + "code": "description", + "base": [ "TestScript" ], + "type": "string", + "expression": "TestScript.description", + "xpath": "f:TestScript/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-identifier", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-identifier", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-identifier", + "version": "4.0.1", + "name": "identifier", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "External identifier for the test script", + "code": "identifier", + "base": [ "TestScript" ], + "type": "token", + "expression": "TestScript.identifier", + "xpath": "f:TestScript/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-jurisdiction", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-jurisdiction", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-jurisdiction", + "version": "4.0.1", + "name": "jurisdiction", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Intended jurisdiction for the test script", + "code": "jurisdiction", + "base": [ "TestScript" ], + "type": "token", + "expression": "TestScript.jurisdiction", + "xpath": "f:TestScript/f:jurisdiction", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-name", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-name", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-name", + "version": "4.0.1", + "name": "name", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Computationally friendly name of the test script", + "code": "name", + "base": [ "TestScript" ], + "type": "string", + "expression": "TestScript.name", + "xpath": "f:TestScript/f:name", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-publisher", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-publisher", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-publisher", + "version": "4.0.1", + "name": "publisher", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "Name of the publisher of the test script", + "code": "publisher", + "base": [ "TestScript" ], + "type": "string", + "expression": "TestScript.publisher", + "xpath": "f:TestScript/f:publisher", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-status", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The current status of the test script", + "code": "status", + "base": [ "TestScript" ], + "type": "token", + "expression": "TestScript.status", + "xpath": "f:TestScript/f:status", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-testscript-capability", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-testscript-capability", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-testscript-capability", + "version": "4.0.1", + "name": "testscript-capability", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "TestScript required and validated capability", + "code": "testscript-capability", + "base": [ "TestScript" ], + "type": "string", + "expression": "TestScript.metadata.capability.description", + "xpath": "f:TestScript/f:metadata/f:capability/f:description", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-title", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-title", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-title", + "version": "4.0.1", + "name": "title", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The human-friendly name of the test script", + "code": "title", + "base": [ "TestScript" ], + "type": "string", + "expression": "TestScript.title", + "xpath": "f:TestScript/f:title", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-url", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-url", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-url", + "version": "4.0.1", + "name": "url", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The uri that identifies the test script", + "code": "url", + "base": [ "TestScript" ], + "type": "uri", + "expression": "TestScript.url", + "xpath": "f:TestScript/f:url", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-version", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-version", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-version", + "version": "4.0.1", + "name": "version", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "The business version of the test script", + "code": "version", + "base": [ "TestScript" ], + "type": "token", + "expression": "TestScript.version", + "xpath": "f:TestScript/f:version", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-context-type-quantity", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-context-type-quantity", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-context-type-quantity", + "version": "4.0.1", + "name": "context-type-quantity", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A use context type and quantity- or range-based value assigned to the test script", + "code": "context-type-quantity", + "base": [ "TestScript" ], + "type": "composite", + "expression": "TestScript.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/TestScript-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/TestScript-context-quantity", + "expression": "value.as(Quantity) | value.as(Range)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/TestScript-context-type-value", + "resource": { + "resourceType": "SearchParameter", + "id": "TestScript-context-type-value", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/TestScript-context-type-value", + "version": "4.0.1", + "name": "context-type-value", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (FHIR Infrastructure)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" + } ] + } ], + "description": "A use context type and value assigned to the test script", + "code": "context-type-value", + "base": [ "TestScript" ], + "type": "composite", + "expression": "TestScript.useContext", + "xpathUsage": "normal", + "multipleOr": false, + "component": [ { + "definition": "http://hl7.org/fhir/SearchParameter/TestScript-context-type", + "expression": "code" + }, { + "definition": "http://hl7.org/fhir/SearchParameter/TestScript-context", + "expression": "value.as(CodeableConcept)" + } ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ValueSet-code", + "resource": { + "resourceType": "SearchParameter", + "id": "ValueSet-code", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ValueSet-code", + "version": "4.0.1", + "name": "code", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "This special parameter searches for codes in the value set. See additional notes on the ValueSet resource", + "code": "code", + "base": [ "ValueSet" ], + "type": "token", + "expression": "ValueSet.expansion.contains.code | ValueSet.compose.include.concept.code", + "xpath": "f:ValueSet/f:expansion/f:contains/f:code | f:ValueSet/f:compose/f:include/f:concept/f:code", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ValueSet-expansion", + "resource": { + "resourceType": "SearchParameter", + "id": "ValueSet-expansion", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ValueSet-expansion", + "version": "4.0.1", + "name": "expansion", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "Identifies the value set expansion (business identifier)", + "code": "expansion", + "base": [ "ValueSet" ], + "type": "uri", + "expression": "ValueSet.expansion.identifier", + "xpath": "f:ValueSet/f:expansion/f:identifier", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/ValueSet-reference", + "resource": { + "resourceType": "SearchParameter", + "id": "ValueSet-reference", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/ValueSet-reference", + "version": "4.0.1", + "name": "reference", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Vocabulary)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/Vocab/index.cfm" + } ] + } ], + "description": "A code system included or excluded in the value set or an imported value set", + "code": "reference", + "base": [ "ValueSet" ], + "type": "uri", + "expression": "ValueSet.compose.include.system", + "xpath": "f:ValueSet/f:compose/f:include/f:system", + "xpathUsage": "normal" + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/VerificationResult-target", + "resource": { + "resourceType": "SearchParameter", + "id": "VerificationResult-target", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/VerificationResult-target", + "version": "4.0.1", + "name": "target", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Patient Administration)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" + } ] + } ], + "description": "A resource that was validated", + "code": "target", + "base": [ "VerificationResult" ], + "type": "reference", + "expression": "VerificationResult.target", + "xpath": "f:VerificationResult/f:target", + "xpathUsage": "normal", + "target": [ "Account", "ActivityDefinition", "AdverseEvent", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", "Bundle", "CapabilityStatement", "CarePlan", "CareTeam", "CatalogEntry", "ChargeItem", "ChargeItemDefinition", "Claim", "ClaimResponse", "ClinicalImpression", "CodeSystem", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceDefinition", "DeviceMetric", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EffectEvidenceSynthesis", "Encounter", "Endpoint", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "EventDefinition", "Evidence", "EvidenceVariable", "ExampleScenario", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GraphDefinition", "Group", "GuidanceResponse", "HealthcareService", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "ImplementationGuide", "InsurancePlan", "Invoice", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationKnowledge", "MedicationRequest", "MedicationStatement", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", "MedicinalProductIndication", "MedicinalProductIngredient", "MedicinalProductInteraction", "MedicinalProductManufactured", "MedicinalProductPackaged", "MedicinalProductPharmaceutical", "MedicinalProductUndesirableEffect", "MessageDefinition", "MessageHeader", "MolecularSequence", "NamingSystem", "NutritionOrder", "Observation", "ObservationDefinition", "OperationDefinition", "OperationOutcome", "Organization", "OrganizationAffiliation", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "PlanDefinition", "Practitioner", "PractitionerRole", "Procedure", "Provenance", "Questionnaire", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchDefinition", "ResearchElementDefinition", "ResearchStudy", "ResearchSubject", "RiskAssessment", "RiskEvidenceSynthesis", "Schedule", "SearchParameter", "ServiceRequest", "Slot", "Specimen", "SpecimenDefinition", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SubstanceNucleicAcid", "SubstancePolymer", "SubstanceProtein", "SubstanceReferenceInformation", "SubstanceSourceMaterial", "SubstanceSpecification", "SupplyDelivery", "SupplyRequest", "Task", "TerminologyCapabilities", "TestReport", "TestScript", "ValueSet", "VerificationResult", "VisionPrescription" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/VisionPrescription-datewritten", + "resource": { + "resourceType": "SearchParameter", + "id": "VisionPrescription-datewritten", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/VisionPrescription-datewritten", + "version": "4.0.1", + "name": "datewritten", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Return prescriptions written on this date", + "code": "datewritten", + "base": [ "VisionPrescription" ], + "type": "date", + "expression": "VisionPrescription.dateWritten", + "xpath": "f:VisionPrescription/f:dateWritten", + "xpathUsage": "normal", + "comparator": [ "eq", "ne", "gt", "ge", "lt", "le", "sa", "eb", "ap" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/VisionPrescription-prescriber", + "resource": { + "resourceType": "SearchParameter", + "id": "VisionPrescription-prescriber", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/VisionPrescription-prescriber", + "version": "4.0.1", + "name": "prescriber", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "Who authorized the vision prescription", + "code": "prescriber", + "base": [ "VisionPrescription" ], + "type": "reference", + "expression": "VisionPrescription.prescriber", + "xpath": "f:VisionPrescription/f:prescriber", + "xpathUsage": "normal", + "target": [ "Practitioner", "PractitionerRole" ] + } +}, { + "fullUrl": "http://hl7.org/fhir/SearchParameter/VisionPrescription-status", + "resource": { + "resourceType": "SearchParameter", + "id": "VisionPrescription-status", + "extension": [ { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + } ], + "url": "http://hl7.org/fhir/SearchParameter/VisionPrescription-status", + "version": "4.0.1", + "name": "status", + "status": "active", + "experimental": false, + "date": "2019-11-01T09:29:23+11:00", + "publisher": "Health Level Seven International (Financial Management)", + "contact": [ { + "telecom": [ { + "system": "url", + "value": "http://hl7.org/fhir" + } ] + }, { + "telecom": [ { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fm/index.cfm" + } ] + } ], + "description": "The status of the vision prescription", + "code": "status", + "base": [ "VisionPrescription" ], + "type": "token", + "expression": "VisionPrescription.status", + "xpath": "f:VisionPrescription/f:status", + "xpathUsage": "normal" + } +} ] +} diff --git a/hapi-fhir-validation-resources-r4/src/test/java/org/hl7/fhir/r4/model/sp/SearchParametersTest.java b/hapi-fhir-validation-resources-r4/src/test/java/org/hl7/fhir/r4/model/sp/SearchParametersTest.java new file mode 100644 index 00000000000..47a8a5e0f09 --- /dev/null +++ b/hapi-fhir-validation-resources-r4/src/test/java/org/hl7/fhir/r4/model/sp/SearchParametersTest.java @@ -0,0 +1,18 @@ +package org.hl7.fhir.r4.model.sp; + +import ca.uhn.fhir.util.ClasspathUtil; +import org.junit.jupiter.api.Test; + +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; + +public class SearchParametersTest { + + @Test + public void testStatus() { + String resource = ClasspathUtil.loadResource("org/hl7/fhir/r4/model/sp/search-parameters.json"); + assertThat(resource, not(containsString("\"draft\""))); + } + +} diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml index 303087ec902..c4ccaa6187f 100644 --- a/hapi-fhir-validation-resources-r5/pom.xml +++ b/hapi-fhir-validation-resources-r5/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml index f354d0d585d..81b1b0d0aa9 100644 --- a/hapi-fhir-validation/pom.xml +++ b/hapi-fhir-validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml index efd54036104..86257aa8913 100644 --- a/hapi-tinder-plugin/pom.xml +++ b/hapi-tinder-plugin/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../pom.xml @@ -58,37 +58,37 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu3 - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-hl7org-dstu2 - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-r4 - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-r5 - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu2 - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu3 - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-r4 - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT org.apache.velocity diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ResourceMinimizerMojo.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ResourceMinimizerMojo.java index b28e6417e06..8c3e44e49a5 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ResourceMinimizerMojo.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ResourceMinimizerMojo.java @@ -229,28 +229,36 @@ public class ResourceMinimizerMojo extends AbstractMojo { // fileCount += m.getFileCount(); m = new ResourceMinimizerMojo(); - m.myCtx = ctxR5; - m.targetDirectory = new File("./hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile"); - m.fhirVersion = "R5"; + m.myCtx = ctxR4; + m.targetDirectory = new File("./hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/sp"); + m.fhirVersion = "R4"; m.execute(); byteCount += m.getByteCount(); fileCount += m.getFileCount(); - m = new ResourceMinimizerMojo(); - m.myCtx = ctxR5; - m.targetDirectory = new File("./hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset"); - m.fhirVersion = "R5"; - m.execute(); - byteCount += m.getByteCount(); - fileCount += m.getFileCount(); - - m = new ResourceMinimizerMojo(); - m.myCtx = ctxR5; - m.targetDirectory = new File("./hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/extension"); - m.fhirVersion = "R5"; - m.execute(); - byteCount += m.getByteCount(); - fileCount += m.getFileCount(); +// m = new ResourceMinimizerMojo(); +// m.myCtx = ctxR5; +// m.targetDirectory = new File("./hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile"); +// m.fhirVersion = "R5"; +// m.execute(); +// byteCount += m.getByteCount(); +// fileCount += m.getFileCount(); +// +// m = new ResourceMinimizerMojo(); +// m.myCtx = ctxR5; +// m.targetDirectory = new File("./hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset"); +// m.fhirVersion = "R5"; +// m.execute(); +// byteCount += m.getByteCount(); +// fileCount += m.getFileCount(); +// +// m = new ResourceMinimizerMojo(); +// m.myCtx = ctxR5; +// m.targetDirectory = new File("./hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/extension"); +// m.fhirVersion = "R5"; +// m.execute(); +// byteCount += m.getByteCount(); +// fileCount += m.getFileCount(); ourLog.info("Trimmed {} files", fileCount); ourLog.info("Trimmed {} bytes", FileUtils.byteCountToDisplaySize(byteCount)); diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml index 9395f743979..aba66273ba3 100644 --- a/hapi-tinder-test/pom.xml +++ b/hapi-tinder-test/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 79cc3817764..b808fcf355c 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir pom - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT HAPI-FHIR An open-source implementation of the FHIR specification in Java. https://hapifhir.io diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml index f095488f4f4..243e84ae57b 100644 --- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml +++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml index dbfadbe9543..7d25aab4a21 100644 --- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml index 8b8aa95b196..00f4b73b00c 100644 --- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.6.0-PRE4-SNAPSHOT + 5.6.0-PRE5-SNAPSHOT ../../pom.xml From eee7d7e455d02b0770edde4297438e408d611da6 Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Sun, 12 Sep 2021 23:09:18 -0400 Subject: [PATCH 114/143] code cleanup (#2986) * failed attempt to get it to work * Use simplified FhirContext.forCached methods * Update hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java Co-authored-by: James Agnew Co-authored-by: James Agnew --- .../java/ca/uhn/fhir/context/FhirContext.java | 8 ++++ .../jpa/batch/job/model/PartitionedUrl.java | 4 ++ .../jpa/bulk/BulkDataExportProviderTest.java | 14 +++---- .../jpa/dao/TolerantJsonParserR4Test.java | 5 +-- .../jpa/dao/TransactionProcessorTest.java | 3 +- .../FhirResourceDaoSearchParameterR4Test.java | 3 +- ...bservationIndexedSearchParamLastNR4IT.java | 29 ++++++++++---- .../dao/r4/SearchParamExtractorR4Test.java | 5 +-- .../jpa/dao/r4/SearchParameterMapTest.java | 3 +- .../ca/uhn/fhir/jpa/packages/NpmR4Test.java | 2 +- .../packages/PackageInstallerSvcImplTest.java | 3 +- .../PartitionManagementProviderTest.java | 3 +- .../fhir/jpa/patch/FhirPatchApplyR4Test.java | 3 +- .../uhn/fhir/jpa/patch/FhirPatchCoreTest.java | 5 +-- .../fhir/jpa/patch/FhirPatchDiffR4Test.java | 3 +- .../provider/JpaGraphQLR4ProviderTest.java | 7 +--- .../jpa/provider/SearchParameterMapTest.java | 27 ++++++++----- .../jpa/provider/SystemProviderDstu2Test.java | 36 ++++++++++------- ...temProviderTransactionSearchDstu2Test.java | 3 +- .../TerminologyUploaderProviderTest.java | 9 ++--- .../ResourceProviderDstu3CodeSystemTest.java | 14 +++++-- ...temProviderTransactionSearchDstu3Test.java | 6 +-- .../jpa/provider/r4/EmptyIndexesR4Test.java | 6 +-- .../jpa/provider/r4/SystemProviderR4Test.java | 3 +- ...SystemProviderTransactionSearchR4Test.java | 14 +++---- .../search/SearchCoordinatorSvcImplTest.java | 13 +++--- .../builder/sql/SearchQueryBuilderTest.java | 3 +- ...lasticsearchSvcMultipleObservationsIT.java | 3 +- ...tNElasticsearchSvcSingleObservationIT.java | 9 +---- .../ResourceReindexingSvcImplTest.java | 3 +- .../jpa/searchparam/MatchUrlServiceTest.java | 5 +-- .../stresstest/GiantTransactionPerfTest.java | 3 +- .../jpa/stresstest/StressTestParserTest.java | 4 +- .../subscription/BaseSubscriptionsR5Test.java | 3 +- .../jpa/subscription/FhirServiceUtil.java | 8 ++-- ...SubscriptionValidatingInterceptorTest.java | 3 +- ...tivatesPreExistingSubscriptionsR4Test.java | 3 +- .../resthook/RestHookTestDstu2Test.java | 21 ++++++---- .../resthook/RestHookTestDstu3Test.java | 40 ++++++++++++++----- ...rceptorRegisteredToDaoConfigDstu2Test.java | 7 ++-- ...rceptorRegisteredToDaoConfigDstu3Test.java | 7 ++-- ...nterceptorRegisteredToDaoConfigR4Test.java | 25 +++++++----- .../RestHookWithInterceptorR4Test.java | 5 +-- .../SubscriptionTriggeringDstu3Test.java | 15 ++++--- .../term/TerminologyLoaderSvcLoincTest.java | 7 ++-- .../util/jsonpatch/JsonPatchUtilsTest.java | 6 +-- .../fhir/validator/AttachmentUtilTest.java | 7 ++-- .../ValidatorAcrossVersionsTest.java | 17 ++++---- .../SearchParamExtractorDstu3Test.java | 3 +- .../rest/openapi/OpenApiInterceptorTest.java | 3 +- ...eptorWithAuthorizationInterceptorTest.java | 40 +------------------ ...mThymeleafNarrativeGeneratorDstu2Test.java | 3 +- ...tThymeleafNarrativeGeneratorDstu2Test.java | 3 +- ...tThymeleafNarrativeGeneratorDstu3Test.java | 17 ++++++-- ...stomThymeleafNarrativeGeneratorR4Test.java | 5 +-- ...aultThymeleafNarrativeGeneratorR4Test.java | 19 +++++++-- .../CapabilityStatementCacheR4Test.java | 3 +- ...apabilityStatementCustomizationR4Test.java | 3 +- .../ca/uhn/fhir/rest/server/ReadR4Test.java | 3 +- .../SearchPreferHandlingInterceptorTest.java | 3 +- .../ca/uhn/fhir/rest/server/SearchR4Test.java | 8 +--- .../server/ServerInvalidDefinitionR4Test.java | 15 +------ .../ca/uhn/fhir/util/FhirTerserR4Test.java | 3 +- ...rverCapabilityStatementProviderR5Test.java | 33 ++++++++++++--- ...oryTerminologyServerValidationSupport.java | 6 +-- ...rverCapabilityStatementProviderR4Test.java | 3 +- ...ologyDisplayPopulationInterceptorTest.java | 3 +- ...mmonCodeSystemsTerminologyServiceTest.java | 7 ++-- 68 files changed, 305 insertions(+), 313 deletions(-) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java index 168a6995b65..73970ce82fe 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java @@ -225,6 +225,14 @@ public class FhirContext { } + + /** + * @since 5.6.0 + */ + public static FhirContext forDstu2Cached() { + return forCached(FhirVersionEnum.DSTU2); + } + /** * @since 5.5.0 */ diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/job/model/PartitionedUrl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/job/model/PartitionedUrl.java index ebc69de9d18..cb3240a203e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/job/model/PartitionedUrl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/job/model/PartitionedUrl.java @@ -54,4 +54,8 @@ public class PartitionedUrl implements IModelJson { public void setRequestPartitionId(RequestPartitionId theRequestPartitionId) { myRequestPartitionId = theRequestPartitionId; } + + public boolean isPartitioned() { + return myRequestPartitionId != null && !myRequestPartitionId.isDefaultPartition(); + } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportProviderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportProviderTest.java index e2ca669a6dd..0783f3cb387 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportProviderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportProviderTest.java @@ -1,16 +1,15 @@ package ca.uhn.fhir.jpa.bulk; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; -import ca.uhn.fhir.rest.api.server.bulk.BulkDataExportOptions; import ca.uhn.fhir.jpa.bulk.export.api.IBulkDataExportSvc; -import ca.uhn.fhir.jpa.bulk.export.model.BulkExportResponseJson; import ca.uhn.fhir.jpa.bulk.export.model.BulkExportJobStatusEnum; +import ca.uhn.fhir.jpa.bulk.export.model.BulkExportResponseJson; import ca.uhn.fhir.jpa.bulk.export.provider.BulkDataExportProvider; import ca.uhn.fhir.jpa.model.util.JpaConstants; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.api.server.RequestDetails; +import ca.uhn.fhir.rest.api.server.bulk.BulkDataExportOptions; import ca.uhn.fhir.rest.client.apache.ResourceEntity; import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; @@ -55,11 +54,8 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; -import static org.mockito.ArgumentMatchers.isNull; import static org.mockito.ArgumentMatchers.nullable; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.times; @@ -74,7 +70,7 @@ public class BulkDataExportProviderTest { private static final String GROUP_ID = "Group/G2401"; private static final String G_JOB_ID = "0000000-GGGGGG"; private Server myServer; - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myCtx = FhirContext.forR4Cached(); private int myPort; @Mock private IBulkDataExportSvc myBulkDataExportSvc; @@ -478,9 +474,9 @@ public class BulkDataExportProviderTest { when(myBulkDataExportSvc.submitJob(any(), any(), nullable(RequestDetails.class))).thenReturn(jobInfo); String url = "http://localhost:" + myPort + "/" + "Group/123/" +JpaConstants.OPERATION_EXPORT - + "?" + JpaConstants.PARAM_EXPORT_OUTPUT_FORMAT + "=" + UrlUtil.escapeUrlParam(Constants.CT_FHIR_NDJSON);; + + "?" + JpaConstants.PARAM_EXPORT_OUTPUT_FORMAT + "=" + UrlUtil.escapeUrlParam(Constants.CT_FHIR_NDJSON); - HttpGet get = new HttpGet(url); + HttpGet get = new HttpGet(url); get.addHeader(Constants.HEADER_PREFER, Constants.HEADER_PREFER_RESPOND_ASYNC); CloseableHttpResponse execute = myClient.execute(get); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TolerantJsonParserR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TolerantJsonParserR4Test.java index 7222ce7f83a..e4079c42903 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TolerantJsonParserR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TolerantJsonParserR4Test.java @@ -1,19 +1,18 @@ package ca.uhn.fhir.jpa.dao; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.parser.LenientErrorHandler; import org.hl7.fhir.r4.model.Observation; import org.junit.jupiter.api.Test; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.hamcrest.MatcherAssert.assertThat; public class TolerantJsonParserR4Test { - private FhirContext myFhirContext = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myFhirContext = FhirContext.forR4Cached(); @Test public void testParseInvalidNumeric_LeadingDecimal() { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java index cff84d93d99..f48b4ede91f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.dao; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.interceptor.executor.InterceptorService; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; @@ -123,7 +122,7 @@ public class TransactionProcessorTest { @Bean public FhirContext fhirContext() { - return FhirContext.forCached(FhirVersionEnum.R4); + return FhirContext.forR4Cached(); } @Bean diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSearchParameterR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSearchParameterR4Test.java index 78eb2ec76e4..b9ab285fa69 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSearchParameterR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSearchParameterR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.jpa.api.config.DaoConfig; @@ -32,7 +31,7 @@ public class FhirResourceDaoSearchParameterR4Test { @BeforeEach public void before() { - myCtx = FhirContext.forCached(FhirVersionEnum.R4); + myCtx = FhirContext.forR4Cached(); myDao = new FhirResourceDaoSearchParameterR4(); myDao.setContext(myCtx); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PersistObservationIndexedSearchParamLastNR4IT.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PersistObservationIndexedSearchParamLastNR4IT.java index bd686231e0c..cbd54dca482 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PersistObservationIndexedSearchParamLastNR4IT.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PersistObservationIndexedSearchParamLastNR4IT.java @@ -1,24 +1,33 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao; import ca.uhn.fhir.jpa.config.TestR4ConfigWithElasticsearchClient; import ca.uhn.fhir.jpa.dao.ObservationLastNIndexPersistSvc; import ca.uhn.fhir.jpa.model.entity.ResourceTable; -import ca.uhn.fhir.jpa.model.util.CodeSystemHash; import ca.uhn.fhir.jpa.search.lastn.ElasticsearchSvcImpl; import ca.uhn.fhir.jpa.search.lastn.json.CodeJson; import ca.uhn.fhir.jpa.search.lastn.json.ObservationJson; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.parser.IParser; -import ca.uhn.fhir.rest.param.*; +import ca.uhn.fhir.rest.param.ReferenceAndListParam; +import ca.uhn.fhir.rest.param.ReferenceOrListParam; +import ca.uhn.fhir.rest.param.ReferenceParam; +import ca.uhn.fhir.rest.param.TokenAndListParam; +import ca.uhn.fhir.rest.param.TokenOrListParam; +import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.test.utilities.docker.RequiresDocker; import com.google.common.base.Charsets; import org.apache.commons.io.IOUtils; -import org.aspectj.lang.annotation.Before; -import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.CodeableConcept; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.DateTimeType; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Meta; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Reference; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.MethodOrderer; @@ -31,14 +40,18 @@ import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceContextType; import java.io.IOException; import java.io.InputStream; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -411,7 +424,7 @@ public class PersistObservationIndexedSearchParamLastNR4IT { @Order(1) @Test public void testSampleBundleInTransaction() throws IOException { - FhirContext myFhirCtx = FhirContext.forCached(FhirVersionEnum.R4); + FhirContext myFhirCtx = FhirContext.forR4Cached(); PathMatchingResourcePatternResolver provider = new PathMatchingResourcePatternResolver(); final Resource[] bundleResources; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchParamExtractorR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchParamExtractorR4Test.java index 8dfe6e4a1c7..0481f0b3de3 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchParamExtractorR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchParamExtractorR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.context.phonetic.IPhoneticEncoder; @@ -61,7 +60,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; public class SearchParamExtractorR4Test { private static final Logger ourLog = LoggerFactory.getLogger(SearchParamExtractorR4Test.class); - private static FhirContext ourCtx = FhirContext.forCached(FhirVersionEnum.R4); + private static final FhirContext ourCtx = FhirContext.forR4Cached(); private MySearchParamRegistry mySearchParamRegistry; private PartitionSettings myPartitionSettings; @@ -398,7 +397,7 @@ public class SearchParamExtractorR4Test { private static class MySearchParamRegistry implements ISearchParamRegistry, ISearchParamRegistryController { - private List myExtraSearchParams = new ArrayList<>(); + private final List myExtraSearchParams = new ArrayList<>(); @Override public void forceRefresh() { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchParameterMapTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchParameterMapTest.java index fcb37e54fe9..090e693af20 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchParameterMapTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchParameterMapTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.rest.param.HasParam; import ca.uhn.fhir.test.BaseTest; @@ -11,7 +10,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; public class SearchParameterMapTest extends BaseTest { - private FhirContext myContext = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myContext = FhirContext.forR4Cached(); @Test public void toNormalizedQueryStringTest() { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/NpmR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/NpmR4Test.java index 13cfb4cd620..ed387fed101 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/NpmR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/NpmR4Test.java @@ -185,7 +185,7 @@ public class NpmR4Test extends BaseJpaR4Test { assertEquals("Nictiz NL package of FHIR STU3 conformance resources for MedMij information standard Questionnaires. Includes dependency on Zib2017 and SDC.\\n\\nHCIMs: https://zibs.nl/wiki/HCIM_Release_2017(EN)", pkg.description()); // Fetch resource by URL - FhirContext fhirContext = FhirContext.forCached(FhirVersionEnum.DSTU3); + FhirContext fhirContext = FhirContext.forDstu3Cached(); runInTransaction(() -> { IBaseResource asset = myPackageCacheManager.loadPackageAssetByUrl(FhirVersionEnum.DSTU3, "http://nictiz.nl/fhir/StructureDefinition/vl-QuestionnaireResponse"); assertThat(fhirContext.newJsonParser().encodeResourceToString(asset), containsString("\"url\":\"http://nictiz.nl/fhir/StructureDefinition/vl-QuestionnaireResponse\",\"version\":\"1.0.1\"")); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/PackageInstallerSvcImplTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/PackageInstallerSvcImplTest.java index 2ac98743ab0..93e4e690b5d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/PackageInstallerSvcImplTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/PackageInstallerSvcImplTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.packages; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import org.hl7.fhir.r4.model.Enumerations; import org.hl7.fhir.r4.model.SearchParameter; import org.junit.jupiter.api.BeforeEach; @@ -11,7 +10,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; class PackageInstallerSvcImplTest { - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myCtx = FhirContext.forR4Cached(); private PackageInstallerSvcImpl mySvc; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/partition/PartitionManagementProviderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/partition/PartitionManagementProviderTest.java index ad02f5fc22a..3d3f0b2fc37 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/partition/PartitionManagementProviderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/partition/PartitionManagementProviderTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.partition; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.entity.PartitionEntity; import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor; @@ -43,7 +42,7 @@ import static org.mockito.Mockito.when; public class PartitionManagementProviderTest { private static final Logger ourLog = LoggerFactory.getLogger(PartitionManagementProviderTest.class); - private static FhirContext ourCtx = FhirContext.forCached(FhirVersionEnum.R4); + private static final FhirContext ourCtx = FhirContext.forR4Cached(); @RegisterExtension public static RestfulServerExtension ourServerRule = new RestfulServerExtension(ourCtx); @MockBean diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/patch/FhirPatchApplyR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/patch/FhirPatchApplyR4Test.java index 0a9252e986a..51f664bac56 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/patch/FhirPatchApplyR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/patch/FhirPatchApplyR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.patch; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseResource; @@ -24,7 +23,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; public class FhirPatchApplyR4Test { - private static final FhirContext ourCtx = FhirContext.forCached(FhirVersionEnum.R4); + private static final FhirContext ourCtx = FhirContext.forR4Cached(); private static final Logger ourLog = LoggerFactory.getLogger(FhirPatchApplyR4Test.class); @Test diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/patch/FhirPatchCoreTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/patch/FhirPatchCoreTest.java index b044d489485..1da0afb4e49 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/patch/FhirPatchCoreTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/patch/FhirPatchCoreTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.patch; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.test.BaseTest; import ca.uhn.fhir.util.ClasspathUtil; import ca.uhn.fhir.util.XmlUtil; @@ -51,10 +50,10 @@ public class FhirPatchCoreTest extends BaseTest { public static List parameters() throws TransformerException, SAXException, IOException { String testSpecR4 = "/org/hl7/fhir/testcases/r4/patch/fhir-path-tests.xml"; - Collection retValR4 = loadTestSpec(FhirContext.forCached(FhirVersionEnum.R4), testSpecR4); + Collection retValR4 = loadTestSpec(FhirContext.forR4Cached(), testSpecR4); String testSpecR5 = "/org/hl7/fhir/testcases/r5/patch/fhir-path-tests.xml"; - Collection retValR5 = loadTestSpec(FhirContext.forCached(FhirVersionEnum.R5), testSpecR5); + Collection retValR5 = loadTestSpec(FhirContext.forR5Cached(), testSpecR5); ArrayList retVal = new ArrayList<>(); retVal.addAll(retValR4); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/patch/FhirPatchDiffR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/patch/FhirPatchDiffR4Test.java index 11e15dec383..94447ad11ed 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/patch/FhirPatchDiffR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/patch/FhirPatchDiffR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.patch; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.r4.model.BooleanType; import org.hl7.fhir.r4.model.DateTimeType; @@ -22,7 +21,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; public class FhirPatchDiffR4Test { private static final Logger ourLog = LoggerFactory.getLogger(FhirPatchDiffR4Test.class); - private static final FhirContext ourCtx = FhirContext.forCached(FhirVersionEnum.R4); + private static final FhirContext ourCtx = FhirContext.forR4Cached(); @Test public void testReplaceIdentifier() { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/JpaGraphQLR4ProviderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/JpaGraphQLR4ProviderTest.java index 9c078cb6ae5..eab62c85934 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/JpaGraphQLR4ProviderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/JpaGraphQLR4ProviderTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.provider; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.rest.annotation.OptionalParam; import ca.uhn.fhir.rest.annotation.Search; import ca.uhn.fhir.rest.api.Constants; @@ -31,7 +30,6 @@ import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Resource; import org.hl7.fhir.utilities.graphql.Argument; import org.hl7.fhir.utilities.graphql.IGraphQLStorageServices; -import org.hl7.fhir.utilities.graphql.Value; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; @@ -40,7 +38,6 @@ import org.junit.jupiter.api.Test; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; -import java.util.LinkedList; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; @@ -55,7 +52,7 @@ public class JpaGraphQLR4ProviderTest { public static final String DATA_PREFIX = "{\"data\": "; public static final String DATA_SUFFIX = "}"; private static CloseableHttpClient ourClient; - private static FhirContext ourCtx = FhirContext.forCached(FhirVersionEnum.R4); + private static final FhirContext ourCtx = FhirContext.forR4Cached(); private static int ourPort; private static Server ourServer; @@ -252,7 +249,7 @@ public class JpaGraphQLR4ProviderTest { Patient patient = new Patient(); patient.addName(new HumanName().setFamily("FAMILY")); patient.getIdElement().setValue("Patient/" + i); - retVal.add((Patient) patient); + retVal.add(patient); } return retVal; } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/SearchParameterMapTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/SearchParameterMapTest.java index 39f995742a4..b9442e0813d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/SearchParameterMapTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/SearchParameterMapTest.java @@ -1,25 +1,30 @@ package ca.uhn.fhir.jpa.provider; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotEquals; - -import ca.uhn.fhir.context.FhirVersionEnum; -import ca.uhn.fhir.rest.api.SearchContainedModeEnum; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.Test; - import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap.EverythingModeEnum; import ca.uhn.fhir.model.api.Include; +import ca.uhn.fhir.rest.api.SearchContainedModeEnum; import ca.uhn.fhir.rest.api.SortOrderEnum; import ca.uhn.fhir.rest.api.SortSpec; -import ca.uhn.fhir.rest.param.*; -import ca.uhn.fhir.util.TestUtil; +import ca.uhn.fhir.rest.param.DateAndListParam; +import ca.uhn.fhir.rest.param.DateOrListParam; +import ca.uhn.fhir.rest.param.DateParam; +import ca.uhn.fhir.rest.param.ParamPrefixEnum; +import ca.uhn.fhir.rest.param.StringAndListParam; +import ca.uhn.fhir.rest.param.StringOrListParam; +import ca.uhn.fhir.rest.param.StringParam; +import ca.uhn.fhir.rest.param.TokenAndListParam; +import ca.uhn.fhir.rest.param.TokenOrListParam; +import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.util.UrlUtil; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; public class SearchParameterMapTest { - private static FhirContext ourCtx = FhirContext.forCached(FhirVersionEnum.DSTU3); + private static final FhirContext ourCtx = FhirContext.forDstu3Cached(); @Test diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/SystemProviderDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/SystemProviderDstu2Test.java index bcaba0b3547..98c604f3903 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/SystemProviderDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/SystemProviderDstu2Test.java @@ -1,15 +1,22 @@ package ca.uhn.fhir.jpa.provider; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.dao.dstu2.BaseJpaDstu2Test; -import ca.uhn.fhir.jpa.rp.dstu2.*; -import ca.uhn.fhir.model.dstu2.resource.*; +import ca.uhn.fhir.jpa.rp.dstu2.BinaryResourceProvider; +import ca.uhn.fhir.jpa.rp.dstu2.DiagnosticOrderResourceProvider; +import ca.uhn.fhir.jpa.rp.dstu2.DiagnosticReportResourceProvider; +import ca.uhn.fhir.jpa.rp.dstu2.LocationResourceProvider; +import ca.uhn.fhir.jpa.rp.dstu2.ObservationResourceProvider; +import ca.uhn.fhir.jpa.rp.dstu2.OrganizationResourceProvider; +import ca.uhn.fhir.jpa.rp.dstu2.PatientResourceProvider; +import ca.uhn.fhir.jpa.rp.dstu2.PractitionerResourceProvider; +import ca.uhn.fhir.model.dstu2.resource.Bundle; +import ca.uhn.fhir.model.dstu2.resource.OperationDefinition; +import ca.uhn.fhir.model.dstu2.resource.OperationOutcome; +import ca.uhn.fhir.model.dstu2.resource.Patient; import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum; import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum; -import ca.uhn.fhir.model.primitive.DecimalDt; import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.rest.api.EncodingEnum; import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.server.FifoMemoryPagingProvider; @@ -17,8 +24,8 @@ import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor; +import ca.uhn.fhir.test.utilities.JettyUtil; import ca.uhn.fhir.util.BundleUtil; -import ca.uhn.fhir.util.TestUtil; import com.google.common.base.Charsets; import org.apache.commons.io.IOUtils; import org.apache.http.client.methods.CloseableHttpResponse; @@ -30,14 +37,11 @@ import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; -import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.IdType; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; import java.io.IOException; import java.io.InputStream; @@ -45,10 +49,13 @@ import java.nio.charset.StandardCharsets; import java.util.concurrent.TimeUnit; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; -import static org.junit.jupiter.api.Assertions.*; - -import ca.uhn.fhir.test.utilities.JettyUtil; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.startsWith; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; public class SystemProviderDstu2Test extends BaseJpaDstu2Test { @@ -104,7 +111,7 @@ public class SystemProviderDstu2Test extends BaseJpaDstu2Test { servletHolder.setServlet(restServer); proxyHandler.addServlet(servletHolder, "/fhir/context/*"); - ourCtx = FhirContext.forCached(FhirVersionEnum.DSTU2); + ourCtx = FhirContext.forDstu2Cached(); restServer.setFhirContext(ourCtx); ourServer.setHandler(proxyHandler); @@ -396,7 +403,6 @@ public class SystemProviderDstu2Test extends BaseJpaDstu2Test { assertEquals(200, http.getStatusLine().getStatusCode()); } finally { IOUtils.closeQuietly(http); - ; } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/SystemProviderTransactionSearchDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/SystemProviderTransactionSearchDstu2Test.java index 4291cc754c8..cc5b8b1f60c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/SystemProviderTransactionSearchDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/SystemProviderTransactionSearchDstu2Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.provider; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.dao.dstu2.BaseJpaDstu2Test; import ca.uhn.fhir.jpa.rp.dstu2.ObservationResourceProvider; @@ -82,7 +81,7 @@ public class SystemProviderTransactionSearchDstu2Test extends BaseJpaDstu2Test { servletHolder.setServlet(restServer); proxyHandler.addServlet(servletHolder, "/fhir/context/*"); - ourCtx = FhirContext.forCached(FhirVersionEnum.DSTU2); + ourCtx = FhirContext.forDstu2Cached(); restServer.setFhirContext(ourCtx); ourServer.setHandler(proxyHandler); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/TerminologyUploaderProviderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/TerminologyUploaderProviderTest.java index e40c255f6c3..ac8066b3f31 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/TerminologyUploaderProviderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/TerminologyUploaderProviderTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.provider; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.test.BaseTest; import org.hl7.fhir.r4.model.CodeSystem; @@ -13,7 +12,7 @@ public class TerminologyUploaderProviderTest extends BaseTest { @Test public void testCanonicalizeR3() { TerminologyUploaderProvider provider = new TerminologyUploaderProvider(); - provider.setContext(FhirContext.forCached(FhirVersionEnum.DSTU3)); + provider.setContext(FhirContext.forDstu3Cached()); org.hl7.fhir.dstu3.model.CodeSystem input = new org.hl7.fhir.dstu3.model.CodeSystem(); input.addConcept().setCode("FOO").setDisplay("Foo"); @@ -26,7 +25,7 @@ public class TerminologyUploaderProviderTest extends BaseTest { @Test public void testCanonicalizeR4() { TerminologyUploaderProvider provider = new TerminologyUploaderProvider(); - provider.setContext(FhirContext.forCached(FhirVersionEnum.R4)); + provider.setContext(FhirContext.forR4Cached()); org.hl7.fhir.r4.model.CodeSystem input = new org.hl7.fhir.r4.model.CodeSystem(); input.addConcept().setCode("FOO").setDisplay("Foo"); @@ -39,7 +38,7 @@ public class TerminologyUploaderProviderTest extends BaseTest { @Test public void testCanonicalizeR5() { TerminologyUploaderProvider provider = new TerminologyUploaderProvider(); - provider.setContext(FhirContext.forCached(FhirVersionEnum.R5)); + provider.setContext(FhirContext.forR5Cached()); org.hl7.fhir.r5.model.CodeSystem input = new org.hl7.fhir.r5.model.CodeSystem(); input.addConcept().setCode("FOO").setDisplay("Foo"); @@ -52,7 +51,7 @@ public class TerminologyUploaderProviderTest extends BaseTest { @Test public void testCanonicalizeR5_WrongType() { TerminologyUploaderProvider provider = new TerminologyUploaderProvider(); - provider.setContext(FhirContext.forCached(FhirVersionEnum.R5)); + provider.setContext(FhirContext.forR5Cached()); org.hl7.fhir.r5.model.Patient input = new org.hl7.fhir.r5.model.Patient(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3CodeSystemTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3CodeSystemTest.java index 7f8aa7a0fb5..75977b406b4 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3CodeSystemTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3CodeSystemTest.java @@ -1,12 +1,20 @@ package ca.uhn.fhir.jpa.provider.dstu3; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.dao.dstu3.FhirResourceDaoDstu3TerminologyTest; import ca.uhn.fhir.jpa.term.TermReindexingSvcImpl; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; -import org.hl7.fhir.dstu3.model.*; +import org.hl7.fhir.dstu3.model.BooleanType; +import org.hl7.fhir.dstu3.model.CodeSystem; +import org.hl7.fhir.dstu3.model.CodeType; +import org.hl7.fhir.dstu3.model.Coding; +import org.hl7.fhir.dstu3.model.Parameters; +import org.hl7.fhir.dstu3.model.Questionnaire; +import org.hl7.fhir.dstu3.model.QuestionnaireResponse; +import org.hl7.fhir.dstu3.model.StringType; +import org.hl7.fhir.dstu3.model.UriType; +import org.hl7.fhir.dstu3.model.ValueSet; import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import org.hl7.fhir.instance.model.api.IBaseResource; import org.junit.jupiter.api.BeforeEach; @@ -22,7 +30,7 @@ import static org.junit.jupiter.api.Assertions.fail; public class ResourceProviderDstu3CodeSystemTest extends BaseResourceProviderDstu3Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceProviderDstu3CodeSystemTest.class); - public static FhirContext ourCtx = FhirContext.forCached(FhirVersionEnum.DSTU3); + public static FhirContext ourCtx = FhirContext.forDstu3Cached(); @BeforeEach @Transactional diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/SystemProviderTransactionSearchDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/SystemProviderTransactionSearchDstu3Test.java index 902e792d724..9e1020e7957 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/SystemProviderTransactionSearchDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/SystemProviderTransactionSearchDstu3Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.provider.dstu3; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.dao.dstu3.BaseJpaDstu3Test; import ca.uhn.fhir.jpa.rp.dstu3.ObservationResourceProvider; @@ -13,7 +12,6 @@ import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.client.interceptor.SimpleRequestHeaderInterceptor; import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.test.utilities.JettyUtil; -import ca.uhn.fhir.util.TestUtil; import com.google.common.base.Charsets; import org.apache.commons.io.IOUtils; import org.apache.http.client.methods.CloseableHttpResponse; @@ -34,10 +32,10 @@ import org.hl7.fhir.dstu3.model.Bundle.HTTPVerb; import org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender; import org.hl7.fhir.dstu3.model.Patient; import org.hl7.fhir.instance.model.api.IIdType; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.nio.charset.StandardCharsets; import java.util.ArrayList; @@ -102,7 +100,7 @@ public class SystemProviderTransactionSearchDstu3Test extends BaseJpaDstu3Test { servletHolder.setServlet(restServer); proxyHandler.addServlet(servletHolder, "/fhir/context/*"); - ourCtx = FhirContext.forCached(FhirVersionEnum.DSTU3); + ourCtx = FhirContext.forDstu3Cached(); restServer.setFhirContext(ourCtx); ourServer.setHandler(proxyHandler); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/EmptyIndexesR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/EmptyIndexesR4Test.java index 6b14da66fb2..ef88b957313 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/EmptyIndexesR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/EmptyIndexesR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.provider.r4; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.dao.r4.BaseJpaR4Test; import ca.uhn.fhir.jpa.rp.r4.ObservationResourceProvider; @@ -12,7 +11,6 @@ import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.client.interceptor.SimpleRequestHeaderInterceptor; import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.test.utilities.JettyUtil; -import ca.uhn.fhir.util.TestUtil; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; @@ -20,10 +18,10 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.hl7.fhir.r4.model.Observation; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.concurrent.TimeUnit; @@ -76,7 +74,7 @@ public class EmptyIndexesR4Test extends BaseJpaR4Test { servletHolder.setServlet(restServer); proxyHandler.addServlet(servletHolder, "/fhir/context/*"); - ourCtx = FhirContext.forCached(FhirVersionEnum.R4); + ourCtx = FhirContext.forR4Cached(); restServer.setFhirContext(ourCtx); ourServer.setHandler(proxyHandler); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderR4Test.java index 7b8a3bf32b8..750953a8818 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.provider.r4; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.interceptor.api.Hook; import ca.uhn.fhir.interceptor.api.Pointcut; import ca.uhn.fhir.jpa.api.config.DaoConfig; @@ -161,7 +160,7 @@ public class SystemProviderR4Test extends BaseJpaR4Test { servletHolder.setServlet(restServer); proxyHandler.addServlet(servletHolder, "/fhir/context/*"); - ourCtx = FhirContext.forCached(FhirVersionEnum.R4); + ourCtx = FhirContext.forR4Cached(); restServer.setFhirContext(ourCtx); ourServer.setHandler(proxyHandler); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderTransactionSearchR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderTransactionSearchR4Test.java index df65b4de7d0..249c93b2166 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderTransactionSearchR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderTransactionSearchR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.provider.r4; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.dao.r4.BaseJpaR4Test; import ca.uhn.fhir.jpa.rp.r4.MedicationRequestResourceProvider; @@ -17,7 +16,6 @@ import ca.uhn.fhir.rest.param.ReferenceParam; import ca.uhn.fhir.rest.param.TokenOrListParam; import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.test.utilities.JettyUtil; -import ca.uhn.fhir.util.TestUtil; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; @@ -34,8 +32,8 @@ import org.hl7.fhir.r4.model.Medication; import org.hl7.fhir.r4.model.MedicationRequest; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Reference; -import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -44,10 +42,10 @@ import java.util.List; import java.util.concurrent.TimeUnit; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; -import static org.junit.jupiter.api.Assertions.*; - -import ca.uhn.fhir.test.utilities.JettyUtil; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.nullValue; +import static org.junit.jupiter.api.Assertions.assertEquals; public class SystemProviderTransactionSearchR4Test extends BaseJpaR4Test { @@ -103,7 +101,7 @@ public class SystemProviderTransactionSearchR4Test extends BaseJpaR4Test { servletHolder.setServlet(restServer); proxyHandler.addServlet(servletHolder, "/fhir/context/*"); - ourCtx = FhirContext.forCached(FhirVersionEnum.R4); + ourCtx = FhirContext.forR4Cached(); restServer.setFhirContext(ourCtx); ourServer.setHandler(proxyHandler); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java index 347f7a94c86..830f77ba0f5 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.search; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.config.DaoConfig; @@ -87,7 +86,7 @@ import static org.mockito.Mockito.when; public class SearchCoordinatorSvcImplTest { private static final Logger ourLog = LoggerFactory.getLogger(SearchCoordinatorSvcImplTest.class); - private static FhirContext ourCtx = FhirContext.forCached(FhirVersionEnum.DSTU3); + private static final FhirContext ourCtx = FhirContext.forDstu3Cached(); @Mock private IFhirResourceDao myCallingDao; @Mock @@ -667,7 +666,7 @@ public class SearchCoordinatorSvcImplTest { public static class FailAfterNIterator extends BaseIterator implements IResultIterator { private int myCount; - private IResultIterator myWrap; + private final IResultIterator myWrap; FailAfterNIterator(IResultIterator theWrap, int theCount) { myWrap = theWrap; @@ -768,10 +767,10 @@ public class SearchCoordinatorSvcImplTest { private static final Logger ourLog = LoggerFactory.getLogger(SlowIterator.class); private final IResultIterator myResultIteratorWrap; - private int myDelay; - private Iterator myWrap; - private List myReturnedValues = new ArrayList<>(); - private AtomicInteger myCountReturned = new AtomicInteger(0); + private final int myDelay; + private final Iterator myWrap; + private final List myReturnedValues = new ArrayList<>(); + private final AtomicInteger myCountReturned = new AtomicInteger(0); SlowIterator(Iterator theWrap, int theDelay) { myWrap = theWrap; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryBuilderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryBuilderTest.java index 7e535aa8c6a..99f799469ac 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryBuilderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryBuilderTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.search.builder.sql; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.config.HibernatePropertiesProvider; import ca.uhn.fhir.jpa.model.config.PartitionSettings; @@ -43,7 +42,7 @@ public class SearchQueryBuilderTest { @BeforeEach public void before() { - myFhirContext = FhirContext.forCached(FhirVersionEnum.R4); + myFhirContext = FhirContext.forR4Cached(); myModelConfig = new ModelConfig(); myPartitionSettings = new PartitionSettings(); myRequestPartitionId = RequestPartitionId.allPartitions(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcMultipleObservationsIT.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcMultipleObservationsIT.java index 653c4de56f5..5c35f8a65e1 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcMultipleObservationsIT.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcMultipleObservationsIT.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.search.lastn; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.model.config.PartitionSettings; import ca.uhn.fhir.jpa.search.lastn.config.TestElasticsearchContainerHelper; import ca.uhn.fhir.jpa.search.lastn.json.CodeJson; @@ -61,7 +60,7 @@ public class LastNElasticsearchSvcMultipleObservationsIT { private static ObjectMapper ourMapperNonPrettyPrint; private static boolean indexLoaded = false; private final Map>> createdPatientObservationMap = new HashMap<>(); - private final FhirContext myFhirContext = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myFhirContext = FhirContext.forR4Cached(); private ElasticsearchSvcImpl elasticsearchSvc; @BeforeEach diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcSingleObservationIT.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcSingleObservationIT.java index 55a5056f8d8..dbda8eb5e48 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcSingleObservationIT.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/lastn/LastNElasticsearchSvcSingleObservationIT.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.search.lastn; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.model.config.PartitionSettings; import ca.uhn.fhir.jpa.model.util.CodeSystemHash; import ca.uhn.fhir.jpa.search.lastn.config.TestElasticsearchContainerHelper; @@ -27,23 +26,17 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.testcontainers.elasticsearch.ElasticsearchContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import java.io.IOException; -import java.time.Duration; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.UUID; -import static java.time.temporal.ChronoUnit.SECONDS; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -85,7 +78,7 @@ public class LastNElasticsearchSvcSingleObservationIT { final String CODEFIRSTCODINGSYSTEM = "http://mycodes.org/fhir/observation-code"; final String CODEFIRSTCODINGCODE = "test-code"; final String CODEFIRSTCODINGDISPLAY = "test-code display"; - final FhirContext myFhirContext = FhirContext.forCached(FhirVersionEnum.R4); + final FhirContext myFhirContext = FhirContext.forR4Cached(); ElasticsearchSvcImpl elasticsearchSvc; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImplTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImplTest.java index c1277dd9378..a8aec02d895 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImplTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImplTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.search.reindex; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; @@ -56,7 +55,7 @@ import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) public class ResourceReindexingSvcImplTest extends BaseJpaTest { - private static final FhirContext ourCtx = FhirContext.forCached(FhirVersionEnum.R4); + private static final FhirContext ourCtx = FhirContext.forR4Cached(); @Mock private PlatformTransactionManager myTxManager; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/searchparam/MatchUrlServiceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/searchparam/MatchUrlServiceTest.java index 5b47c24a5be..ccf59fce433 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/searchparam/MatchUrlServiceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/searchparam/MatchUrlServiceTest.java @@ -1,14 +1,13 @@ package ca.uhn.fhir.jpa.searchparam; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.jpa.config.TestDstu3Config; import ca.uhn.fhir.jpa.dao.BaseJpaTest; -import ca.uhn.fhir.rest.server.util.ISearchParamRegistry; import ca.uhn.fhir.jpa.searchparam.util.Dstu3DistanceHelper; import ca.uhn.fhir.rest.param.QuantityParam; import ca.uhn.fhir.rest.param.ReferenceParam; +import ca.uhn.fhir.rest.server.util.ISearchParamRegistry; import org.hl7.fhir.dstu3.model.Condition; import org.hl7.fhir.dstu3.model.Location; import org.junit.jupiter.api.Test; @@ -30,7 +29,7 @@ import static org.mockito.Mockito.when; @ContextConfiguration(classes = {TestDstu3Config.class}) public class MatchUrlServiceTest extends BaseJpaTest { - private static FhirContext ourCtx = FhirContext.forCached(FhirVersionEnum.DSTU3); + private static final FhirContext ourCtx = FhirContext.forDstu3Cached(); @Autowired MatchUrlService myMatchUrlService; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java index fb0bb5230dd..f6d155b268f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.stresstest; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.interceptor.executor.InterceptorService; import ca.uhn.fhir.interceptor.model.ReadPartitionIdRequestDetails; @@ -110,7 +109,7 @@ import static org.mockito.Mockito.when; public class GiantTransactionPerfTest { private static final Logger ourLog = LoggerFactory.getLogger(GiantTransactionPerfTest.class); - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myCtx = FhirContext.forR4Cached(); private FhirSystemDaoR4 mySystemDao; private IInterceptorBroadcaster myInterceptorSvc; private TransactionProcessor myTransactionProcessor; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/StressTestParserTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/StressTestParserTest.java index e0a8c46726c..f0f5d41113c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/StressTestParserTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/StressTestParserTest.java @@ -1,10 +1,8 @@ package ca.uhn.fhir.jpa.stresstest; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.test.BaseTest; import ca.uhn.fhir.util.StopWatch; -import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.model.Bundle; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -24,7 +22,7 @@ public class StressTestParserTest extends BaseTest { @Test @Disabled public void test() throws IOException { - FhirContext ctx = FhirContext.forCached(FhirVersionEnum.R4); + FhirContext ctx = FhirContext.forR4Cached(); String input = loadResource("/org/hl7/fhir/r4/model/valueset/valuesets.xml"); Bundle parsed = ctx.newXmlParser().parseResource(Bundle.class, input); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionsR5Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionsR5Test.java index c99d943d134..d6eaae2a64d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionsR5Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionsR5Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.subscription; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.provider.r5.BaseResourceProviderR5Test; import ca.uhn.fhir.jpa.subscription.channel.impl.LinkedBlockingChannel; @@ -225,7 +224,7 @@ public abstract class BaseSubscriptionsR5Test extends BaseResourceProviderR5Test @BeforeAll public static void startListenerServer() throws Exception { - RestfulServer ourListenerRestServer = new RestfulServer(FhirContext.forCached(FhirVersionEnum.R5)); + RestfulServer ourListenerRestServer = new RestfulServer(FhirContext.forR5Cached()); ObservationListener obsListener = new ObservationListener(); ourListenerRestServer.setResourceProviders(obsListener); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/FhirServiceUtil.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/FhirServiceUtil.java index c3928d03cca..168209f9830 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/FhirServiceUtil.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/FhirServiceUtil.java @@ -1,11 +1,9 @@ package ca.uhn.fhir.jpa.subscription; -import ca.uhn.fhir.context.FhirVersionEnum; -import org.hl7.fhir.instance.model.api.IBaseResource; - import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.client.api.IGenericClient; +import org.hl7.fhir.instance.model.api.IBaseResource; public class FhirServiceUtil { @@ -16,12 +14,12 @@ public class FhirServiceUtil { public static final String REST_HOOK_ENDPOINT = "http://localhost:10080/rest-hook"; public static IGenericClient getFhirDstu3Client() { - FhirContext ctx = FhirContext.forCached(FhirVersionEnum.DSTU3); + FhirContext ctx = FhirContext.forDstu3Cached(); return ctx.newRestfulGenericClient(FHIR_DSTU3_URL); } public static IGenericClient getFhirDstu2Client() { - FhirContext ctx = FhirContext.forCached(FhirVersionEnum.DSTU2); + FhirContext ctx = FhirContext.forDstu2Cached(); return ctx.newRestfulGenericClient(FHIR_DSTU2_URL); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/SubscriptionValidatingInterceptorTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/SubscriptionValidatingInterceptorTest.java index 543546ec9ab..8e829406d72 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/SubscriptionValidatingInterceptorTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/SubscriptionValidatingInterceptorTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.subscription; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.subscription.match.matcher.matching.SubscriptionStrategyEvaluator; import ca.uhn.fhir.jpa.subscription.match.registry.SubscriptionCanonicalizer; @@ -26,7 +25,7 @@ public class SubscriptionValidatingInterceptorTest { @Mock public DaoRegistry myDaoRegistry; private SubscriptionValidatingInterceptor mySvc; - private FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myCtx = FhirContext.forR4Cached(); @Mock private SubscriptionStrategyEvaluator mySubscriptionStrategyEvaluator; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookActivatesPreExistingSubscriptionsR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookActivatesPreExistingSubscriptionsR4Test.java index c8383e05398..4c6d4fcf2ee 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookActivatesPreExistingSubscriptionsR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookActivatesPreExistingSubscriptionsR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.subscription.resthook; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.provider.r4.BaseResourceProviderR4Test; import ca.uhn.fhir.jpa.subscription.SubscriptionTestUtil; import ca.uhn.fhir.jpa.subscription.submit.interceptor.SubscriptionMatcherInterceptor; @@ -164,7 +163,7 @@ public class RestHookActivatesPreExistingSubscriptionsR4Test extends BaseResourc @BeforeAll public static void startListenerServer() throws Exception { - ourListenerRestServer = new RestfulServer(FhirContext.forCached(FhirVersionEnum.R4)); + ourListenerRestServer = new RestfulServer(FhirContext.forR4Cached()); ObservationListener obsListener = new ObservationListener(); ourListenerRestServer.setResourceProviders(obsListener); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestDstu2Test.java index fa642b17864..cde305c056b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestDstu2Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.subscription.resthook; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.provider.BaseResourceProviderDstu2Test; import ca.uhn.fhir.jpa.subscription.SubscriptionTestUtil; @@ -28,7 +27,11 @@ import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; -import org.junit.jupiter.api.*; import static org.hamcrest.MatcherAssert.assertThat; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import javax.validation.constraints.NotNull; @@ -38,7 +41,11 @@ import java.util.stream.Collectors; import static ca.uhn.fhir.jpa.subscription.resthook.RestHookTestDstu3Test.logAllInterceptors; import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.jupiter.api.Assertions.*; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.fail; /** * Test the rest-hook subscriptions @@ -46,13 +53,13 @@ import static org.junit.jupiter.api.Assertions.*; public class RestHookTestDstu2Test extends BaseResourceProviderDstu2Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(RestHookTestDstu2Test.class); - private static List ourCreatedObservations = Lists.newArrayList(); + private static final List ourCreatedObservations = Lists.newArrayList(); private static int ourListenerPort; private static RestfulServer ourListenerRestServer; private static Server ourListenerServer; private static String ourListenerServerBase; - private static List ourUpdatedObservations = Lists.newArrayList(); - private List mySubscriptionIds = new ArrayList(); + private static final List ourUpdatedObservations = Lists.newArrayList(); + private final List mySubscriptionIds = new ArrayList(); @Autowired private SubscriptionTestUtil mySubscriptionTestUtil; @@ -325,7 +332,7 @@ public class RestHookTestDstu2Test extends BaseResourceProviderDstu2Test { @BeforeAll public static void startListenerServer() throws Exception { - ourListenerRestServer = new RestfulServer(FhirContext.forCached(FhirVersionEnum.DSTU2)); + ourListenerRestServer = new RestfulServer(FhirContext.forDstu2Cached()); ObservationListener obsListener = new ObservationListener(); ourListenerRestServer.setResourceProviders(obsListener); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestDstu3Test.java index 310bbd35715..b5715d7291d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestDstu3Test.java @@ -1,14 +1,13 @@ package ca.uhn.fhir.jpa.subscription.resthook; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.interceptor.api.IInterceptorService; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.provider.dstu3.BaseResourceProviderDstu3Test; import ca.uhn.fhir.jpa.subscription.NotificationServlet; import ca.uhn.fhir.jpa.subscription.SubscriptionTestUtil; -import ca.uhn.fhir.jpa.subscription.util.SubscriptionDebugLogInterceptor; import ca.uhn.fhir.jpa.subscription.match.matcher.matching.SubscriptionMatchingStrategy; +import ca.uhn.fhir.jpa.subscription.util.SubscriptionDebugLogInterceptor; import ca.uhn.fhir.rest.annotation.Create; import ca.uhn.fhir.rest.annotation.ResourceParam; import ca.uhn.fhir.rest.annotation.Update; @@ -24,10 +23,22 @@ import com.google.common.collect.Lists; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; -import org.hl7.fhir.dstu3.model.*; +import org.hl7.fhir.dstu3.model.CodeableConcept; +import org.hl7.fhir.dstu3.model.Coding; +import org.hl7.fhir.dstu3.model.CommunicationRequest; +import org.hl7.fhir.dstu3.model.DateTimeType; +import org.hl7.fhir.dstu3.model.IdType; +import org.hl7.fhir.dstu3.model.Observation; +import org.hl7.fhir.dstu3.model.Organization; +import org.hl7.fhir.dstu3.model.StringType; +import org.hl7.fhir.dstu3.model.Subscription; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; -import org.junit.jupiter.api.*; import static org.hamcrest.MatcherAssert.assertThat; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import javax.servlet.http.HttpServletRequest; @@ -40,8 +51,15 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import static org.awaitility.Awaitility.await; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; /** * Test the rest-hook subscriptions @@ -49,18 +67,18 @@ import static org.junit.jupiter.api.Assertions.*; public class RestHookTestDstu3Test extends BaseResourceProviderDstu3Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(RestHookTestDstu3Test.class); - private static List ourCreatedObservations = Collections.synchronizedList(Lists.newArrayList()); + private static final List ourCreatedObservations = Collections.synchronizedList(Lists.newArrayList()); private static int ourListenerPort; private static RestfulServer ourListenerRestServer; private static Server ourListenerServer; private static String ourListenerServerBase; - private static List ourUpdatedObservations = Collections.synchronizedList(Lists.newArrayList()); - private static List ourContentTypes = Collections.synchronizedList(new ArrayList<>()); + private static final List ourUpdatedObservations = Collections.synchronizedList(Lists.newArrayList()); + private static final List ourContentTypes = Collections.synchronizedList(new ArrayList<>()); private static NotificationServlet ourNotificationServlet; private static String ourNotificationListenerServer; private static CountDownLatch communicationRequestListenerLatch; - private static SubscriptionDebugLogInterceptor ourSubscriptionDebugLogInterceptor = new SubscriptionDebugLogInterceptor(); - private List mySubscriptionIds = Collections.synchronizedList(new ArrayList<>()); + private static final SubscriptionDebugLogInterceptor ourSubscriptionDebugLogInterceptor = new SubscriptionDebugLogInterceptor(); + private final List mySubscriptionIds = Collections.synchronizedList(new ArrayList<>()); @Autowired private SubscriptionTestUtil mySubscriptionTestUtil; @@ -638,7 +656,7 @@ public class RestHookTestDstu3Test extends BaseResourceProviderDstu3Test { @BeforeAll public static void startListenerServer() throws Exception { - ourListenerRestServer = new RestfulServer(FhirContext.forCached(FhirVersionEnum.DSTU3)); + ourListenerRestServer = new RestfulServer(FhirContext.forDstu3Cached()); ObservationListener obsListener = new ObservationListener(); CommunicationRequestListener crListener = new CommunicationRequestListener(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestWithInterceptorRegisteredToDaoConfigDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestWithInterceptorRegisteredToDaoConfigDstu2Test.java index 904b0b1653f..7e24d49a2a2 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestWithInterceptorRegisteredToDaoConfigDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestWithInterceptorRegisteredToDaoConfigDstu2Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.subscription.resthook; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.provider.BaseResourceProviderDstu2Test; import ca.uhn.fhir.jpa.subscription.SubscriptionTestUtil; @@ -47,12 +46,12 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; public class RestHookTestWithInterceptorRegisteredToDaoConfigDstu2Test extends BaseResourceProviderDstu2Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(RestHookTestWithInterceptorRegisteredToDaoConfigDstu2Test.class); - private static List ourCreatedObservations = Collections.synchronizedList(Lists.newArrayList()); + private static final List ourCreatedObservations = Collections.synchronizedList(Lists.newArrayList()); private static int ourListenerPort; private static RestfulServer ourListenerRestServer; private static Server ourListenerServer; private static String ourListenerServerBase; - private static List ourUpdatedObservations = Collections.synchronizedList(Lists.newArrayList()); + private static final List ourUpdatedObservations = Collections.synchronizedList(Lists.newArrayList()); @Autowired protected SubscriptionRegistry mySubscriptionRegistry; @Autowired @@ -309,7 +308,7 @@ public class RestHookTestWithInterceptorRegisteredToDaoConfigDstu2Test extends B @BeforeAll public static void startListenerServer() throws Exception { - ourListenerRestServer = new RestfulServer(FhirContext.forCached(FhirVersionEnum.DSTU2)); + ourListenerRestServer = new RestfulServer(FhirContext.forDstu2Cached()); ObservationListener obsListener = new ObservationListener(); ourListenerRestServer.setResourceProviders(obsListener); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestWithInterceptorRegisteredToDaoConfigDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestWithInterceptorRegisteredToDaoConfigDstu3Test.java index c9bc7b33b41..81ffcab1315 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestWithInterceptorRegisteredToDaoConfigDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestWithInterceptorRegisteredToDaoConfigDstu3Test.java @@ -2,7 +2,6 @@ package ca.uhn.fhir.jpa.subscription.resthook; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.provider.dstu3.BaseResourceProviderDstu3Test; import ca.uhn.fhir.jpa.subscription.SubscriptionTestUtil; @@ -42,13 +41,13 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; */ public class RestHookTestWithInterceptorRegisteredToDaoConfigDstu3Test extends BaseResourceProviderDstu3Test { - private static List ourCreatedObservations = Collections.synchronizedList(Lists.newArrayList()); + private static final List ourCreatedObservations = Collections.synchronizedList(Lists.newArrayList()); private static int ourListenerPort; private static RestfulServer ourListenerRestServer; private static Server ourListenerServer; private static String ourListenerServerBase; private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(RestHookTestWithInterceptorRegisteredToDaoConfigDstu3Test.class); - private static List ourUpdatedObservations = Collections.synchronizedList(Lists.newArrayList()); + private static final List ourUpdatedObservations = Collections.synchronizedList(Lists.newArrayList()); @Autowired private SubscriptionTestUtil mySubscriptionTestUtil; @@ -266,7 +265,7 @@ public class RestHookTestWithInterceptorRegisteredToDaoConfigDstu3Test extends B @BeforeAll public static void startListenerServer() throws Exception { - ourListenerRestServer = new RestfulServer(FhirContext.forCached(FhirVersionEnum.DSTU3)); + ourListenerRestServer = new RestfulServer(FhirContext.forDstu3Cached()); ObservationListener obsListener = new ObservationListener(); ourListenerRestServer.setResourceProviders(obsListener); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestWithInterceptorRegisteredToDaoConfigR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestWithInterceptorRegisteredToDaoConfigR4Test.java index f1e3593c89c..35ecf3cda06 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestWithInterceptorRegisteredToDaoConfigR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestWithInterceptorRegisteredToDaoConfigR4Test.java @@ -2,7 +2,6 @@ package ca.uhn.fhir.jpa.subscription.resthook; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.provider.r4.BaseResourceProviderR4Test; import ca.uhn.fhir.jpa.subscription.SubscriptionTestUtil; @@ -20,28 +19,36 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.model.*; -import org.junit.jupiter.api.*; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; - +import org.hl7.fhir.r4.model.CodeableConcept; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Subscription; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import java.util.Collections; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; + /** * Test the rest-hook subscriptions */ public class RestHookTestWithInterceptorRegisteredToDaoConfigR4Test extends BaseResourceProviderR4Test { - private static List ourCreatedObservations = Collections.synchronizedList(Lists.newArrayList()); + private static final List ourCreatedObservations = Collections.synchronizedList(Lists.newArrayList()); private static int ourListenerPort; private static RestfulServer ourListenerRestServer; private static Server ourListenerServer; private static String ourListenerServerBase; private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(RestHookTestWithInterceptorRegisteredToDaoConfigR4Test.class); - private static List ourUpdatedObservations = Collections.synchronizedList(Lists.newArrayList()); + private static final List ourUpdatedObservations = Collections.synchronizedList(Lists.newArrayList()); @Autowired private SubscriptionTestUtil mySubscriptionTestUtil; @@ -270,7 +277,7 @@ public class RestHookTestWithInterceptorRegisteredToDaoConfigR4Test extends Base @BeforeAll public static void startListenerServer() throws Exception { - ourListenerRestServer = new RestfulServer(FhirContext.forCached(FhirVersionEnum.R4)); + ourListenerRestServer = new RestfulServer(FhirContext.forR4Cached()); ObservationListener obsListener = new ObservationListener(); ourListenerRestServer.setResourceProviders(obsListener); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookWithInterceptorR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookWithInterceptorR4Test.java index faa775e0771..4e2f76b3dd7 100755 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookWithInterceptorR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookWithInterceptorR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.subscription.resthook; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.interceptor.api.Hook; import ca.uhn.fhir.interceptor.api.IInterceptorService; import ca.uhn.fhir.interceptor.api.Interceptor; @@ -61,7 +60,7 @@ public class RestHookWithInterceptorR4Test extends BaseSubscriptionsR4Test { private static boolean ourNextAfterRestHookDeliveryReturn; private static boolean ourHitAfterRestHookDelivery; private static boolean ourNextAddHeader; - private static FhirContext ourCtx = FhirContext.forCached(FhirVersionEnum.R4); + private static final FhirContext ourCtx = FhirContext.forR4Cached(); @Autowired StoppableSubscriptionDeliveringRestHookSubscriber myStoppableSubscriptionDeliveringRestHookSubscriber; @@ -277,7 +276,7 @@ public class RestHookWithInterceptorR4Test extends BaseSubscriptionsR4Test { public static class AttributeCarryingInterceptor { private ResourceDeliveryMessage myLastDelivery; - private CountDownLatch myFinishedLatch = new CountDownLatch(1); + private final CountDownLatch myFinishedLatch = new CountDownLatch(1); public CountDownLatch getFinishedLatch() { return myFinishedLatch; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/SubscriptionTriggeringDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/SubscriptionTriggeringDstu3Test.java index ef2ff92b8f4..db91b394e8a 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/SubscriptionTriggeringDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/SubscriptionTriggeringDstu3Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.subscription.resthook; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.util.JpaConstants; @@ -64,12 +63,12 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te private static RestfulServer ourListenerRestServer; private static Server ourListenerServer; private static String ourListenerServerBase; - private static List ourCreatedObservations = Collections.synchronizedList(Lists.newArrayList()); - private static List ourUpdatedObservations = Collections.synchronizedList(Lists.newArrayList()); - private static List ourCreatedPatients = Lists.newArrayList(); - private static List ourUpdatedPatients = Lists.newArrayList(); - private static List ourContentTypes = new ArrayList<>(); - private List mySubscriptionIds = new ArrayList<>(); + private static final List ourCreatedObservations = Collections.synchronizedList(Lists.newArrayList()); + private static final List ourUpdatedObservations = Collections.synchronizedList(Lists.newArrayList()); + private static final List ourCreatedPatients = Lists.newArrayList(); + private static final List ourUpdatedPatients = Lists.newArrayList(); + private static final List ourContentTypes = new ArrayList<>(); + private final List mySubscriptionIds = new ArrayList<>(); @Autowired private SubscriptionTestUtil mySubscriptionTestUtil; @@ -555,7 +554,7 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te @BeforeAll public static void startListenerServer() throws Exception { - ourListenerRestServer = new RestfulServer(FhirContext.forCached(FhirVersionEnum.DSTU3)); + ourListenerRestServer = new RestfulServer(FhirContext.forDstu3Cached()); ObservationListener obsListener = new ObservationListener(); PatientListener ptListener = new PatientListener(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologyLoaderSvcLoincTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologyLoaderSvcLoincTest.java index 96c8f32762e..23feac7194b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologyLoaderSvcLoincTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologyLoaderSvcLoincTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.term; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.entity.TermCodeSystemVersion; import ca.uhn.fhir.jpa.entity.TermConcept; import ca.uhn.fhir.jpa.entity.TermConceptDesignation; @@ -432,7 +431,7 @@ public class TerminologyLoaderSvcLoincTest extends BaseLoaderTest { // IEEE Medical Device Codes conceptMap = conceptMaps.get(LoincIeeeMedicalDeviceCodeHandler.LOINC_IEEE_CM_ID); - ourLog.debug(FhirContext.forCached(FhirVersionEnum.R4).newXmlParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); + ourLog.debug(FhirContext.forR4Cached().newXmlParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); assertEquals(LoincIeeeMedicalDeviceCodeHandler.LOINC_IEEE_CM_NAME, conceptMap.getName()); assertEquals(LoincIeeeMedicalDeviceCodeHandler.LOINC_IEEE_CM_URI, conceptMap.getUrl()); assertEquals("Beta.1", conceptMap.getVersion()); @@ -458,7 +457,7 @@ public class TerminologyLoaderSvcLoincTest extends BaseLoaderTest { // Group - Parent vs = valueSets.get("LG100-4"); - ourLog.info(FhirContext.forCached(FhirVersionEnum.R4).newXmlParser().setPrettyPrint(true).encodeResourceToString(vs)); + ourLog.info(FhirContext.forR4Cached().newXmlParser().setPrettyPrint(true).encodeResourceToString(vs)); assertEquals("Chem_DrugTox_Chal_Sero_Allergy", vs.getName()); assertEquals("http://loinc.org/vs/LG100-4", vs.getUrl()); assertEquals(1, vs.getCompose().getInclude().size()); @@ -467,7 +466,7 @@ public class TerminologyLoaderSvcLoincTest extends BaseLoaderTest { // Group - Child vs = valueSets.get("LG1695-8"); - ourLog.info(FhirContext.forCached(FhirVersionEnum.R4).newXmlParser().setPrettyPrint(true).encodeResourceToString(vs)); + ourLog.info(FhirContext.forR4Cached().newXmlParser().setPrettyPrint(true).encodeResourceToString(vs)); assertEquals("1,4-Dichlorobenzene|MCnc|Pt|ANYBldSerPl", vs.getName()); assertEquals("http://loinc.org/vs/LG1695-8", vs.getUrl()); assertEquals(1, vs.getCompose().getInclude().size()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/util/jsonpatch/JsonPatchUtilsTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/util/jsonpatch/JsonPatchUtilsTest.java index 059adf0234c..cb7eb0246a8 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/util/jsonpatch/JsonPatchUtilsTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/util/jsonpatch/JsonPatchUtilsTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.util.jsonpatch; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.dao.BaseJpaTest; import ca.uhn.fhir.jpa.patch.JsonPatchUtils; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; @@ -14,11 +13,12 @@ import org.springframework.transaction.PlatformTransactionManager; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.not; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; public class JsonPatchUtilsTest extends BaseJpaTest { - private static final FhirContext ourCtx = FhirContext.forCached(FhirVersionEnum.R4); + private static final FhirContext ourCtx = FhirContext.forR4Cached(); private static final Logger ourLog = LoggerFactory.getLogger(JsonPatchUtilsTest.class); @SuppressWarnings("JsonStandardCompliance") diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/AttachmentUtilTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/AttachmentUtilTest.java index 69b2b89b1b8..072b1a5d6b2 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/AttachmentUtilTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/AttachmentUtilTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.validator; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.util.AttachmentUtil; import org.hl7.fhir.instance.model.api.ICompositeType; import org.junit.jupiter.api.Test; @@ -12,7 +11,7 @@ public class AttachmentUtilTest { @Test public void testCreateAttachmentDstu3() { - FhirContext ctx = FhirContext.forCached(FhirVersionEnum.DSTU3); + FhirContext ctx = FhirContext.forDstu3Cached(); ICompositeType attachment = AttachmentUtil.newInstance(ctx); AttachmentUtil.setData(ctx, attachment, new byte[]{0, 1, 2, 3}); AttachmentUtil.setUrl(ctx, attachment, "http://foo"); @@ -27,7 +26,7 @@ public class AttachmentUtilTest { @Test public void testCreateAttachmentR4() { - FhirContext ctx = FhirContext.forCached(FhirVersionEnum.R4); + FhirContext ctx = FhirContext.forR4Cached(); ICompositeType attachment = AttachmentUtil.newInstance(ctx); AttachmentUtil.setData(ctx, attachment, new byte[]{0, 1, 2, 3}); AttachmentUtil.setUrl(ctx, attachment, "http://foo"); @@ -42,7 +41,7 @@ public class AttachmentUtilTest { @Test public void testCreateAttachmentR5() { - FhirContext ctx = FhirContext.forCached(FhirVersionEnum.R5); + FhirContext ctx = FhirContext.forR5Cached(); ICompositeType attachment = AttachmentUtil.newInstance(ctx); AttachmentUtil.setData(ctx, attachment, new byte[]{0, 1, 2, 3}); AttachmentUtil.setUrl(ctx, attachment, "http://foo"); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/ValidatorAcrossVersionsTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/ValidatorAcrossVersionsTest.java index 0fbfcc025b7..ed9722353d5 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/ValidatorAcrossVersionsTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/ValidatorAcrossVersionsTest.java @@ -1,19 +1,16 @@ package ca.uhn.fhir.validator; -import static org.junit.jupiter.api.Assertions.*; - -import ca.uhn.fhir.context.FhirVersionEnum; -import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.Test; - import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse; import ca.uhn.fhir.model.primitive.DateTimeDt; -import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ValidationResult; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; /** * This test doesn't really belong to JPA, but it needs to be in a project with both DSTU2 and HL7ORG_DSTU2 present, so here will do. @@ -23,7 +20,7 @@ public class ValidatorAcrossVersionsTest { @Test public void testWrongContextVersion() { - FhirContext ctxDstu2 = FhirContext.forCached(FhirVersionEnum.DSTU2); + FhirContext ctxDstu2 = FhirContext.forDstu2Cached(); try { ctxDstu2.getResourceDefinition(org.hl7.fhir.dstu3.model.Patient.class); fail(); @@ -37,7 +34,7 @@ public class ValidatorAcrossVersionsTest { @Test public void testValidateProfileOnDstu2Resource() { - FhirContext ctxDstu2 = FhirContext.forCached(FhirVersionEnum.DSTU2); + FhirContext ctxDstu2 = FhirContext.forDstu2Cached(); FhirValidator val = ctxDstu2.newValidator(); val.setValidateAgainstStandardSchema(false); val.setValidateAgainstStandardSchematron(false); diff --git a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu3Test.java b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu3Test.java index d3c18e9414f..5e70f8f7fe2 100644 --- a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu3Test.java +++ b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu3Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.searchparam.extractor; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.context.phonetic.IPhoneticEncoder; @@ -49,7 +48,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; public class SearchParamExtractorDstu3Test { - private static FhirContext ourCtx = FhirContext.forCached(FhirVersionEnum.DSTU3); + private static FhirContext ourCtx = FhirContext.forDstu3Cached(); @Test public void testParamWithOrInPath() { diff --git a/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorTest.java b/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorTest.java index d80c750f92b..c7afe2ad42a 100644 --- a/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorTest.java +++ b/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.rest.openapi; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.interceptor.api.Hook; import ca.uhn.fhir.interceptor.api.Pointcut; import ca.uhn.fhir.model.api.annotation.Description; @@ -70,7 +69,7 @@ import static org.junit.jupiter.api.Assertions.assertNull; public class OpenApiInterceptorTest { private static final Logger ourLog = LoggerFactory.getLogger(OpenApiInterceptorTest.class); - private FhirContext myFhirContext = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myFhirContext = FhirContext.forR4Cached(); @RegisterExtension @Order(0) protected RestfulServerExtension myServer = new RestfulServerExtension(myFhirContext) diff --git a/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorWithAuthorizationInterceptorTest.java b/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorWithAuthorizationInterceptorTest.java index 766e79e5d89..ff9f3e6b9fd 100644 --- a/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorWithAuthorizationInterceptorTest.java +++ b/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorWithAuthorizationInterceptorTest.java @@ -1,50 +1,20 @@ package ca.uhn.fhir.rest.openapi; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; -import ca.uhn.fhir.interceptor.api.Hook; -import ca.uhn.fhir.interceptor.api.Pointcut; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; -import ca.uhn.fhir.rest.annotation.IdParam; -import ca.uhn.fhir.rest.annotation.Operation; -import ca.uhn.fhir.rest.annotation.OperationParam; -import ca.uhn.fhir.rest.annotation.Patch; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.PatchTypeEnum; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor; import ca.uhn.fhir.rest.server.interceptor.auth.AuthorizationInterceptor; import ca.uhn.fhir.rest.server.interceptor.auth.IAuthRule; import ca.uhn.fhir.rest.server.interceptor.auth.RuleBuilder; import ca.uhn.fhir.rest.server.provider.HashMapResourceProvider; -import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; -import ca.uhn.fhir.test.utilities.HtmlUtil; import ca.uhn.fhir.test.utilities.server.RestfulServerExtension; -import ca.uhn.fhir.util.ExtensionConstants; -import com.gargoylesoftware.htmlunit.html.DomElement; -import com.gargoylesoftware.htmlunit.html.HtmlDivision; -import com.gargoylesoftware.htmlunit.html.HtmlPage; import io.swagger.v3.core.util.Yaml; import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.PathItem; import org.apache.commons.io.IOUtils; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; -import org.hamcrest.Matchers; -import org.hl7.fhir.instance.model.api.IBaseBundle; -import org.hl7.fhir.instance.model.api.IBaseCoding; -import org.hl7.fhir.instance.model.api.IBaseConformance; -import org.hl7.fhir.instance.model.api.IBaseParameters; -import org.hl7.fhir.instance.model.api.IBaseReference; -import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.instance.model.api.IPrimitiveType; -import org.hl7.fhir.r4.model.CapabilityStatement; -import org.hl7.fhir.r4.model.DecimalType; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Patient; import org.junit.jupiter.api.AfterEach; @@ -55,25 +25,17 @@ import org.junit.jupiter.api.extension.RegisterExtension; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.servlet.http.HttpServletRequest; import java.io.IOException; -import java.net.URL; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; import java.util.List; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.containsString; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; public class OpenApiInterceptorWithAuthorizationInterceptorTest { private static final Logger ourLog = LoggerFactory.getLogger(OpenApiInterceptorWithAuthorizationInterceptorTest.class); - private FhirContext myFhirContext = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myFhirContext = FhirContext.forR4Cached(); @RegisterExtension @Order(0) protected RestfulServerExtension myServer = new RestfulServerExtension(myFhirContext) diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGeneratorDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGeneratorDstu2Test.java index a3742c8ea60..44c6aa8cd14 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGeneratorDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGeneratorDstu2Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.narrative; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.model.dstu2.resource.Practitioner; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; @@ -13,7 +12,7 @@ public class CustomThymeleafNarrativeGeneratorDstu2Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(CustomThymeleafNarrativeGeneratorDstu2Test.class); - private FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.DSTU2); + private final FhirContext myCtx = FhirContext.forDstu2Cached(); @AfterEach public void after() { diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorDstu2Test.java index 58beb7f4a0b..f96f093cc9a 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorDstu2Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.narrative; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.model.api.TemporalPrecisionEnum; import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; import ca.uhn.fhir.model.dstu2.composite.QuantityDt; @@ -37,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; public class DefaultThymeleafNarrativeGeneratorDstu2Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(DefaultThymeleafNarrativeGeneratorDstu2Test.class); - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.DSTU2); + private final FhirContext myCtx = FhirContext.forDstu2Cached(); private DefaultThymeleafNarrativeGenerator myGen; @BeforeEach diff --git a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorDstu3Test.java b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorDstu3Test.java index c5dceef79ac..c5827989db2 100644 --- a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorDstu3Test.java +++ b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorDstu3Test.java @@ -1,16 +1,27 @@ package ca.uhn.fhir.narrative; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.util.TestUtil; import org.apache.commons.collections.Transformer; import org.apache.commons.collections.map.LazyMap; import org.hamcrest.core.StringContains; -import org.hl7.fhir.dstu3.model.*; +import org.hl7.fhir.dstu3.model.CodeableConcept; +import org.hl7.fhir.dstu3.model.Coding; +import org.hl7.fhir.dstu3.model.DateTimeType; +import org.hl7.fhir.dstu3.model.DiagnosticReport; import org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus; +import org.hl7.fhir.dstu3.model.Medication; +import org.hl7.fhir.dstu3.model.MedicationRequest; import org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus; +import org.hl7.fhir.dstu3.model.Observation; import org.hl7.fhir.dstu3.model.Observation.ObservationStatus; +import org.hl7.fhir.dstu3.model.OperationOutcome; +import org.hl7.fhir.dstu3.model.Patient; +import org.hl7.fhir.dstu3.model.Quantity; +import org.hl7.fhir.dstu3.model.Reference; +import org.hl7.fhir.dstu3.model.SimpleQuantity; +import org.hl7.fhir.dstu3.model.StringType; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -30,7 +41,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; public class DefaultThymeleafNarrativeGeneratorDstu3Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(DefaultThymeleafNarrativeGeneratorDstu3Test.class); - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.DSTU3); + private final FhirContext myCtx = FhirContext.forDstu3Cached(); private DefaultThymeleafNarrativeGenerator myGen; @BeforeEach diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGeneratorR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGeneratorR4Test.java index 957551d03c5..012552f7896 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGeneratorR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGeneratorR4Test.java @@ -1,12 +1,9 @@ package ca.uhn.fhir.narrative; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; -import ca.uhn.fhir.util.TestUtil; import org.hl7.fhir.r4.model.Practitioner; import org.hl7.fhir.r4.model.Quantity; import org.hl7.fhir.r4.model.StringType; -import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; @@ -21,7 +18,7 @@ public class CustomThymeleafNarrativeGeneratorR4Test { /** * Don't use cached here since we modify the context */ - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myCtx = FhirContext.forR4Cached(); @AfterEach public void after() { diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorR4Test.java index 4847d922123..b67f5e6ba3c 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorR4Test.java @@ -1,14 +1,25 @@ package ca.uhn.fhir.narrative; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.util.TestUtil; import org.hamcrest.core.StringContains; -import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.CodeableConcept; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.DateTimeType; +import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus; +import org.hl7.fhir.r4.model.Medication; +import org.hl7.fhir.r4.model.MedicationRequest; import org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus; +import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Observation.ObservationStatus; +import org.hl7.fhir.r4.model.OperationOutcome; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Quantity; +import org.hl7.fhir.r4.model.Reference; +import org.hl7.fhir.r4.model.SimpleQuantity; +import org.hl7.fhir.r4.model.StringType; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -23,7 +34,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; public class DefaultThymeleafNarrativeGeneratorR4Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(DefaultThymeleafNarrativeGeneratorR4Test.class); - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myCtx = FhirContext.forR4Cached(); private DefaultThymeleafNarrativeGenerator myGen; @BeforeEach @@ -115,7 +126,7 @@ public class DefaultThymeleafNarrativeGeneratorR4Test { Observation obs = new Observation(); obs.getCode().addCoding().setCode("1938HB").setDisplay("Hemoglobin"); obs.setValue(new Quantity(null, 2.223, null, null, "mg/L")); - obs.addReferenceRange().setLow((SimpleQuantity) new SimpleQuantity().setValue(2.20)).setHigh((SimpleQuantity) new SimpleQuantity().setValue(2.99)); + obs.addReferenceRange().setLow(new SimpleQuantity().setValue(2.20)).setHigh(new SimpleQuantity().setValue(2.99)); obs.setStatus(ObservationStatus.FINAL); obs.addNote().setText("This is a result comment"); diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/CapabilityStatementCacheR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/CapabilityStatementCacheR4Test.java index 426ecdb22d3..2df0330e34b 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/CapabilityStatementCacheR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/CapabilityStatementCacheR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.rest.server; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.rest.annotation.Metadata; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.server.method.ConformanceMethodBinding; @@ -24,7 +23,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; public class CapabilityStatementCacheR4Test { - private final FhirContext myFhirContext = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myFhirContext = FhirContext.forR4Cached(); @RegisterExtension protected final RestfulServerExtension myServerExtension = new RestfulServerExtension(myFhirContext) diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/CapabilityStatementCustomizationR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/CapabilityStatementCustomizationR4Test.java index 5be02c67f3d..a3aa25c673a 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/CapabilityStatementCustomizationR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/CapabilityStatementCustomizationR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.rest.server; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.interceptor.api.Hook; import ca.uhn.fhir.interceptor.api.Interceptor; import ca.uhn.fhir.interceptor.api.Pointcut; @@ -20,7 +19,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; public class CapabilityStatementCustomizationR4Test { - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myCtx = FhirContext.forR4Cached(); @Order(0) @RegisterExtension protected RestfulServerExtension myServerExtension = new RestfulServerExtension(myCtx); diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/ReadR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/ReadR4Test.java index dd76ccb61de..7bde8051f8b 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/ReadR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/ReadR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.rest.server; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.rest.annotation.IdParam; import ca.uhn.fhir.rest.annotation.Read; @@ -38,7 +37,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; public class ReadR4Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ReadR4Test.class); private static CloseableHttpClient ourClient; - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myCtx = FhirContext.forR4Cached(); @RegisterExtension public RestfulServerExtension myRestfulServerExtension = new RestfulServerExtension(myCtx); private int myPort; diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/SearchPreferHandlingInterceptorTest.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/SearchPreferHandlingInterceptorTest.java index 53718bc6c2d..cae4b588b19 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/SearchPreferHandlingInterceptorTest.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/SearchPreferHandlingInterceptorTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.rest.server; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; import ca.uhn.fhir.model.valueset.BundleEntrySearchModeEnum; import ca.uhn.fhir.rest.annotation.OptionalParam; @@ -39,7 +38,7 @@ import static org.junit.jupiter.api.Assertions.fail; public class SearchPreferHandlingInterceptorTest { - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myCtx = FhirContext.forR4Cached(); @RegisterExtension public RestfulServerExtension myRestfulServerExtension = new RestfulServerExtension(myCtx) .registerProvider(new DummyPatientResourceProvider()) diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/SearchR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/SearchR4Test.java index 147f77a192a..ce6d5674cf9 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/SearchR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/SearchR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.rest.server; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; import ca.uhn.fhir.model.valueset.BundleEntrySearchModeEnum; @@ -17,9 +16,7 @@ import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor; import ca.uhn.fhir.rest.gclient.StringClientParam; import ca.uhn.fhir.rest.param.TokenAndListParam; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import ca.uhn.fhir.test.utilities.JettyUtil; import ca.uhn.fhir.test.utilities.server.RestfulServerExtension; -import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.util.UrlUtil; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ValidationResult; @@ -30,9 +27,6 @@ import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.servlet.ServletHandler; -import org.eclipse.jetty.servlet.ServletHolder; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.HumanName; @@ -68,7 +62,7 @@ public class SearchR4Test { private static CloseableHttpClient ourClient; private static TokenAndListParam ourIdentifiers; private static String ourLastMethod; - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myCtx = FhirContext.forR4Cached(); @RegisterExtension public RestfulServerExtension myRestfulServerExtension = new RestfulServerExtension(myCtx) .registerProvider(new DummyPatientResourceProvider()) diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/ServerInvalidDefinitionR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/ServerInvalidDefinitionR4Test.java index eac229a77c8..3e108855982 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/ServerInvalidDefinitionR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/ServerInvalidDefinitionR4Test.java @@ -1,8 +1,6 @@ package ca.uhn.fhir.rest.server; -import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; import ca.uhn.fhir.rest.annotation.IdParam; import ca.uhn.fhir.rest.annotation.Operation; @@ -14,34 +12,23 @@ import ca.uhn.fhir.rest.annotation.Update; import ca.uhn.fhir.rest.annotation.Validate; import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.api.server.IBundleProvider; -import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.param.TokenParam; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import ca.uhn.fhir.rest.server.provider.ServerCapabilityStatementProvider; import ca.uhn.fhir.test.utilities.server.MockServletUtil; -import ca.uhn.fhir.util.TestUtil; import com.google.common.collect.Lists; import org.hamcrest.core.StringContains; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.model.CapabilityStatement; import org.hl7.fhir.r4.model.DateType; import org.hl7.fhir.r4.model.IdType; -import org.hl7.fhir.r4.model.OperationDefinition; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.StringType; -import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Test; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; - import java.util.List; -import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; public class ServerInvalidDefinitionR4Test extends BaseR4ServerTest { @@ -208,7 +195,7 @@ public class ServerInvalidDefinitionR4Test extends BaseR4ServerTest { } - RestfulServer rs = new RestfulServer(FhirContext.forCached(FhirVersionEnum.R4)); + RestfulServer rs = new RestfulServer(FhirContext.forR4Cached()); rs.setProviders(new PlainProviderWithExtendedOperationOnNoType()); rs.setServerAddressStrategy(new HardcodedServerAddressStrategy("http://localhost/baseR4")); diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/FhirTerserR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/FhirTerserR4Test.java index d44b17812dc..c48d36cf793 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/FhirTerserR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/FhirTerserR4Test.java @@ -3,7 +3,6 @@ package ca.uhn.fhir.util; import ca.uhn.fhir.context.BaseRuntimeChildDefinition; import ca.uhn.fhir.context.BaseRuntimeElementDefinition; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.model.api.annotation.Block; import ca.uhn.fhir.parser.DataFormatException; import com.google.common.collect.Lists; @@ -68,7 +67,7 @@ import static org.mockito.Mockito.when; public class FhirTerserR4Test { private static final Logger ourLog = LoggerFactory.getLogger(FhirTerserR4Test.class); - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myCtx = FhirContext.forR4Cached(); @Test public void testAddElement() { diff --git a/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR5Test.java b/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR5Test.java index baa2c7758fa..9bf0eda3f7a 100644 --- a/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR5Test.java +++ b/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR5Test.java @@ -1,12 +1,25 @@ package ca.uhn.fhir.rest.server; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.primitive.InstantDt; -import ca.uhn.fhir.rest.annotation.*; +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.Delete; +import ca.uhn.fhir.rest.annotation.History; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.IncludeParam; +import ca.uhn.fhir.rest.annotation.Operation; +import ca.uhn.fhir.rest.annotation.OperationParam; +import ca.uhn.fhir.rest.annotation.OptionalParam; +import ca.uhn.fhir.rest.annotation.Read; +import ca.uhn.fhir.rest.annotation.RequiredParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Search; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.annotation.Validate; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum; @@ -28,7 +41,8 @@ import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.validation.ValidationResult; import com.google.common.collect.Lists; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r5.model.*; +import org.hl7.fhir.r5.model.Bundle; +import org.hl7.fhir.r5.model.CapabilityStatement; import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestComponent; import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceComponent; import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent; @@ -36,9 +50,18 @@ import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResource import org.hl7.fhir.r5.model.CapabilityStatement.ConditionalDeleteStatus; import org.hl7.fhir.r5.model.CapabilityStatement.SystemRestfulInteraction; import org.hl7.fhir.r5.model.CapabilityStatement.TypeRestfulInteraction; +import org.hl7.fhir.r5.model.CodeType; +import org.hl7.fhir.r5.model.DateType; +import org.hl7.fhir.r5.model.DiagnosticReport; +import org.hl7.fhir.r5.model.Encounter; +import org.hl7.fhir.r5.model.Enumerations; import org.hl7.fhir.r5.model.Enumerations.PublicationStatus; +import org.hl7.fhir.r5.model.IdType; +import org.hl7.fhir.r5.model.OperationDefinition; import org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent; import org.hl7.fhir.r5.model.OperationDefinition.OperationKind; +import org.hl7.fhir.r5.model.Patient; +import org.hl7.fhir.r5.model.StringType; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -70,7 +93,7 @@ import static org.mockito.Mockito.when; public class ServerCapabilityStatementProviderR5Test { - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R5); + private final FhirContext myCtx = FhirContext.forR5Cached(); private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ServerCapabilityStatementProviderR5Test.class); private HttpServletRequest createHttpServletRequest() { @@ -212,7 +235,7 @@ public class ServerCapabilityStatementProviderR5Test { rs.init(createServletConfig()); CapabilityStatement serverConformance = (CapabilityStatement) sc.getServerConformance(createHttpServletRequest(), createRequestDetails(rs)); - List formatCodes = serverConformance.getFormat().stream().map(c -> c.getCode()).collect(Collectors.toList());; + List formatCodes = serverConformance.getFormat().stream().map(c -> c.getCode()).collect(Collectors.toList()); assertThat(formatCodes, hasItem(Constants.FORMAT_XML)); assertThat(formatCodes, hasItem(Constants.FORMAT_JSON)); diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/InMemoryTerminologyServerValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/InMemoryTerminologyServerValidationSupport.java index 810414aaa2b..8ccc2bc9926 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/InMemoryTerminologyServerValidationSupport.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/InMemoryTerminologyServerValidationSupport.java @@ -370,7 +370,7 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu @Nullable private org.hl7.fhir.r5.model.ValueSet expandValueSetDstu2(ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.model.dstu2.resource.ValueSet theInput, @Nullable String theWantSystemUrlAndVersion, @Nullable String theWantCode) { IParser parserRi = FhirContext.forCached(FhirVersionEnum.DSTU2_HL7ORG).newJsonParser(); - IParser parserHapi = FhirContext.forCached(FhirVersionEnum.DSTU2).newJsonParser(); + IParser parserHapi = FhirContext.forDstu2Cached().newJsonParser(); Function codeSystemLoader = t -> { ca.uhn.fhir.model.dstu2.resource.ValueSet codeSystem = theInput; @@ -408,9 +408,7 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu if (cs != null) { IPrimitiveType content = getFhirContext().newTerser().getSingleValueOrNull(cs, "content", IPrimitiveType.class); - if (!"not-present".equals(content.getValueAsString())) { - return true; - } + return !"not-present".equals(content.getValueAsString()); } return false; diff --git a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR4Test.java b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR4Test.java index ca366cab38a..daea5b0f1f7 100644 --- a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR4Test.java +++ b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR4Test.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.rest.server; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.model.util.JpaConstants; import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.model.api.annotation.Description; @@ -119,7 +118,7 @@ public class ServerCapabilityStatementProviderR4Test { public static final String PATIENT_SUB_SUB_2 = "PatientSubSub2"; public static final String PATIENT_TRIPLE_SUB = "PatientTripleSub"; private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ServerCapabilityStatementProviderR4Test.class); - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myCtx = FhirContext.forR4Cached(); private FhirValidator myValidator; private static Set toStrings(Collection theType) { diff --git a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/interceptor/ResponseTerminologyDisplayPopulationInterceptorTest.java b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/interceptor/ResponseTerminologyDisplayPopulationInterceptorTest.java index 65b5767d5cf..2b476d65a31 100644 --- a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/interceptor/ResponseTerminologyDisplayPopulationInterceptorTest.java +++ b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/interceptor/ResponseTerminologyDisplayPopulationInterceptorTest.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.rest.server.interceptor; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.context.support.ValidationSupportContext; import ca.uhn.fhir.rest.client.api.IGenericClient; @@ -21,7 +20,7 @@ import static org.junit.jupiter.api.Assertions.assertNull; public class ResponseTerminologyDisplayPopulationInterceptorTest { - private final FhirContext myCtx = FhirContext.forCached(FhirVersionEnum.R4); + private final FhirContext myCtx = FhirContext.forR4Cached(); @Order(0) @RegisterExtension protected RestfulServerExtension myServerExtension = new RestfulServerExtension(myCtx); diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/common/hapi/validation/support/CommonCodeSystemsTerminologyServiceTest.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/common/hapi/validation/support/CommonCodeSystemsTerminologyServiceTest.java index 863eac1fd4f..a099a68ac93 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/common/hapi/validation/support/CommonCodeSystemsTerminologyServiceTest.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/common/hapi/validation/support/CommonCodeSystemsTerminologyServiceTest.java @@ -1,7 +1,6 @@ package org.hl7.fhir.common.hapi.validation.support; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.support.ConceptValidationOptions; import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.context.support.ValidationSupportContext; @@ -168,7 +167,7 @@ public class CommonCodeSystemsTerminologyServiceTest { @Test public void testFetchCodeSystemBuiltIn_Iso3166_DSTU3() { - CommonCodeSystemsTerminologyService svc = new CommonCodeSystemsTerminologyService(FhirContext.forCached(FhirVersionEnum.DSTU3)); + CommonCodeSystemsTerminologyService svc = new CommonCodeSystemsTerminologyService(FhirContext.forDstu3Cached()); org.hl7.fhir.dstu3.model.CodeSystem cs = (org.hl7.fhir.dstu3.model.CodeSystem) svc.fetchCodeSystem(CommonCodeSystemsTerminologyService.COUNTRIES_CODESYSTEM_URL); assert cs != null; assertEquals(498, cs.getConcept().size()); @@ -176,7 +175,7 @@ public class CommonCodeSystemsTerminologyServiceTest { @Test public void testFetchCodeSystemBuiltIn_Iso3166_R5() { - CommonCodeSystemsTerminologyService svc = new CommonCodeSystemsTerminologyService(FhirContext.forCached(FhirVersionEnum.R5)); + CommonCodeSystemsTerminologyService svc = new CommonCodeSystemsTerminologyService(FhirContext.forR5Cached()); org.hl7.fhir.r5.model.CodeSystem cs = (org.hl7.fhir.r5.model.CodeSystem) svc.fetchCodeSystem(CommonCodeSystemsTerminologyService.COUNTRIES_CODESYSTEM_URL); assert cs != null; assertEquals(498, cs.getConcept().size()); @@ -184,7 +183,7 @@ public class CommonCodeSystemsTerminologyServiceTest { @Test public void testFetchCodeSystemBuiltIn_Iso3166_DSTU2() { - CommonCodeSystemsTerminologyService svc = new CommonCodeSystemsTerminologyService(FhirContext.forCached(FhirVersionEnum.DSTU2)); + CommonCodeSystemsTerminologyService svc = new CommonCodeSystemsTerminologyService(FhirContext.forDstu2Cached()); IBaseResource cs = svc.fetchCodeSystem(CommonCodeSystemsTerminologyService.COUNTRIES_CODESYSTEM_URL); assertEquals(null, cs); } From 59c8765e6ae9c46559c8d03a3f710a3684571707 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 13 Sep 2021 13:03:44 -0400 Subject: [PATCH 115/143] Add implementation to validate conditional URLs post-transaction --- .../jpa/dao/BaseTransactionProcessor.java | 43 ++++++++++++++++++- .../fhir/jpa/dao/r4/FhirSystemDaoR4Test.java | 23 ++++++---- .../src/test/resources/logback-test.xml | 2 +- .../matcher/InMemoryResourceMatcher.java | 1 + 4 files changed, 58 insertions(+), 11 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index ef476ec1d58..f98e01cb0b5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -44,7 +44,9 @@ import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.model.search.StorageProcessingMessage; import ca.uhn.fhir.jpa.searchparam.extractor.ResourceIndexedSearchParams; +import ca.uhn.fhir.jpa.searchparam.matcher.InMemoryMatchResult; import ca.uhn.fhir.jpa.searchparam.matcher.InMemoryResourceMatcher; +import ca.uhn.fhir.jpa.searchparam.matcher.SearchParamMatcher; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; import ca.uhn.fhir.parser.DataFormatException; @@ -64,6 +66,7 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.MethodNotAllowedException; import ca.uhn.fhir.rest.server.exceptions.NotModifiedException; import ca.uhn.fhir.rest.server.exceptions.PayloadTooLargeException; +import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor; import ca.uhn.fhir.rest.server.method.BaseMethodBinding; import ca.uhn.fhir.rest.server.method.BaseResourceReturningMethodBinding; @@ -157,6 +160,8 @@ public abstract class BaseTransactionProcessor { private ModelConfig myModelConfig; @Autowired private InMemoryResourceMatcher myInMemoryResourceMatcher; + @Autowired + private SearchParamMatcher mySearchParamMatcher; private TaskExecutor myExecutor ; @@ -852,6 +857,7 @@ public abstract class BaseTransactionProcessor { Map entriesToProcess = new IdentityHashMap<>(); Set nonUpdatedEntities = new HashSet<>(); Set updatedEntities = new HashSet<>(); + Map conditionalUrlToIdMap = new HashMap<>(); List updatedResources = new ArrayList<>(); Map> conditionalRequestUrls = new HashMap<>(); @@ -891,6 +897,7 @@ public abstract class BaseTransactionProcessor { String matchUrl = myVersionAdapter.getEntryRequestIfNoneExist(nextReqEntry); matchUrl = performIdSubstitutionsInMatchUrl(theIdSubstitutions, matchUrl); outcome = resourceDao.create(res, matchUrl, false, theTransactionDetails, theRequest); + conditionalUrlToIdMap.put(matchUrl, outcome.getId()); res.setId(outcome.getId()); if (nextResourceId != null) { handleTransactionCreateOrUpdateOutcome(theIdSubstitutions, theIdToPersistedOutcome, nextResourceId, outcome, nextRespEntry, resourceType, res, theRequest); @@ -925,6 +932,7 @@ public abstract class BaseTransactionProcessor { String matchUrl = parts.getResourceType() + '?' + parts.getParams(); matchUrl = performIdSubstitutionsInMatchUrl(theIdSubstitutions, matchUrl); DeleteMethodOutcome deleteOutcome = dao.deleteByUrl(matchUrl, deleteConflicts, theRequest); + conditionalUrlToIdMap.put(matchUrl, deleteOutcome.getId()); List allDeleted = deleteOutcome.getDeletedEntities(); for (ResourceTable deleted : allDeleted) { deletedResources.add(deleted.getIdDt().toUnqualifiedVersionless().getValueAsString()); @@ -967,6 +975,7 @@ public abstract class BaseTransactionProcessor { } matchUrl = performIdSubstitutionsInMatchUrl(theIdSubstitutions, matchUrl); outcome = resourceDao.update(res, matchUrl, false, false, theRequest, theTransactionDetails); + conditionalUrlToIdMap.put(matchUrl, outcome.getId()); if (Boolean.TRUE.equals(outcome.getCreated())) { conditionalRequestUrls.put(matchUrl, res.getClass()); } @@ -1025,6 +1034,7 @@ public abstract class BaseTransactionProcessor { IFhirResourceDao dao = toDao(parts, verb, url); IIdType patchId = myContext.getVersion().newIdType().setValue(parts.getResourceId()); DaoMethodOutcome outcome = dao.patch(patchId, matchUrl, patchType, patchBody, patchBodyParameters, theRequest); + conditionalUrlToIdMap.put(matchUrl, outcome.getId()); updatedEntities.add(outcome.getEntity()); if (outcome.getResource() != null) { updatedResources.add(outcome.getResource()); @@ -1081,6 +1091,11 @@ public abstract class BaseTransactionProcessor { if (!myDaoConfig.isMassIngestionMode()) { validateNoDuplicates(theRequest, theActionName, conditionalRequestUrls, theIdToPersistedOutcome.values()); } + + if (!myDaoConfig.isMassIngestionMode()) { + validateAllInsertsMatchTheirConditionalUrls(theIdToPersistedOutcome, conditionalUrlToIdMap, theRequest); + } + theTransactionStopWatch.endCurrentTask(); for (IIdType next : theAllIds) { @@ -1119,6 +1134,32 @@ public abstract class BaseTransactionProcessor { } } + /** + * After transaction processing and resolution of indexes and references, we want to validate that the resources that were stored _actually_ + * match the conditional URLs that they were brought in on. + * @param theIdToPersistedOutcome + * @param conditionalUrlToIdMap + */ + private void validateAllInsertsMatchTheirConditionalUrls(Map theIdToPersistedOutcome, Map conditionalUrlToIdMap, RequestDetails theRequest) { + conditionalUrlToIdMap.entrySet().stream() + .forEach(entry -> { + String matchUrl = entry.getKey(); + IIdType value = entry.getValue(); + DaoMethodOutcome daoMethodOutcome = theIdToPersistedOutcome.get(value); + if (daoMethodOutcome != null && daoMethodOutcome.getResource() != null) { + InMemoryMatchResult match = mySearchParamMatcher.match(matchUrl, daoMethodOutcome.getResource(), theRequest); + if (ourLog.isDebugEnabled()) { + ourLog.debug("Checking conditional URL [{}] against resource with ID [{}]: Supported?:[{}], Matched?:[{}]", matchUrl, value, match.supported(), match.matched()); + } + if (match.supported()) { + if (!match.matched()) { + throw new PreconditionFailedException("Invalid conditional URL \"" + matchUrl + "\". The given resource is not matched by this URL."); + }; + } + } + }); + } + /** * Checks for any delete conflicts. * @param theDeleteConflicts - set of delete conflicts @@ -1409,7 +1450,7 @@ public abstract class BaseTransactionProcessor { thePersistedOutcomes .stream() .filter(t -> !t.isNop()) - .filter(t -> t.getEntity() instanceof ResourceTable) + .filter(t -> t.getEntity() instanceof ResourceTable)//N.B. GGG: This validation never occurs for mongo, as nothing is a ResourceTable. .filter(t -> t.getEntity().getDeleted() == null) .filter(t -> t.getResource() != null) .forEach(t -> resourceToIndexedParams.put(t.getResource(), new ResourceIndexedSearchParams((ResourceTable) t.getEntity()))); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java index 595716b47fb..a0fdc180f78 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java @@ -98,7 +98,9 @@ import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.emptyString; import static org.hamcrest.Matchers.endsWith; +import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; +import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.matchesPattern; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.startsWith; @@ -1207,12 +1209,14 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest { } @Test - public void testConditionalUrlWhichDoesNotMatcHResource() { + public void testConditionalUrlWhichDoesNotMatchResource() { Bundle transactionBundle = new Bundle().setType(BundleType.TRANSACTION); + String storedIdentifierValue = "woop"; + String conditionalUrlIdentifierValue = "zoop"; // Patient HumanName patientName = new HumanName().setFamily("TEST_LAST_NAME").addGiven("TEST_FIRST_NAME"); - Identifier patientIdentifier = new Identifier().setSystem("http://example.com/mrns").setValue("U1234567890"); + Identifier patientIdentifier = new Identifier().setSystem("http://example.com/mrns").setValue(storedIdentifierValue); Patient patient = new Patient() .setName(List.of(patientName)) .setIdentifier(List.of(patientIdentifier)); @@ -1224,14 +1228,14 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest { .setResource(patient) .getRequest() .setMethod(Bundle.HTTPVerb.PUT) - .setUrl("/Patient?identifier=" + patientIdentifier.getSystem() + "|" + "zoop"); + .setUrl("/Patient?identifier=" + patientIdentifier.getSystem() + "|" + conditionalUrlIdentifierValue); - ourLog.info("Patient TEMP UUID: {}", patient.getId()); - String s = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(transactionBundle); - System.out.println(s); - Bundle outcome= mySystemDao.transaction(null, transactionBundle); - String patientLocation = outcome.getEntry().get(0).getResponse().getLocation(); - assertThat(patientLocation, matchesPattern("Patient/[a-z0-9-]+/_history/1")); + try { + mySystemDao.transaction(null, transactionBundle); + fail(); + } catch (PreconditionFailedException e) { + assertThat(e.getMessage(), is(equalTo("Invalid conditional URL \"Patient?identifier=http://example.com/mrns|" + conditionalUrlIdentifierValue +"\". The given resource is not matched by this URL."))); + } } @Test @@ -1267,6 +1271,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest { } + @Test public void testTransactionUpdateTwoResourcesWithSameId() { Bundle request = new Bundle(); diff --git a/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml b/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml index ac75e0d04be..36a83af6599 100644 --- a/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml +++ b/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml @@ -42,7 +42,7 @@ - + diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryResourceMatcher.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryResourceMatcher.java index f6d0027898f..24a0483b823 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryResourceMatcher.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryResourceMatcher.java @@ -156,6 +156,7 @@ public class InMemoryResourceMatcher { String resourceName = theResourceDefinition.getName(); RuntimeSearchParam paramDef = mySearchParamRegistry.getActiveSearchParam(resourceName, theParamName); InMemoryMatchResult checkUnsupportedResult = checkUnsupportedPrefixes(theParamName, paramDef, theAndOrParams); + if (!checkUnsupportedResult.supported()) { return checkUnsupportedResult; } From 4aa1329e110a17f0b13d7fc82cd8d82354a1c164 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 13 Sep 2021 13:13:28 -0400 Subject: [PATCH 116/143] Fix up changelog --- .../fhir/changelog/5_6_0/2987-validate-conditional-urls.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2987-validate-conditional-urls.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2987-validate-conditional-urls.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2987-validate-conditional-urls.yaml new file mode 100644 index 00000000000..ce1048e8ece --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2987-validate-conditional-urls.yaml @@ -0,0 +1,5 @@ +--- +type: change +jira: SMILE-2927 +title: "During transactions, any resources that were PUT or POSTed with a conditional URL now receive extra validation. There is now a final +storage step which ensures that the stored resource actually matches the conditional URL." From 46936e17046cea64f5848f79912c341015b3d129 Mon Sep 17 00:00:00 2001 From: Justin Dar Date: Mon, 13 Sep 2021 11:26:21 -0700 Subject: [PATCH 117/143] Fixed code formatting and better way of fixing issue --- .../ca/uhn/fhir/jpa/dao/index/IdHelperService.java | 10 +++++----- .../jpa/provider/r4/ResourceProviderR4CacheTest.java | 6 ++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java index 0674ba87ffe..039eb3b6507 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java @@ -205,11 +205,11 @@ public class IdHelperService { */ @Nonnull public List resolveResourcePersistentIdsWithCache(RequestPartitionId theRequestPartitionId, List theIds) { - try { - theIds.forEach(id -> Validate.isTrue(id.hasIdPart())); - } catch (IllegalArgumentException e) { - ourLog.error("Illegal Argument during database access", e); - throw new InvalidRequestException("Parameter value missing in request", e); + for (IIdType id : theIds) { + if (!id.hasIdPart()) { + ourLog.error("Illegal Argument during database access"); + throw new InvalidRequestException("Parameter value missing in request"); + } } if (theIds.isEmpty()) { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java index eca83de0556..ba72739616c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java @@ -8,16 +8,12 @@ import ca.uhn.fhir.rest.api.CacheControlDirective; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.client.interceptor.CapturingInterceptor; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import com.ctc.wstx.shaded.msv_core.verifier.jarv.Const; -import org.hl7.fhir.r4.model.Base; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.Patient; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -256,12 +252,14 @@ public class ResourceProviderR4CacheTest extends BaseResourceProviderR4Test { @Test public void testReturn400ForParameterWithNoValue(){ + // When: We search Procedure?patient= BaseServerResponseException exception = assertThrows(BaseServerResponseException.class, () -> {myClient .search() .byUrl("Procedure?patient=") .returnBundle(Bundle.class) .execute();}); + // Then: We get a HTTP 400 Bad Request assertEquals(Constants.STATUS_HTTP_400_BAD_REQUEST, exception.getStatusCode()); } From 876768718d95ef9ecbd9ea7f720d0a7dc84c9e9e Mon Sep 17 00:00:00 2001 From: Justin Dar Date: Mon, 13 Sep 2021 11:29:36 -0700 Subject: [PATCH 118/143] Remove log --- .../src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java | 1 - 1 file changed, 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java index 1582d1c0738..1f9908c458c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java @@ -207,7 +207,6 @@ public class IdHelperService { public List resolveResourcePersistentIdsWithCache(RequestPartitionId theRequestPartitionId, List theIds) { for (IIdType id : theIds) { if (!id.hasIdPart()) { - ourLog.error("Illegal Argument during database access"); throw new InvalidRequestException("Parameter value missing in request"); } } From 67cf058318f38d9484a490f18ee5dea370186c1e Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Mon, 13 Sep 2021 19:29:49 -0400 Subject: [PATCH 119/143] Add changelog --- .../5_4_0/2457-fix-single-threaded-search-execution.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2457-fix-single-threaded-search-execution.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2457-fix-single-threaded-search-execution.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2457-fix-single-threaded-search-execution.yaml new file mode 100644 index 00000000000..ccedc14c04b --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2457-fix-single-threaded-search-execution.yaml @@ -0,0 +1,5 @@ +--- +type: perf +issue: 2457 +title: "A regression in HAPI FHIR 5.3.0 resulted in concurrent searches being executed in a sequential + (and not parallel) fashion in some circumstances." From a0cd83398b8e206ffc0dcb5f82179e3536d7edf2 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 13 Sep 2021 20:52:14 -0400 Subject: [PATCH 120/143] Bump test java to 16 --- hapi-fhir-jpaserver-base/pom.xml | 8 -------- pom.xml | 2 ++ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index c37ee56d4e8..428612b17c4 100644 --- a/hapi-fhir-jpaserver-base/pom.xml +++ b/hapi-fhir-jpaserver-base/pom.xml @@ -815,14 +815,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - 9 - 9 - - diff --git a/pom.xml b/pom.xml index b808fcf355c..841a4eabbea 100644 --- a/pom.xml +++ b/pom.xml @@ -2001,6 +2001,8 @@ 1.8 1.8 + 16 + 16 true UTF-8 true From b2f881cb76f833613e74dff40373994b425ea29d Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 13 Sep 2021 21:09:48 -0400 Subject: [PATCH 121/143] java 16 --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d8ccce15b76..9d968dfed1d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,7 +15,7 @@ pool: jobs: - job: Build timeoutInMinutes: 360 - container: maven:3-openjdk-15 + container: maven:3-openjdk-16 steps: - task: DockerInstaller@0 displayName: Docker Installer @@ -32,7 +32,7 @@ jobs: script: mkdir -p $(MAVEN_CACHE_FOLDER); pwd; ls -al $(MAVEN_CACHE_FOLDER) - task: Maven@3 env: - JAVA_HOME_11_X64: /usr/java/openjdk-15 + JAVA_HOME_11_X64: /usr/java/openjdk-16 inputs: goals: 'clean install' # These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy From b4e2679872f30f7310b2e416215ea8551c9c9ffd Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 13 Sep 2021 21:15:23 -0400 Subject: [PATCH 122/143] Remove jetbrains --- .../java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java | 3 +-- .../src/test/java/ca/uhn/fhir/jpa/mdm/BaseMdmR4Test.java | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index f98e01cb0b5..8b359bb9229 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -96,7 +96,6 @@ import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IPrimitiveType; -import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -647,7 +646,7 @@ public abstract class BaseTransactionProcessor { CompositeInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequestDetails, thePointcut, params); } - @NotNull + private TransactionWriteOperationsDetails buildWriteOperationsDetails(List theEntries) { TransactionWriteOperationsDetails writeOperationsDetails; List updateRequestUrls = new ArrayList<>(); diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/BaseMdmR4Test.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/BaseMdmR4Test.java index 96115a95bf2..055f12a25b7 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/BaseMdmR4Test.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/BaseMdmR4Test.java @@ -61,7 +61,6 @@ import org.hl7.fhir.r4.model.Organization; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Practitioner; import org.hl7.fhir.r4.model.Reference; -import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; From 1ca313f8ad9b0498ba6071792681dc05e81ca71f Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 13 Sep 2021 21:27:05 -0400 Subject: [PATCH 123/143] lower logging --- hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml b/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml index 36a83af6599..ac75e0d04be 100644 --- a/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml +++ b/hapi-fhir-jpaserver-base/src/test/resources/logback-test.xml @@ -42,7 +42,7 @@ - + From b58d63dc7ccfa1fc1287d4f060dbea1502caae8f Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 13 Sep 2021 21:34:14 -0400 Subject: [PATCH 124/143] Remove usage of 16 --- pom.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pom.xml b/pom.xml index 841a4eabbea..b808fcf355c 100644 --- a/pom.xml +++ b/pom.xml @@ -2001,8 +2001,6 @@ 1.8 1.8 - 16 - 16 true UTF-8 true From fcf8c434f5ad93277d61baf10e026f6f2debd7f9 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 13 Sep 2021 21:41:52 -0400 Subject: [PATCH 125/143] jdk --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9d968dfed1d..d8ccce15b76 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,7 +15,7 @@ pool: jobs: - job: Build timeoutInMinutes: 360 - container: maven:3-openjdk-16 + container: maven:3-openjdk-15 steps: - task: DockerInstaller@0 displayName: Docker Installer @@ -32,7 +32,7 @@ jobs: script: mkdir -p $(MAVEN_CACHE_FOLDER); pwd; ls -al $(MAVEN_CACHE_FOLDER) - task: Maven@3 env: - JAVA_HOME_11_X64: /usr/java/openjdk-16 + JAVA_HOME_11_X64: /usr/java/openjdk-15 inputs: goals: 'clean install' # These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy From 49debec36a18b281e69016ef01d74a2debdbb465 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 14 Sep 2021 10:48:56 -0400 Subject: [PATCH 126/143] Fix problem with null conditionals --- .../fhir/jpa/dao/BaseTransactionProcessor.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index 8b359bb9229..8e4034f688b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -83,6 +83,7 @@ import ca.uhn.fhir.util.UrlUtil; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.hl7.fhir.dstu3.model.Bundle; import org.hl7.fhir.exceptions.FHIRException; @@ -896,8 +897,8 @@ public abstract class BaseTransactionProcessor { String matchUrl = myVersionAdapter.getEntryRequestIfNoneExist(nextReqEntry); matchUrl = performIdSubstitutionsInMatchUrl(theIdSubstitutions, matchUrl); outcome = resourceDao.create(res, matchUrl, false, theTransactionDetails, theRequest); - conditionalUrlToIdMap.put(matchUrl, outcome.getId()); - res.setId(outcome.getId()); + setConditionalUrlToBeValidatedLater(conditionalUrlToIdMap, matchUrl, outcome.getId()); + res.setId(outcome.getId()); if (nextResourceId != null) { handleTransactionCreateOrUpdateOutcome(theIdSubstitutions, theIdToPersistedOutcome, nextResourceId, outcome, nextRespEntry, resourceType, res, theRequest); } @@ -931,7 +932,7 @@ public abstract class BaseTransactionProcessor { String matchUrl = parts.getResourceType() + '?' + parts.getParams(); matchUrl = performIdSubstitutionsInMatchUrl(theIdSubstitutions, matchUrl); DeleteMethodOutcome deleteOutcome = dao.deleteByUrl(matchUrl, deleteConflicts, theRequest); - conditionalUrlToIdMap.put(matchUrl, deleteOutcome.getId()); + setConditionalUrlToBeValidatedLater(conditionalUrlToIdMap, matchUrl, deleteOutcome.getId()); List allDeleted = deleteOutcome.getDeletedEntities(); for (ResourceTable deleted : allDeleted) { deletedResources.add(deleted.getIdDt().toUnqualifiedVersionless().getValueAsString()); @@ -974,7 +975,7 @@ public abstract class BaseTransactionProcessor { } matchUrl = performIdSubstitutionsInMatchUrl(theIdSubstitutions, matchUrl); outcome = resourceDao.update(res, matchUrl, false, false, theRequest, theTransactionDetails); - conditionalUrlToIdMap.put(matchUrl, outcome.getId()); + setConditionalUrlToBeValidatedLater(conditionalUrlToIdMap, matchUrl, outcome.getId()); if (Boolean.TRUE.equals(outcome.getCreated())) { conditionalRequestUrls.put(matchUrl, res.getClass()); } @@ -1033,7 +1034,7 @@ public abstract class BaseTransactionProcessor { IFhirResourceDao dao = toDao(parts, verb, url); IIdType patchId = myContext.getVersion().newIdType().setValue(parts.getResourceId()); DaoMethodOutcome outcome = dao.patch(patchId, matchUrl, patchType, patchBody, patchBodyParameters, theRequest); - conditionalUrlToIdMap.put(matchUrl, outcome.getId()); + setConditionalUrlToBeValidatedLater(conditionalUrlToIdMap, matchUrl, outcome.getId()); updatedEntities.add(outcome.getEntity()); if (outcome.getResource() != null) { updatedResources.add(outcome.getResource()); @@ -1133,6 +1134,12 @@ public abstract class BaseTransactionProcessor { } } + private void setConditionalUrlToBeValidatedLater(Map theConditionalUrlToIdMap, String theMatchUrl, IIdType theId) { + if (!StringUtils.isBlank(theMatchUrl)) { + theConditionalUrlToIdMap.put(theMatchUrl, theId); + } + } + /** * After transaction processing and resolution of indexes and references, we want to validate that the resources that were stored _actually_ * match the conditional URLs that they were brought in on. @@ -1141,6 +1148,7 @@ public abstract class BaseTransactionProcessor { */ private void validateAllInsertsMatchTheirConditionalUrls(Map theIdToPersistedOutcome, Map conditionalUrlToIdMap, RequestDetails theRequest) { conditionalUrlToIdMap.entrySet().stream() + .filter(entry -> entry.getKey() != null) .forEach(entry -> { String matchUrl = entry.getKey(); IIdType value = entry.getValue(); From 9771210553d08ff636ed69534a339056a8836bec Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 14 Sep 2021 13:40:53 -0400 Subject: [PATCH 127/143] Prefer non-lazy outcomes in map --- .../jpa/api/model/LazyDaoMethodOutcome.java | 2 -- .../jpa/dao/BaseTransactionProcessor.java | 26 +++++++++++++++++-- .../fhir/jpa/dao/r4/FhirSystemDaoR4Test.java | 6 ++--- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/model/LazyDaoMethodOutcome.java b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/model/LazyDaoMethodOutcome.java index 0ed9808a84e..07caf13ad19 100644 --- a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/model/LazyDaoMethodOutcome.java +++ b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/model/LazyDaoMethodOutcome.java @@ -52,13 +52,11 @@ public class LazyDaoMethodOutcome extends DaoMethodOutcome { private void tryToRunSupplier() { if (myEntitySupplier != null) { - EntityAndResource entityAndResource = myEntitySupplier.get(); setEntity(entityAndResource.getEntity()); setResource(entityAndResource.getResource()); setId(entityAndResource.getResource().getIdElement()); myEntitySupplierUseCallback.run(); - } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index 8e4034f688b..6804fcb9848 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -35,6 +35,7 @@ import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome; import ca.uhn.fhir.jpa.api.model.DeleteConflict; import ca.uhn.fhir.jpa.api.model.DeleteConflictList; import ca.uhn.fhir.jpa.api.model.DeleteMethodOutcome; +import ca.uhn.fhir.jpa.api.model.LazyDaoMethodOutcome; import ca.uhn.fhir.jpa.cache.IResourceVersionSvc; import ca.uhn.fhir.jpa.cache.ResourcePersistentIdMap; import ca.uhn.fhir.jpa.dao.tx.HapiTransactionService; @@ -280,7 +281,9 @@ public abstract class BaseTransactionProcessor { idSubstitutions.put(id, newId); } } - idToPersistedOutcome.put(newId, outcome); + + populateIdToPersistedOutcomeMap(idToPersistedOutcome, newId, outcome); + if (outcome.getCreated()) { myVersionAdapter.setResponseStatus(newEntry, toStatusString(Constants.STATUS_HTTP_201_CREATED)); } else { @@ -304,6 +307,21 @@ public abstract class BaseTransactionProcessor { } + /** Method which populates entry in idToPersistedOutcome. + * Will store whatever outcome is sent, unless the key already exists, then we only replace an instance if we find that the instance + * we are replacing with is non-lazy. This allows us to evaluate later more easily, as we _know_ we need access to these. + */ + private void populateIdToPersistedOutcomeMap(Map idToPersistedOutcome, IIdType newId, DaoMethodOutcome outcome) { + //Prefer real method outcomes over lazy ones. + if (idToPersistedOutcome.containsKey(newId)) { + if (!(outcome instanceof LazyDaoMethodOutcome)) { + idToPersistedOutcome.put(newId, outcome); + } + } else { + idToPersistedOutcome.put(newId, outcome); + } + } + private Date getLastModified(IBaseResource theRes) { return theRes.getMeta().getLastUpdated(); } @@ -1092,10 +1110,14 @@ public abstract class BaseTransactionProcessor { validateNoDuplicates(theRequest, theActionName, conditionalRequestUrls, theIdToPersistedOutcome.values()); } + theTransactionStopWatch.endCurrentTask(); + if (conditionalUrlToIdMap.size() > 0) { + theTransactionStopWatch.startTask("Check that all conditionally created/updated entities actually match their conditionals."); + } + if (!myDaoConfig.isMassIngestionMode()) { validateAllInsertsMatchTheirConditionalUrls(theIdToPersistedOutcome, conditionalUrlToIdMap, theRequest); } - theTransactionStopWatch.endCurrentTask(); for (IIdType next : theAllIds) { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java index a0fdc180f78..7e7bd26fbd7 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java @@ -1824,9 +1824,9 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest { p.addIdentifier().setSystem("urn:system").setValue(methodName); request.addEntry().setResource(p).getRequest().setMethod(HTTPVerb.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - request.addEntry().setResource(p).getRequest().setMethod(HTTPVerb.POST); +// p = new Patient(); +// p.addIdentifier().setSystem("urn:system").setValue(methodName); +// request.addEntry().setResource(p).getRequest().setMethod(HTTPVerb.POST); try { mySystemDao.transaction(mySrd, request); From b25bdc1169dd8e685cfc6ecdb5a6b16f9471e044 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 14 Sep 2021 13:48:37 -0400 Subject: [PATCH 128/143] Remove crazy double encoding --- .../ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java | 6 +++--- .../src/test/resources/cdr-bundle.json | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java index 7e7bd26fbd7..a0fdc180f78 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java @@ -1824,9 +1824,9 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest { p.addIdentifier().setSystem("urn:system").setValue(methodName); request.addEntry().setResource(p).getRequest().setMethod(HTTPVerb.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); -// p = new Patient(); -// p.addIdentifier().setSystem("urn:system").setValue(methodName); -// request.addEntry().setResource(p).getRequest().setMethod(HTTPVerb.POST); + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + request.addEntry().setResource(p).getRequest().setMethod(HTTPVerb.POST); try { mySystemDao.transaction(mySrd, request); diff --git a/hapi-fhir-jpaserver-base/src/test/resources/cdr-bundle.json b/hapi-fhir-jpaserver-base/src/test/resources/cdr-bundle.json index 2e8644593a5..9afb12a7cc8 100644 --- a/hapi-fhir-jpaserver-base/src/test/resources/cdr-bundle.json +++ b/hapi-fhir-jpaserver-base/src/test/resources/cdr-bundle.json @@ -44,7 +44,7 @@ }, "request": { "method": "PUT", - "url": "/Practitioner?identifier=http%253A%252F%252Facme.org%252Fclinicians%257C777" + "url": "/Practitioner?identifier=http%3A%2F%2Facme.org%2Fclinicians%7C777" } }, { @@ -125,7 +125,7 @@ }, "request": { "method": "PUT", - "url": "/Patient?identifier=http%253A%252F%252Facme.org%252Fmrns%257C7000135" + "url": "/Patient?identifier=http%3A%2F%2Facme.org%2Fmrns%7C7000135" } }, { @@ -203,7 +203,7 @@ }, "request": { "method": "PUT", - "url": "/Encounter?identifier=http%253A%252F%252Facme.org%252FvisitNumbers%257C4736455" + "url": "/Encounter?identifier=http%3A%2F%2Facme.org%2FvisitNumbers%7C4736455" } }, { @@ -267,7 +267,7 @@ }, "request": { "method": "PUT", - "url": "/Practitioner?identifier=http%253A%252F%252Facme.org%252Fclinicians%257C3622" + "url": "/Practitioner?identifier=http%3A%2F%2Facme.org%2Fclinicians%7C3622" } }, { @@ -312,8 +312,8 @@ }, "request": { "method": "PUT", - "url": "/Practitioner?identifier=http%253A%252F%252Facme.org%252Fclinicians%257C7452" + "url": "/Practitioner?identifier=http%3A%2F%2Facme.org%2Fclinicians%7C7452" } } ] -} \ No newline at end of file +} From bb5e04e7064c242dd34ff83b6e5c36a1a23fedee Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 14 Sep 2021 17:22:25 -0400 Subject: [PATCH 129/143] Fix broken test --- .../ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java | 3 +++ .../java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java index f48b4ede91f..02a797f60f6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/TransactionProcessorTest.java @@ -13,6 +13,7 @@ import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc; import ca.uhn.fhir.jpa.searchparam.MatchUrlService; import ca.uhn.fhir.jpa.searchparam.matcher.InMemoryResourceMatcher; +import ca.uhn.fhir.jpa.searchparam.matcher.SearchParamMatcher; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import org.hibernate.Session; import org.hibernate.internal.SessionImpl; @@ -72,6 +73,8 @@ public class TransactionProcessorTest { private IRequestPartitionHelperSvc myRequestPartitionHelperSvc; @MockBean private IResourceVersionSvc myResourceVersionSvc; + @MockBean + private SearchParamMatcher mySearchParamMatcher; @MockBean(answer = Answers.RETURNS_DEEP_STUBS) private SessionImpl mySession; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java index a0fdc180f78..fd513807f31 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java @@ -85,6 +85,7 @@ import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import java.nio.charset.StandardCharsets; +import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -1173,8 +1174,8 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest { HumanName patientName = new HumanName().setFamily("TEST_LAST_NAME").addGiven("TEST_FIRST_NAME"); Identifier patientIdentifier = new Identifier().setSystem("http://example.com/mrns").setValue("U1234567890"); Patient patient = new Patient() - .setName(List.of(patientName)) - .setIdentifier(List.of(patientIdentifier)); + .setName(Arrays.asList(patientName)) + .setIdentifier(Arrays.asList(patientIdentifier)); patient.setId(IdType.newRandomUuid()); transactionBundle @@ -1218,8 +1219,8 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest { HumanName patientName = new HumanName().setFamily("TEST_LAST_NAME").addGiven("TEST_FIRST_NAME"); Identifier patientIdentifier = new Identifier().setSystem("http://example.com/mrns").setValue(storedIdentifierValue); Patient patient = new Patient() - .setName(List.of(patientName)) - .setIdentifier(List.of(patientIdentifier)); + .setName(Arrays.asList(patientName)) + .setIdentifier(Arrays.asList(patientIdentifier)); patient.setId(IdType.newRandomUuid()); transactionBundle From 9bb1558b714d5266da478dbb967d18806d2111d5 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 14 Sep 2021 17:45:09 -0400 Subject: [PATCH 130/143] Update query count ttest --- .../uhn/fhir/jpa/dao/BaseTransactionProcessor.java | 1 + .../dao/r4/FhirResourceDaoR4QueryCountTest.java | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index 6804fcb9848..d57891839e3 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -1175,6 +1175,7 @@ public abstract class BaseTransactionProcessor { String matchUrl = entry.getKey(); IIdType value = entry.getValue(); DaoMethodOutcome daoMethodOutcome = theIdToPersistedOutcome.get(value); + //TODO GGG: daoMethodOutcome.getResource() actually executes a DB select query. Any way to avoid this?? if (daoMethodOutcome != null && daoMethodOutcome.getResource() != null) { InMemoryMatchResult match = mySearchParamMatcher.match(matchUrl, daoMethodOutcome.getResource(), theRequest); if (ourLog.isDebugEnabled()) { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java index 580cb632e94..06a8110de62 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java @@ -964,7 +964,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test outcome = mySystemDao.transaction(mySrd, input.get()); ourLog.info("Resp: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); myCaptureQueriesListener.logSelectQueries(); - assertEquals(11, myCaptureQueriesListener.countSelectQueries()); + assertEquals(12, myCaptureQueriesListener.countSelectQueries()); myCaptureQueriesListener.logInsertQueries(); assertEquals(1, myCaptureQueriesListener.countInsertQueries()); myCaptureQueriesListener.logUpdateQueries(); @@ -1043,7 +1043,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test myCaptureQueriesListener.clear(); mySystemDao.transaction(mySrd, bundleCreator.get()); myCaptureQueriesListener.logSelectQueries(); - assertEquals(1, myCaptureQueriesListener.countSelectQueries()); + assertEquals(3, myCaptureQueriesListener.countSelectQueries()); assertEquals(3, myCaptureQueriesListener.countInsertQueries()); assertEquals(0, myCaptureQueriesListener.countDeleteQueries()); @@ -1056,7 +1056,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test myCaptureQueriesListener.clear(); mySystemDao.transaction(mySrd, bundleCreator.get()); - assertEquals(0, myCaptureQueriesListener.countSelectQueries()); + assertEquals(2, myCaptureQueriesListener.countSelectQueries()); assertEquals(3, myCaptureQueriesListener.countInsertQueries()); assertEquals(0, myCaptureQueriesListener.countDeleteQueries()); @@ -1105,7 +1105,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test myCaptureQueriesListener.clear(); mySystemDao.transaction(mySrd, bundleCreator.get()); myCaptureQueriesListener.logSelectQueries(); - assertEquals(2, myCaptureQueriesListener.countSelectQueries()); + assertEquals(4, myCaptureQueriesListener.countSelectQueries()); assertEquals(3, myCaptureQueriesListener.countInsertQueries()); assertEquals(0, myCaptureQueriesListener.countDeleteQueries()); @@ -1123,7 +1123,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test myCaptureQueriesListener.clear(); mySystemDao.transaction(mySrd, bundleCreator.get()); - assertEquals(1, myCaptureQueriesListener.countSelectQueries()); + assertEquals(3, myCaptureQueriesListener.countSelectQueries()); assertEquals(3, myCaptureQueriesListener.countInsertQueries()); assertEquals(0, myCaptureQueriesListener.countDeleteQueries()); @@ -1706,7 +1706,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test // Lookup the two existing IDs to make sure they are legit myCaptureQueriesListener.logSelectQueriesForCurrentThread(); - assertEquals(3, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); + assertEquals(7, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); assertEquals(3, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); assertEquals(1, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); @@ -1765,7 +1765,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test // Lookup the two existing IDs to make sure they are legit myCaptureQueriesListener.logSelectQueriesForCurrentThread(); - assertEquals(1, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); + assertEquals(5, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); assertEquals(3, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); assertEquals(1, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); From 8f0e8b9e51c4b065432d61d4c5b0e06dff095ab8 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 14 Sep 2021 18:44:55 -0400 Subject: [PATCH 131/143] remove useless DB calls --- .../uhn/fhir/jpa/dao/BaseTransactionProcessor.java | 3 +-- .../dao/r4/FhirResourceDaoR4QueryCountTest.java | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index d57891839e3..a5830be5107 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -1175,8 +1175,7 @@ public abstract class BaseTransactionProcessor { String matchUrl = entry.getKey(); IIdType value = entry.getValue(); DaoMethodOutcome daoMethodOutcome = theIdToPersistedOutcome.get(value); - //TODO GGG: daoMethodOutcome.getResource() actually executes a DB select query. Any way to avoid this?? - if (daoMethodOutcome != null && daoMethodOutcome.getResource() != null) { + if (daoMethodOutcome != null && !daoMethodOutcome.isNop() && daoMethodOutcome.getResource() != null) { InMemoryMatchResult match = mySearchParamMatcher.match(matchUrl, daoMethodOutcome.getResource(), theRequest); if (ourLog.isDebugEnabled()) { ourLog.debug("Checking conditional URL [{}] against resource with ID [{}]: Supported?:[{}], Matched?:[{}]", matchUrl, value, match.supported(), match.matched()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java index 06a8110de62..580cb632e94 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java @@ -964,7 +964,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test outcome = mySystemDao.transaction(mySrd, input.get()); ourLog.info("Resp: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); myCaptureQueriesListener.logSelectQueries(); - assertEquals(12, myCaptureQueriesListener.countSelectQueries()); + assertEquals(11, myCaptureQueriesListener.countSelectQueries()); myCaptureQueriesListener.logInsertQueries(); assertEquals(1, myCaptureQueriesListener.countInsertQueries()); myCaptureQueriesListener.logUpdateQueries(); @@ -1043,7 +1043,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test myCaptureQueriesListener.clear(); mySystemDao.transaction(mySrd, bundleCreator.get()); myCaptureQueriesListener.logSelectQueries(); - assertEquals(3, myCaptureQueriesListener.countSelectQueries()); + assertEquals(1, myCaptureQueriesListener.countSelectQueries()); assertEquals(3, myCaptureQueriesListener.countInsertQueries()); assertEquals(0, myCaptureQueriesListener.countDeleteQueries()); @@ -1056,7 +1056,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test myCaptureQueriesListener.clear(); mySystemDao.transaction(mySrd, bundleCreator.get()); - assertEquals(2, myCaptureQueriesListener.countSelectQueries()); + assertEquals(0, myCaptureQueriesListener.countSelectQueries()); assertEquals(3, myCaptureQueriesListener.countInsertQueries()); assertEquals(0, myCaptureQueriesListener.countDeleteQueries()); @@ -1105,7 +1105,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test myCaptureQueriesListener.clear(); mySystemDao.transaction(mySrd, bundleCreator.get()); myCaptureQueriesListener.logSelectQueries(); - assertEquals(4, myCaptureQueriesListener.countSelectQueries()); + assertEquals(2, myCaptureQueriesListener.countSelectQueries()); assertEquals(3, myCaptureQueriesListener.countInsertQueries()); assertEquals(0, myCaptureQueriesListener.countDeleteQueries()); @@ -1123,7 +1123,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test myCaptureQueriesListener.clear(); mySystemDao.transaction(mySrd, bundleCreator.get()); - assertEquals(3, myCaptureQueriesListener.countSelectQueries()); + assertEquals(1, myCaptureQueriesListener.countSelectQueries()); assertEquals(3, myCaptureQueriesListener.countInsertQueries()); assertEquals(0, myCaptureQueriesListener.countDeleteQueries()); @@ -1706,7 +1706,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test // Lookup the two existing IDs to make sure they are legit myCaptureQueriesListener.logSelectQueriesForCurrentThread(); - assertEquals(7, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); + assertEquals(3, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); assertEquals(3, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); assertEquals(1, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); @@ -1765,7 +1765,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test // Lookup the two existing IDs to make sure they are legit myCaptureQueriesListener.logSelectQueriesForCurrentThread(); - assertEquals(5, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); + assertEquals(1, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); assertEquals(3, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); assertEquals(1, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); From 9070aa357187d6479182dc2b6636dee21816a0ef Mon Sep 17 00:00:00 2001 From: Tadgh Date: Wed, 15 Sep 2021 01:20:46 -0400 Subject: [PATCH 132/143] wip --- .../uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java | 1 - .../rest/server/interceptor/auth/IAuthRuleBuilderRuleOp.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java index d9557d86ca3..c2f29fa8c85 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java @@ -67,7 +67,6 @@ public interface IAuthRuleBuilder { * and could be shown to the client, but has no semantic meaning within * HAPI FHIR. */ - IAuthRuleBuilderRuleOpClassifierFinished allowAll(String theRuleName); /** * Build the rule list diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOp.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOp.java index 94427a2d8fc..c21e9990842 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOp.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOp.java @@ -53,7 +53,7 @@ public interface IAuthRuleBuilderRuleOp extends IAuthRuleBuilderAppliesToPatient/123 - Any Patient resource with the ID "123" will be matched *

  • 123 - Any resource of any type with the ID "123" will be matched
  • * - * + >* * @param theId The ID of the resource to apply (e.g. Patient/123) * @throws IllegalArgumentException If theId does not contain an ID with at least an ID part * @throws NullPointerException If theId is null From a0c8cc427937936f572c20785525014e90c2855a Mon Sep 17 00:00:00 2001 From: Tadgh Date: Wed, 15 Sep 2021 01:23:43 -0400 Subject: [PATCH 133/143] fix test --- .../jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java index 0c85f54f0a0..47da8dafd53 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java @@ -467,7 +467,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { Patient patient = new Patient(); patient.setId(IdType.newRandomUuid()); - patient.setActive(true); + patient.setActive(false); builder .addTransactionUpdateEntry(patient) .conditional("Patient?active=false"); From 171f0f8724382a3d5e6e30802cbe27787f7b2ae9 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Wed, 15 Sep 2021 09:04:45 -0400 Subject: [PATCH 134/143] fix rulebuilder --- .../jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java | 3 ++- .../fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java index 47da8dafd53..423c0dadaa6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java @@ -467,6 +467,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { Patient patient = new Patient(); patient.setId(IdType.newRandomUuid()); + patient.addName().setFamily("zoop"); patient.setActive(false); builder .addTransactionUpdateEntry(patient) @@ -488,7 +489,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { assertEquals("1", observationId.getVersionIdPart()); // Make sure we're not introducing any extra DB operations - assertEquals(4, myCaptureQueriesListener.logSelectQueries().size()); + assertEquals(5, myCaptureQueriesListener.logSelectQueries().size()); // Read back and verify that reference is now versioned observation = myObservationDao.read(observationId); diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java index c2f29fa8c85..d9557d86ca3 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java @@ -67,6 +67,7 @@ public interface IAuthRuleBuilder { * and could be shown to the client, but has no semantic meaning within * HAPI FHIR. */ + IAuthRuleBuilderRuleOpClassifierFinished allowAll(String theRuleName); /** * Build the rule list From 724e4b37dac3a34067f098eaee97098ae1099ca2 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Wed, 15 Sep 2021 11:24:01 -0400 Subject: [PATCH 135/143] Fix up test to actually match --- .../jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java index 423c0dadaa6..0975df2548e 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java @@ -11,6 +11,7 @@ import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.util.BundleBuilder; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.r4.model.BooleanType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Condition; import org.hl7.fhir.r4.model.Encounter; @@ -467,7 +468,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { Patient patient = new Patient(); patient.setId(IdType.newRandomUuid()); - patient.addName().setFamily("zoop"); + patient.setDeceased(new BooleanType(true)); patient.setActive(false); builder .addTransactionUpdateEntry(patient) @@ -489,7 +490,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { assertEquals("1", observationId.getVersionIdPart()); // Make sure we're not introducing any extra DB operations - assertEquals(5, myCaptureQueriesListener.logSelectQueries().size()); + assertEquals(4, myCaptureQueriesListener.logSelectQueries().size()); // Read back and verify that reference is now versioned observation = myObservationDao.read(observationId); From 16e329e40c7374f4485c49cdf784e5de8c48a018 Mon Sep 17 00:00:00 2001 From: "juan.marchionatto" Date: Wed, 15 Sep 2021 10:29:30 -0400 Subject: [PATCH 136/143] Add version to ValueSet.compose.include when uploading terminology --- .../uhn/fhir/jpa/term/TermLoaderSvcImpl.java | 2 +- .../fhir/jpa/term/loinc/BaseLoincHandler.java | 4 + .../term/loinc/LoincAnswerListHandler.java | 1 + .../term/loinc/LoincRsnaPlaybookHandler.java | 1 + .../jpa/term/loinc/BaseLoincHandlerTest.java | 304 ++++++++++++++++++ 5 files changed, 311 insertions(+), 1 deletion(-) create mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincHandlerTest.java diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java index 60f2952754c..be31eb190c3 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java @@ -723,7 +723,7 @@ public class TermLoaderSvcImpl implements ITermLoaderSvc { retVal.setPublisher("Regenstrief Institute, Inc."); retVal.setDescription("A value set that includes all LOINC codes"); retVal.setCopyright("This content from LOINC® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at https://loinc.org/license/"); - retVal.getCompose().addInclude().setSystem(ITermLoaderSvc.LOINC_URI); + retVal.getCompose().addInclude().setSystem(ITermLoaderSvc.LOINC_URI).setVersion(codeSystemVersionId); return retVal; } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincHandler.java index cba3609fa8b..7cd49e97c45 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincHandler.java @@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.term.loinc; import ca.uhn.fhir.jpa.entity.TermConcept; import ca.uhn.fhir.jpa.term.IZipContentsHandlerCsv; +import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.r4.model.ConceptMap; import org.hl7.fhir.r4.model.ContactPoint; import org.hl7.fhir.r4.model.Enumerations; @@ -74,6 +75,9 @@ public abstract class BaseLoincHandler implements IZipContentsHandlerCsv { if (include == null) { include = theVs.getCompose().addInclude(); include.setSystem(theCodeSystemUrl); + if (StringUtils.isNotBlank(theVs.getVersion())) { + include.setVersion(theVs.getVersion()); + } } boolean found = false; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincAnswerListHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincAnswerListHandler.java index cdb97ca48d8..037a2fb0e6b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincAnswerListHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincAnswerListHandler.java @@ -104,6 +104,7 @@ public class LoincAnswerListHandler extends BaseLoincHandler { .getCompose() .getIncludeFirstRep() .setSystem(ITermLoaderSvc.LOINC_URI) + .setVersion(codeSystemVersionId) .addConcept() .setCode(answerString) .setDisplay(displayText); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincRsnaPlaybookHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincRsnaPlaybookHandler.java index d0b03f0acc9..d81466f5380 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincRsnaPlaybookHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincRsnaPlaybookHandler.java @@ -120,6 +120,7 @@ public class LoincRsnaPlaybookHandler extends BaseLoincHandler implements IZipCo .getCompose() .getIncludeFirstRep() .setSystem(ITermLoaderSvc.LOINC_URI) + .setVersion(codeSystemVersionId) .addConcept() .setCode(loincNumber) .setDisplay(longCommonName); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincHandlerTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincHandlerTest.java new file mode 100644 index 00000000000..9a304b33bbb --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincHandlerTest.java @@ -0,0 +1,304 @@ +package ca.uhn.fhir.jpa.term.loinc; + +import com.google.common.collect.Maps; +import org.apache.commons.compress.utils.Lists; +import org.apache.commons.csv.CSVFormat; +import org.apache.commons.csv.CSVParser; +import org.apache.commons.csv.CSVRecord; +import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.r4.model.ValueSet; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Answers; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; + +import java.io.StringReader; +import java.util.Map; +import java.util.Properties; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.when; + +@ExtendWith(MockitoExtension.class) +class BaseLoincHandlerTest { + + public static final String LOINC_NUMBER = "test-loinc-number"; + public static final String DISPLAY_NAME = "test-display-name"; + public static final String TEST_VERSION = "2.69"; + + @Mock(answer = Answers.RETURNS_DEEP_STUBS) + private ValueSet myValueSet; + + @Mock + private ValueSet.ConceptSetComponent myInclude; + + @Mock + private ValueSet.ConceptReferenceComponent myConceptReferenceComponent; + + private Map headerMap; + private CSVRecord recordWithHeader; + + + /** + * Need to setup a real parser because we can't mock final classes (without PowerMockito) + */ + private void setupCSVParser(Map headerValues) throws Exception { + final String[] headers = headerValues.keySet().toArray(new String[0]); + final String[] values = headerValues.values().toArray(new String[0]); + final String rowData = StringUtils.join(values, ','); + + try (final CSVParser parser = CSVFormat.DEFAULT.parse(new StringReader(rowData))) { + parser.iterator().next(); + } + try (final CSVParser parser = CSVFormat.DEFAULT.withHeader(headers).parse(new StringReader(rowData))) { + recordWithHeader = parser.iterator().next(); + headerMap = parser.getHeaderMap(); + } + } + + + @Nested + public class WithVersion { + + @Test + void Top2000LabResultsHandlerTest() throws Exception { + Map recordDataMap = Maps.newHashMap(); + recordDataMap.put("LOINC #", "test-loinc-number"); + recordDataMap.put("Long Common Name", "test-Long-Common-Names"); + setupCSVParser(recordDataMap); + + BaseLoincHandler loincHandler = new BaseLoincTop2000LabResultsHandler( + null, Lists.newArrayList(), null, null, null, Lists.newArrayList(), new Properties()); + BaseLoincHandler spiedLoincHandler = spy(loincHandler); + + when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet); + when(myValueSet.getVersion()).thenReturn(TEST_VERSION); + when(myValueSet.getCompose().addInclude()).thenReturn(myInclude); + when(myInclude.addConcept()).thenReturn(myConceptReferenceComponent); + when(myConceptReferenceComponent.setCode(any())).thenReturn(myConceptReferenceComponent); + + spiedLoincHandler.accept(recordWithHeader); + + Mockito.verify(myInclude).setVersion(Mockito.notNull()); + } + + @Test + void LoincDocumentOntologyHandlerTest() throws Exception { + Map recordDataMap = Maps.newHashMap(); + recordDataMap.put("LoincNumber", "test-LoincNumber"); + recordDataMap.put("PartNumber", "test-PartNumber"); + recordDataMap.put("PartTypeName", "Document.Role"); + recordDataMap.put("PartSequenceOrder", "test-PartSequenceOrder"); + recordDataMap.put("PartName", "test-PartName"); + setupCSVParser(recordDataMap); + + BaseLoincHandler loincHandler = new LoincDocumentOntologyHandler( + Maps.newHashMap(), null, Lists.newArrayList(), Lists.newArrayList(), new Properties()); + BaseLoincHandler spiedLoincHandler = spy(loincHandler); + + when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet); + when(myValueSet.getVersion()).thenReturn(TEST_VERSION); + when(myValueSet.getCompose().addInclude()).thenReturn(myInclude); + when(myInclude.addConcept()).thenReturn(myConceptReferenceComponent); + when(myConceptReferenceComponent.setCode(any())).thenReturn(myConceptReferenceComponent); + + spiedLoincHandler.accept(recordWithHeader); + + Mockito.verify(myInclude).setVersion(Mockito.notNull()); + } + + + @Test + void LoincGroupTermsFileHandlerTest() throws Exception { + Map recordDataMap = Maps.newHashMap(); + recordDataMap.put("LoincNumber", "test-LoincNumber"); + recordDataMap.put("GroupId", "test-GroupId"); + setupCSVParser(recordDataMap); + + BaseLoincHandler loincHandler = new LoincGroupTermsFileHandler( + Maps.newHashMap(), Lists.newArrayList(), Lists.newArrayList(), new Properties()); + BaseLoincHandler spiedLoincHandler = spy(loincHandler); + + when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet); + when(myValueSet.getVersion()).thenReturn(TEST_VERSION); + when(myValueSet.getCompose().addInclude()).thenReturn(myInclude); + when(myInclude.addConcept()).thenReturn(myConceptReferenceComponent); + when(myConceptReferenceComponent.setCode(any())).thenReturn(myConceptReferenceComponent); + + spiedLoincHandler.accept(recordWithHeader); + + Mockito.verify(myInclude).setVersion(Mockito.notNull()); + } + + + @Test + void LoincImagingDocumentCodeHandlerTest() throws Exception { + Map recordDataMap = Maps.newHashMap(); + recordDataMap.put("LOINC_NUM", "test-loinc-number"); + recordDataMap.put("LONG_COMMON_NAME", "test-Long-Common-Names"); + setupCSVParser(recordDataMap); + + BaseLoincHandler loincHandler = new LoincImagingDocumentCodeHandler( + Maps.newHashMap(), Lists.newArrayList(), Lists.newArrayList(), new Properties()); + BaseLoincHandler spiedLoincHandler = spy(loincHandler); + + when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet); + when(myValueSet.getVersion()).thenReturn(TEST_VERSION); + when(myValueSet.getCompose().addInclude()).thenReturn(myInclude); + when(myInclude.addConcept()).thenReturn(myConceptReferenceComponent); + when(myConceptReferenceComponent.setCode(any())).thenReturn(myConceptReferenceComponent); + + spiedLoincHandler.accept(recordWithHeader); + + Mockito.verify(myInclude).setVersion(Mockito.notNull()); + } + + + @Test + void LoincUniversalOrderSetHandlerTest() throws Exception { + Map recordDataMap = Maps.newHashMap(); + recordDataMap.put("LOINC_NUM", "test-loinc-number"); + recordDataMap.put("LONG_COMMON_NAME", "test-Long-Common-Names"); + recordDataMap.put("ORDER_OBS", "test-ORDER_OBS"); + setupCSVParser(recordDataMap); + + BaseLoincHandler loincHandler = new LoincUniversalOrderSetHandler( + Maps.newHashMap(), Lists.newArrayList(), Lists.newArrayList(), new Properties()); + BaseLoincHandler spiedLoincHandler = spy(loincHandler); + + when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet); + when(myValueSet.getVersion()).thenReturn(TEST_VERSION); + when(myValueSet.getCompose().addInclude()).thenReturn(myInclude); + when(myInclude.addConcept()).thenReturn(myConceptReferenceComponent); + when(myConceptReferenceComponent.setCode(any())).thenReturn(myConceptReferenceComponent); + + spiedLoincHandler.accept(recordWithHeader); + + Mockito.verify(myInclude).setVersion(Mockito.notNull()); + } } + + @Nested + public class WithoutVersion { + + @Test + void Top2000LabResultsHandlerTest() throws Exception { + Map recordDataMap = Maps.newHashMap(); + recordDataMap.put("LOINC #", "test-loinc-number"); + recordDataMap.put("Long Common Name", "test-Long-Common-Names"); + setupCSVParser(recordDataMap); + + BaseLoincHandler loincHandler = new BaseLoincTop2000LabResultsHandler( + Maps.newHashMap(), Lists.newArrayList(), null, null, null, Lists.newArrayList(), new Properties()); + BaseLoincHandler spiedLoincHandler = spy(loincHandler); + + when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet); + when(myValueSet.getCompose().addInclude()).thenReturn(myInclude); + when(myInclude.addConcept()).thenReturn(myConceptReferenceComponent); + when(myConceptReferenceComponent.setCode(any())).thenReturn(myConceptReferenceComponent); + + spiedLoincHandler.accept(recordWithHeader); + + Mockito.verify(myInclude, never()).setVersion(any()); + } + + @Test + void LoincDocumentOntologyHandlerTest() throws Exception { + Map recordDataMap = Maps.newHashMap(); + recordDataMap.put("LoincNumber", "test-LoincNumber"); + recordDataMap.put("PartNumber", "test-PartNumber"); + recordDataMap.put("PartTypeName", "Document.Role"); + recordDataMap.put("PartSequenceOrder", "test-PartSequenceOrder"); + recordDataMap.put("PartName", "test-PartName"); + setupCSVParser(recordDataMap); + + BaseLoincHandler loincHandler = new LoincDocumentOntologyHandler( + Maps.newHashMap(), null, Lists.newArrayList(), Lists.newArrayList(), new Properties()); + BaseLoincHandler spiedLoincHandler = spy(loincHandler); + + when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet); + when(myValueSet.getCompose().addInclude()).thenReturn(myInclude); + when(myInclude.addConcept()).thenReturn(myConceptReferenceComponent); + when(myConceptReferenceComponent.setCode(any())).thenReturn(myConceptReferenceComponent); + + spiedLoincHandler.accept(recordWithHeader); + + Mockito.verify(myInclude, never()).setVersion(any()); + } + + @Test + void LoincGroupTermsFileHandlerTest() throws Exception { + Map recordDataMap = Maps.newHashMap(); + recordDataMap.put("LoincNumber", "test-LoincNumber"); + recordDataMap.put("GroupId", "test-GroupId"); + setupCSVParser(recordDataMap); + + BaseLoincHandler loincHandler = new LoincGroupTermsFileHandler( + Maps.newHashMap(), Lists.newArrayList(), Lists.newArrayList(), new Properties()); + BaseLoincHandler spiedLoincHandler = spy(loincHandler); + + when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet); + when(myValueSet.getCompose().addInclude()).thenReturn(myInclude); + when(myInclude.addConcept()).thenReturn(myConceptReferenceComponent); + when(myConceptReferenceComponent.setCode(any())).thenReturn(myConceptReferenceComponent); + + spiedLoincHandler.accept(recordWithHeader); + + Mockito.verify(myInclude, never()).setVersion(any()); + } + + + @Test + void LoincImagingDocumentCodeHandlerTest() throws Exception { + Map recordDataMap = Maps.newHashMap(); + recordDataMap.put("LOINC_NUM", "test-loinc-number"); + recordDataMap.put("LONG_COMMON_NAME", "test-Long-Common-Names"); + setupCSVParser(recordDataMap); + + BaseLoincHandler loincHandler = new LoincImagingDocumentCodeHandler( + Maps.newHashMap(), Lists.newArrayList(), Lists.newArrayList(), new Properties()); + BaseLoincHandler spiedLoincHandler = spy(loincHandler); + + when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet); + when(myValueSet.getCompose().addInclude()).thenReturn(myInclude); + when(myInclude.addConcept()).thenReturn(myConceptReferenceComponent); + when(myConceptReferenceComponent.setCode(any())).thenReturn(myConceptReferenceComponent); + + spiedLoincHandler.accept(recordWithHeader); + + Mockito.verify(myInclude, never()).setVersion(any()); + } + + + @Test + void LoincUniversalOrderSetHandlerTest() throws Exception { + Map recordDataMap = Maps.newHashMap(); + recordDataMap.put("LOINC_NUM", "test-loinc-number"); + recordDataMap.put("LONG_COMMON_NAME", "test-Long-Common-Names"); + recordDataMap.put("ORDER_OBS", "test-ORDER_OBS"); + setupCSVParser(recordDataMap); + + BaseLoincHandler loincHandler = new LoincUniversalOrderSetHandler( + Maps.newHashMap(), Lists.newArrayList(), Lists.newArrayList(), new Properties()); + BaseLoincHandler spiedLoincHandler = spy(loincHandler); + + when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet); + when(myValueSet.getCompose().addInclude()).thenReturn(myInclude); + when(myInclude.addConcept()).thenReturn(myConceptReferenceComponent); + when(myConceptReferenceComponent.setCode(any())).thenReturn(myConceptReferenceComponent); + + spiedLoincHandler.accept(recordWithHeader); + + Mockito.verify(myInclude, never()).setVersion(any()); + } + + } + + + + +} From 2435d770898c1cfe618e210701b2657e6058e107 Mon Sep 17 00:00:00 2001 From: "juan.marchionatto" Date: Wed, 15 Sep 2021 14:46:33 -0400 Subject: [PATCH 137/143] Add changelog --- ...nclude-version-is-not-set-when-uploading-terminology.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2995-valueset-compose-include-version-is-not-set-when-uploading-terminology.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2995-valueset-compose-include-version-is-not-set-when-uploading-terminology.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2995-valueset-compose-include-version-is-not-set-when-uploading-terminology.yaml new file mode 100644 index 00000000000..8377273cf8c --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2995-valueset-compose-include-version-is-not-set-when-uploading-terminology.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 2995 +title: "CodeSystem version is copied to ValueSet.compose.include.version on loinc terminology upload + to support versioned ValueSet expansion." From a56c85f780b4c1a28b4e348b2553fca9da451869 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Thu, 16 Sep 2021 12:37:34 -0400 Subject: [PATCH 138/143] Eliminate Search Coordinator ThreadPool (#2991) * Add test * Remove search coordinator thread pool * Add changelog * Add docs * Test fixes * Test fixes * Test fixes * Test fix --- ...iminate-search-coordinator-threadpool.yaml | 6 + .../ca/uhn/fhir/jpa/config/BaseConfig.java | 15 +- .../jpa/search/SearchCoordinatorSvcImpl.java | 16 +- ...rResourceDaoR4LegacySearchBuilderTest.java | 2 +- .../FhirResourceDaoR4SearchLastNAsyncIT.java | 12 +- .../r4/FhirResourceDaoR4SearchNoFtTest.java | 2 +- .../FhirResourceDaoR4SearchOptimizedTest.java | 6 +- .../provider/ResourceProviderDstu2Test.java | 3 - .../r4/BaseResourceProviderR4Test.java | 3 + .../r4/ResourceProviderConcurrencyR4Test.java | 202 ++++++++++++++++++ .../provider/r4/ResourceProviderR4Test.java | 2 + .../search/SearchCoordinatorSvcImplTest.java | 48 ++--- 12 files changed, 255 insertions(+), 62 deletions(-) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2991-eliminate-search-coordinator-threadpool.yaml create mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderConcurrencyR4Test.java diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2991-eliminate-search-coordinator-threadpool.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2991-eliminate-search-coordinator-threadpool.yaml new file mode 100644 index 00000000000..638ed8c891b --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/2991-eliminate-search-coordinator-threadpool.yaml @@ -0,0 +1,6 @@ +--- +type: change +issue: 2991 +title: "This PR eliminates the search coordinator threadpool, and executes searches synchronously on the HTTP client + thread. The idea of using a separate pool was supposed to help improve server scalability, but ultimately created + false bottlenecks and reduced the utility of monitoring infrastructure so it has been eliminated." diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java index 717e5c3aa0e..72a2535faef 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java @@ -380,17 +380,6 @@ public abstract class BaseConfig { return new TermConceptMappingSvcImpl(); } - @Bean - public ThreadPoolTaskExecutor searchCoordinatorThreadFactory() { - final ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor(); - threadPoolTaskExecutor.setThreadNamePrefix("search_coord_"); - threadPoolTaskExecutor.setCorePoolSize(searchCoordCorePoolSize); - threadPoolTaskExecutor.setMaxPoolSize(searchCoordMaxPoolSize); - threadPoolTaskExecutor.setQueueCapacity(searchCoordQueueCapacity); - threadPoolTaskExecutor.initialize(); - return threadPoolTaskExecutor; - } - @Bean public TaskScheduler taskScheduler() { ConcurrentTaskScheduler retVal = new ConcurrentTaskScheduler(); @@ -851,8 +840,8 @@ public abstract class BaseConfig { } @Bean - public ISearchCoordinatorSvc searchCoordinatorSvc(ThreadPoolTaskExecutor searchCoordinatorThreadFactory) { - return new SearchCoordinatorSvcImpl(searchCoordinatorThreadFactory); + public ISearchCoordinatorSvc searchCoordinatorSvc() { + return new SearchCoordinatorSvcImpl(); } @Bean diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java index aa67d53c597..a64ba464246 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java @@ -82,7 +82,6 @@ import org.springframework.data.domain.Sort; import org.springframework.orm.jpa.JpaDialect; import org.springframework.orm.jpa.JpaTransactionManager; import org.springframework.orm.jpa.vendor.HibernateJpaDialect; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.stereotype.Component; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; @@ -111,7 +110,6 @@ import java.util.UUID; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; @@ -123,7 +121,6 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { public static final Integer INTEGER_0 = 0; private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SearchCoordinatorSvcImpl.class); private final ConcurrentHashMap myIdToSearchTask = new ConcurrentHashMap<>(); - private final ExecutorService myExecutor; @Autowired private FhirContext myContext; @Autowired @@ -162,8 +159,13 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { * Constructor */ @Autowired - public SearchCoordinatorSvcImpl(ThreadPoolTaskExecutor searchCoordinatorThreadFactory) { - myExecutor = searchCoordinatorThreadFactory.getThreadPoolExecutor(); + public SearchCoordinatorSvcImpl() { + super(); + } + + @VisibleForTesting + Set getActiveSearchIds() { + return myIdToSearchTask.keySet(); } @VisibleForTesting @@ -274,7 +276,7 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { RequestPartitionId requestPartitionId = myRequestPartitionHelperService.determineReadPartitionForRequestForSearchType(theRequestDetails, resourceType, params, null); SearchContinuationTask task = new SearchContinuationTask(search, resourceDao, params, resourceType, theRequestDetails, requestPartitionId); myIdToSearchTask.put(search.getUuid(), task); - myExecutor.submit(task); + task.call(); } } @@ -406,7 +408,7 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { SearchTask task = new SearchTask(theSearch, theCallingDao, theParams, theResourceType, theRequestDetails, theRequestPartitionId); myIdToSearchTask.put(theSearch.getUuid(), task); - myExecutor.submit(task); + task.call(); PersistedJpaSearchFirstPageBundleProvider retVal = myPersistedJpaBundleProviderFactory.newInstanceFirstPage(theRequestDetails, theSearch, task, theSb); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4LegacySearchBuilderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4LegacySearchBuilderTest.java index 5366efa789c..5c33c51e5ab 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4LegacySearchBuilderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4LegacySearchBuilderTest.java @@ -929,7 +929,7 @@ public class FhirResourceDaoR4LegacySearchBuilderTest extends BaseJpaR4Test { List actual = toUnqualifiedVersionlessIds(resp); myCaptureQueriesListener.logSelectQueriesForCurrentThread(); assertThat(actual, containsInAnyOrder(orgId, medId, patId, moId, patId2)); - assertEquals(1, myCaptureQueriesListener.getSelectQueriesForCurrentThread().size()); + assertEquals(8, myCaptureQueriesListener.getSelectQueriesForCurrentThread().size()); // Specific patient ID with linked stuff request = mock(HttpServletRequest.class); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchLastNAsyncIT.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchLastNAsyncIT.java index 5ff05cac158..37661610e44 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchLastNAsyncIT.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchLastNAsyncIT.java @@ -13,6 +13,8 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -30,6 +32,7 @@ import static org.mockito.Mockito.when; @ExtendWith(SpringExtension.class) public class FhirResourceDaoR4SearchLastNAsyncIT extends BaseR4SearchLastN { + private static final Logger ourLog = LoggerFactory.getLogger(FhirResourceDaoR4SearchLastNAsyncIT.class); @Autowired protected DaoConfig myDaoConfig; private List originalPreFetchThresholds; @@ -108,8 +111,11 @@ public class FhirResourceDaoR4SearchLastNAsyncIT extends BaseR4SearchLastN { .map(t -> t.getSql(true, false)) .collect(Collectors.toList()); + ourLog.info("Queries:\n * " + String.join("\n * ", queries)); + + // 3 queries to actually perform the search // 1 query to lookup up Search from cache, and 2 chunked queries to retrieve resources by PID. - assertEquals(3, queries.size()); + assertEquals(6, queries.size()); // The first chunked query should have a full complement of PIDs StringBuilder firstQueryPattern = new StringBuilder(".*RES_ID in \\('[0-9]+'"); @@ -117,7 +123,7 @@ public class FhirResourceDaoR4SearchLastNAsyncIT extends BaseR4SearchLastN { firstQueryPattern.append(" , '[0-9]+'"); } firstQueryPattern.append("\\).*"); - assertThat(queries.get(1), matchesPattern(firstQueryPattern.toString())); + assertThat(queries.get(4), matchesPattern(firstQueryPattern.toString())); // the second chunked query should be padded with "-1". StringBuilder secondQueryPattern = new StringBuilder(".*RES_ID in \\('[0-9]+'"); @@ -128,7 +134,7 @@ public class FhirResourceDaoR4SearchLastNAsyncIT extends BaseR4SearchLastN { secondQueryPattern.append(" , '-1'"); } secondQueryPattern.append("\\).*"); - assertThat(queries.get(2), matchesPattern(secondQueryPattern.toString())); + assertThat(queries.get(5), matchesPattern(secondQueryPattern.toString())); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java index 5ee19c00c8e..2757b30ee0d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java @@ -781,7 +781,7 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { List actual = toUnqualifiedVersionlessIds(resp); myCaptureQueriesListener.logSelectQueriesForCurrentThread(); assertThat(actual, containsInAnyOrder(orgId, medId, patId, moId, patId2)); - assertEquals(1, myCaptureQueriesListener.getSelectQueriesForCurrentThread().size()); + assertEquals(7, myCaptureQueriesListener.getSelectQueriesForCurrentThread().size()); // Specific patient ID with linked stuff request = mock(HttpServletRequest.class); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java index e726c5254da..a9a9352b66d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java @@ -1177,9 +1177,9 @@ public class FhirResourceDaoR4SearchOptimizedTest extends BaseJpaR4Test { assertEquals(1, myCaptureQueriesListener.countUpdateQueries()); assertEquals(0, myCaptureQueriesListener.countDeleteQueries()); - assertEquals(2, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); - assertEquals(0, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); - assertEquals(0, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); + assertEquals(4, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); + assertEquals(9, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); + assertEquals(1, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java index 98e72802634..a961eafc12f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java @@ -1627,9 +1627,6 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test { .execute(); assertEquals(10, response.getEntry().size()); - if (ourConnectionPoolSize > 1) { - assertEquals(null, response.getTotalElement().getValueAsString(), "Total should be null but was " + response.getTotalElement().getValueAsString() + " in " + sw.toString()); - } assertThat(response.getLink("next").getUrl(), not(emptyString())); // Load page 2 diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/BaseResourceProviderR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/BaseResourceProviderR4Test.java index 6081f5019a5..760542e197f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/BaseResourceProviderR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/BaseResourceProviderR4Test.java @@ -179,9 +179,12 @@ public abstract class BaseResourceProviderR4Test extends BaseJpaR4Test { myFhirCtx.getRestfulClientFactory().setSocketTimeout(400000); PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(5000, TimeUnit.MILLISECONDS); + connectionManager.setMaxTotal(10); + connectionManager.setDefaultMaxPerRoute(10); HttpClientBuilder builder = HttpClientBuilder.create(); builder.setConnectionManager(connectionManager); builder.setMaxConnPerRoute(99); + ourHttpClient = builder.build(); ourServer = server; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderConcurrencyR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderConcurrencyR4Test.java new file mode 100644 index 00000000000..9b0ca550c62 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderConcurrencyR4Test.java @@ -0,0 +1,202 @@ +package ca.uhn.fhir.jpa.provider.r4; + +import ca.uhn.fhir.interceptor.api.Hook; +import ca.uhn.fhir.interceptor.api.Interceptor; +import ca.uhn.fhir.interceptor.api.Pointcut; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; +import org.apache.commons.io.IOUtils; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Patient; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.awaitility.Awaitility.await; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.equalTo; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SuppressWarnings("Duplicates") +public class ResourceProviderConcurrencyR4Test extends BaseResourceProviderR4Test { + + private static final Logger ourLog = LoggerFactory.getLogger(ResourceProviderConcurrencyR4Test.class); + private ExecutorService myExecutor; + private List myReceivedNames = Collections.synchronizedList(new ArrayList<>()); + private List myExceptions = Collections.synchronizedList(new ArrayList<>()); + + @Override + @BeforeEach + public void before() throws Exception { + super.before(); + + myExecutor = Executors.newFixedThreadPool(10); + myReceivedNames.clear(); + myExceptions.clear(); + } + + @Override + @AfterEach + public void after() throws Exception { + super.after(); + + myInterceptorRegistry.unregisterInterceptorsIf(t -> t instanceof SearchBlockingInterceptor); + myExecutor.shutdown(); + + assertThat(myExceptions, empty()); + } + + /** + * This test is intended to verify that we are in fact executing searches in parallel + * when two different searches come in. + * + * We execute two identical searches (which should result in only one actual + * execution that will be reused by both) and one other search. We use an + * interceptor to artifically delay the execution of the first search in order + * to verify that the last search completes before the first one can finish. + */ + @Test + public void testSearchesExecuteConcurrently() { + createPatient(withFamily("FAMILY1")); + createPatient(withFamily("FAMILY2")); + createPatient(withFamily("FAMILY3")); + + SearchBlockingInterceptor searchBlockingInterceptorFamily1 = new SearchBlockingInterceptor("FAMILY1"); + myInterceptorRegistry.registerInterceptor(searchBlockingInterceptorFamily1); + + // Submit search 1 (should block because of interceptor semaphore) + { + String uri = ourServerBase + "/Patient?_format=json&family=FAMILY1"; + ourLog.info("Submitting GET " + uri); + HttpGet get = new HttpGet(uri); + myExecutor.submit(() -> { + try (CloseableHttpResponse outcome = ourHttpClient.execute(get)) { + assertEquals(200, outcome.getStatusLine().getStatusCode()); + String outcomeString = IOUtils.toString(outcome.getEntity().getContent(), StandardCharsets.UTF_8); + Bundle bundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, outcomeString); + assertEquals(1, bundle.getEntry().size()); + Patient pt = (Patient) bundle.getEntry().get(0).getResource(); + String family = pt.getNameFirstRep().getFamily(); + ourLog.info("Received response with family name: {}", family); + myReceivedNames.add(family); + } catch (Exception e) { + ourLog.error("Client failure", e); + myExceptions.add(e); + } + }); + } + + await().until(() -> searchBlockingInterceptorFamily1.getHits(), equalTo(1)); + + // Submit search 2 (should also block because it will reuse the first search - same name being searched) + { + String uri = ourServerBase + "/Patient?_format=json&family=FAMILY1"; + HttpGet get = new HttpGet(uri); + myExecutor.submit(() -> { + ourLog.info("Submitting GET " + uri); + try (CloseableHttpResponse outcome = ourHttpClient.execute(get)) { + assertEquals(200, outcome.getStatusLine().getStatusCode()); + String outcomeString = IOUtils.toString(outcome.getEntity().getContent(), StandardCharsets.UTF_8); + Bundle bundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, outcomeString); + assertEquals(1, bundle.getEntry().size()); + Patient pt = (Patient) bundle.getEntry().get(0).getResource(); + String family = pt.getNameFirstRep().getFamily(); + ourLog.info("Received response with family name: {}", family); + myReceivedNames.add(family); + } catch (Exception e) { + ourLog.error("Client failure", e); + myExceptions.add(e); + } + }); + } + + // Submit search 3 (should not block - different name being searched, so it should actually finish first) + { + String uri = ourServerBase + "/Patient?_format=json&family=FAMILY3"; + HttpGet get = new HttpGet(uri); + myExecutor.submit(() -> { + ourLog.info("Submitting GET " + uri); + try (CloseableHttpResponse outcome = ourHttpClient.execute(get)) { + assertEquals(200, outcome.getStatusLine().getStatusCode()); + String outcomeString = IOUtils.toString(outcome.getEntity().getContent(), StandardCharsets.UTF_8); + Bundle bundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, outcomeString); + assertEquals(1, bundle.getEntry().size()); + Patient pt = (Patient) bundle.getEntry().get(0).getResource(); + String family = pt.getNameFirstRep().getFamily(); + ourLog.info("Received response with family name: {}", family); + myReceivedNames.add(family); + } catch (Exception e) { + ourLog.error("Client failure", e); + myExceptions.add(e); + } + }); + } + + ourLog.info("About to wait for FAMILY3 to complete"); + await().until(() -> myReceivedNames, contains("FAMILY3")); + ourLog.info("Got FAMILY3"); + + searchBlockingInterceptorFamily1.getLatch().countDown(); + + ourLog.info("About to wait for FAMILY1 to complete"); + await().until(() -> myReceivedNames, contains("FAMILY3", "FAMILY1", "FAMILY1")); + ourLog.info("Got FAMILY1"); + + assertEquals(1, searchBlockingInterceptorFamily1.getHits()); + } + + + @Interceptor + public static class SearchBlockingInterceptor { + + private final CountDownLatch myLatch = new CountDownLatch(1); + private final String myFamily; + private AtomicInteger myHits = new AtomicInteger(0); + + SearchBlockingInterceptor(String theFamily) { + myFamily = theFamily; + } + + @Hook(Pointcut.JPA_PERFTRACE_SEARCH_FIRST_RESULT_LOADED) + public void firstResultLoaded(RequestDetails theRequestDetails) { + String family = theRequestDetails.getParameters().get("family")[0]; + ourLog.info("See a hit for: {}", family); + if (family.equals(myFamily)) { + try { + myHits.incrementAndGet(); + if (!myLatch.await(1, TimeUnit.MINUTES)) { + throw new InternalErrorException("Timed out waiting for " + Pointcut.JPA_PERFTRACE_SEARCH_FIRST_RESULT_LOADED); + } + } catch (InterruptedException e) { + throw new InternalErrorException(e); + } + } + } + + public Integer getHits() { + return myHits.get(); + } + + public CountDownLatch getLatch() { + return myLatch; + } + } + + +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java index b939c4b1536..9e9978072e9 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java @@ -4808,6 +4808,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { } @Test + @Disabled("Not useful with the search coordinator thread pool removed") public void testSearchWithCountNotSet() { mySearchCoordinatorSvcRaw.setSyncSizeForUnitTests(1); mySearchCoordinatorSvcRaw.setLoadingThrottleForUnitTests(200); @@ -4876,6 +4877,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { } @Test + @Disabled("Not useful with the search coordinator thread pool removed") public void testSearchWithCountSearchResultsUpTo5() { mySearchCoordinatorSvcRaw.setSyncSizeForUnitTests(1); mySearchCoordinatorSvcRaw.setLoadingThrottleForUnitTests(200); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java index 830f77ba0f5..c6af09b5281 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java @@ -6,7 +6,6 @@ import ca.uhn.fhir.interceptor.model.RequestPartitionId; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; -import ca.uhn.fhir.jpa.config.dstu3.BaseDstu3Config; import ca.uhn.fhir.jpa.dao.IResultIterator; import ca.uhn.fhir.jpa.dao.ISearchBuilder; import ca.uhn.fhir.jpa.dao.LegacySearchBuilder; @@ -29,6 +28,7 @@ import ca.uhn.fhir.rest.param.StringParam; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; import com.google.common.collect.Lists; +import org.hamcrest.Matchers; import org.hl7.fhir.instance.model.api.IBaseResource; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -126,7 +126,7 @@ public class SearchCoordinatorSvcImplTest { myCurrentSearch = null; - mySvc = new SearchCoordinatorSvcImpl(new BaseDstu3Config().searchCoordinatorThreadFactory()); + mySvc = new SearchCoordinatorSvcImpl(); mySvc.setEntityManagerForUnitTest(myEntityManager); mySvc.setTransactionManagerForUnitTest(myTxManager); mySvc.setContextForUnitTest(ourCtx); @@ -174,12 +174,8 @@ public class SearchCoordinatorSvcImplTest { IResultIterator iter = new FailAfterNIterator(new SlowIterator(pids.iterator(), 2), 300); when(mySearchBuilder.createQuery(same(params), any(), any(), nullable(RequestPartitionId.class))).thenReturn(iter); - IBundleProvider result = mySvc.registerSearch(myCallingDao, params, "Patient", new CacheControlDirective(), null, RequestPartitionId.allPartitions()); - assertNotNull(result.getUuid()); - assertEquals(null, result.size()); - try { - result.getResources(0, 100000); + mySvc.registerSearch(myCallingDao, params, "Patient", new CacheControlDirective(), null, RequestPartitionId.allPartitions()); } catch (InternalErrorException e) { assertThat(e.getMessage(), containsString("FAILED")); assertThat(e.getMessage(), containsString("at ca.uhn.fhir.jpa.search.SearchCoordinatorSvcImplTest")); @@ -220,7 +216,7 @@ public class SearchCoordinatorSvcImplTest { IBundleProvider result = mySvc.registerSearch(myCallingDao, params, "Patient", new CacheControlDirective(), null, RequestPartitionId.allPartitions()); assertNotNull(result.getUuid()); - assertEquals(null, result.size()); + assertEquals(790, result.size()); List resources = result.getResources(0, 100000); assertEquals(790, resources.size()); @@ -297,7 +293,7 @@ public class SearchCoordinatorSvcImplTest { IBundleProvider result = mySvc.registerSearch(myCallingDao, params, "Patient", new CacheControlDirective(), null, RequestPartitionId.allPartitions()); assertNotNull(result.getUuid()); - assertEquals(null, result.size()); + assertEquals(790, result.size()); List resources; @@ -337,16 +333,19 @@ public class SearchCoordinatorSvcImplTest { SlowIterator iter = new SlowIterator(pids.iterator(), 500); when(mySearchBuilder.createQuery(same(params), any(), any(), nullable(RequestPartitionId.class))).thenReturn(iter); - IBundleProvider result = mySvc.registerSearch(myCallingDao, params, "Patient", new CacheControlDirective(), null, RequestPartitionId.allPartitions()); - assertNotNull(result.getUuid()); + ourLog.info("Registering the first search"); + new Thread(() -> mySvc.registerSearch(myCallingDao, params, "Patient", new CacheControlDirective(), null, RequestPartitionId.allPartitions())).start(); + await().until(()->iter.getCountReturned(), Matchers.greaterThan(0)); + String searchId = mySvc.getActiveSearchIds().iterator().next(); CountDownLatch completionLatch = new CountDownLatch(1); Runnable taskStarter = () -> { try { + assertNotNull(searchId); ourLog.info("About to pull the first resource"); - List resources = result.getResources(0, 1); + List resources = mySvc.getResources(searchId, 0, 1, null); ourLog.info("Done pulling the first resource"); - assertEquals(1, resources.size()); + assertEquals(1, resources.size()); } finally { completionLatch.countDown(); } @@ -360,10 +359,9 @@ public class SearchCoordinatorSvcImplTest { ourLog.info("Done cancelling all searches"); try { - result.getResources(10, 20); - } catch (InternalErrorException e) { - assertThat(e.getMessage(), containsString("Abort has been requested")); - assertThat(e.getMessage(), containsString("at ca.uhn.fhir.jpa.search.SearchCoordinatorSvcImpl")); + mySvc.getResources(searchId, 0, 1, null); + } catch (ResourceGoneException e) { + // good } completionLatch.await(10, TimeUnit.SECONDS); @@ -391,7 +389,7 @@ public class SearchCoordinatorSvcImplTest { IBundleProvider result = mySvc.registerSearch(myCallingDao, params, "Patient", new CacheControlDirective(), null, RequestPartitionId.allPartitions()); assertNotNull(result.getUuid()); - assertEquals(null, result.size()); + assertEquals(790, result.size()); ArgumentCaptor searchCaptor = ArgumentCaptor.forClass(Search.class); verify(mySearchCacheSvc, atLeast(1)).save(searchCaptor.capture()); @@ -402,23 +400,11 @@ public class SearchCoordinatorSvcImplTest { PersistedJpaBundleProvider provider; resources = result.getResources(0, 10); - assertNull(result.size()); + assertEquals(790, result.size()); assertEquals(10, resources.size()); assertEquals("10", resources.get(0).getIdElement().getValueAsString()); assertEquals("19", resources.get(9).getIdElement().getValueAsString()); - when(mySearchCacheSvc.fetchByUuid(eq(result.getUuid()))).thenReturn(Optional.of(search)); - - /* - * Now call from a new bundle provider. This simulates a separate HTTP - * client request coming in. - */ - provider = newPersistedJpaBundleProvider(result.getUuid()); - resources = provider.getResources(10, 20); - assertEquals(10, resources.size()); - assertEquals("20", resources.get(0).getIdElement().getValueAsString()); - assertEquals("29", resources.get(9).getIdElement().getValueAsString()); - myExpectedNumberOfSearchBuildersCreated = 4; } From 756af63993c2539d19049b48b2cf44fc51d6c4aa Mon Sep 17 00:00:00 2001 From: Daron McIntosh Date: Thu, 16 Sep 2021 17:33:04 +0000 Subject: [PATCH 139/143] Add scope to unit test dependency --- hapi-fhir-structures-dstu2.1/pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml index 203d9759eb9..3910f44e72a 100644 --- a/hapi-fhir-structures-dstu2.1/pom.xml +++ b/hapi-fhir-structures-dstu2.1/pom.xml @@ -176,8 +176,9 @@ commons-lang - commons-lang - 2.5 + commons-lang + 2.5 + test net.sf.json-lib From 528690fe6cd8db13f2813b9f18aaa27bf0120e83 Mon Sep 17 00:00:00 2001 From: Daron McIntosh Date: Thu, 16 Sep 2021 18:26:53 +0000 Subject: [PATCH 140/143] add commons-lang dep to hapi-fhir-validation pom --- hapi-fhir-validation/pom.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml index 81b1b0d0aa9..8158acb5ba3 100644 --- a/hapi-fhir-validation/pom.xml +++ b/hapi-fhir-validation/pom.xml @@ -261,6 +261,13 @@ test + + commons-lang + commons-lang + 2.5 + test + + com.helger From 56920149bc842e1c502965ef1cc95ccb92667e2b Mon Sep 17 00:00:00 2001 From: Jason Roberts Date: Fri, 17 Sep 2021 09:48:39 -0400 Subject: [PATCH 141/143] add support for OIDC authentication to Swagger API --- .../uhn/fhir/rest/openapi/OpenApiInterceptor.java | 15 ++++++++++++++- .../resources/ca/uhn/fhir/rest/openapi/index.css | 2 +- .../resources/ca/uhn/fhir/rest/openapi/index.html | 4 +++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-server-openapi/src/main/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptor.java b/hapi-fhir-server-openapi/src/main/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptor.java index 7caad2dbb78..13a3107cc02 100644 --- a/hapi-fhir-server-openapi/src/main/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptor.java +++ b/hapi-fhir-server-openapi/src/main/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptor.java @@ -262,6 +262,13 @@ public class OpenApiInterceptor { return true; } + if (resourcePath.endsWith(".html")) { + theResponse.setContentType(Constants.CT_HTML); + theResponse.setStatus(200); + IOUtils.copy(resource, theResponse.getOutputStream()); + theResponse.getOutputStream().close(); + return true; + } } return false; } @@ -336,12 +343,18 @@ public class OpenApiInterceptor { String page = extractPageName(theRequestDetails, PAGE_SYSTEM); context.setVariable("PAGE", page); + populateOIDCVariables(context); + String outcome = myTemplateEngine.process("index.html", context); theResponse.getWriter().write(outcome); theResponse.getWriter().close(); } + protected void populateOIDCVariables(WebContext context) { + context.setVariable("OAUTH2_REDIRECT_URL_PROPERTY", ""); + } + private String extractPageName(ServletRequestDetails theRequestDetails, String theDefault) { String[] pageValues = theRequestDetails.getParameters().get("page"); String page = null; @@ -354,7 +367,7 @@ public class OpenApiInterceptor { return page; } - private OpenAPI generateOpenApi(ServletRequestDetails theRequestDetails) { + protected OpenAPI generateOpenApi(ServletRequestDetails theRequestDetails) { String page = extractPageName(theRequestDetails, null); CapabilityStatement cs = getCapabilityStatement(theRequestDetails); diff --git a/hapi-fhir-server-openapi/src/main/resources/ca/uhn/fhir/rest/openapi/index.css b/hapi-fhir-server-openapi/src/main/resources/ca/uhn/fhir/rest/openapi/index.css index a94d230ed3c..b921df6148a 100644 --- a/hapi-fhir-server-openapi/src/main/resources/ca/uhn/fhir/rest/openapi/index.css +++ b/hapi-fhir-server-openapi/src/main/resources/ca/uhn/fhir/rest/openapi/index.css @@ -18,7 +18,7 @@ body background: #fafafa; } -.scheme-container, .information-container +.information-container { display: none } diff --git a/hapi-fhir-server-openapi/src/main/resources/ca/uhn/fhir/rest/openapi/index.html b/hapi-fhir-server-openapi/src/main/resources/ca/uhn/fhir/rest/openapi/index.html index a1e0d16659d..f3ff503295f 100644 --- a/hapi-fhir-server-openapi/src/main/resources/ca/uhn/fhir/rest/openapi/index.html +++ b/hapi-fhir-server-openapi/src/main/resources/ca/uhn/fhir/rest/openapi/index.html @@ -1,3 +1,4 @@ + @@ -55,7 +56,8 @@ plugins: [ // SwaggerUIBundle.plugins.DownloadUrl ], - // layout: "StandaloneLayout" + // layout: "StandaloneLayout", + oauth2RedirectUrl: "[[${OAUTH2_REDIRECT_URL_PROPERTY}]]" }); // End Swagger UI call region From a866feb730945c96d289209a8723a58e206b7f6f Mon Sep 17 00:00:00 2001 From: Jason Roberts Date: Fri, 17 Sep 2021 11:41:51 -0400 Subject: [PATCH 142/143] changelog --- .../fhir/changelog/5_6_0/3005-oidc-support-in-swagger.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3005-oidc-support-in-swagger.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3005-oidc-support-in-swagger.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3005-oidc-support-in-swagger.yaml new file mode 100644 index 00000000000..7a924a3fd8f --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3005-oidc-support-in-swagger.yaml @@ -0,0 +1,5 @@ +--- +type: add +issue: 3005 +jira: SMILE-723 +title: "Open up the visibility of some methods in the generation of the Open API definition files to allow extenders to add support for OIDC authorization." From 4051fe084937e728f8ebd027cff76ae40af62f8e Mon Sep 17 00:00:00 2001 From: Jason Roberts Date: Fri, 17 Sep 2021 14:17:33 -0400 Subject: [PATCH 143/143] code review feedback --- .../ca/uhn/fhir/rest/openapi/OpenApiInterceptor.java | 6 +++--- .../uhn/fhir/rest/openapi/OpenApiInterceptorTest.java | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-server-openapi/src/main/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptor.java b/hapi-fhir-server-openapi/src/main/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptor.java index 13a3107cc02..9a3117c0d2f 100644 --- a/hapi-fhir-server-openapi/src/main/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptor.java +++ b/hapi-fhir-server-openapi/src/main/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptor.java @@ -343,7 +343,7 @@ public class OpenApiInterceptor { String page = extractPageName(theRequestDetails, PAGE_SYSTEM); context.setVariable("PAGE", page); - populateOIDCVariables(context); + populateOIDCVariables(theRequestDetails, context); String outcome = myTemplateEngine.process("index.html", context); @@ -351,8 +351,8 @@ public class OpenApiInterceptor { theResponse.getWriter().close(); } - protected void populateOIDCVariables(WebContext context) { - context.setVariable("OAUTH2_REDIRECT_URL_PROPERTY", ""); + protected void populateOIDCVariables(ServletRequestDetails theRequestDetails, WebContext theContext) { + theContext.setVariable("OAUTH2_REDIRECT_URL_PROPERTY", ""); } private String extractPageName(ServletRequestDetails theRequestDetails, String theDefault) { diff --git a/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorTest.java b/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorTest.java index c7afe2ad42a..66d649cbfb1 100644 --- a/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorTest.java +++ b/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorTest.java @@ -213,6 +213,17 @@ public class OpenApiInterceptorTest { assertEquals(null, url); } + @Test + public void testStandardRedirectScriptIsAccessible() throws IOException { + myServer.getRestfulServer().registerInterceptor(new AddResourceCountsInterceptor()); + myServer.getRestfulServer().registerInterceptor(new OpenApiInterceptor()); + + HttpGet get = new HttpGet("http://localhost:" + myServer.getPort() + "/fhir/swagger-ui/oauth2-redirect.html"); + try (CloseableHttpResponse response = myClient.execute(get)) { + assertEquals(200, response.getStatusLine().getStatusCode()); + } + } + private String fetchSwaggerUi(String url) throws IOException { String resp; HttpGet get = new HttpGet(url);
    sourceTyperesourceType String0..* + The Source resource types you would like to clear. If omitted, all resource types will be cleared. +
    batchSizeInteger 0..1 - The Source Resource type you would like to clear. If omitted, will operate over all links. + The number of links that should be deleted at a time. If ommitted, then the batch size will be determined by the value +of [Expunge Batch Size](/apidocs/hapi-fhir-jpaserver-api/ca/uhn/fhir/jpa/api/config/DaoConfig.html#getExpungeBatchSize()) +property.