From 579e5da5ffe145a1bb0403e0d3b2e7aeda588686 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Tue, 9 May 2017 11:47:05 +0200 Subject: [PATCH] Make sure we reuse searches --- .../uhn/fhir/jpa/dao/SearchParameterMap.java | 3 + .../jpa/dao/dstu3/FhirSystemDaoDstu3.java | 11 +- .../jpa/search/SearchCoordinatorSvcImpl.java | 3 +- .../java/ca/uhn/fhir/jpa/util/StopWatch.java | 50 +- .../jpa/dao/dstu3/FhirSystemDaoDstu3Test.java | 164 +- .../dstu3/ResourceProviderDstu3Test.java | 47 + .../ca/uhn/fhir/jpa/util/StopWatchTest.java | 40 +- .../src/test/resources/batch-error.xml | 2435 +++++++++++++++++ 8 files changed, 2722 insertions(+), 31 deletions(-) create mode 100644 hapi-fhir-jpaserver-base/src/test/resources/batch-error.xml diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchParameterMap.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchParameterMap.java index 604772ee988..9a4bf7aee38 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchParameterMap.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchParameterMap.java @@ -383,6 +383,9 @@ public class SearchParameterMap extends LinkedHashMap { List deleteConflicts = new ArrayList(); Map entriesToProcess = new IdentityHashMap(); Set nonUpdatedEntities = new HashSet(); + Set conditionalRequestUrls = new HashSet(); /* * Loop through the request and process any entries of type @@ -412,6 +413,10 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao { entriesToProcess.put(nextRespEntry, outcome.getEntity()); if (outcome.getCreated() == false) { nonUpdatedEntities.add(outcome.getEntity()); + } else { + if (isNotBlank(matchUrl)) { + conditionalRequestUrls.add(matchUrl); + } } break; @@ -462,7 +467,11 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao { outcome = resourceDao.update(res, null, false, theRequestDetails); } else { res.setId((String) null); - outcome = resourceDao.update(res, parts.getResourceType() + '?' + parts.getParams(), false, theRequestDetails); + String matchUrl = parts.getResourceType() + '?' + parts.getParams(); + outcome = resourceDao.update(res, matchUrl, false, theRequestDetails); + if (Boolean.TRUE.equals(outcome.getCreated())) { + conditionalRequestUrls.add(matchUrl); + } } handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, nextRespEntry, resourceType, res); 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 e3562f430eb..a4dbf24edcb 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 @@ -273,7 +273,8 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { public PersistedJpaBundleProvider doInTransaction(TransactionStatus theStatus) { Search searchToUse = null; - Collection candidates = mySearchDao.find(resourceType, queryString.hashCode(), createdCutoff); + int hashCode = queryString.hashCode(); + Collection candidates = mySearchDao.find(resourceType, hashCode, createdCutoff); for (Search nextCandidateSearch : candidates) { if (queryString.equals(nextCandidateSearch.getSearchQueryString())) { searchToUse = nextCandidateSearch; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/StopWatch.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/StopWatch.java index 81ff08caa0e..e9d6480f34f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/StopWatch.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/StopWatch.java @@ -12,7 +12,7 @@ import java.util.Date; * 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 + * 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, @@ -22,18 +22,17 @@ import java.util.Date; * #L% */ - public class StopWatch { private long myStarted = System.currentTimeMillis(); - + /** * Constructor */ public StopWatch() { super(); } - + /** * Constructor */ @@ -47,13 +46,13 @@ public class StopWatch { myStarted = now; return retVal; } - + public long getMillis() { long now = System.currentTimeMillis(); long retVal = now - myStarted; return retVal; } - + public long getMillis(Date theNow) { long retVal = theNow.getTime() - myStarted; return retVal; @@ -62,9 +61,40 @@ public class StopWatch { public Date getStartedDate() { return new Date(myStarted); } - - public double getMillisPerOperation(int theNumOperations) { - return ((double)getMillis()) / Math.max(1.0, theNumOperations); + + /** + * Formats value in the format hh:mm:ss.SSSS + */ + @Override + public String toString() { + return formatMillis(getMillis()); } - + + static public String formatMillis(long val) { + StringBuilder buf = new StringBuilder(20); + append(buf, "", 2, ((val % 3600000) / 60000)); + append(buf, ":", 2, ((val % 60000) / 1000)); + append(buf, ".", 3, (val % 1000)); + return buf.toString(); + } + + /** Append a right-aligned and zero-padded numeric value to a `StringBuilder`. */ + static private void append(StringBuilder tgt, String pfx, int dgt, long val) { + tgt.append(pfx); + if (dgt > 1) { + int pad = (dgt - 1); + for (long xa = val; xa > 9 && pad > 0; xa /= 10) { + pad--; + } + for (int xa = 0; xa < pad; xa++) { + tgt.append('0'); + } + } + tgt.append(val); + } + + public double getMillisPerOperation(int theNumOperations) { + return ((double) getMillis()) / Math.max(1.0, theNumOperations); + } + } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3Test.java index 29fecf1369a..a570920c558 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3Test.java @@ -84,6 +84,17 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest { myDaoConfig.setAllowMultipleDelete(new DaoConfig().isAllowMultipleDelete()); } + @Test + public void testTransactionWithMultiBundle() throws IOException { + String inputBundleString = loadClasspath("/batch-error.xml"); + Bundle bundle = myFhirCtx.newXmlParser().parseResource(Bundle.class, inputBundleString); + Bundle resp = mySystemDao.transaction(mySrd, bundle); + + ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); + + assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus()); + } + @SuppressWarnings("unchecked") private T find(Bundle theBundle, Class theType, int theIndex) { int count = 0; @@ -396,30 +407,30 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest { public void testTransactionWithPostDoesntUpdate() throws Exception { // First bundle (name is Joshua) - + String input = IOUtils.toString(getClass().getResource("/dstu3-post1.xml"), StandardCharsets.UTF_8); Bundle request = myFhirCtx.newXmlParser().parseResource(Bundle.class, input); Bundle response = mySystemDao.transaction(mySrd, request); ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); - + assertEquals(1, response.getEntry().size()); assertEquals("201 Created", response.getEntry().get(0).getResponse().getStatus()); assertEquals("1", response.getEntry().get(0).getResponse().getEtag()); String id = response.getEntry().get(0).getResponse().getLocation(); - + // Now the second (name is Adam, shouldn't get used) - + input = IOUtils.toString(getClass().getResource("/dstu3-post2.xml"), StandardCharsets.UTF_8); request = myFhirCtx.newXmlParser().parseResource(Bundle.class, input); response = mySystemDao.transaction(mySrd, request); ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); - + assertEquals(1, response.getEntry().size()); assertEquals("200 OK", response.getEntry().get(0).getResponse().getStatus()); assertEquals("1", response.getEntry().get(0).getResponse().getEtag()); String id2 = response.getEntry().get(0).getResponse().getLocation(); assertEquals(id, id2); - + Patient patient = myPatientDao.read(new IdType(id), mySrd); ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient)); assertEquals("Joshua", patient.getNameFirstRep().getGivenAsSingleString()); @@ -2196,6 +2207,147 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest { assertThat(o2.getSubject().getReferenceElement().getValue(), endsWith("Patient/" + p1.getIdElement().getIdPart())); } + + + @Test + public void testTransactionDoubleConditionalCreateOnlyCreatesOne() { + Bundle inputBundle = new Bundle(); + inputBundle.setType(Bundle.BundleType.TRANSACTION); + + Encounter enc1 = new Encounter(); + enc1.addIdentifier().setSystem("urn:foo").setValue("12345"); + inputBundle + .addEntry() + .setResource(enc1) + .getRequest() + .setMethod(HTTPVerb.POST) + .setIfNoneExist("Encounter?identifier=urn:foo|12345"); + Encounter enc2 = new Encounter(); + enc2.addIdentifier().setSystem("urn:foo").setValue("12345"); + inputBundle + .addEntry() + .setResource(enc2) + .getRequest() + .setMethod(HTTPVerb.POST) + .setIfNoneExist("Encounter?identifier=urn:foo|12345"); + + try { + mySystemDao.transaction(mySrd, inputBundle); + fail(); + } catch (InvalidRequestException e) { + assertEquals("Unable to process Transaction - Request would cause multiple resources to match URL: \"Encounter?identifier=urn:foo|12345\". Does transaction request contain duplicates?", e.getMessage()); + } + } + + + @Test + public void testTransactionDoubleConditionalUpdateOnlyCreatesOne() { + Bundle inputBundle = new Bundle(); + inputBundle.setType(Bundle.BundleType.TRANSACTION); + + Encounter enc1 = new Encounter(); + enc1.addIdentifier().setSystem("urn:foo").setValue("12345"); + inputBundle + .addEntry() + .setResource(enc1) + .getRequest() + .setMethod(HTTPVerb.PUT) + .setUrl("Encounter?identifier=urn:foo|12345"); + Encounter enc2 = new Encounter(); + enc2.addIdentifier().setSystem("urn:foo").setValue("12345"); + inputBundle + .addEntry() + .setResource(enc2) + .getRequest() + .setMethod(HTTPVerb.PUT) + .setUrl("Encounter?identifier=urn:foo|12345"); + + Bundle response = mySystemDao.transaction(mySrd, inputBundle); + + IBundleProvider found = myEncounterDao.search(new SearchParameterMap().setLoadSynchronous(true)); + assertEquals(1, found.size().intValue()); + + } + + @Test + public void testCircularCreateAndDelete() { + Encounter enc = new Encounter(); + enc.setId(IdType.newRandomUuid()); + + Condition cond = new Condition(); + cond.setId(IdType.newRandomUuid()); + + EpisodeOfCare ep = new EpisodeOfCare(); + ep.setId(IdType.newRandomUuid()); + + enc.getEpisodeOfCareFirstRep().setReference(ep.getId()); + cond.getContext().setReference(enc.getId()); + ep.getDiagnosisFirstRep().getCondition().setReference(cond.getId()); + + Bundle inputBundle = new Bundle(); + inputBundle.setType(Bundle.BundleType.TRANSACTION); + inputBundle + .addEntry() + .setResource(ep) + .setFullUrl(ep.getId()) + .getRequest().setMethod(HTTPVerb.POST); + inputBundle + .addEntry() + .setResource(cond) + .setFullUrl(cond.getId()) + .getRequest().setMethod(HTTPVerb.POST); + inputBundle + .addEntry() + .setResource(enc) + .setFullUrl(enc.getId()) + .getRequest().setMethod(HTTPVerb.POST); + + Bundle resp = mySystemDao.transaction(mySrd, inputBundle); + ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); + + IdType epId = new IdType(resp.getEntry().get(0).getResponse().getLocation()); + IdType condId = new IdType(resp.getEntry().get(1).getResponse().getLocation()); + IdType encId = new IdType(resp.getEntry().get(2).getResponse().getLocation()); + + // Make sure a single one can't be deleted + try { + myEncounterDao.delete(encId); + fail(); + } catch (ResourceVersionConflictException e) { + // good + } + + /* + * Now delete all 3 by transaction + */ + inputBundle = new Bundle(); + inputBundle.setType(Bundle.BundleType.TRANSACTION); + inputBundle + .addEntry() + .getRequest().setMethod(HTTPVerb.DELETE) + .setUrl(epId.toUnqualifiedVersionless().getValue()); + inputBundle + .addEntry() + .getRequest().setMethod(HTTPVerb.DELETE) + .setUrl(encId.toUnqualifiedVersionless().getValue()); + inputBundle + .addEntry() + .getRequest().setMethod(HTTPVerb.DELETE) + .setUrl(condId.toUnqualifiedVersionless().getValue()); + + ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(inputBundle)); + resp = mySystemDao.transaction(mySrd, inputBundle); + ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); + + // They should now be deleted + try { + myEncounterDao.read(encId.toUnqualifiedVersionless()); + fail(); + } catch (ResourceGoneException e) { + // good + } + + } @AfterClass public static void afterClassClearContext() { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java index 1968268f136..9fac2f5ab5f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java @@ -2859,6 +2859,53 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test { assertNotEquals(uuid1, uuid3); } + @Test + public void testSearchReusesResultsEnabledNoParams() throws Exception { + List resources = new ArrayList(); + for (int i = 0; i < 50; i++) { + Organization org = new Organization(); + org.setName("HELLO"); + resources.add(org); + } + ourClient.transaction().withResources(resources).prettyPrint().encodedXml().execute(); + + myDaoConfig.setReuseCachedSearchResultsForMillis(100000L); + + Bundle result1 = ourClient + .search() + .forResource("Organization") + .returnBundle(Bundle.class) + .execute(); + + final String uuid1 = toSearchUuidFromLinkNext(result1); + Search search1 = newTxTemplate().execute(new TransactionCallback() { + @Override + public Search doInTransaction(TransactionStatus theStatus) { + return mySearchEntityDao.findByUuid(uuid1); + } + }); + Date lastReturned1 = search1.getSearchLastReturned(); + + Bundle result2 = ourClient + .search() + .forResource("Organization") + .returnBundle(Bundle.class) + .execute(); + + final String uuid2 = toSearchUuidFromLinkNext(result2); + Search search2 = newTxTemplate().execute(new TransactionCallback() { + @Override + public Search doInTransaction(TransactionStatus theStatus) { + return mySearchEntityDao.findByUuid(uuid2); + } + }); + Date lastReturned2 = search2.getSearchLastReturned(); + + assertTrue(lastReturned2.getTime() > lastReturned1.getTime()); + + assertEquals(uuid1, uuid2); + } + /** * See #316 */ diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/util/StopWatchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/util/StopWatchTest.java index 05c14c665ee..1e1eafe10fb 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/util/StopWatchTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/util/StopWatchTest.java @@ -2,6 +2,7 @@ package ca.uhn.fhir.jpa.util; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.lessThan; +import static org.hamcrest.Matchers.startsWith; import static org.junit.Assert.assertThat; import java.util.Date; @@ -10,26 +11,39 @@ import org.junit.Test; public class StopWatchTest { + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(StopWatchTest.class); + @Test public void testStopwatch() throws Exception { StopWatch sw = new StopWatch(); - + Thread.sleep(100); - - assertThat(sw.getMillis(new Date()), greaterThan(10L)); - assertThat(sw.getMillis(), greaterThan(10L)); - assertThat(sw.getStartedDate().getTime(), lessThan(System.currentTimeMillis())); - } - - @Test - public void testStopwatchWithDate() throws Exception { - StopWatch sw = new StopWatch(new Date()); - - Thread.sleep(100); - + assertThat(sw.getMillis(new Date()), greaterThan(10L)); assertThat(sw.getMillis(), greaterThan(10L)); assertThat(sw.getStartedDate().getTime(), lessThan(System.currentTimeMillis())); } + @Test + public void testStopwatchWithDate() throws Exception { + StopWatch sw = new StopWatch(new Date()); + + Thread.sleep(100); + + assertThat(sw.getMillis(new Date()), greaterThan(10L)); + assertThat(sw.getMillis(), greaterThan(10L)); + assertThat(sw.getStartedDate().getTime(), lessThan(System.currentTimeMillis())); + } + + @Test + public void testToString() throws Exception { + StopWatch sw = new StopWatch(); + + Thread.sleep(100); + + String string = sw.toString(); + ourLog.info(string); + assertThat(string, startsWith("00:00")); + } + } diff --git a/hapi-fhir-jpaserver-base/src/test/resources/batch-error.xml b/hapi-fhir-jpaserver-base/src/test/resources/batch-error.xml new file mode 100644 index 00000000000..71d8d2bae15 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/resources/batch-error.xml @@ -0,0 +1,2435 @@ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ Document Id + db734647-fc99-424c-a864-7e3cda82e703
+ Document Created: + December 1, 2016, 11:20, PST
+ + + + + + + + + + + +
+ Care provision + Review of Medications�from�November 1, 2016 to December 1, 2016
+ Performer + Claude Pharmacist, CPh
+ + + + + + + + + + + +
+ Author + Registered Pharmacist, RPh, The Pharmacy Alliance Health Group
+ Contact info + 1004 Pharmacy Drive
Portland,�OR�99123,�US
Tel: +1(555)555-1004
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Encounter Id + 9937012 2.16.840.1.113883.19
+ Encounter Type + Inpatient
+ Encounter Date + �From�December 1, 2016, 09:20 to December 1, 2016, 10:20
+ Encounter Location + id: NPI-Example 2.16.840.1.113883.4.6
+ Responsible party + Michael Coletta, M.D. of Mass Doctors
+ Contact info + 2100 North Ave
Burlington,�MA�02368,�US
Tel: +1(555)555-1003
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Assigned entity + Review of Care Plan
+
+ Assigned entity {$code/@code='SELF'?} + Review of Care Plan
+
+ Emergency contact + Mrs. Martha Jones
+
+
+ Contact info + 17 Daws Rd.
Ann Arbor,�MI�97857,�US
Tel: (999)555-1212
+
+ Care giver + Mrs. Martha Jones
+
+ Contact info + 17 Daws Rd.
Ann Arbor,�MI�97857,�US
Tel: (999)555-1212
+
+ + + + + + + + + + + +
+ Entered by + Ellen Enter
+ Contact info + 1007 Pharmacy Drive
Portland,�OR�99123,�US
Tel: +1(555)555-1050
+
+ + + + + + + + + + + +
+ Signed + Eve Everywoman at December 1, 2016
+ Contact info + Primary Home:
2222 Home Street
Beaverton,�OR�97867,�US
Tel: +1(555)555-2003
+
+ + + + + + + + + + + +
+ Informant + Harold Pharma, CPh
+ Contact info + 1007 Pharmacy Drive
Portland,�OR�99123,�US
Tel: +1(555)555-1003
+
+ + + + + + + + + + + +
+ Information recipient: + Pharmacist Coordinator, CPh
+ Contact info + 100 Better Health Rd.
Ann Arbor,�MI�97857,�US
Telecom information not available
+
+ + + + + + + + + + + +
+ Legal authenticator + Pharmacist Registered, RPh of Greater Area Pharmacy signed at December 1, 2016
+ Contact info + 1004 Pharmacy Drive
Portland,�OR�99123,�US
Tel: +1(555)555-1004
+
+ + + + + + + + + + + +
+ Document maintained by + Greater Area Pharmacy HIE
+ Contact info + Work Place:
1009 Pharmacy Drive
Portland,�OR�99123,�US
Tel: +1(555)555-1009
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + <confidentiality value="N"/> + <attester> + <mode value="legal"/> + <time value="2016-12-01"/> + <party> + <reference value="urn:uuid:61a60cde-63c4-4a4f-899a-fc1c9fcf8a2a"/> + </party> + </attester> + <custodian> + <reference value="urn:uuid:18d04c4e-78cf-4c04-9361-6fe85601bf6d"/> + </custodian> + <event> + <extension url="http://hl7.org/fhir/ccda/StructureDefinition/CCDA-on-FHIR-Performer"> + <valueReference> + <reference value="urn:uuid:5b9cd493-fc58-46f6-9b23-b646e4d05203"/> + </valueReference> + </extension> + <period> + <start value="2016-11-01"/> + <end value="2016-12-01"/> + </period> + </event> + <section> + <title value="Health Concerns Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="75310-3"/> + <display value="Health Concerns Document"/> + </coding> + </code> + <text> + <status value="additional"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <table> + <thead> + <tr> + <th>Health Concern</th> + </tr> + </thead> + <tbody> + <tr> + <td>active</td> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <col width="30%"/> + <col width="30%"/> + <thead> + <tr> + <th>Problem Type</th> + <th>Problem</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>Condition</td> + <td>Constipation</td> + <td>AUG 19, 2016</td> + </tr> + </tbody> + </table> + <table> + <col width="60%"/> + <thead> + <tr> + <th>Intolerance Type</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <span class="Italics Bold">No known </span>Allergy to Substance</td> + <td>AUG 20, 2016</td> + </tr> + </tbody> + </table> + <table> + <col width="60%"/> + <thead> + <tr> + <th>Cognitive Function Observation</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>Difficulty processing information accurately</td> + <td>AUG 1, 2016</td> + </tr> + </tbody> + </table> + <table> + <col width="30%"/> + <thead> + <tr> + <th>ADL Type</th> + <th>Ability</th> + </tr> + </thead> + <tbody> + <tr> + <td>Bathing</td> + <td>Independent</td> + </tr> + </tbody> + </table> + <table> + <col width="30%"/> + <col width="30%"/> + <thead> + <tr> + <th>Functional Assessment</th> + <th>Result of Evaluation</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>Functional status</td> + <td>Independent walking</td> + <td>MAR 11, 2016</td> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <col width="30%"/> + <thead> + <tr> + <th>Device Supplied</th> + <th>Quantity Supplied</th> + </tr> + </thead> + <tbody> + <tr> + <td>cane, device (physical object)</td> + <td>2</td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + <table> + <col width="60%"/> + <thead> + <tr> + <th>Nutritional Status</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>well nourished</td> + <td>MAY 12, 2016</td> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <col width="60%"/> + <thead> + <tr> + <th>Nutrition assessment</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>low sodium diet (finding)</td> + <td>MAY 12, 2016</td> + </tr> + <tr> + <td>excessive dietary carbohydrate intake (finding)</td> + <td>MAY 12, 2016</td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + <table> + <col width="30%"/> + <col width="30%"/> + <thead> + <tr> + <th>Reaction Type</th> + <th>Severity</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>Nausea</td> + <td>Mild</td> + <td>FEB 26, 2016 08:05 to FEB 28, 2016 12:05</td> + </tr> + </tbody> + </table> + <table> + <col width="30%"/> + <col width="30%"/> + <thead> + <tr> + <th>Social History Observation Type</th> + <th>Value</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>Alcohol Intake</td> + <td>12 drinks per day</td> + <td>FEB 15, 2016</td> + </tr> + <tr> + <td>History of tobacco use</td> + <td>Current every day smoker</td> + <td>FEB 14, 2016</td> + </tr> + <tr> + <td>Personal belief</td> + <td>Does not accept blood transfusions, or donates, or stores blood for transfusion.</td> + <td>MAR 12, 2016</td> + </tr> + </tbody> + </table> + <table> + <col width="30%"/> + <col width="30%"/> + <thead> + <tr> + <th>Vital Sign</th> + <th>Value</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>Patient Body Weight - Measured</td> + <td>88 kg</td> + <td>SEP 1, 2016</td> + </tr> + </tbody> + </table> + <table> + <col width="30%"/> + <col width="30%"/> + <thead> + <tr> + <th>Caregiver Characteristic</th> + <th>Caregiver</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>Caregiver has difficulty providing physical care</td> + <td>Mother</td> + <td>MAR 12, 2016</td> + </tr> + </tbody> + </table> + <table> + <col width="30%"/> + <col width="30%"/> + <thead> + <tr> + <th>Functional Assessment</th> + <th>Summed score of component values</th> + <th>Effective Date</th> + </tr> + </thead> + <tbody> + <tr> + <td>Brief Interview for Mental Status</td> + <td>7</td> + <td>FEB 14, 2016</td> + </tr> + </tbody> + </table> + <table> + <col width="30%"/> + <col width="30%"/> + <thead> + <tr> + <th>Sensory Status Type</th> + <th>Value</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>Hearing</td> + <td>Impaired</td> + <td>MAR 3, 2015 </td> + </tr> + </tbody> + </table> + <table> + <col width="60%"/> + <thead> + <tr> + <th>Pregnancy Status</th> + <th>Date</th> + </tr> + </thead> + <tbody> + <tr> + <td>pregnant</td> + <td>SEP 10, 2016</td> + </tr> + </tbody> + </table> + <table> + <thead> + <tr> + <th>Wound Type</th> + <th>Location</th> + <th>Width</th> + <th>Length</th> + <th>Characteristic</th> + <th>Number of Pressure Ulcers/Stage</th> + <th>Highest Pressure Ulcer Stage</th> + </tr> + </thead> + <tbody> + <tr> + <td>Pressure ulcer stage 3</td> + <td>Anterior aspect of knee</td> + <td>1 inch</td> + <td>2 inches</td> + <td>Offensive wound odor</td> + <td>3 / Pressure ulcer stage 3</td> + <td>Necrotic eschar</td> + </tr> + </tbody> + </table> + <table> + <col width="30%"/> + <thead> + <tr> + <th>Encounter Diagnosis Type</th> + <th>Encounter Diagnosis</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>Problem</td> + <td>Migraine</td> + <td>AUG 19, 2016</td> + </tr> + </tbody> + </table> + <table> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <thead> + <tr> + <th>Family History Subject</th> + <th>Administrative Gender</th> + <th>Birth Date</th> + <th>Deceased</th> + <th>Deceased Date</th> + </tr> + </thead> + <tbody> + <tr> + <td>Father</td> + <td>Male</td> + <td>1910</td> + <td>true</td> + <td>1967</td> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <thead> + <tr> + <th>Problem Type</th> + <th>Problem</th> + <th>Date(s)</th> + <th>Age at Onset</th> + <th>Cause of Death</th> + </tr> + </thead> + <tbody> + <tr> + <td>Condition</td> + <td>Myocardial infarction</td> + <td>1967</td> + <td>57 years</td> + <td>Yes</td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + <table> + <col width="20%"/> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <thead> + <tr> + <th>Substance or Device Allergy-Intolerance Type</th> + <th>Substance/Device</th> + <th>Date(s)</th> + <th>Reaction to substance</th> + <th>Severity of reaction</th> + <th>Reaction Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>Food Allergy</td> + <td>Peanut</td> + <td>JAN 9, 2016</td> + <td>Hives</td> + <td>Mild</td> + <td>JAN 9, 2016 08:05 to JAN 9, 2016 12:05</td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + <table> + <thead> + <tr> + <th>Risk Concern</th> + </tr> + </thead> + <tbody> + <tr> + <td>active</td> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <col width="30%"/> + <thead> + <tr> + <th>Social History Observation Type</th> + <th>Value</th> + </tr> + </thead> + <tbody> + <tr> + <td>Characteristics of residence</td> + <td>Motel</td> + </tr> + </tbody> + </table> + <table> + <col width="30%"/> + <col width="30%"/> + <thead> + <tr> + <th>Problem Type</th> + <th>Problem</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>Condition</td> + <td>Opiod abuse (disorder)</td> + <td>DEC 1, 2016</td> + </tr> + <tr> + <td> + <span class="Italics Bold">No known </span>Problem</td> + <td/> + <td>DEC 1, 2016 10:45</td> + </tr> + </tbody> + </table> + <table> + <col width="60%"/> + <thead> + <tr> + <th>Intolerance Type</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <span class="Italics Bold">No known </span>Allergy to Substance</td> + <td>AUG 20, 2016</td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + </div> + </text> + <entry> + <reference value="urn:uuid:320e25c5-b583-4c11-951a-5efc532556ec"/> + </entry> + <entry> + <reference value="urn:uuid:a53aa517-60b3-4272-a443-c9d8920eb59e"/> + </entry> + <entry> + <reference value="urn:uuid:8ccfd7bd-409a-4515-9540-e2b090a0dcf3"/> + </entry> + </section> + <section> + <title value="Goals Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="61146-7"/> + <display value="Goals"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <table> + <col width="30%"/> + <thead> + <tr> + <th>Goal</th> + <th>Date</th> + <th>Author</th> + <th>Reference to</th> + </tr> + </thead> + <tbody> + <tr> + <td>Prevention of constipation</td> + <td>DEC 1, 2016</td> + <td> + <ul> + <li> + <span class="Italics">Pharmacist</span>: Registered Pharmacist, The Pharmacy Alliance Health Group</li> + </ul> + </td> + <td>Problem of "Constipation" in the Health Concerns Section</td> + </tr> + <tr> + <td>Prevention of opioid abuse</td> + <td>DEC 1, 2016</td> + <td> + <ul> + <li> + <span class="Italics">Pharmacist</span>: Registered Pharmacist, The Pharmacy Alliance Health Group</li> + </ul> + </td> + <td>Risk for "Opioid Abuse" in the Health Concerns Section</td> + </tr> + </tbody> + </table> + </div> + </text> + <entry> + <reference value="urn:uuid:e6b1a60b-be79-4cf5-b64b-8541315dfadf"/> + </entry> + <entry> + <reference value="urn:uuid:eba4ea86-9963-4a72-8a08-61c549e67c88"/> + </entry> + </section> + <section> + <title value="Interventions Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="62387-6"/> + <display value="Interventions Provided"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <table> + <thead> + <tr> + <th>Intervention</th> + </tr> + </thead> + <tbody> + <tr> + <td>Procedure/intervention</td> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <col width="20%"/> + <thead> + <tr> + <th>Medication(Prescription)</th> + <th>Dose</th> + <th>Frequency</th> + <th>Duration</th> + <th>Repeat Number</th> + <th>Route</th> + <th>Rate</th> + <th>Author</th> + </tr> + </thead> + <tbody> + <tr> + <td>oxyCODONE Hydrochloride 10 MG Oral Tablet</td> + <td>2</td> + <td>6 h</td> + <td>NOV 25, 2016 to NOV 28, 2016</td> + <td>0</td> + <td>ORAL</td> + <td>24</td> + <td> + <ul> + <li> + <span class="Italics">General Practice</span>: John Middle Doe, MD</li> + <li> + <span class="Italics">Date: </span>NOV 25, 2016</li> + </ul> + </td> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <col width="30%"/> + <thead> + <tr> + <th>Reason for action</th> + <th>Value</th> + </tr> + </thead> + <tbody> + <tr> + <td>Complaint</td> + <td>Chronic Low Back Pain</td> + </tr> + </tbody> + </table> + <table> + <col width="20%"/> + <thead> + <tr> + <th>Medication Supplied</th> + <th>Status</th> + <th>Other timing</th> + <th>Repeat Number</th> + <th>Quantity</th> + <th>Performer</th> + </tr> + </thead> + <tbody> + <tr> + <td>Oxycodone Hydrochloride 10 MG Oral Tablet</td> + <td>completed</td> + <td>NOV 28, 2016</td> + <td>1</td> + <td>24</td> + <td> + <ul> + <li> + <span class="Italics">The Pharmacy Alliance Health Group</span>: </li> + </ul> + </td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + <table> + <col width="30%"/> + <thead> + <tr> + <th>Intervention</th> + <th>Date(s)</th> + </tr> + </thead> + <tbody> + <tr> + <td>Procedure/intervention</td> + <td/> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <col width="20%"/> + <thead> + <tr> + <th>Planned Medication (Prescription)</th> + <th>Dose</th> + <th>Frequency</th> + <th>Duration</th> + <th>Repeat Number</th> + <th>Route</th> + <th>Rate</th> + <th>Author</th> + </tr> + </thead> + <tbody> + <tr> + <td>Oxycodone Hydrochloride 10 MG Oral Tablet</td> + <td>2</td> + <td>6 h</td> + <td>NOV 25, 2016 to NOV 28, 2016</td> + <td>0</td> + <td>ORAL</td> + <td>24</td> + <td> + <ul> + <li> + <span class="Italics">Nurse Practitioner</span>: Mary Middle Jane, NP</li> + <li> + <span class="Italics">Date: </span>NOV 25, 2016</li> + </ul> + </td> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <col width="30%"/> + <thead> + <tr> + <th>Reason for action</th> + <th>Value</th> + </tr> + </thead> + <tbody> + <tr> + <td>Complaint</td> + <td>Chronic Low Back Pain</td> + </tr> + </tbody> + </table> + <table> + <col width="20%"/> + <thead> + <tr> + <th>Medication Supplied</th> + <th>Status</th> + <th>Description</th> + <th>Other timing</th> + <th>Quantity</th> + <th>Performer</th> + </tr> + </thead> + <tbody> + <tr> + <td>Oxycodone Hydrochloride 10 MG Oral Tablet</td> + <td>aborted</td> + <td>Refused to dispense - drug denied.</td> + <td>NOV 25, 2016</td> + <td>0</td> + <td> + <ul> + <li> + <span class="Italics">Competitor Pharmacy</span>: </li> + </ul> + </td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + <table> + <thead> + <tr> + <th>Planned Intervention</th> + </tr> + </thead> + <tbody> + <tr> + <td>Intervention</td> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <thead> + <tr> + <th>Reference to</th> + </tr> + </thead> + <tbody> + <tr> + <td>Goal of "Prevention of opioid abuse" in the Goals Section</td> + </tr> + </tbody> + </table> + <table> + <col width="30%"/> + <thead> + <tr> + <th>Patient Referral</th> + <th>Date(s)</th> + <th>Author</th> + </tr> + </thead> + <tbody> + <tr> + <td>Referral to general practitioner</td> + <td>DEC 1, 2016</td> + <td> + <ul> + <li> + <span class="Italics">Pharmacist</span>: Registered Pharmacist, The Pharmacy Alliance Health Group</li> + </ul> + </td> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <col width="30%"/> + <thead> + <tr> + <th>Reason for action</th> + <th>Value</th> + </tr> + </thead> + <tbody> + <tr> + <td>Problem</td> + <td>Opioid abuse (disorder) (suspected)</td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + <table> + <col width="30%"/> + <thead> + <tr> + <th>Planned Encounter</th> + <th>Date(s)</th> + <th>Performer</th> + <th>Location</th> + </tr> + </thead> + <tbody> + <tr> + <td>Office outpatient visit 15 minutes</td> + <td>DEC 15, 2016 13:00</td> + <td> + <ul> + <li> + <span class="Italics">Clinical Pharmacist</span>: Claude Pharma Pharmacist</li> + </ul> + </td> + <td> + <ul> + <li> + <span class="Italics">Urgent Care Center</span> + </li> + </ul> + </td> + </tr> + <tr> + <td>Office outpatient visit 15 minutes</td> + <td>DEC 25, 2016 13:00</td> + <td> + <ul> + <li> + <span class="Italics"> Clinical Pharmacist</span>: Claude Pharma Pharmacist</li> + </ul> + </td> + <td> + <ul> + <li> + <span class="Italics">Urgent Care Center</span> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + <table> + <col width="20%"/> + <thead> + <tr> + <th>Handoff communication</th> + <th>Date(s)</th> + <th>Participant</th> + <th>Author</th> + </tr> + </thead> + <tbody> + <tr> + <td>handoff communication (procedure)</td> + <td>DEC 1, 2016</td> + <td> + <ul> + <li> + <span class="Italics">Registered Nurse</span>: Nightingale Nancy</li> + </ul> + </td> + <td> + <ul> + <li> + <span class="Italics">Registered nurse</span>: Nurse Florence</li> + </ul> + </td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + </div> + </text> + <entry> + <reference value="urn:uuid:bc2adf40-9760-4652-890b-c749471544b0"/> + </entry> + <!--Unmapped entry reference: act urn:hl7ii:2.16.840.1.113883.10.20.22.4.146:2015-08-01 urn:hl7ii:2.16.840.1.113883.10.20.37.3.12:2017-08-01--> + </section> + <section> + <title value="Health Status Evaluations/Outcomes Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="11383-7"/> + <display value="Patient Problem Outcome"/> + </coding> + </code> + <text> + <status value="additional"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <table> + <col width="30%"/> + <thead> + <tr> + <th>Outcome Type</th> + <th>Outcome Value</th> + <th>Author</th> + </tr> + </thead> + <tbody> + <tr> + <td>Nutrition and dietetics team consult</td> + <td>Normal Bowel Habits</td> + <td> + <ul> + <li> + <span class="Italics">Pharmacist</span>: Registered Pharmacist, The Pharmacy Alliance Health Group</li> + <li> + <span class="Italics">Date: </span>JAN 1, 2016</li> + </ul> + </td> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <thead> + <tr> + <th>Reference to</th> + </tr> + </thead> + <tbody> + <tr> + <td>Goal of "Prevention of constipation" in the Goals Section</td> + </tr> + </tbody> + </table> + <table> + <thead> + <tr> + <th>Progress Toward Goal</th> + </tr> + </thead> + <tbody> + <tr> + <td>Goal achieved</td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + </div> + </text> + <entry> + <reference value="urn:uuid:ff03c97a-ebf4-49dc-a2c8-22cdeaf5887d"/> + </entry> + </section> + <section> + <title value="INSURANCE PROVIDERS"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="48768-6"/> + <display value="Payer"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <table> + <thead> + <tr> + <th>Coverage</th> + </tr> + </thead> + <tbody> + <tr> + <td>Payment sources</td> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <thead> + <tr> + <th>Policy</th> + <th>Preference Order</th> + <th>Covered Party</th> + <th>Policy Holder</th> + <th>Performer</th> + </tr> + </thead> + <tbody> + <tr> + <td>Medicaid</td> + <td>1</td> + <td> + <ul> + <li> + <span class="Italics">Self</span>: Eve Middle Betterhalf</li> + </ul> + </td> + <td> + <ul> + <li/> + </ul> + </td> + <td> + <ul> + <li> + <span class="Italics">Payor</span>: </li> + </ul> + <ul> + <li> + <span class="Italics">Guarantor</span>: Boris Betterhalf</li> + <li> + <span class="Italics">Date: </span>Unknown</li> + </ul> + </td> + </tr> + <tr> + <td colspan="20"> + <ul> + <li> + <table> + <thead> + <tr> + <th>Authorization For</th> + </tr> + </thead> + <tbody> + <tr> + <td>Nutritionist education, guidance, and counseling</td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + </li> + </ul> + </td> + </tr> + </tbody> + </table> + </div> + </text> + <!--Found Coverage Activity--> + <!--Found Policy Activity--> + <entry> + <reference value="urn:uuid:b91f92de-af9a-4871-bac2-851356b8e320"/> + </entry> + </section> + </Composition> + </resource> + <request> + <method value="POST"/> + <url value="Composition"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:addbc0f2-10f9-40b3-91c3-41b4c8ba090e"/> + <resource> + <Patient> + <meta> + <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"/> + </meta> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <h1>Betterhalf3, Eve Middle</h1> + <p>Alternate name: Everywoman, + Eve</p> + <!--TODO: finish Patient.text (add contact info, etc.)--> + </div> + </text> + <extension url="http://hl7.org/fhir/us/core/StructureDefinition/us-core-race"> + <extension url="ombCategory"> + <valueCoding> + <system value="http://hl7.org/fhir/v3/Race"/> + <code value="2106-3"/> + <display value="White"/> + </valueCoding> + </extension> + <extension url="detailed"> + <valueCoding> + <system value="http://hl7.org/fhir/v3/Race"/> + <code value="2076-8"/> + <display value="Hawaiian or Other Pacific Islander"/> + </valueCoding> + </extension> + </extension> + <extension url="http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"> + <extension url="ombCategory"> + <valueCoding> + <system value="http://hl7.org/fhir/v3/Ethnicity"/> + <code value="2186-5"/> + <display value="Not Hispanic or Latino"/> + </valueCoding> + </extension> + </extension> + <identifier> + <system value="urn:oid:2.16.840.1.113883.4.1"/> + <value value="444222222"/> + </identifier> + <identifier> + <system value="urn:oid:2.16.840.1.113883.19"/> + <value value="example-ccnc-id"/> + </identifier> + <identifier> + <system value="urn:oid:2.16.840.1.113883.19"/> + <value value="example-vendor-id"/> + </identifier> + <name> + <use value="usual"/> + <text value="Betterhalf3, Sr., Eve Middle (usual name)"/> + <family value="Betterhalf3"/> + <given value="Eve"/> + <given value="Middle"/> + <suffix value="Sr."/> + </name> + <name> + <use value="maiden"/> + <text value="Everywoman, Eve (maiden name)"/> + <family value="Everywoman"/> + <given value="Eve"/> + </name> + <telecom> + <system value="phone"/> + <value value="+1(555)555-2003"/> + <use value="home"/> + </telecom> + <telecom> + <system value="phone"/> + <value value="+1(555)555-2006"/> + <use value="home"/> + </telecom> + <gender value="female"/> + <birthDate value="1975-05-01"/> + <address> + <line value="2222 Home Street 3333 Old Home Street"/> + <city value="Beaverton Beaverton"/> + <state value="OR OR"/> + <postalCode value="97867 97869"/> + <country value="US US"/> + </address> + </Patient> + </resource> + <request> + <method value="POST"/> + <url value="Patient"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:e46d009a-817a-417f-88ea-da6dd88c0593"/> + <resource> + <Encounter> + <status value="finished"/> + <type> + <coding> + <system value="http://hl7.org/fhir/v3/ActCode"/> + <code value="IMP"/> + <display value="Inpatient"/> + </coding> + <coding> + <system value="urn:oid:2.16.840.1.113883.999999"/> + <code value="fake_code"/> + <display value="fake display name"/> + </coding> + </type> + <subject><!--Pulling subject from document--> + <reference value="urn:uuid:addbc0f2-10f9-40b3-91c3-41b4c8ba090e"/> + </subject> + <period> + <start value="2016-12-01T09:20:00-04:00"/> + <end value="2016-12-01T10:20:00-04:00"/> + </period> + </Encounter> + </resource> + <request> + <method value="POST"/> + <url value="Encounter"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:ec36309c-edb2-47c1-bc39-67f61f38e2a5"/> + <resource> + <Practitioner> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Name: Pharmacist, Registered</p> + <p>---TODO: ID info---</p> + <p>Telephone: tel:+1(555)555-1004</p> + </div> + </text> + <identifier> + <system value="urn:ietf:rfc:3986"/> + <value value="urn:uuid:ec399842-7c0d-4cfc-ada3-f11a799d0460"/> + </identifier> + <name> + <family value="Pharmacist"/> + <given value="Registered"/> + <suffix value="RPh"/> + </name> + <telecom> + <system value="phone"/> + <value value="+1(555)555-1004"/> + <use value="work"/> + </telecom> + <address> + <line value="1004 Pharmacy Drive"/> + <city value="Portland"/> + <state value="OR"/> + <postalCode value="99123"/> + <country value="US"/> + </address> + </Practitioner> + </resource> + <request> + <method value="POST"/> + <url value="Practitioner"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:bb8054b1-61aa-4964-9d0b-70e64870dff7"/> + <resource> + <Practitioner> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Name: Amanda, Assigned</p> + <p>---TODO: ID info---</p> + <p>Telephone: tel:+1(555)555-1003</p> + </div> + </text> + <identifier> + <system value="urn:oid:2.16.840.1.113883.19.5"/> + <value value="KP00017"/> + </identifier> + <name> + <family value="Amanda"/> + <given value="Assigned"/> + </name> + <telecom> + <system value="phone"/> + <value value="+1(555)555-1003"/> + <use value="work"/> + </telecom> + <address> + <line value="1003 Health Care Drive"/> + <city value="Ann Arbor"/> + <state value="MI"/> + <postalCode value="02368"/> + <country value="US"/> + </address> + </Practitioner> + </resource> + <request> + <method value="POST"/> + <url value="Practitioner"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:1122a28b-5e9d-421b-89c5-ef0f7ceacedd"/> + <resource> + <Practitioner> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Name: Pharmacist, Registered</p> + <p>---TODO: ID info---</p> + <p>Telephone: tel:+1(555)555-1004</p> + </div> + </text> + <identifier> + <system value="urn:ietf:rfc:3986"/> + <value value="urn:uuid:5c9ad54d-aa68-4f07-963e-c51920c952c9"/> + </identifier> + <name> + <family value="Pharmacist"/> + <given value="Registered"/> + <suffix value="RPh"/> + </name> + <telecom> + <system value="phone"/> + <value value="+1(555)555-1004"/> + <use value="work"/> + </telecom> + <address> + <line value="1004 Pharmacy Drive"/> + <city value="Portland"/> + <state value="OR"/> + <postalCode value="99123"/> + <country value="US"/> + </address> + </Practitioner> + </resource> + <request> + <method value="POST"/> + <url value="Practitioner"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:fe096f70-b7c3-4679-b9cb-4030cbc1087b"/> + <resource> + <Practitioner> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Name: Pharmacist, Registered</p> + <p>---TODO: ID info---</p> + <p>Telephone: tel:+1(555)555-1004</p> + </div> + </text> + <identifier> + <system value="urn:ietf:rfc:3986"/> + <value value="urn:uuid:5c9ad54d-aa68-4f07-963e-c51920c952c9"/> + </identifier> + <name> + <family value="Pharmacist"/> + <given value="Registered"/> + <suffix value="RPh"/> + </name> + <telecom> + <system value="phone"/> + <value value="+1(555)555-1004"/> + <use value="work"/> + </telecom> + <address> + <line value="1004 Pharmacy Drive"/> + <city value="Portland"/> + <state value="OR"/> + <postalCode value="99123"/> + <country value="US"/> + </address> + </Practitioner> + </resource> + <request> + <method value="POST"/> + <url value="Practitioner"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:2604e064-259b-4501-ae6e-c46f9cb20091"/> + <resource> + <Practitioner> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Name: Doe, John Middle</p> + <p>---TODO: ID info---</p> + <p>Telephone: tel:+1(555)555-1004 fax:+1(555)555-5050 mailto:doctor@provider.com</p> + </div> + </text> + <identifier> + <system value="urn:oid:2.16.840.1.113883.4.6"/> + <value value="219BX"/> + </identifier> + <name> + <family value="Doe"/> + <given value="John"/> + <given value="Middle"/> + <suffix value="MD"/> + </name> + <telecom> + <system value="phone"/> + <value value="+1(555)555-1004"/> + <use value="work"/> + </telecom> + <telecom> + <system value="fax"/> + <value value="+1(555)555-5050"/> + <use value="work"/> + </telecom> + <telecom> + <system value="email"/> + <value value="doctor@provider.com"/> + <use value="work"/> + </telecom> + <address> + <line value="1004 Clinical Drive"/> + <city value="Portland"/> + <state value="OR"/> + <postalCode value="99123"/> + <country value="US"/> + </address> + </Practitioner> + </resource> + <request> + <method value="POST"/> + <url value="Practitioner"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:af0bc8f4-2d68-4eb8-8816-7f24dec4c3a7"/> + <resource> + <Practitioner> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Name: Jane, Mary Middle</p> + <p>---TODO: ID info---</p> + <p>Telephone: tel:+1(555)555-1004 fax:+1(555)555-5050 mailto:pharmacist@pharmacy.com</p> + </div> + </text> + <identifier> + <system value="urn:oid:2.16.840.1.113883.4.6"/> + <value value="219BX"/> + </identifier> + <name> + <family value="Jane"/> + <given value="Mary"/> + <given value="Middle"/> + <suffix value="NP"/> + </name> + <telecom> + <system value="phone"/> + <value value="+1(555)555-1004"/> + <use value="work"/> + </telecom> + <telecom> + <system value="fax"/> + <value value="+1(555)555-5050"/> + <use value="work"/> + </telecom> + <telecom> + <system value="email"/> + <value value="pharmacist@pharmacy.com"/> + <use value="work"/> + </telecom> + <address> + <line value="1004 Clinical Drive"/> + <city value="Portland"/> + <state value="OR"/> + <postalCode value="99123"/> + <country value="US"/> + </address> + </Practitioner> + </resource> + <request> + <method value="POST"/> + <url value="Practitioner"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:682830d6-b182-4b9f-a66e-7f1811769b78"/> + <resource> + <Practitioner> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Name: Pharmacist, Registered</p> + <p>---TODO: ID info---</p> + <p>Telephone: tel:+1(555)555-1004</p> + </div> + </text> + <identifier> + <system value="urn:ietf:rfc:3986"/> + <value value="urn:uuid:ec399842-7c0d-4cfc-ada3-f11a799d0460"/> + </identifier> + <name> + <family value="Pharmacist"/> + <given value="Registered"/> + <suffix value="RPh"/> + </name> + <telecom> + <system value="phone"/> + <value value="+1(555)555-1004"/> + <use value="work"/> + </telecom> + <address> + <line value="1004 Pharmacy Drive"/> + <city value="Portland"/> + <state value="OR"/> + <postalCode value="99123"/> + <country value="US"/> + </address> + </Practitioner> + </resource> + <request> + <method value="POST"/> + <url value="Practitioner"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:19df9511-501f-44d0-9921-87aad87da4c6"/> + <resource> + <Practitioner> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Name: Florence, Nurse</p> + <p>---TODO: ID info---</p> + <p>Telephone: </p> + </div> + </text> + <identifier> + <system value="urn:ietf:rfc:3986"/> + <value value="urn:uuid:d839038b-7171-4165-a760-467925b43857"/> + </identifier> + <name> + <family value="Florence"/> + <given value="Nurse"/> + <suffix value="RN"/> + </name> + </Practitioner> + </resource> + <request> + <method value="POST"/> + <url value="Practitioner"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:2cdff84e-0a07-4958-a523-99152d67999e"/> + <resource> + <Practitioner> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>---TODO: ID info---</p> + <p>Telephone: </p> + </div> + </text> + <identifier> + <system value="urn:ietf:rfc:3986"/> + <value value="urn:uuid:ec399842-7c0d-4cfc-ada3-f11a799d0460"/> + </identifier> + </Practitioner> + </resource> + <request> + <method value="POST"/> + <url value="Practitioner"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:18d04c4e-78cf-4c04-9361-6fe85601bf6d"/> + <resource> + <Organization> + <name value="Greater Area Pharmacy HIE"/> + <telecom> + <system value="phone"/> + <value value="+1(555)555-1009"/> + <use value="work"/> + </telecom> + <address> + <line value="1009 Pharmacy Drive "/> + <city value="Portland"/> + <state value="OR"/> + <postalCode value="99123"/> + <country value="US"/> + </address> + </Organization> + </resource> + <request> + <method value="POST"/> + <url value="Organization"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:61a60cde-63c4-4a4f-899a-fc1c9fcf8a2a"/> + <resource> + <Practitioner> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Name: Registered, Pharmacist</p> + <p>---TODO: ID info---</p> + <p>Telephone: tel:+1(555)555-1004</p> + </div> + </text> + <identifier> + <system value="urn:ietf:rfc:3986"/> + <value value="urn:uuid:20cf14fb-b65c-4c8c-a54d-b0cca834c18d"/> + </identifier> + <name> + <family value="Registered"/> + <given value="Pharmacist"/> + <suffix value="RPh"/> + </name> + <telecom> + <system value="phone"/> + <value value="+1(555)555-1004"/> + <use value="work"/> + </telecom> + <address> + <line value="1004 Pharmacy Drive"/> + <city value="Portland"/> + <state value="OR"/> + <postalCode value="99123"/> + <country value="US"/> + </address> + </Practitioner> + </resource> + <request> + <method value="POST"/> + <url value="Practitioner"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:5b9cd493-fc58-46f6-9b23-b646e4d05203"/> + <resource> + <Practitioner> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Name: Pharmacist, Claude Pharma</p> + <p>---TODO: ID info---</p> + <p>Telephone: tel:+1(555)555 -1004</p> + </div> + </text> + <identifier> + <system value="urn:oid:2.16.840.1.113883.4.6"/> + <value value="5555555555"/> + </identifier> + <name> + <family value="Pharmacist"/> + <given value="Claude"/> + <given value="Pharma"/> + <suffix value="CPh"/> + </name> + <telecom> + <system value="phone"/> + <value value="+1(555)555 -1004"/> + <use value="work"/> + </telecom> + <address> + <line value="1004 Pharmaceutical Drive"/> + <city value="Portland"/> + <state value="OR"/> + <postalCode value="99123"/> + <country value="US"/> + </address> + </Practitioner> + </resource> + <request> + <method value="POST"/> + <url value="Practitioner"/> + </request> + </entry> + <!--Removed concern wrapper--> + <entry> + <fullUrl value="urn:uuid:320e25c5-b583-4c11-951a-5efc532556ec"/> + <resource> + <Condition> + <meta> + <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"/> + <!--CDA templateId: urn:hl7ii:2.16.840.1.113883.10.20.22.4.4:2015-08-01--> + </meta> + <clinicalStatus value="active"/> + <verificationStatus value="confirmed"/> + <category> + <coding> + <system value="http://snomed.info/sct"/> + <code value="55607006"/> + <display value="Problem"/> + </coding> + <coding> + <system value="http://loinc.org"/> + <code value="75326-9"/> + <display value="Problem"/> + </coding> + </category> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="14760008"/> + <display value="Constipation"/> + </coding> + </code> + <subject><!--Pulling subject from document--> + <reference value="urn:uuid:addbc0f2-10f9-40b3-91c3-41b4c8ba090e"/> + </subject> + <onsetDateTime value="2016-08-19"/> + <asserter><!--Pulling author from document--> + <reference value="urn:uuid:ec36309c-edb2-47c1-bc39-67f61f38e2a5"/> + </asserter> + </Condition> + </resource> + <request> + <method value="POST"/> + <url value="Condition"/> + </request> + </entry> + <!--Removed concern wrapper--> + <entry> + <fullUrl value="urn:uuid:a53aa517-60b3-4272-a443-c9d8920eb59e"/> + <resource> + <AllergyIntolerance> + <meta> + <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance"/> + <!--CDA templateId: urn:hl7ii:2.16.840.1.113883.10.20.22.4.7:2014-06-09--> + </meta> + <clinicalStatus value="active"/> + <verificationStatus value="confirmed"/> + <code><!--Original negated code: 419199007--> + <coding> + <system value="http://snomed.info/sct"/> + <code value="716186003"/> + <display value="No known allergy"/> + </coding> + </code> + <patient> + <reference value="urn:uuid:addbc0f2-10f9-40b3-91c3-41b4c8ba090e"/> + </patient> + <onsetDateTime value="2016-08-20"/> + </AllergyIntolerance> + </resource> + <request> + <method value="POST"/> + <url value="AllergyIntolerance"/> + </request> + </entry> + <!--Removed concern wrapper--> + <entry> + <fullUrl value="urn:uuid:8ccfd7bd-409a-4515-9540-e2b090a0dcf3"/> + <resource> + <Condition> + <meta><!--CDA templateId: urn:hl7ii:2.16.840.1.113883.10.20.22.4.114:2015-08-01--> + <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"/> + <!--CDA templateId: urn:hl7ii:2.16.840.1.113883.10.20.22.4.4:2015-08-01--> + </meta> + <clinicalStatus value="active"/> + <verificationStatus value="confirmed"/> + <category> + <coding> + <system value="http://hl7.org/fhir/v3/ActCode"/> + <code value="ASSERTION"/> + </coding> + <coding> + <system value="http://loinc.org"/> + <code value="75321-0"/> + <display value="Clinical Finding"/> + </coding> + </category> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="425144005"/> + <display value="pressure ulcer stage 3"/> + </coding> + </code> + <subject><!--Pulling subject from document--> + <reference value="urn:uuid:addbc0f2-10f9-40b3-91c3-41b4c8ba090e"/> + </subject> + <onsetDateTime value="2016-02-14"/> + <asserter> + <reference value="urn:uuid:bb8054b1-61aa-4964-9d0b-70e64870dff7"/> + </asserter> + </Condition> + </resource> + <request> + <method value="POST"/> + <url value="Condition"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:e6b1a60b-be79-4cf5-b64b-8541315dfadf"/> + <resource> + <Goal> + <status value="in-progress"/> + <description> + <coding> + <system value="http://snomed.info/sct"/> + <code value="713115004"/> + <display value="Prevention of constipation"/> + </coding> + </description> + <subject><!--Pulling subject from document--> + <reference value="urn:uuid:addbc0f2-10f9-40b3-91c3-41b4c8ba090e"/> + </subject> + <expressedBy> + <reference value="urn:uuid:1122a28b-5e9d-421b-89c5-ef0f7ceacedd"/> + </expressedBy> + <addresses> + <reference value="urn:uuid:320e25c5-b583-4c11-951a-5efc532556ec"/> + </addresses> + <!--Found linked outcome observation--> + <outcomeReference> + <reference value="urn:uuid:ff03c97a-ebf4-49dc-a2c8-22cdeaf5887d"/> + </outcomeReference> + </Goal> + </resource> + <request> + <method value="POST"/> + <url value="Goal"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:eba4ea86-9963-4a72-8a08-61c549e67c88"/> + <resource> + <Goal> + <status value="in-progress"/> + <description> + <coding> + <system value="http://snomed.info/sct"/> + <code value="426928008"/> + <display value="Prevention of opioid abuse"/> + </coding> + </description> + <subject><!--Pulling subject from document--> + <reference value="urn:uuid:addbc0f2-10f9-40b3-91c3-41b4c8ba090e"/> + </subject> + <statusDate value="2016-12-01"/> + <expressedBy> + <reference value="urn:uuid:fe096f70-b7c3-4679-b9cb-4030cbc1087b"/> + </expressedBy> + </Goal> + </resource> + <request> + <method value="POST"/> + <url value="Goal"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:bc2adf40-9760-4652-890b-c749471544b0"/> + <resource> + <List> + <identifier> + <system value="urn:ietf:rfc:3986"/> + <value value="urn:uuid:1040f76d-d877-4f0a-8564-c0b508c57085"/> + </identifier> + <status value="current"/> + <mode value="snapshot"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="362956003"/> + <display value="Procedure/intervention"/> + </coding> + </code> + <entry> + <item> + <reference value="urn:uuid:4376031c-b85c-49ec-9e22-ba624dfb4297"/> + </item> + </entry> + <entry> + <item> + <reference value="urn:uuid:ce030106-6953-4d1a-9444-c703be1b56ff"/> + </item> + </entry> + </List> + </resource> + <request> + <method value="POST"/> + <url value="List"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:4376031c-b85c-49ec-9e22-ba624dfb4297"/> + <resource> + <MedicationRequest> + <identifier> + <system value="urn:oid:2.16.840.1.113883.19"/> + <value value="example-rx-number-id"/> + </identifier> + <status value="active"/> + <intent value="order"/> + <medicationCodeableConcept> + <coding> + <system value="http://www.nlm.nih.gov/research/umls/rxnorm"/> + <code value="1049683"/> + <display value="oxyCODONE Hydrochloride 10 MG Oral Tablet"/> + </coding> + <coding> + <system value="http://hl7.org/fhir/sid/ndc"/> + <code value="35356083930"/> + <display value="oxyCODONE Hydrochloride 10 MG Oral Tablet"/> + </coding> + </medicationCodeableConcept> + <subject><!--Pulling subject from document--> + <reference value="urn:uuid:addbc0f2-10f9-40b3-91c3-41b4c8ba090e"/> + </subject> + <authoredOn value="2016-11-25"/> + <requester> + <agent> + <reference value="urn:uuid:2604e064-259b-4501-ae6e-c46f9cb20091"/> + </agent> + </requester> + <dosageInstruction> + <timing> + <repeat> + <boundsPeriod> + <start value="2016-11-25"/> + <end value="2016-11-28"/> + </boundsPeriod> + <period value="6"/> + <periodUnit value="h"/> + </repeat> + </timing> + <route> + <coding> + <system value="urn:oid:2.16.840.1.113883.3.26.1.1"/> + <code value="C38288"/> + <display value="ORAL"/> + </coding> + </route> + </dosageInstruction> + <dispenseRequest> + <numberOfRepeatsAllowed value="3"/> + </dispenseRequest> + </MedicationRequest> + </resource> + <request> + <method value="POST"/> + <url value="MedicationRequest"/> + </request> + </entry> + <entry> + <fullUrl value="urn:uuid:ce030106-6953-4d1a-9444-c703be1b56ff"/> + <resource> + <MedicationRequest> + <identifier> + <system value="urn:oid:2.16.840.1.113883.19"/> + <value value="example-rx-number-id"/> + </identifier> + <status value="active"/> + <intent value="order"/> + <medicationCodeableConcept> + <coding> + <system value="http://www.nlm.nih.gov/research/umls/rxnorm"/> + <code value="1049683"/> + <display value="oxyCODONE Hydrochloride 10 MG Oral Tablet"/> + </coding> + <coding> + <system value="http://hl7.org/fhir/sid/ndc"/> + <code value="35356083930"/> + <display value="oxyCODONE Hydrochloride 10 MG Oral Tablet"/> + </coding> + </medicationCodeableConcept> + <subject><!--Pulling subject from document--> + <reference value="urn:uuid:addbc0f2-10f9-40b3-91c3-41b4c8ba090e"/> + </subject> + <authoredOn value="2016-11-25"/> + <requester> + <agent> + <reference value="urn:uuid:af0bc8f4-2d68-4eb8-8816-7f24dec4c3a7"/> + </agent> + </requester> + <dosageInstruction> + <timing> + <repeat> + <boundsPeriod> + <start value="2016-11-25"/> + <end value="2016-11-28"/> + </boundsPeriod> + <period value="6"/> + <periodUnit value="h"/> + </repeat> + </timing> + <route> + <coding> + <system value="urn:oid:2.16.840.1.113883.3.26.1.1"/> + <code value="C38288"/> + <display value="ORAL"/> + </coding> + </route> + </dosageInstruction> + <dispenseRequest> + <numberOfRepeatsAllowed value="3"/> + </dispenseRequest> + </MedicationRequest> + </resource> + <request> + <method value="POST"/> + <url value="MedicationRequest"/> + </request> + </entry> + <!--No template match for 2.16.840.1.113883.10.20.22.4.146: 2015-08-01--> + <!--No template match for 2.16.840.1.113883.10.20.37.3.12: 2017-08-01--> + <entry> + <fullUrl value="urn:uuid:ff03c97a-ebf4-49dc-a2c8-22cdeaf5887d"/> + <resource> + <Observation> + <identifier> + <system value="urn:ietf:rfc:3986"/> + <value value="urn:uuid:5c9f77b1-257a-4f9e-bde1-9ee715e1e755"/> + </identifier> + <status value="final"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="84292-2"/> + <display value="Nutrition and dietetics team consult"/> + </coding> + </code> + <subject> + <reference value="urn:uuid:addbc0f2-10f9-40b3-91c3-41b4c8ba090e"/> + </subject> + <performer> + <reference value="urn:uuid:2cdff84e-0a07-4958-a523-99152d67999e"/> + </performer> + <valueCodeableConcept> + <coding> + <system value="http://snomed.info/sct"/> + <code value="55019002"/> + <display value="Normal bowel habits"/> + </coding> + </valueCodeableConcept> + </Observation> + </resource> + <request> + <method value="POST"/> + <url value="Observation"/> + </request> + </entry> + <!--Found Coverage Activity--> + <!--Found Policy Activity--> + <entry> + <fullUrl value="urn:uuid:b91f92de-af9a-4871-bac2-851356b8e320"/> + <resource> + <Coverage> + <identifier> + <system value="urn:ietf:rfc:3986"/> + <value value="urn:uuid:3e676a50-7aac-11db-9fe1-0800200c9a66"/> + </identifier> + <type> + <coding> + <system value="urn:oid:2.16.840.1.113883.3.88.12.3221.5.2"/> + <code value="MC"/> + <display value="Medicaid"/> + </coding> + <coding> + <system value="urn:oid:2.16.840.1.113883.3.221.5"/> + <code value="212"/> + <display value="Medicaid PPO"/> + </coding> + </type> + <policyHolder><!--Pulling subject from document--> + <reference value="urn:uuid:addbc0f2-10f9-40b3-91c3-41b4c8ba090e"/> + </policyHolder> + </Coverage> + </resource> + <request> + <method value="POST"/> + <url value="Coverage"/> + </request> + </entry> +</Bundle>