More work on JPA
This commit is contained in:
parent
a0b120f70e
commit
be44a2bca2
|
@ -292,4 +292,12 @@ public class Bundle extends BaseBundle /* implements IElement */{
|
|||
|
||||
}
|
||||
|
||||
public static Bundle withResources(ArrayList<IResource> theUploadBundle, FhirContext theContext, String theServerBase) {
|
||||
Bundle retVal = new Bundle();
|
||||
for (IResource next : theUploadBundle) {
|
||||
retVal.addResource(next, theContext, theServerBase);
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -164,6 +164,8 @@ public enum ResourceMetadataKeyEnum {
|
|||
} else {
|
||||
return (IdDt) retValObj;
|
||||
}
|
||||
} else if (retValObj instanceof Number) {
|
||||
return new IdDt(((Number)retValObj).toString());
|
||||
}
|
||||
throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected " + IdDt.class.getCanonicalName());
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ public abstract class BaseHttpClientInvocationWithContents extends BaseHttpClien
|
|||
if (myTagList != null) {
|
||||
contents = parser.encodeTagListToString(myTagList);
|
||||
} else if (myResources != null) {
|
||||
Bundle bundle = BaseResourceReturningMethodBinding.createBundleFromResourceList(myContext, "", myResources, theEncoding, theUrlBase, "", false, NarrativeModeEnum.NORMAL);
|
||||
Bundle bundle = BaseResourceReturningMethodBinding.createBundleFromResourceList(myContext, "", myResources, theEncoding, "", "", false, NarrativeModeEnum.NORMAL);
|
||||
contents = parser.encodeBundleToString(bundle);
|
||||
} else {
|
||||
contents = parser.encodeResourceToString(myResource);
|
||||
|
|
|
@ -21,6 +21,7 @@ package ca.uhn.fhir.rest.server.provider;
|
|||
*/
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
|
@ -79,7 +80,14 @@ public class ServerConformanceProvider {
|
|||
|
||||
Set<RestfulOperationSystemEnum> systemOps = new HashSet<RestfulOperationSystemEnum>();
|
||||
|
||||
for (ResourceBinding next : myRestfulServer.getResourceBindings()) {
|
||||
List<ResourceBinding> bindings = new ArrayList<ResourceBinding>(myRestfulServer.getResourceBindings());
|
||||
Collections.sort(bindings, new Comparator<ResourceBinding>() {
|
||||
@Override
|
||||
public int compare(ResourceBinding theArg0, ResourceBinding theArg1) {
|
||||
return theArg0.getResourceName().compareToIgnoreCase(theArg1.getResourceName());
|
||||
}});
|
||||
|
||||
for (ResourceBinding next : bindings) {
|
||||
|
||||
Set<RestfulOperationTypeEnum> resourceOps = new HashSet<RestfulOperationTypeEnum>();
|
||||
RestResource resource = rest.addResource();
|
||||
|
|
|
@ -66,7 +66,7 @@ This file is a Thymeleaf template for the
|
|||
<tr>
|
||||
<td class="propertyKeyCell">Pretty Printing</td>
|
||||
<td>
|
||||
<input type="checkbox" id="configPretty"/>
|
||||
<input type="checkbox" id="configPretty" checked="checked"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -28,7 +28,8 @@ This file is a Thymeleaf template for the
|
|||
</tr>
|
||||
</table>
|
||||
<div class="bodyHeaderBlock">
|
||||
Executed invocation against FHIR RESTful Server in ${latencyMs}ms
|
||||
Executed invocation against FHIR RESTful Server in
|
||||
<th:block th:text="${latencyMs} + 'ms'"/>
|
||||
</div>
|
||||
|
||||
<table border="0" width="100%" cellpadding="0" cellspacing="0" style="margin-top: 4px;">
|
||||
|
|
|
@ -79,15 +79,15 @@ public class TransactionClientTest {
|
|||
client.searchWithParam(resources);
|
||||
|
||||
assertEquals(HttpPost.class, capt.getValue().getClass());
|
||||
HttpPost get = (HttpPost) capt.getValue();
|
||||
assertEquals("http://foo/", get.getURI().toString());
|
||||
HttpPost post = (HttpPost) capt.getValue();
|
||||
assertEquals("http://foo/", post.getURI().toString());
|
||||
|
||||
Bundle bundle = ctx.newXmlParser().parseBundle(new InputStreamReader(get.getEntity().getContent()));
|
||||
Bundle bundle = ctx.newXmlParser().parseBundle(new InputStreamReader(post.getEntity().getContent()));
|
||||
ourLog.info(ctx.newXmlParser().setPrettyPrint(true).encodeBundleToString(bundle));
|
||||
|
||||
assertEquals(2, bundle.size());
|
||||
assertEquals("http://foo/Patient/testPersistWithSimpleLinkP01", bundle.getEntries().get(0).getId().getValue());
|
||||
assertEquals("http://foo/Patient/testPersistWithSimpleLinkP01", bundle.getEntries().get(0).getLinkSelf().getValue());
|
||||
assertEquals("Patient/testPersistWithSimpleLinkP01", bundle.getEntries().get(0).getId().getValue());
|
||||
assertEquals("Patient/testPersistWithSimpleLinkP01", bundle.getEntries().get(0).getLinkSelf().getValue());
|
||||
assertEquals(null, bundle.getEntries().get(0).getLinkAlternate().getValue());
|
||||
|
||||
assertTrue(bundle.getEntries().get(1).getId().isEmpty());
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
target/
|
||||
/bin
|
||||
nohup.out
|
||||
|
|
|
@ -21,6 +21,12 @@
|
|||
<version>0.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
|
|
|
@ -238,6 +238,10 @@ public abstract class BaseFhirDao {
|
|||
if (nextValue.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
if (nextValue.getReference().getValue().startsWith("#")) {
|
||||
// This is a contained resource reference
|
||||
continue;
|
||||
}
|
||||
|
||||
String typeString = nextValue.getResourceId().getResourceType();
|
||||
if (isBlank(typeString)) {
|
||||
|
|
|
@ -73,8 +73,15 @@ public class FhirSystemDao extends BaseFhirDao implements IFhirSystemDao {
|
|||
}
|
||||
|
||||
IdDt newId = new IdDt(resourceName + '/' + entity.getId());
|
||||
ourLog.info("Incoming ID[{}] has been assigned ID[{}]", nextId, newId);
|
||||
idConversions.put(nextId, newId);
|
||||
if (nextId.isEmpty()) {
|
||||
ourLog.info("Transaction resource (with no preexisting ID) has been assigned new ID[{}]", nextId, newId);
|
||||
} else if (newId.equals(entity.getId())) {
|
||||
ourLog.info("Transaction resource ID[{}] is being updated", newId);
|
||||
} else {
|
||||
ourLog.info("Transaction resource ID[{}] has been assigned new ID[{}]", nextId, newId);
|
||||
idConversions.put(nextId, newId);
|
||||
}
|
||||
|
||||
persistedResources.add(entity);
|
||||
|
||||
}
|
||||
|
@ -87,6 +94,8 @@ public class FhirSystemDao extends BaseFhirDao implements IFhirSystemDao {
|
|||
IdDt newId = idConversions.get(nextId);
|
||||
ourLog.info(" * Replacing resource ref {} with {}", nextId, newId);
|
||||
nextRef.setResourceId(newId);
|
||||
} else {
|
||||
ourLog.info(" * Reference [{}] does not exist in bundle", nextId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -106,38 +115,38 @@ public class FhirSystemDao extends BaseFhirDao implements IFhirSystemDao {
|
|||
|
||||
@Override
|
||||
public TagList getAllTags() {
|
||||
// CriteriaBuilder builder = myEntityManager.getCriteriaBuilder();
|
||||
// CriteriaQuery<Tuple> cq = builder.createQuery(Tag)
|
||||
// Root<?> from = cq.from(ResourceTable.class);
|
||||
// cq.multiselect(from.get("myId").as(Long.class), from.get("myUpdated").as(Date.class));
|
||||
//
|
||||
// List<Predicate> predicates = new ArrayList<Predicate>();
|
||||
// if (theSince != null) {
|
||||
// Predicate low = builder.greaterThanOrEqualTo(from.<Date> get("myUpdated"), theSince);
|
||||
// predicates.add(low);
|
||||
// }
|
||||
//
|
||||
// if (theResourceName != null) {
|
||||
// predicates.add(builder.equal(from.get("myResourceType"), theResourceName));
|
||||
// }
|
||||
// if (theId != null) {
|
||||
// predicates.add(builder.equal(from.get("myId"), theId));
|
||||
// }
|
||||
//
|
||||
// cq.where(builder.and(predicates.toArray(new Predicate[0])));
|
||||
//
|
||||
// cq.orderBy(builder.desc(from.get("myUpdated")));
|
||||
// TypedQuery<Tuple> q = myEntityManager.createQuery(cq);
|
||||
// if (theLimit > 0) {
|
||||
// q.setMaxResults(theLimit);
|
||||
// }
|
||||
// for (Tuple next : q.getResultList()) {
|
||||
// long id = (Long) next.get(0);
|
||||
// Date updated = (Date) next.get(1);
|
||||
// tuples.add(new HistoryTuple(ResourceTable.class, updated, id));
|
||||
// }
|
||||
// CriteriaBuilder builder = myEntityManager.getCriteriaBuilder();
|
||||
// CriteriaQuery<Tuple> cq = builder.createQuery(Tag)
|
||||
// Root<?> from = cq.from(ResourceTable.class);
|
||||
// cq.multiselect(from.get("myId").as(Long.class), from.get("myUpdated").as(Date.class));
|
||||
//
|
||||
// List<Predicate> predicates = new ArrayList<Predicate>();
|
||||
// if (theSince != null) {
|
||||
// Predicate low = builder.greaterThanOrEqualTo(from.<Date> get("myUpdated"), theSince);
|
||||
// predicates.add(low);
|
||||
// }
|
||||
//
|
||||
// if (theResourceName != null) {
|
||||
// predicates.add(builder.equal(from.get("myResourceType"), theResourceName));
|
||||
// }
|
||||
// if (theId != null) {
|
||||
// predicates.add(builder.equal(from.get("myId"), theId));
|
||||
// }
|
||||
//
|
||||
// cq.where(builder.and(predicates.toArray(new Predicate[0])));
|
||||
//
|
||||
// cq.orderBy(builder.desc(from.get("myUpdated")));
|
||||
// TypedQuery<Tuple> q = myEntityManager.createQuery(cq);
|
||||
// if (theLimit > 0) {
|
||||
// q.setMaxResults(theLimit);
|
||||
// }
|
||||
// for (Tuple next : q.getResultList()) {
|
||||
// long id = (Long) next.get(0);
|
||||
// Date updated = (Date) next.get(1);
|
||||
// tuples.add(new HistoryTuple(ResourceTable.class, updated, id));
|
||||
// }
|
||||
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -45,8 +45,8 @@ public interface IFhirResourceDao<T extends IResource> {
|
|||
|
||||
List<T> history();
|
||||
|
||||
List<IResource> history(Date theDate, int theLimit);
|
||||
List<IResource> history(Date theDate, Integer theLimit);
|
||||
|
||||
List<IResource> history(Long theId, Date theSince, int theLimit);
|
||||
List<IResource> history(Long theId, Date theSince, Integer theLimit);
|
||||
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ public interface IFhirSystemDao {
|
|||
|
||||
void transaction(List<IResource> theResources);
|
||||
|
||||
List<IResource> history(Date theDate, int theLimit);
|
||||
List<IResource> history(Date theDate, Integer theLimit);
|
||||
|
||||
TagList getAllTags();
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.Collection;
|
|||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.EnumType;
|
||||
import javax.persistence.Enumerated;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
import javax.persistence.Temporal;
|
||||
|
@ -17,7 +19,8 @@ import ca.uhn.fhir.rest.server.EncodingEnum;
|
|||
@MappedSuperclass
|
||||
public abstract class BaseHasResource {
|
||||
|
||||
@Column(name = "RES_ENCODING", nullable = false)
|
||||
@Column(name = "RES_ENCODING", nullable = false, length=4)
|
||||
@Enumerated(EnumType.STRING)
|
||||
private EncodingEnum myEncoding;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
|
|
|
@ -20,7 +20,6 @@ import javax.persistence.Version;
|
|||
import org.hibernate.annotations.Index;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.model.api.Tag;
|
||||
import ca.uhn.fhir.model.primitive.IdDt;
|
||||
import ca.uhn.fhir.rest.server.Constants;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class JpaSystemProvider {
|
|||
}
|
||||
|
||||
@History
|
||||
List<IResource> getHistoryServerWithCriteria(@Since Date theDate, @Count Integer theCount) {
|
||||
public List<IResource> getHistoryServerWithCriteria(@Since Date theDate, @Count Integer theCount) {
|
||||
return myDao.history(theDate, theCount);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,15 +3,20 @@ package ca.uhn.fhir.jpa.dao;
|
|||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
|
||||
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
||||
|
@ -83,6 +88,16 @@ public class FhirSystemDaoTest {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTransactionFromBundle() throws Exception {
|
||||
|
||||
InputStream bundleRes = FhirSystemDaoTest.class.getResourceAsStream("/bundle.json");
|
||||
Bundle bundle = new FhirContext().newJsonParser().parseBundle(new InputStreamReader(bundleRes));
|
||||
List<IResource> res = bundle.toListOfResources();
|
||||
|
||||
ourSystemDao.transaction(res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPersistWithSimpleLink() {
|
||||
Patient patient = new Patient();
|
||||
|
|
|
@ -0,0 +1,690 @@
|
|||
|
||||
{
|
||||
"resourceType":"Bundle",
|
||||
"entry":[
|
||||
{
|
||||
"deleted":null,
|
||||
"title":"Patient http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/Patient/5556918",
|
||||
"id":"Patient/5556918",
|
||||
"link":[
|
||||
{
|
||||
"rel":"self",
|
||||
"href":"Patient/5556918"
|
||||
}
|
||||
],
|
||||
"published":"2014-05-29T10:49:32-04:00",
|
||||
"content":{
|
||||
"resourceType":"Patient",
|
||||
"id":"http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/Patient/5556918",
|
||||
"text":{
|
||||
"status":"generated",
|
||||
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\"> Donald null <b>DUCK </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>7000135</td></tr><tr><td>Address</td><td><span>10 Duxon Street </span><br/><span>VICTORIA </span><span>BC </span><span>Can </span></td></tr><tr><td>Date of birth</td><td><span>01 June 1980</span></td></tr></tbody></table></div>"
|
||||
},
|
||||
"identifier":[
|
||||
{
|
||||
"use":"official",
|
||||
"label":"University Health Network MRN 7000135",
|
||||
"system":"urn:oid:2.16.840.1.113883.3.239.18.148",
|
||||
"value":"7000135",
|
||||
"assigner":{
|
||||
"resource":"Organization/1.3.6.1.4.1.12201"
|
||||
}
|
||||
}
|
||||
],
|
||||
"name":[
|
||||
{
|
||||
"family":[
|
||||
"Duck"
|
||||
],
|
||||
"given":[
|
||||
"Donald"
|
||||
]
|
||||
}
|
||||
],
|
||||
"telecom":[
|
||||
{
|
||||
"system":"phone",
|
||||
"use":"home"
|
||||
},
|
||||
{
|
||||
"system":"phone",
|
||||
"use":"work"
|
||||
},
|
||||
{
|
||||
"system":"phone",
|
||||
"use":"mobile"
|
||||
},
|
||||
{
|
||||
"system":"email",
|
||||
"use":"home"
|
||||
}
|
||||
],
|
||||
"gender":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"http://hl7.org/fhir/v3/AdministrativeGender",
|
||||
"code":"M"
|
||||
}
|
||||
]
|
||||
},
|
||||
"birthDate":"1980-06-01T00:00:00",
|
||||
"address":[
|
||||
{
|
||||
"use":"home",
|
||||
"line":[
|
||||
"10 Duxon Street"
|
||||
],
|
||||
"city":"VICTORIA",
|
||||
"state":"BC",
|
||||
"zip":"V8N 1Y4",
|
||||
"country":"Can"
|
||||
}
|
||||
],
|
||||
"managingOrganization":{
|
||||
"resource":"Organization/1.3.6.1.4.1.12201"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"deleted":null,
|
||||
"title":"DiagnosticReport http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/DiagnosticReport/5978827",
|
||||
"id":"DiagnosticReport/5978827",
|
||||
"link":[
|
||||
{
|
||||
"rel":"self",
|
||||
"href":"DiagnosticReport/5978827"
|
||||
}
|
||||
],
|
||||
"published":"2014-05-29T10:49:33-04:00",
|
||||
"content":{
|
||||
"resourceType":"DiagnosticReport",
|
||||
"id":"http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/DiagnosticReport/5978827",
|
||||
"text":{
|
||||
"status":"generated",
|
||||
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\"> C&S </div><table class=\"hapiPropertyTable\"><tbody><tr><td>Status</td><td>partial</td></tr><tr><td>Issued</td><td> 29 April 2014 17:21:56 </td></tr></tbody></table><table class=\"hapiTableOfValues\"><thead><tr><td>Name</td><td>Value</td><td>Interpretation</td><td>Reference Range</td><td>Status</td></tr></thead><tbody><tr class=\"hapiTableOfValuesRowEven\"><td> Collection Info </td><td> Spec #102758: 26 Sep 08 1117</td><td/><td/><td>preliminary</td></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Direct Stain </td><td> pus cells</td><td/><td/><td>preliminary</td></tr><tr class=\"hapiTableOfValuesRowEven\"><td> Header </td><td> To view Culture & Sensitivity Results, select</td><td/><td/><td/></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Header </td><td> (Y) Report Query. Do NOT select number beside</td><td/><td/><td/></tr><tr class=\"hapiTableOfValuesRowEven\"><td> Header </td><td> Prelim or Final Result field, as there is</td><td/><td/><td/></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Header </td><td> potential for viewing an incomplete report.</td><td/><td/><td/></tr><tr class=\"hapiTableOfValuesRowEven\"><td> Organism </td><td> Haemophilus influenzae</td><td/><td/><td>final</td></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Qualifier </td><td> =>10 x E6 cfu/L SIGNIFICANT RESULT. Organisms cultured in quantities =>10 x E6 cfu/L are consistent with pneumonia. beta-lactamase positive result suggests resistance to ampicillin but generally susceptible to amoxicillin- clavulanic and cefuroxime.</td><td/><td/><td>final</td></tr><tr class=\"hapiTableOfValuesRowEven\"><td> Sensitivities </td><td> _Beta-lactamase Pos: </td><td/><td/><td>final</td></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Test Comment </td><td> =>10 x E6 cfu/L Commensal flora</td><td/><td/><td>final</td></tr></tbody></table></div>"
|
||||
},
|
||||
"contained":[
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"f816a276-cfad-4eca-a9fa-f1dff844a196",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"146151.1"
|
||||
}
|
||||
],
|
||||
"text":"Collection Info"
|
||||
},
|
||||
"valueString":"Spec #102758: 26 Sep 08 1117",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"preliminary"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"23b55496-1c2a-4d5f-9c24-8ca5042f4027",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"GM.2"
|
||||
}
|
||||
],
|
||||
"text":"Direct Stain"
|
||||
},
|
||||
"valueString":"pus cells",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"preliminary"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"74e6791a-d810-4545-8410-e9eca41e81d6",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H1.3"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"To view Culture & Sensitivity Results, select",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"cd8c6a6c-7ef5-446f-b07b-47a21bfe28ee",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H2.4"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"(Y) Report Query. Do NOT select number beside",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"4a3d453d-3a18-432f-8f1f-d7657c50dcd4",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H3.5"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"Prelim or Final Result field, as there is",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"0dd6cff6-f9db-42cc-89c9-2cd6ba6fe5af",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H4.6"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"potential for viewing an incomplete report.",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"6d6b0117-220f-4b9a-abf3-5faf772cfa61",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/O.4"
|
||||
}
|
||||
],
|
||||
"text":"Organism"
|
||||
},
|
||||
"valueString":"Haemophilus influenzae",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"64068acf-57f4-42c8-b0e6-416247067b16",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/31266.5"
|
||||
}
|
||||
],
|
||||
"text":"Qualifier"
|
||||
},
|
||||
"valueString":"=>10 x E6 cfu/L SIGNIFICANT RESULT. Organisms cultured in quantities =>10 x E6 cfu/L are consistent with pneumonia. beta-lactamase positive result suggests resistance to ampicillin but generally susceptible to amoxicillin- clavulanic and cefuroxime.",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"0f9d254f-3ad1-404b-9be9-20258b3c242f",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/31415.6"
|
||||
}
|
||||
],
|
||||
"text":"Sensitivities"
|
||||
},
|
||||
"valueString":"_Beta-lactamase Pos: ",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"349bb02b-fbbe-4ce0-b190-3f545240dcc0",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"Q.3"
|
||||
}
|
||||
],
|
||||
"text":"Test Comment"
|
||||
},
|
||||
"valueString":"=>10 x E6 cfu/L Commensal flora",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"f816a276-cfad-4eca-a9fa-f1dff844a196",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"146151.1"
|
||||
}
|
||||
],
|
||||
"text":"Collection Info"
|
||||
},
|
||||
"valueString":"Spec #102758: 26 Sep 08 1117",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"preliminary"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"23b55496-1c2a-4d5f-9c24-8ca5042f4027",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"GM.2"
|
||||
}
|
||||
],
|
||||
"text":"Direct Stain"
|
||||
},
|
||||
"valueString":"pus cells",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"preliminary"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"74e6791a-d810-4545-8410-e9eca41e81d6",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H1.3"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"To view Culture & Sensitivity Results, select",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"cd8c6a6c-7ef5-446f-b07b-47a21bfe28ee",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H2.4"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"(Y) Report Query. Do NOT select number beside",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"4a3d453d-3a18-432f-8f1f-d7657c50dcd4",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H3.5"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"Prelim or Final Result field, as there is",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"0dd6cff6-f9db-42cc-89c9-2cd6ba6fe5af",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H4.6"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"potential for viewing an incomplete report.",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"6d6b0117-220f-4b9a-abf3-5faf772cfa61",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/O.4"
|
||||
}
|
||||
],
|
||||
"text":"Organism"
|
||||
},
|
||||
"valueString":"Haemophilus influenzae",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"64068acf-57f4-42c8-b0e6-416247067b16",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/31266.5"
|
||||
}
|
||||
],
|
||||
"text":"Qualifier"
|
||||
},
|
||||
"valueString":"=>10 x E6 cfu/L SIGNIFICANT RESULT. Organisms cultured in quantities =>10 x E6 cfu/L are consistent with pneumonia. beta-lactamase positive result suggests resistance to ampicillin but generally susceptible to amoxicillin- clavulanic and cefuroxime.",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"0f9d254f-3ad1-404b-9be9-20258b3c242f",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/31415.6"
|
||||
}
|
||||
],
|
||||
"text":"Sensitivities"
|
||||
},
|
||||
"valueString":"_Beta-lactamase Pos: ",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"349bb02b-fbbe-4ce0-b190-3f545240dcc0",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"Q.3"
|
||||
}
|
||||
],
|
||||
"text":"Test Comment"
|
||||
},
|
||||
"valueString":"=>10 x E6 cfu/L Commensal flora",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
}
|
||||
],
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.5",
|
||||
"code":"4140"
|
||||
}
|
||||
],
|
||||
"text":"C&S"
|
||||
},
|
||||
"status":"partial",
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"subject":{
|
||||
"resource":"Patient/5556918"
|
||||
},
|
||||
"identifier":{
|
||||
"value":"2363922"
|
||||
},
|
||||
"diagnosticDateTime":"2014-04-14T00:00:00-04:00",
|
||||
"result":[
|
||||
{
|
||||
"resource":"#f816a276-cfad-4eca-a9fa-f1dff844a196"
|
||||
},
|
||||
{
|
||||
"resource":"#23b55496-1c2a-4d5f-9c24-8ca5042f4027"
|
||||
},
|
||||
{
|
||||
"resource":"#74e6791a-d810-4545-8410-e9eca41e81d6"
|
||||
},
|
||||
{
|
||||
"resource":"#cd8c6a6c-7ef5-446f-b07b-47a21bfe28ee"
|
||||
},
|
||||
{
|
||||
"resource":"#4a3d453d-3a18-432f-8f1f-d7657c50dcd4"
|
||||
},
|
||||
{
|
||||
"resource":"#0dd6cff6-f9db-42cc-89c9-2cd6ba6fe5af"
|
||||
},
|
||||
{
|
||||
"resource":"#6d6b0117-220f-4b9a-abf3-5faf772cfa61"
|
||||
},
|
||||
{
|
||||
"resource":"#64068acf-57f4-42c8-b0e6-416247067b16"
|
||||
},
|
||||
{
|
||||
"resource":"#0f9d254f-3ad1-404b-9be9-20258b3c242f"
|
||||
},
|
||||
{
|
||||
"resource":"#349bb02b-fbbe-4ce0-b190-3f545240dcc0"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"deleted":null,
|
||||
"title":"Organization http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/Organization/1.3.6.1.4.1.12201",
|
||||
"id":"Organization/1.3.6.1.4.1.12201",
|
||||
"link":[
|
||||
{
|
||||
"rel":"self",
|
||||
"href":"Organization/1.3.6.1.4.1.12201"
|
||||
}
|
||||
],
|
||||
"published":"2014-05-29T10:49:32-04:00",
|
||||
"content":{
|
||||
"resourceType":"Organization",
|
||||
"id":"http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/Organization/1.3.6.1.4.1.12201",
|
||||
"extension":[
|
||||
{
|
||||
"url":"http://fhir.connectinggta.ca/Profile/organization#providerIdPool",
|
||||
"valueUri":"1.3.6.1.4.1.12201.1"
|
||||
}
|
||||
],
|
||||
"text":{
|
||||
"status":"empty",
|
||||
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">No narrative template available for resource profile: http://fhir.connectinggta.ca/Profile/organization</div>"
|
||||
},
|
||||
"contained":[
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.1",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.1"
|
||||
},
|
||||
"name":"Toronto General Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.2",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.2"
|
||||
},
|
||||
"name":"Toronto Western Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.3",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.3"
|
||||
},
|
||||
"name":"Princess Margaret Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.4",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.4"
|
||||
},
|
||||
"name":"Toronto Rehab Institute"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.1",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.1"
|
||||
},
|
||||
"name":"Toronto General Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.2",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.2"
|
||||
},
|
||||
"name":"Toronto Western Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.3",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.3"
|
||||
},
|
||||
"name":"Princess Margaret Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.4",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.4"
|
||||
},
|
||||
"name":"Toronto Rehab Institute"
|
||||
}
|
||||
],
|
||||
"name":"University Health Network",
|
||||
"type":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"HOSPITAL"
|
||||
}
|
||||
]
|
||||
},
|
||||
"address":[
|
||||
{
|
||||
"line":[
|
||||
"R. Fraser Elliott Building, 1st Floor",
|
||||
"190 Elizabeth St."
|
||||
],
|
||||
"city":"Toronto",
|
||||
"state":"ON",
|
||||
"zip":"M5G 2C4"
|
||||
}
|
||||
],
|
||||
"location":[
|
||||
{
|
||||
"resource":"#1.3.6.1.4.1.12201.100.1"
|
||||
},
|
||||
{
|
||||
"resource":"#1.3.6.1.4.1.12201.100.2"
|
||||
},
|
||||
{
|
||||
"resource":"#1.3.6.1.4.1.12201.100.3"
|
||||
},
|
||||
{
|
||||
"resource":"#1.3.6.1.4.1.12201.100.4"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
package ca.uhn.fhir.jpa.test;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||
import org.eclipse.jetty.servlet.ServletHolder;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.jpa.dao.IFhirResourceDao;
|
||||
import ca.uhn.fhir.jpa.dao.IFhirSystemDao;
|
||||
import ca.uhn.fhir.jpa.provider.JpaSystemProvider;
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.dstu.resource.Observation;
|
||||
import ca.uhn.fhir.model.dstu.resource.Organization;
|
||||
import ca.uhn.fhir.model.dstu.resource.Patient;
|
||||
import ca.uhn.fhir.model.dstu.resource.Questionnaire;
|
||||
import ca.uhn.fhir.rest.client.IGenericClient;
|
||||
import ca.uhn.fhir.rest.server.RestfulServer;
|
||||
import ca.uhn.fhir.rest.server.tester.RestfulServerTesterServlet;
|
||||
import ca.uhn.test.jpasrv.ObservationResourceProvider;
|
||||
import ca.uhn.test.jpasrv.OrganizationResourceProvider;
|
||||
import ca.uhn.test.jpasrv.PatientResourceProvider;
|
||||
|
||||
public class SystemTest {
|
||||
|
||||
|
||||
private static Server ourServer;
|
||||
private static ClassPathXmlApplicationContext ourAppCtx;
|
||||
private static FhirContext ourCtx;
|
||||
private static IGenericClient ourClient;
|
||||
|
||||
@Test
|
||||
public void testTransactionFromBundle() throws Exception {
|
||||
|
||||
InputStream bundleRes = SystemTest.class.getResourceAsStream("/bundle.json");
|
||||
Bundle bundle = new FhirContext().newJsonParser().parseBundle(new InputStreamReader(bundleRes));
|
||||
List<IResource> res = bundle.toListOfResources();
|
||||
|
||||
ourClient.transaction(res);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@AfterClass
|
||||
public static void afterClass() throws Exception {
|
||||
ourServer.stop();
|
||||
ourAppCtx.stop();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
ourAppCtx = new ClassPathXmlApplicationContext("fhir-spring-test-config.xml");
|
||||
|
||||
IFhirResourceDao<Patient> patientDao = (IFhirResourceDao<Patient>) ourAppCtx.getBean("myPatientDao", IFhirResourceDao.class);
|
||||
PatientResourceProvider patientRp = new PatientResourceProvider();
|
||||
patientRp.setDao(patientDao);
|
||||
|
||||
IFhirResourceDao<Questionnaire> questionnaireDao = (IFhirResourceDao<Questionnaire>) ourAppCtx.getBean("myQuestionnaireDao", IFhirResourceDao.class);
|
||||
QuestionnaireResourceProvider questionnaireRp = new QuestionnaireResourceProvider();
|
||||
questionnaireRp.setDao(questionnaireDao);
|
||||
|
||||
IFhirResourceDao<Observation> observationDao = (IFhirResourceDao<Observation>) ourAppCtx.getBean("myObservationDao", IFhirResourceDao.class);
|
||||
ObservationResourceProvider observationRp = new ObservationResourceProvider();
|
||||
observationRp.setDao(observationDao);
|
||||
|
||||
IFhirSystemDao systemDao = ourAppCtx.getBean("mySystemDao", IFhirSystemDao.class);
|
||||
|
||||
IFhirResourceDao<Organization> organizationDao = (IFhirResourceDao<Organization>) ourAppCtx.getBean("myOrganizationDao", IFhirResourceDao.class);
|
||||
OrganizationResourceProvider organizationRp = new OrganizationResourceProvider();
|
||||
organizationRp.setDao(organizationDao);
|
||||
|
||||
RestfulServer restServer = new RestfulServer();
|
||||
restServer.setResourceProviders(patientRp, questionnaireRp, observationRp, organizationRp);
|
||||
restServer.setPlainProviders(new JpaSystemProvider(systemDao));
|
||||
|
||||
int myPort = 8888;
|
||||
ourServer = new Server(myPort);
|
||||
|
||||
ServletContextHandler proxyHandler = new ServletContextHandler();
|
||||
proxyHandler.setContextPath("/");
|
||||
|
||||
RestfulServerTesterServlet testerServlet = new RestfulServerTesterServlet();
|
||||
String serverBase = "http://localhost:" + myPort + "/fhir/context";
|
||||
testerServlet.setServerBase(serverBase);
|
||||
// testerServlet.setServerBase("http://fhir.healthintersections.com.au/open");
|
||||
ServletHolder handler = new ServletHolder();
|
||||
handler.setServlet(testerServlet);
|
||||
proxyHandler.addServlet(handler, "/fhir/tester/*");
|
||||
|
||||
ServletHolder servletHolder = new ServletHolder();
|
||||
servletHolder.setServlet(restServer);
|
||||
proxyHandler.addServlet(servletHolder, "/fhir/context/*");
|
||||
|
||||
ourServer.setHandler(proxyHandler);
|
||||
ourServer.start();
|
||||
|
||||
ourCtx = restServer.getFhirContext();
|
||||
|
||||
ourClient = ourCtx.newRestfulGenericClient(serverBase);
|
||||
ourClient.setLogRequestAndResponse(true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,690 @@
|
|||
|
||||
{
|
||||
"resourceType":"Bundle",
|
||||
"entry":[
|
||||
{
|
||||
"deleted":null,
|
||||
"title":"Patient http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/Patient/5556918",
|
||||
"id":"Patient/5556918",
|
||||
"link":[
|
||||
{
|
||||
"rel":"self",
|
||||
"href":"Patient/5556918"
|
||||
}
|
||||
],
|
||||
"published":"2014-05-29T10:49:32-04:00",
|
||||
"content":{
|
||||
"resourceType":"Patient",
|
||||
"id":"http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/Patient/5556918",
|
||||
"text":{
|
||||
"status":"generated",
|
||||
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\"> Donald null <b>DUCK </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>7000135</td></tr><tr><td>Address</td><td><span>10 Duxon Street </span><br/><span>VICTORIA </span><span>BC </span><span>Can </span></td></tr><tr><td>Date of birth</td><td><span>01 June 1980</span></td></tr></tbody></table></div>"
|
||||
},
|
||||
"identifier":[
|
||||
{
|
||||
"use":"official",
|
||||
"label":"University Health Network MRN 7000135",
|
||||
"system":"urn:oid:2.16.840.1.113883.3.239.18.148",
|
||||
"value":"7000135",
|
||||
"assigner":{
|
||||
"resource":"Organization/1.3.6.1.4.1.12201"
|
||||
}
|
||||
}
|
||||
],
|
||||
"name":[
|
||||
{
|
||||
"family":[
|
||||
"Duck"
|
||||
],
|
||||
"given":[
|
||||
"Donald"
|
||||
]
|
||||
}
|
||||
],
|
||||
"telecom":[
|
||||
{
|
||||
"system":"phone",
|
||||
"use":"home"
|
||||
},
|
||||
{
|
||||
"system":"phone",
|
||||
"use":"work"
|
||||
},
|
||||
{
|
||||
"system":"phone",
|
||||
"use":"mobile"
|
||||
},
|
||||
{
|
||||
"system":"email",
|
||||
"use":"home"
|
||||
}
|
||||
],
|
||||
"gender":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"http://hl7.org/fhir/v3/AdministrativeGender",
|
||||
"code":"M"
|
||||
}
|
||||
]
|
||||
},
|
||||
"birthDate":"1980-06-01T00:00:00",
|
||||
"address":[
|
||||
{
|
||||
"use":"home",
|
||||
"line":[
|
||||
"10 Duxon Street"
|
||||
],
|
||||
"city":"VICTORIA",
|
||||
"state":"BC",
|
||||
"zip":"V8N 1Y4",
|
||||
"country":"Can"
|
||||
}
|
||||
],
|
||||
"managingOrganization":{
|
||||
"resource":"Organization/1.3.6.1.4.1.12201"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"deleted":null,
|
||||
"title":"DiagnosticReport http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/DiagnosticReport/5978827",
|
||||
"id":"DiagnosticReport/5978827",
|
||||
"link":[
|
||||
{
|
||||
"rel":"self",
|
||||
"href":"DiagnosticReport/5978827"
|
||||
}
|
||||
],
|
||||
"published":"2014-05-29T10:49:33-04:00",
|
||||
"content":{
|
||||
"resourceType":"DiagnosticReport",
|
||||
"id":"http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/DiagnosticReport/5978827",
|
||||
"text":{
|
||||
"status":"generated",
|
||||
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\"> C&S </div><table class=\"hapiPropertyTable\"><tbody><tr><td>Status</td><td>partial</td></tr><tr><td>Issued</td><td> 29 April 2014 17:21:56 </td></tr></tbody></table><table class=\"hapiTableOfValues\"><thead><tr><td>Name</td><td>Value</td><td>Interpretation</td><td>Reference Range</td><td>Status</td></tr></thead><tbody><tr class=\"hapiTableOfValuesRowEven\"><td> Collection Info </td><td> Spec #102758: 26 Sep 08 1117</td><td/><td/><td>preliminary</td></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Direct Stain </td><td> pus cells</td><td/><td/><td>preliminary</td></tr><tr class=\"hapiTableOfValuesRowEven\"><td> Header </td><td> To view Culture & Sensitivity Results, select</td><td/><td/><td/></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Header </td><td> (Y) Report Query. Do NOT select number beside</td><td/><td/><td/></tr><tr class=\"hapiTableOfValuesRowEven\"><td> Header </td><td> Prelim or Final Result field, as there is</td><td/><td/><td/></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Header </td><td> potential for viewing an incomplete report.</td><td/><td/><td/></tr><tr class=\"hapiTableOfValuesRowEven\"><td> Organism </td><td> Haemophilus influenzae</td><td/><td/><td>final</td></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Qualifier </td><td> =>10 x E6 cfu/L SIGNIFICANT RESULT. Organisms cultured in quantities =>10 x E6 cfu/L are consistent with pneumonia. beta-lactamase positive result suggests resistance to ampicillin but generally susceptible to amoxicillin- clavulanic and cefuroxime.</td><td/><td/><td>final</td></tr><tr class=\"hapiTableOfValuesRowEven\"><td> Sensitivities </td><td> _Beta-lactamase Pos: </td><td/><td/><td>final</td></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Test Comment </td><td> =>10 x E6 cfu/L Commensal flora</td><td/><td/><td>final</td></tr></tbody></table></div>"
|
||||
},
|
||||
"contained":[
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"f816a276-cfad-4eca-a9fa-f1dff844a196",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"146151.1"
|
||||
}
|
||||
],
|
||||
"text":"Collection Info"
|
||||
},
|
||||
"valueString":"Spec #102758: 26 Sep 08 1117",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"preliminary"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"23b55496-1c2a-4d5f-9c24-8ca5042f4027",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"GM.2"
|
||||
}
|
||||
],
|
||||
"text":"Direct Stain"
|
||||
},
|
||||
"valueString":"pus cells",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"preliminary"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"74e6791a-d810-4545-8410-e9eca41e81d6",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H1.3"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"To view Culture & Sensitivity Results, select",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"cd8c6a6c-7ef5-446f-b07b-47a21bfe28ee",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H2.4"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"(Y) Report Query. Do NOT select number beside",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"4a3d453d-3a18-432f-8f1f-d7657c50dcd4",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H3.5"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"Prelim or Final Result field, as there is",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"0dd6cff6-f9db-42cc-89c9-2cd6ba6fe5af",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H4.6"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"potential for viewing an incomplete report.",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"6d6b0117-220f-4b9a-abf3-5faf772cfa61",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/O.4"
|
||||
}
|
||||
],
|
||||
"text":"Organism"
|
||||
},
|
||||
"valueString":"Haemophilus influenzae",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"64068acf-57f4-42c8-b0e6-416247067b16",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/31266.5"
|
||||
}
|
||||
],
|
||||
"text":"Qualifier"
|
||||
},
|
||||
"valueString":"=>10 x E6 cfu/L SIGNIFICANT RESULT. Organisms cultured in quantities =>10 x E6 cfu/L are consistent with pneumonia. beta-lactamase positive result suggests resistance to ampicillin but generally susceptible to amoxicillin- clavulanic and cefuroxime.",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"0f9d254f-3ad1-404b-9be9-20258b3c242f",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/31415.6"
|
||||
}
|
||||
],
|
||||
"text":"Sensitivities"
|
||||
},
|
||||
"valueString":"_Beta-lactamase Pos: ",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"349bb02b-fbbe-4ce0-b190-3f545240dcc0",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"Q.3"
|
||||
}
|
||||
],
|
||||
"text":"Test Comment"
|
||||
},
|
||||
"valueString":"=>10 x E6 cfu/L Commensal flora",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"f816a276-cfad-4eca-a9fa-f1dff844a196",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"146151.1"
|
||||
}
|
||||
],
|
||||
"text":"Collection Info"
|
||||
},
|
||||
"valueString":"Spec #102758: 26 Sep 08 1117",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"preliminary"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"23b55496-1c2a-4d5f-9c24-8ca5042f4027",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"GM.2"
|
||||
}
|
||||
],
|
||||
"text":"Direct Stain"
|
||||
},
|
||||
"valueString":"pus cells",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"preliminary"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"74e6791a-d810-4545-8410-e9eca41e81d6",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H1.3"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"To view Culture & Sensitivity Results, select",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"cd8c6a6c-7ef5-446f-b07b-47a21bfe28ee",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H2.4"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"(Y) Report Query. Do NOT select number beside",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"4a3d453d-3a18-432f-8f1f-d7657c50dcd4",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H3.5"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"Prelim or Final Result field, as there is",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"0dd6cff6-f9db-42cc-89c9-2cd6ba6fe5af",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H4.6"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"potential for viewing an incomplete report.",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"6d6b0117-220f-4b9a-abf3-5faf772cfa61",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/O.4"
|
||||
}
|
||||
],
|
||||
"text":"Organism"
|
||||
},
|
||||
"valueString":"Haemophilus influenzae",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"64068acf-57f4-42c8-b0e6-416247067b16",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/31266.5"
|
||||
}
|
||||
],
|
||||
"text":"Qualifier"
|
||||
},
|
||||
"valueString":"=>10 x E6 cfu/L SIGNIFICANT RESULT. Organisms cultured in quantities =>10 x E6 cfu/L are consistent with pneumonia. beta-lactamase positive result suggests resistance to ampicillin but generally susceptible to amoxicillin- clavulanic and cefuroxime.",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"0f9d254f-3ad1-404b-9be9-20258b3c242f",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/31415.6"
|
||||
}
|
||||
],
|
||||
"text":"Sensitivities"
|
||||
},
|
||||
"valueString":"_Beta-lactamase Pos: ",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"349bb02b-fbbe-4ce0-b190-3f545240dcc0",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"Q.3"
|
||||
}
|
||||
],
|
||||
"text":"Test Comment"
|
||||
},
|
||||
"valueString":"=>10 x E6 cfu/L Commensal flora",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
}
|
||||
],
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.5",
|
||||
"code":"4140"
|
||||
}
|
||||
],
|
||||
"text":"C&S"
|
||||
},
|
||||
"status":"partial",
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"subject":{
|
||||
"resource":"Patient/5556918"
|
||||
},
|
||||
"identifier":{
|
||||
"value":"2363922"
|
||||
},
|
||||
"diagnosticDateTime":"2014-04-14T00:00:00-04:00",
|
||||
"result":[
|
||||
{
|
||||
"resource":"#f816a276-cfad-4eca-a9fa-f1dff844a196"
|
||||
},
|
||||
{
|
||||
"resource":"#23b55496-1c2a-4d5f-9c24-8ca5042f4027"
|
||||
},
|
||||
{
|
||||
"resource":"#74e6791a-d810-4545-8410-e9eca41e81d6"
|
||||
},
|
||||
{
|
||||
"resource":"#cd8c6a6c-7ef5-446f-b07b-47a21bfe28ee"
|
||||
},
|
||||
{
|
||||
"resource":"#4a3d453d-3a18-432f-8f1f-d7657c50dcd4"
|
||||
},
|
||||
{
|
||||
"resource":"#0dd6cff6-f9db-42cc-89c9-2cd6ba6fe5af"
|
||||
},
|
||||
{
|
||||
"resource":"#6d6b0117-220f-4b9a-abf3-5faf772cfa61"
|
||||
},
|
||||
{
|
||||
"resource":"#64068acf-57f4-42c8-b0e6-416247067b16"
|
||||
},
|
||||
{
|
||||
"resource":"#0f9d254f-3ad1-404b-9be9-20258b3c242f"
|
||||
},
|
||||
{
|
||||
"resource":"#349bb02b-fbbe-4ce0-b190-3f545240dcc0"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"deleted":null,
|
||||
"title":"Organization http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/Organization/1.3.6.1.4.1.12201",
|
||||
"id":"Organization/1.3.6.1.4.1.12201",
|
||||
"link":[
|
||||
{
|
||||
"rel":"self",
|
||||
"href":"Organization/1.3.6.1.4.1.12201"
|
||||
}
|
||||
],
|
||||
"published":"2014-05-29T10:49:32-04:00",
|
||||
"content":{
|
||||
"resourceType":"Organization",
|
||||
"id":"http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/Organization/1.3.6.1.4.1.12201",
|
||||
"extension":[
|
||||
{
|
||||
"url":"http://fhir.connectinggta.ca/Profile/organization#providerIdPool",
|
||||
"valueUri":"1.3.6.1.4.1.12201.1"
|
||||
}
|
||||
],
|
||||
"text":{
|
||||
"status":"empty",
|
||||
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">No narrative template available for resource profile: http://fhir.connectinggta.ca/Profile/organization</div>"
|
||||
},
|
||||
"contained":[
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.1",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.1"
|
||||
},
|
||||
"name":"Toronto General Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.2",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.2"
|
||||
},
|
||||
"name":"Toronto Western Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.3",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.3"
|
||||
},
|
||||
"name":"Princess Margaret Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.4",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.4"
|
||||
},
|
||||
"name":"Toronto Rehab Institute"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.1",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.1"
|
||||
},
|
||||
"name":"Toronto General Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.2",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.2"
|
||||
},
|
||||
"name":"Toronto Western Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.3",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.3"
|
||||
},
|
||||
"name":"Princess Margaret Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.4",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.4"
|
||||
},
|
||||
"name":"Toronto Rehab Institute"
|
||||
}
|
||||
],
|
||||
"name":"University Health Network",
|
||||
"type":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"HOSPITAL"
|
||||
}
|
||||
]
|
||||
},
|
||||
"address":[
|
||||
{
|
||||
"line":[
|
||||
"R. Fraser Elliott Building, 1st Floor",
|
||||
"190 Elizabeth St."
|
||||
],
|
||||
"city":"Toronto",
|
||||
"state":"ON",
|
||||
"zip":"M5G 2C4"
|
||||
}
|
||||
],
|
||||
"location":[
|
||||
{
|
||||
"resource":"#1.3.6.1.4.1.12201.100.1"
|
||||
},
|
||||
{
|
||||
"resource":"#1.3.6.1.4.1.12201.100.2"
|
||||
},
|
||||
{
|
||||
"resource":"#1.3.6.1.4.1.12201.100.3"
|
||||
},
|
||||
{
|
||||
"resource":"#1.3.6.1.4.1.12201.100.4"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -29,6 +29,9 @@
|
|||
<property name="resourceType" value="ca.uhn.fhir.model.dstu.resource.Questionnaire"/>
|
||||
</bean>
|
||||
|
||||
<bean id="mySystemDao" class="ca.uhn.fhir.jpa.dao.FhirSystemDao">
|
||||
</bean>
|
||||
|
||||
<bean id="myPersistenceDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true">
|
||||
<property name="url" value="jdbc:derby:memory:myUnitTestDB;create=true" />
|
||||
<!-- <property name="url" value="jdbc:derby:directory:myUnitTestDB;create=true" /> -->
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
myUnitTestDB/
|
||||
target/
|
||||
/bin
|
||||
nohup.out
|
||||
|
|
|
@ -23,9 +23,10 @@ public class TestRestfulServer extends RestfulServer {
|
|||
super.initialize();
|
||||
|
||||
try {
|
||||
ourLog.info("Creating database");
|
||||
DriverManager.getConnection("jdbc:derby:directory:" + System.getProperty("fhir.db.location") + ";create=true");
|
||||
} catch (Exception e) {
|
||||
ourLog.info("Failed to create database: {}",e.getMessage());
|
||||
ourLog.error("Failed to create database: {}",e);
|
||||
}
|
||||
|
||||
myAppCtx = new ClassPathXmlApplicationContext("fhir-spring-uhnfhirtest-config.xml", "hapi-jpaserver-springbeans.xml");
|
||||
|
@ -46,6 +47,13 @@ public class TestRestfulServer extends RestfulServer {
|
|||
super.destroy();
|
||||
|
||||
myAppCtx.close();
|
||||
|
||||
try {
|
||||
ourLog.info("Shutting down derby");
|
||||
DriverManager.getConnection("jdbc:derby:directory:" + System.getProperty("fhir.db.location") + ";shutdown=true");
|
||||
} catch (Exception e) {
|
||||
ourLog.info("Failed to create database: {}",e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<class>ca.uhn.fhir.jpa.entity.ResourceLink</class>
|
||||
<class>ca.uhn.fhir.jpa.entity.ResourceTable</class>
|
||||
<class>ca.uhn.fhir.jpa.entity.ResourceTag</class>
|
||||
<class>ca.uhn.fhir.jpa.entity.TagDefinition</class>
|
||||
|
||||
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
||||
<properties>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<bean id="myPersistenceDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true">
|
||||
<!-- ;create=true /opt/glassfish/glassfish4/glassfish/nodes/localhost-domain1/fhirtest/fhirdb -->
|
||||
<property name="url" value="jdbc:derby:directory:#{systemProperties['fhir.db.location']}" />
|
||||
<property name="url" value="jdbc:derby:directory:#{systemProperties['fhir.db.location']};create=true" />
|
||||
</bean>
|
||||
|
||||
<bean id="myEntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
|
||||
|
|
|
@ -0,0 +1,690 @@
|
|||
|
||||
{
|
||||
"resourceType":"Bundle",
|
||||
"entry":[
|
||||
{
|
||||
"deleted":null,
|
||||
"title":"Patient http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/Patient/5556918",
|
||||
"id":"Patient/5556918",
|
||||
"link":[
|
||||
{
|
||||
"rel":"self",
|
||||
"href":"Patient/5556918"
|
||||
}
|
||||
],
|
||||
"published":"2014-05-29T10:49:32-04:00",
|
||||
"content":{
|
||||
"resourceType":"Patient",
|
||||
"id":"http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/Patient/5556918",
|
||||
"text":{
|
||||
"status":"generated",
|
||||
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\"> Donald null <b>DUCK </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>7000135</td></tr><tr><td>Address</td><td><span>10 Duxon Street </span><br/><span>VICTORIA </span><span>BC </span><span>Can </span></td></tr><tr><td>Date of birth</td><td><span>01 June 1980</span></td></tr></tbody></table></div>"
|
||||
},
|
||||
"identifier":[
|
||||
{
|
||||
"use":"official",
|
||||
"label":"University Health Network MRN 7000135",
|
||||
"system":"urn:oid:2.16.840.1.113883.3.239.18.148",
|
||||
"value":"7000135",
|
||||
"assigner":{
|
||||
"resource":"Organization/1.3.6.1.4.1.12201"
|
||||
}
|
||||
}
|
||||
],
|
||||
"name":[
|
||||
{
|
||||
"family":[
|
||||
"Duck"
|
||||
],
|
||||
"given":[
|
||||
"Donald"
|
||||
]
|
||||
}
|
||||
],
|
||||
"telecom":[
|
||||
{
|
||||
"system":"phone",
|
||||
"use":"home"
|
||||
},
|
||||
{
|
||||
"system":"phone",
|
||||
"use":"work"
|
||||
},
|
||||
{
|
||||
"system":"phone",
|
||||
"use":"mobile"
|
||||
},
|
||||
{
|
||||
"system":"email",
|
||||
"use":"home"
|
||||
}
|
||||
],
|
||||
"gender":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"http://hl7.org/fhir/v3/AdministrativeGender",
|
||||
"code":"M"
|
||||
}
|
||||
]
|
||||
},
|
||||
"birthDate":"1980-06-01T00:00:00",
|
||||
"address":[
|
||||
{
|
||||
"use":"home",
|
||||
"line":[
|
||||
"10 Duxon Street"
|
||||
],
|
||||
"city":"VICTORIA",
|
||||
"state":"BC",
|
||||
"zip":"V8N 1Y4",
|
||||
"country":"Can"
|
||||
}
|
||||
],
|
||||
"managingOrganization":{
|
||||
"resource":"Organization/1.3.6.1.4.1.12201"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"deleted":null,
|
||||
"title":"DiagnosticReport http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/DiagnosticReport/5978827",
|
||||
"id":"DiagnosticReport/5978827",
|
||||
"link":[
|
||||
{
|
||||
"rel":"self",
|
||||
"href":"DiagnosticReport/5978827"
|
||||
}
|
||||
],
|
||||
"published":"2014-05-29T10:49:33-04:00",
|
||||
"content":{
|
||||
"resourceType":"DiagnosticReport",
|
||||
"id":"http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/DiagnosticReport/5978827",
|
||||
"text":{
|
||||
"status":"generated",
|
||||
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\"> C&S </div><table class=\"hapiPropertyTable\"><tbody><tr><td>Status</td><td>partial</td></tr><tr><td>Issued</td><td> 29 April 2014 17:21:56 </td></tr></tbody></table><table class=\"hapiTableOfValues\"><thead><tr><td>Name</td><td>Value</td><td>Interpretation</td><td>Reference Range</td><td>Status</td></tr></thead><tbody><tr class=\"hapiTableOfValuesRowEven\"><td> Collection Info </td><td> Spec #102758: 26 Sep 08 1117</td><td/><td/><td>preliminary</td></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Direct Stain </td><td> pus cells</td><td/><td/><td>preliminary</td></tr><tr class=\"hapiTableOfValuesRowEven\"><td> Header </td><td> To view Culture & Sensitivity Results, select</td><td/><td/><td/></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Header </td><td> (Y) Report Query. Do NOT select number beside</td><td/><td/><td/></tr><tr class=\"hapiTableOfValuesRowEven\"><td> Header </td><td> Prelim or Final Result field, as there is</td><td/><td/><td/></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Header </td><td> potential for viewing an incomplete report.</td><td/><td/><td/></tr><tr class=\"hapiTableOfValuesRowEven\"><td> Organism </td><td> Haemophilus influenzae</td><td/><td/><td>final</td></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Qualifier </td><td> =>10 x E6 cfu/L SIGNIFICANT RESULT. Organisms cultured in quantities =>10 x E6 cfu/L are consistent with pneumonia. beta-lactamase positive result suggests resistance to ampicillin but generally susceptible to amoxicillin- clavulanic and cefuroxime.</td><td/><td/><td>final</td></tr><tr class=\"hapiTableOfValuesRowEven\"><td> Sensitivities </td><td> _Beta-lactamase Pos: </td><td/><td/><td>final</td></tr><tr class=\"hapiTableOfValuesRowOdd\"><td> Test Comment </td><td> =>10 x E6 cfu/L Commensal flora</td><td/><td/><td>final</td></tr></tbody></table></div>"
|
||||
},
|
||||
"contained":[
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"f816a276-cfad-4eca-a9fa-f1dff844a196",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"146151.1"
|
||||
}
|
||||
],
|
||||
"text":"Collection Info"
|
||||
},
|
||||
"valueString":"Spec #102758: 26 Sep 08 1117",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"preliminary"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"23b55496-1c2a-4d5f-9c24-8ca5042f4027",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"GM.2"
|
||||
}
|
||||
],
|
||||
"text":"Direct Stain"
|
||||
},
|
||||
"valueString":"pus cells",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"preliminary"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"74e6791a-d810-4545-8410-e9eca41e81d6",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H1.3"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"To view Culture & Sensitivity Results, select",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"cd8c6a6c-7ef5-446f-b07b-47a21bfe28ee",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H2.4"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"(Y) Report Query. Do NOT select number beside",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"4a3d453d-3a18-432f-8f1f-d7657c50dcd4",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H3.5"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"Prelim or Final Result field, as there is",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"0dd6cff6-f9db-42cc-89c9-2cd6ba6fe5af",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H4.6"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"potential for viewing an incomplete report.",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"6d6b0117-220f-4b9a-abf3-5faf772cfa61",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/O.4"
|
||||
}
|
||||
],
|
||||
"text":"Organism"
|
||||
},
|
||||
"valueString":"Haemophilus influenzae",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"64068acf-57f4-42c8-b0e6-416247067b16",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/31266.5"
|
||||
}
|
||||
],
|
||||
"text":"Qualifier"
|
||||
},
|
||||
"valueString":"=>10 x E6 cfu/L SIGNIFICANT RESULT. Organisms cultured in quantities =>10 x E6 cfu/L are consistent with pneumonia. beta-lactamase positive result suggests resistance to ampicillin but generally susceptible to amoxicillin- clavulanic and cefuroxime.",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"0f9d254f-3ad1-404b-9be9-20258b3c242f",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/31415.6"
|
||||
}
|
||||
],
|
||||
"text":"Sensitivities"
|
||||
},
|
||||
"valueString":"_Beta-lactamase Pos: ",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"349bb02b-fbbe-4ce0-b190-3f545240dcc0",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"Q.3"
|
||||
}
|
||||
],
|
||||
"text":"Test Comment"
|
||||
},
|
||||
"valueString":"=>10 x E6 cfu/L Commensal flora",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"f816a276-cfad-4eca-a9fa-f1dff844a196",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"146151.1"
|
||||
}
|
||||
],
|
||||
"text":"Collection Info"
|
||||
},
|
||||
"valueString":"Spec #102758: 26 Sep 08 1117",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"preliminary"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"23b55496-1c2a-4d5f-9c24-8ca5042f4027",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"GM.2"
|
||||
}
|
||||
],
|
||||
"text":"Direct Stain"
|
||||
},
|
||||
"valueString":"pus cells",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"preliminary"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"74e6791a-d810-4545-8410-e9eca41e81d6",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H1.3"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"To view Culture & Sensitivity Results, select",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"cd8c6a6c-7ef5-446f-b07b-47a21bfe28ee",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H2.4"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"(Y) Report Query. Do NOT select number beside",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"4a3d453d-3a18-432f-8f1f-d7657c50dcd4",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H3.5"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"Prelim or Final Result field, as there is",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"0dd6cff6-f9db-42cc-89c9-2cd6ba6fe5af",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"1H4.6"
|
||||
}
|
||||
],
|
||||
"text":"Header"
|
||||
},
|
||||
"valueString":"potential for viewing an incomplete report.",
|
||||
"issued":"2014-04-29T17:21:56"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"6d6b0117-220f-4b9a-abf3-5faf772cfa61",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/O.4"
|
||||
}
|
||||
],
|
||||
"text":"Organism"
|
||||
},
|
||||
"valueString":"Haemophilus influenzae",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"64068acf-57f4-42c8-b0e6-416247067b16",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/31266.5"
|
||||
}
|
||||
],
|
||||
"text":"Qualifier"
|
||||
},
|
||||
"valueString":"=>10 x E6 cfu/L SIGNIFICANT RESULT. Organisms cultured in quantities =>10 x E6 cfu/L are consistent with pneumonia. beta-lactamase positive result suggests resistance to ampicillin but generally susceptible to amoxicillin- clavulanic and cefuroxime.",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"0f9d254f-3ad1-404b-9be9-20258b3c242f",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"F/31415.6"
|
||||
}
|
||||
],
|
||||
"text":"Sensitivities"
|
||||
},
|
||||
"valueString":"_Beta-lactamase Pos: ",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
},
|
||||
{
|
||||
"resourceType":"Observation",
|
||||
"id":"349bb02b-fbbe-4ce0-b190-3f545240dcc0",
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.6",
|
||||
"code":"Q.3"
|
||||
}
|
||||
],
|
||||
"text":"Test Comment"
|
||||
},
|
||||
"valueString":"=>10 x E6 cfu/L Commensal flora",
|
||||
"interpretation":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"N"
|
||||
}
|
||||
]
|
||||
},
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"status":"final"
|
||||
}
|
||||
],
|
||||
"name":{
|
||||
"coding":[
|
||||
{
|
||||
"system":"urn:oid:1.3.6.1.4.1.12201.102.5",
|
||||
"code":"4140"
|
||||
}
|
||||
],
|
||||
"text":"C&S"
|
||||
},
|
||||
"status":"partial",
|
||||
"issued":"2014-04-29T17:21:56",
|
||||
"subject":{
|
||||
"resource":"Patient/5556918"
|
||||
},
|
||||
"identifier":{
|
||||
"value":"2363922"
|
||||
},
|
||||
"diagnosticDateTime":"2014-04-14T00:00:00-04:00",
|
||||
"result":[
|
||||
{
|
||||
"resource":"#f816a276-cfad-4eca-a9fa-f1dff844a196"
|
||||
},
|
||||
{
|
||||
"resource":"#23b55496-1c2a-4d5f-9c24-8ca5042f4027"
|
||||
},
|
||||
{
|
||||
"resource":"#74e6791a-d810-4545-8410-e9eca41e81d6"
|
||||
},
|
||||
{
|
||||
"resource":"#cd8c6a6c-7ef5-446f-b07b-47a21bfe28ee"
|
||||
},
|
||||
{
|
||||
"resource":"#4a3d453d-3a18-432f-8f1f-d7657c50dcd4"
|
||||
},
|
||||
{
|
||||
"resource":"#0dd6cff6-f9db-42cc-89c9-2cd6ba6fe5af"
|
||||
},
|
||||
{
|
||||
"resource":"#6d6b0117-220f-4b9a-abf3-5faf772cfa61"
|
||||
},
|
||||
{
|
||||
"resource":"#64068acf-57f4-42c8-b0e6-416247067b16"
|
||||
},
|
||||
{
|
||||
"resource":"#0f9d254f-3ad1-404b-9be9-20258b3c242f"
|
||||
},
|
||||
{
|
||||
"resource":"#349bb02b-fbbe-4ce0-b190-3f545240dcc0"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"deleted":null,
|
||||
"title":"Organization http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/Organization/1.3.6.1.4.1.12201",
|
||||
"id":"Organization/1.3.6.1.4.1.12201",
|
||||
"link":[
|
||||
{
|
||||
"rel":"self",
|
||||
"href":"Organization/1.3.6.1.4.1.12201"
|
||||
}
|
||||
],
|
||||
"published":"2014-05-29T10:49:32-04:00",
|
||||
"content":{
|
||||
"resourceType":"Organization",
|
||||
"id":"http://uhnvesb01d.uhn.on.ca:25180/uhn-fhir-service-1.0/Organization/1.3.6.1.4.1.12201",
|
||||
"extension":[
|
||||
{
|
||||
"url":"http://fhir.connectinggta.ca/Profile/organization#providerIdPool",
|
||||
"valueUri":"1.3.6.1.4.1.12201.1"
|
||||
}
|
||||
],
|
||||
"text":{
|
||||
"status":"empty",
|
||||
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">No narrative template available for resource profile: http://fhir.connectinggta.ca/Profile/organization</div>"
|
||||
},
|
||||
"contained":[
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.1",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.1"
|
||||
},
|
||||
"name":"Toronto General Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.2",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.2"
|
||||
},
|
||||
"name":"Toronto Western Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.3",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.3"
|
||||
},
|
||||
"name":"Princess Margaret Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.4",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.4"
|
||||
},
|
||||
"name":"Toronto Rehab Institute"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.1",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.1"
|
||||
},
|
||||
"name":"Toronto General Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.2",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.2"
|
||||
},
|
||||
"name":"Toronto Western Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.3",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.3"
|
||||
},
|
||||
"name":"Princess Margaret Hospital"
|
||||
},
|
||||
{
|
||||
"resourceType":"Location",
|
||||
"id":"1.3.6.1.4.1.12201.100.4",
|
||||
"identifier":{
|
||||
"system":"urn:cgta:facility_ids",
|
||||
"value":"1.3.6.1.4.1.12201.100.4"
|
||||
},
|
||||
"name":"Toronto Rehab Institute"
|
||||
}
|
||||
],
|
||||
"name":"University Health Network",
|
||||
"type":{
|
||||
"coding":[
|
||||
{
|
||||
"code":"HOSPITAL"
|
||||
}
|
||||
]
|
||||
},
|
||||
"address":[
|
||||
{
|
||||
"line":[
|
||||
"R. Fraser Elliott Building, 1st Floor",
|
||||
"190 Elizabeth St."
|
||||
],
|
||||
"city":"Toronto",
|
||||
"state":"ON",
|
||||
"zip":"M5G 2C4"
|
||||
}
|
||||
],
|
||||
"location":[
|
||||
{
|
||||
"resource":"#1.3.6.1.4.1.12201.100.1"
|
||||
},
|
||||
{
|
||||
"resource":"#1.3.6.1.4.1.12201.100.2"
|
||||
},
|
||||
{
|
||||
"resource":"#1.3.6.1.4.1.12201.100.3"
|
||||
},
|
||||
{
|
||||
"resource":"#1.3.6.1.4.1.12201.100.4"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue