Shorten column names in Search table for JPA
This commit is contained in:
parent
83c8036eda
commit
fdd82e0b2a
|
@ -1539,6 +1539,12 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao {
|
|||
/*
|
||||
* Update the "search param present" table which is used for the
|
||||
* ?foo:missing=true queries
|
||||
*
|
||||
* Note that we're only populating this for reference params
|
||||
* because the index tables for all other types have a MISSING column
|
||||
* right on them for handling the :missing queries. We can't use the
|
||||
* index table for resource links (reference indexes) because we index
|
||||
* those by path and not by parameter name.
|
||||
*/
|
||||
if (thePerformIndexing) {
|
||||
Map<String, Boolean> presentSearchParams = new HashMap<String, Boolean>();
|
||||
|
|
|
@ -23,15 +23,8 @@ package ca.uhn.fhir.jpa.entity;
|
|||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.persistence.*;
|
||||
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
import org.hibernate.annotations.Columns;
|
||||
import org.hibernate.search.annotations.ContainedIn;
|
||||
import org.hibernate.search.annotations.Field;
|
||||
|
||||
|
@ -44,7 +37,6 @@ public abstract class BaseResourceIndexedSearchParam implements Serializable {
|
|||
|
||||
@Field()
|
||||
@Column(name = "SP_MISSING", nullable = true)
|
||||
@ColumnDefault("false")
|
||||
private boolean myMissing;
|
||||
|
||||
@Field
|
||||
|
|
|
@ -42,8 +42,8 @@ import ca.uhn.fhir.rest.param.DateRangeParam;
|
|||
@Table(name = "HFJ_SEARCH", uniqueConstraints= {
|
||||
@UniqueConstraint(name="IDX_SEARCH_UUID", columnNames="SEARCH_UUID")
|
||||
}, indexes= {
|
||||
@Index(name="JDX_SEARCH_LASTRETURNED", columnList="SEARCH_LAST_RETURNED"),
|
||||
@Index(name="JDX_SEARCH_RESTYPE_STRINGHASHCREATED", columnList="RESOURCE_TYPE,SEARCH_QUERY_STRING_HASH,CREATED")
|
||||
@Index(name="IDX_SEARCH_LASTRETURNED", columnList="SEARCH_LAST_RETURNED"),
|
||||
@Index(name="IDX_SEARCH_RESTYPE_HASHS", columnList="RESOURCE_TYPE,SEARCH_QUERY_STRING_HASH,CREATED")
|
||||
})
|
||||
public class Search implements Serializable {
|
||||
|
||||
|
|
|
@ -52,5 +52,8 @@ public class SearchParam {
|
|||
myResourceName = theResourceName;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return myId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,6 +54,13 @@ public class SearchParamPresent implements Serializable {
|
|||
@JoinColumn(name = "SP_ID", referencedColumnName = "PID", nullable = false, foreignKey = @ForeignKey(name = "FK_RESPARMPRES_SPID"))
|
||||
private SearchParam mySearchParam;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public SearchParamPresent() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ResourceTable getResource() {
|
||||
return myResource;
|
||||
}
|
||||
|
|
|
@ -80,9 +80,7 @@ import ca.uhn.fhir.model.api.Include;
|
|||
import ca.uhn.fhir.rest.method.PageMethodBinding;
|
||||
import ca.uhn.fhir.rest.server.IBundleProvider;
|
||||
import ca.uhn.fhir.rest.server.SimpleBundleProvider;
|
||||
import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException;
|
||||
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
||||
import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException;
|
||||
import ca.uhn.fhir.rest.server.exceptions.*;
|
||||
|
||||
public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc {
|
||||
static final int DEFAULT_SYNC_SIZE = 250;
|
||||
|
@ -475,7 +473,22 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc {
|
|||
ourLog.info("Completed search for {} resources in {}ms", mySyncedPids.size(), sw.getMillis());
|
||||
|
||||
} catch (Throwable t) {
|
||||
ourLog.error("Failed during search loading after {}ms", sw.getMillis(), t);
|
||||
|
||||
/*
|
||||
* Don't print a stack trace for client errors.. that's just noisy
|
||||
*/
|
||||
boolean logged = false;
|
||||
if (t instanceof BaseServerResponseException) {
|
||||
BaseServerResponseException exception = (BaseServerResponseException) t;
|
||||
if (exception.getStatusCode() >= 400 && exception.getStatusCode() < 500) {
|
||||
logged = true;
|
||||
ourLog.warn("Failed during search due to invalid request: {}", t.toString());
|
||||
}
|
||||
}
|
||||
|
||||
if (!logged) {
|
||||
ourLog.error("Failed during search loading after {}ms", sw.getMillis(), t);
|
||||
}
|
||||
myUnsyncedPids.clear();
|
||||
|
||||
Throwable rootCause = ExceptionUtils.getRootCause(t);
|
||||
|
|
|
@ -82,7 +82,8 @@ public class SearchParamPresenceSvcImpl implements ISearchParamPresenceSvc {
|
|||
searchParam = new SearchParam();
|
||||
searchParam.setResourceName(resourceType);
|
||||
searchParam.setParamName(paramName);
|
||||
mySearchParamDao.save(searchParam);
|
||||
searchParam = mySearchParamDao.saveAndFlush(searchParam);
|
||||
ourLog.info("Added search param {} with pid {}", paramName, searchParam.getId());
|
||||
// Don't add the newly saved entity to the map in case the save fails
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
package ca.uhn.fhir.jpa.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.AnnotatedElement;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.reflect.ClassPath;
|
||||
import com.google.common.reflect.ClassPath.ClassInfo;
|
||||
|
||||
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
||||
|
||||
public class TestUtil {
|
||||
private static final int MAX_LENGTH = 30;
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(TestUtil.class);
|
||||
|
||||
/** non instantiable */
|
||||
private TestUtil() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* This is really only useful for unit tests, do not call otherwise
|
||||
*/
|
||||
public static void scanEntities(String packageName) throws IOException, ClassNotFoundException {
|
||||
ImmutableSet<ClassInfo> classes = ClassPath.from(TestUtil.class.getClassLoader()).getTopLevelClasses(packageName);
|
||||
|
||||
if (classes.size() <= 1) {
|
||||
throw new InternalErrorException("Found no classes");
|
||||
}
|
||||
|
||||
for (ClassInfo classInfo : classes) {
|
||||
Class<?> clazz = Class.forName(classInfo.getName());
|
||||
Entity entity = clazz.getAnnotation(Entity.class);
|
||||
if (entity == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ourLog.info("Scanning: {}", clazz.getSimpleName());
|
||||
|
||||
scan(clazz);
|
||||
|
||||
for (Field nextField : clazz.getFields()) {
|
||||
scan(nextField);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private static void scan(AnnotatedElement ae) {
|
||||
Table table = ae.getAnnotation(Table.class);
|
||||
if (table != null) {
|
||||
assertThat(table.name());
|
||||
for (UniqueConstraint nextConstraint : table.uniqueConstraints()) {
|
||||
assertThat(nextConstraint.name());
|
||||
}
|
||||
for (Index nextConstraint : table.indexes()) {
|
||||
assertThat(nextConstraint.name());
|
||||
}
|
||||
}
|
||||
|
||||
JoinColumn joinColumn = ae.getAnnotation(JoinColumn.class);
|
||||
if (joinColumn != null) {
|
||||
assertThat(joinColumn.name());
|
||||
ForeignKey fk = joinColumn.foreignKey();
|
||||
assertThat(fk.name());
|
||||
}
|
||||
|
||||
Column column = ae.getAnnotation(Column.class);
|
||||
if (column != null) {
|
||||
assertThat(column.name());
|
||||
}
|
||||
|
||||
GeneratedValue gen = ae.getAnnotation(GeneratedValue.class);
|
||||
if (gen != null) {
|
||||
assertThat(gen.generator());
|
||||
SequenceGenerator sg = ae.getAnnotation(SequenceGenerator.class);
|
||||
assertThat(sg.name());
|
||||
assertThat(sg.sequenceName());
|
||||
assertEquals(gen.generator(), sg.name());
|
||||
assertEquals(gen.generator(), sg.sequenceName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void assertEquals(String theGenerator, String theName) {
|
||||
Validate.isTrue(theGenerator.equals(theName));
|
||||
}
|
||||
|
||||
private static void assertThat(String theName) {
|
||||
Validate.isTrue(theName.length() <= MAX_LENGTH, "Identifier \"" + theName + "\" is " + theName.length() + " chars long");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package ca.uhn.fhir.jpa.config;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import ca.uhn.fhir.jpa.entity.ResourceTable;
|
||||
import ca.uhn.fhir.jpa.util.TestUtil;
|
||||
|
||||
public class IdentifierLengthTest {
|
||||
|
||||
@Test
|
||||
public void testIdentifierLength() throws Exception {
|
||||
TestUtil.scanEntities(ResourceTable.class.getPackage().getName());
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -25,6 +25,7 @@ import java.util.List;
|
|||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.hl7.fhir.dstu3.model.IdType;
|
||||
import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent;
|
||||
import org.hl7.fhir.instance.model.api.IIdType;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Test;
|
||||
|
@ -75,6 +76,21 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
|
|||
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu2Test.class);
|
||||
|
||||
/**
|
||||
* See #638
|
||||
*/
|
||||
@Test
|
||||
public void testTransactionBug638() throws Exception {
|
||||
String input = loadClasspath("/bug638.xml");
|
||||
Bundle request = myFhirCtx.newXmlParser().parseResource(Bundle.class, input);
|
||||
|
||||
Bundle resp = mySystemDao.transaction(mySrd, request);
|
||||
|
||||
ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
|
||||
|
||||
assertEquals(18, resp.getEntry().size());
|
||||
}
|
||||
|
||||
/**
|
||||
* Per a message on the mailing list
|
||||
*/
|
||||
|
|
|
@ -3094,6 +3094,28 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
|||
checkParamMissing(Observation.SP_DATE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSearchInvalidParam() throws Exception {
|
||||
Patient patient = new Patient();
|
||||
patient.addIdentifier().setSystem("urn:system").setValue("0");
|
||||
patient.addName().setFamily("testSearchWithMixedParams").addGiven("Joe");
|
||||
myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless();
|
||||
|
||||
// should be subject._id
|
||||
HttpGet httpPost = new HttpGet(ourServerBase + "/Observation?subject.id=FOO");
|
||||
|
||||
CloseableHttpResponse resp = ourHttpClient.execute(httpPost);
|
||||
try {
|
||||
String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8);
|
||||
ourLog.info(respString);
|
||||
assertThat(respString, containsString("Invalid parameter chain: subject.id"));
|
||||
assertEquals(400, resp.getStatusLine().getStatusCode());
|
||||
} finally {
|
||||
IOUtils.closeQuietly(resp.getEntity().getContent());
|
||||
}
|
||||
ourLog.info("Outgoing post: {}", httpPost);
|
||||
}
|
||||
|
||||
/**
|
||||
* See #411
|
||||
*
|
||||
|
|
|
@ -0,0 +1,651 @@
|
|||
<Bundle xmlns="http://hl7.org/fhir">
|
||||
<meta>
|
||||
<lastUpdated value="2017-05-02T11:15:27.998+01:00" />
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NewbornBloodSpotScreeningBundlev1" />
|
||||
</meta>
|
||||
<type value="transaction" />
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:60c88939-6159-45ee-9f78-122c9b56a5bb" />
|
||||
<resource>
|
||||
<Provenance>
|
||||
<id value="60c88939-6159-45ee-9f78-122c9b56a5bb" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/PCHRProvenancev1" />
|
||||
</meta>
|
||||
<target>
|
||||
<reference value="urn:uuid:be58eb90-74b3-4db6-9a31-c40a6c97e3dc" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:f0b5569d-136b-4be8-b5a3-e5db1feead99" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:8a3a8adc-747a-4430-8876-d8b4937928b9" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:aee71835-b117-4fe5-ad11-4bff7c9adff3" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:116799a0-223e-4708-aa5c-010587fabde8" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:8b43b707-cab5-42e7-8dd8-2f664c69dee7" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:a947c7d3-ea88-4f45-b6ab-a1db471ccd32" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:ed9ca84e-86ba-4a1d-9e6f-4a928be7a89c" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:51d6a6de-4263-43b5-9fa0-64a41d1f89a1" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:acd1e52b-00bb-49b6-af2c-83c592694e86" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:80159cb4-9fc2-434f-9fb5-b4da4beb92dc" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:463c6bd8-79c8-4982-acef-5312329bba72" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:db24d6f9-6110-4ab2-a694-e4c99f5a5838" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:c3e671e6-1402-4993-97fc-3e970fa0e1d4" />
|
||||
</target>
|
||||
<target>
|
||||
<reference value="urn:uuid:f7bb659c-fb86-4aed-90c3-a7957459927f" />
|
||||
</target>
|
||||
<recorded value="2017-05-02T11:15:27.998+01:00" />
|
||||
<agent>
|
||||
<role>
|
||||
<system value="http://hl7.org/fhir/provenance-participant-role" />
|
||||
<code value="author" />
|
||||
</role>
|
||||
<actor>
|
||||
<reference value="urn:uuid:89df119a-409d-4e18-a68c-ab75fcecb9c3" />
|
||||
</actor>
|
||||
</agent>
|
||||
</Provenance>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Provenance"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:89df119a-409d-4e18-a68c-ab75fcecb9c3" />
|
||||
<resource>
|
||||
<Organization>
|
||||
<id value="89df119a-409d-4e18-a68c-ab75fcecb9c3" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/PCHROrganizationv1" />
|
||||
</meta>
|
||||
<identifier>
|
||||
<system value="urn:ietf:rfc:RNS01" />
|
||||
<value value="2.16.840.1.113883.19.5" />
|
||||
</identifier>
|
||||
</Organization>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Organization"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:be58eb90-74b3-4db6-9a31-c40a6c97e3dc" />
|
||||
<resource>
|
||||
<Organization>
|
||||
<id value="be58eb90-74b3-4db6-9a31-c40a6c97e3dc" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/PCHROrganizationv1" />
|
||||
</meta>
|
||||
<identifier>
|
||||
<system value="http://fhir.nhs.net/id/gcode" />
|
||||
<value value="M87003" />
|
||||
</identifier>
|
||||
</Organization>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Organization"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
<resource>
|
||||
<Patient>
|
||||
<id value="3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NHSPatientv1" />
|
||||
</meta>
|
||||
<extension url="http://fhir.nhs.net/StructureDefinition/BirthDetailsExtensionv1">
|
||||
<extension url="birthTime">
|
||||
<valueTime value="12:05:00" />
|
||||
</extension>
|
||||
</extension>
|
||||
<identifier>
|
||||
<system value="http://fhir.nhs.net/id/nhs-number" />
|
||||
<value value="1935537156" />
|
||||
</identifier>
|
||||
<name>
|
||||
<family value="Gibson" />
|
||||
<given value="Mike" />
|
||||
</name>
|
||||
<gender value="male" />
|
||||
<birthDate value="2014-05-25" />
|
||||
<careProvider>
|
||||
<reference value="urn:uuid:be58eb90-74b3-4db6-9a31-c40a6c97e3dc" />
|
||||
</careProvider>
|
||||
</Patient>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Patient"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:f0b5569d-136b-4be8-b5a3-e5db1feead99" />
|
||||
<resource>
|
||||
<Encounter>
|
||||
<id value="f0b5569d-136b-4be8-b5a3-e5db1feead99" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/PCHREncounterv1" />
|
||||
</meta>
|
||||
<status value="finished" />
|
||||
<type>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="428447008" />
|
||||
<display value="Newborn blood spot screening (procedure)" />
|
||||
</coding>
|
||||
</type>
|
||||
<patient>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</patient>
|
||||
<period>
|
||||
<start value="2017-05-02" />
|
||||
</period>
|
||||
</Encounter>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Encounter"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:8a3a8adc-747a-4430-8876-d8b4937928b9" />
|
||||
<resource>
|
||||
<Procedure>
|
||||
<id value="8a3a8adc-747a-4430-8876-d8b4937928b9" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NewbornBloodSpotScreeningProcedurev1" />
|
||||
</meta>
|
||||
<subject>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</subject>
|
||||
<status value="completed" />
|
||||
<code>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="77262006" />
|
||||
<display value="Heel stick (procedure)" />
|
||||
</coding>
|
||||
</code>
|
||||
<performer>
|
||||
<actor>
|
||||
<reference value="urn:uuid:f7bb659c-fb86-4aed-90c3-a7957459927f" />
|
||||
</actor>
|
||||
</performer>
|
||||
<performedDate value="2014-06-06" />
|
||||
<encounter>
|
||||
<reference value="urn:uuid:f0b5569d-136b-4be8-b5a3-e5db1feead99" />
|
||||
</encounter>
|
||||
<outcome>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="15501000000100" />
|
||||
<display value="" />
|
||||
</coding>
|
||||
</outcome>
|
||||
</Procedure>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Procedure"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:aee71835-b117-4fe5-ad11-4bff7c9adff3" />
|
||||
<resource>
|
||||
<DiagnosticReport>
|
||||
<id value="aee71835-b117-4fe5-ad11-4bff7c9adff3" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NewbornBloodSpotScreeningDiagnosticReportv1" />
|
||||
</meta>
|
||||
<status value="final" />
|
||||
<code>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="428447008" />
|
||||
<display value="Newborn blood spot screening (procedure)" />
|
||||
</coding>
|
||||
</code>
|
||||
<subject>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</subject>
|
||||
<effectiveDateTime value="2014-06-06" />
|
||||
<issued value="2017-05-02T11:15:27.998+01:00" />
|
||||
<performer>
|
||||
<reference value="urn:uuid:f7bb659c-fb86-4aed-90c3-a7957459927f" />
|
||||
</performer>
|
||||
<result>
|
||||
<reference value="urn:uuid:8b43b707-cab5-42e7-8dd8-2f664c69dee7" />
|
||||
<display value="Cystic fibrosis screening test (observable entity)" />
|
||||
</result>
|
||||
<result>
|
||||
<reference value="urn:uuid:a947c7d3-ea88-4f45-b6ab-a1db471ccd32" />
|
||||
<display value="Congenital hypothyroidism screening test (observable entity)" />
|
||||
</result>
|
||||
<result>
|
||||
<reference value="urn:uuid:ed9ca84e-86ba-4a1d-9e6f-4a928be7a89c" />
|
||||
<display value="Blood spot glutaric aciduria type 1 screening test (observable entity)" />
|
||||
</result>
|
||||
<result>
|
||||
<reference value="urn:uuid:51d6a6de-4263-43b5-9fa0-64a41d1f89a1" />
|
||||
<display value="Blood spot homocystinuria screening test (observable entity)" />
|
||||
</result>
|
||||
<result>
|
||||
<reference value="urn:uuid:acd1e52b-00bb-49b6-af2c-83c592694e86" />
|
||||
<display value="Blood spot isovaleric acidaemia screening test (observable entity)" />
|
||||
</result>
|
||||
<result>
|
||||
<reference value="urn:uuid:80159cb4-9fc2-434f-9fb5-b4da4beb92dc" />
|
||||
<display value="Medium chain acyl coenzyme A dehydrogenase deficiency screening test (observable entity)" />
|
||||
</result>
|
||||
<result>
|
||||
<reference value="urn:uuid:463c6bd8-79c8-4982-acef-5312329bba72" />
|
||||
<display value="Blood spot maple syrup urine disease screening test (observable entity)" />
|
||||
</result>
|
||||
<result>
|
||||
<reference value="urn:uuid:db24d6f9-6110-4ab2-a694-e4c99f5a5838" />
|
||||
<display value="Phenylketonuria screening test (observable entity)" />
|
||||
</result>
|
||||
<result>
|
||||
<reference value="urn:uuid:c3e671e6-1402-4993-97fc-3e970fa0e1d4" />
|
||||
<display value="Sickle cell disease screening test (observable entity)" />
|
||||
</result>
|
||||
</DiagnosticReport>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="DiagnosticReport"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:116799a0-223e-4708-aa5c-010587fabde8" />
|
||||
<resource>
|
||||
<Specimen>
|
||||
<id value="116799a0-223e-4708-aa5c-010587fabde8" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NewbornBloodSpotScreeningSpecimenv1" />
|
||||
</meta>
|
||||
<status value="available" />
|
||||
<subject>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</subject>
|
||||
<container>
|
||||
<identifier>
|
||||
<system value="HPSystem" />
|
||||
<value value="H1DZTGK8GUSLVY36C" />
|
||||
</identifier>
|
||||
</container>
|
||||
</Specimen>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Specimen"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:8b43b707-cab5-42e7-8dd8-2f664c69dee7" />
|
||||
<resource>
|
||||
<Observation>
|
||||
<id value="8b43b707-cab5-42e7-8dd8-2f664c69dee7" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NewbornBloodSpotScreeningObservationv1" />
|
||||
</meta>
|
||||
<status value="final" />
|
||||
<code>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="1028351000000108" />
|
||||
<display value="Cystic fibrosis screening test (observable entity)" />
|
||||
</coding>
|
||||
</code>
|
||||
<subject>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</subject>
|
||||
<effectiveDateTime value="2014-06-06" />
|
||||
<valueCodeableConcept>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="509581000000105" />
|
||||
<display value="Newborn blood spot specimen received (finding)" />
|
||||
<userSelected value="false" />
|
||||
</coding>
|
||||
</valueCodeableConcept>
|
||||
</Observation>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Observation"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:a947c7d3-ea88-4f45-b6ab-a1db471ccd32" />
|
||||
<resource>
|
||||
<Observation>
|
||||
<id value="a947c7d3-ea88-4f45-b6ab-a1db471ccd32" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NewbornBloodSpotScreeningObservationv1" />
|
||||
</meta>
|
||||
<status value="final" />
|
||||
<code>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="1005921000000102" />
|
||||
<display value="Congenital hypothyroidism screening test (observable entity)" />
|
||||
</coding>
|
||||
</code>
|
||||
<subject>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</subject>
|
||||
<effectiveDateTime value="2014-06-06" />
|
||||
<valueCodeableConcept>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="509581000000105" />
|
||||
<display value="Newborn blood spot specimen received (finding)" />
|
||||
<userSelected value="false" />
|
||||
</coding>
|
||||
</valueCodeableConcept>
|
||||
</Observation>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Observation"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:ed9ca84e-86ba-4a1d-9e6f-4a928be7a89c" />
|
||||
<resource>
|
||||
<Observation>
|
||||
<id value="ed9ca84e-86ba-4a1d-9e6f-4a928be7a89c" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NewbornBloodSpotScreeningObservationv1" />
|
||||
</meta>
|
||||
<status value="final" />
|
||||
<code>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="1011391000000103" />
|
||||
<display value="Blood spot glutaric aciduria type 1 screening test (observable entity)" />
|
||||
</coding>
|
||||
</code>
|
||||
<subject>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</subject>
|
||||
<effectiveDateTime value="2014-06-06" />
|
||||
<valueCodeableConcept>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="509581000000105" />
|
||||
<display value="Newborn blood spot specimen received (finding)" />
|
||||
<userSelected value="false" />
|
||||
</coding>
|
||||
</valueCodeableConcept>
|
||||
</Observation>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Observation"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:51d6a6de-4263-43b5-9fa0-64a41d1f89a1" />
|
||||
<resource>
|
||||
<Observation>
|
||||
<id value="51d6a6de-4263-43b5-9fa0-64a41d1f89a1" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NewbornBloodSpotScreeningObservationv1" />
|
||||
</meta>
|
||||
<status value="final" />
|
||||
<code>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="1011371000000102" />
|
||||
<display value="Blood spot homocystinuria screening test (observable entity)" />
|
||||
</coding>
|
||||
</code>
|
||||
<subject>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</subject>
|
||||
<effectiveDateTime value="2014-06-06" />
|
||||
<valueCodeableConcept>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="509581000000105" />
|
||||
<display value="Newborn blood spot specimen received (finding)" />
|
||||
<userSelected value="false" />
|
||||
</coding>
|
||||
</valueCodeableConcept>
|
||||
</Observation>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Observation"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:acd1e52b-00bb-49b6-af2c-83c592694e86" />
|
||||
<resource>
|
||||
<Observation>
|
||||
<id value="acd1e52b-00bb-49b6-af2c-83c592694e86" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NewbornBloodSpotScreeningObservationv1" />
|
||||
</meta>
|
||||
<status value="final" />
|
||||
<code>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="1011381000000100" />
|
||||
<display value="Blood spot isovaleric acidaemia screening test (observable entity)" />
|
||||
</coding>
|
||||
</code>
|
||||
<subject>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</subject>
|
||||
<effectiveDateTime value="2014-06-06" />
|
||||
<valueCodeableConcept>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="509581000000105" />
|
||||
<display value="Newborn blood spot specimen received (finding)" />
|
||||
<userSelected value="false" />
|
||||
</coding>
|
||||
</valueCodeableConcept>
|
||||
</Observation>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Observation"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:80159cb4-9fc2-434f-9fb5-b4da4beb92dc" />
|
||||
<resource>
|
||||
<Observation>
|
||||
<id value="80159cb4-9fc2-434f-9fb5-b4da4beb92dc" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NewbornBloodSpotScreeningObservationv1" />
|
||||
</meta>
|
||||
<status value="final" />
|
||||
<code>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="1005911000000108" />
|
||||
<display value="Medium chain acyl coenzyme A dehydrogenase deficiency screening test (observable entity)" />
|
||||
</coding>
|
||||
</code>
|
||||
<subject>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</subject>
|
||||
<effectiveDateTime value="2014-06-06" />
|
||||
<valueCodeableConcept>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="509581000000105" />
|
||||
<display value="Newborn blood spot specimen received (finding)" />
|
||||
<userSelected value="false" />
|
||||
</coding>
|
||||
</valueCodeableConcept>
|
||||
</Observation>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Observation"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:463c6bd8-79c8-4982-acef-5312329bba72" />
|
||||
<resource>
|
||||
<Observation>
|
||||
<id value="463c6bd8-79c8-4982-acef-5312329bba72" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NewbornBloodSpotScreeningObservationv1" />
|
||||
</meta>
|
||||
<status value="final" />
|
||||
<code>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="1011361000000109" />
|
||||
<display value="Blood spot maple syrup urine disease screening test (observable entity)" />
|
||||
</coding>
|
||||
</code>
|
||||
<subject>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</subject>
|
||||
<effectiveDateTime value="2014-06-06" />
|
||||
<valueCodeableConcept>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="509581000000105" />
|
||||
<display value="Newborn blood spot specimen received (finding)" />
|
||||
<userSelected value="false" />
|
||||
</coding>
|
||||
</valueCodeableConcept>
|
||||
</Observation>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Observation"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:db24d6f9-6110-4ab2-a694-e4c99f5a5838" />
|
||||
<resource>
|
||||
<Observation>
|
||||
<id value="db24d6f9-6110-4ab2-a694-e4c99f5a5838" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NewbornBloodSpotScreeningObservationv1" />
|
||||
</meta>
|
||||
<status value="final" />
|
||||
<code>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="1031241000000109" />
|
||||
<display value="Phenylketonuria screening test (observable entity)" />
|
||||
</coding>
|
||||
</code>
|
||||
<subject>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</subject>
|
||||
<effectiveDateTime value="2014-06-06" />
|
||||
<valueCodeableConcept>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="509581000000105" />
|
||||
<display value="Newborn blood spot specimen received (finding)" />
|
||||
<userSelected value="false" />
|
||||
</coding>
|
||||
</valueCodeableConcept>
|
||||
</Observation>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Observation"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:c3e671e6-1402-4993-97fc-3e970fa0e1d4" />
|
||||
<resource>
|
||||
<Observation>
|
||||
<id value="c3e671e6-1402-4993-97fc-3e970fa0e1d4" />
|
||||
<meta>
|
||||
<profile value="http://fhir.nhs.net/StructureDefinition/NewbornBloodSpotScreeningObservationv1" />
|
||||
</meta>
|
||||
<status value="final" />
|
||||
<code>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="991891000000102" />
|
||||
<display value="Sickle cell disease screening test (observable entity)" />
|
||||
</coding>
|
||||
</code>
|
||||
<subject>
|
||||
<reference value="urn:uuid:3d1cffec-2f6e-4bca-9945-f1ca77bf8949" />
|
||||
</subject>
|
||||
<effectiveDateTime value="2014-06-06" />
|
||||
<valueCodeableConcept>
|
||||
<coding>
|
||||
<system value="http://snomed.info/sct" />
|
||||
<code value="509581000000105" />
|
||||
<display value="Newborn blood spot specimen received (finding)" />
|
||||
<userSelected value="false" />
|
||||
</coding>
|
||||
</valueCodeableConcept>
|
||||
</Observation>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Observation"/>
|
||||
</request>
|
||||
</entry>
|
||||
<entry>
|
||||
<fullUrl value="urn:uuid:f7bb659c-fb86-4aed-90c3-a7957459927f" />
|
||||
<resource>
|
||||
<Practitioner>
|
||||
<id value="f7bb659c-fb86-4aed-90c3-a7957459927f" />
|
||||
<meta>
|
||||
<profile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
|
||||
</meta>
|
||||
<identifier>
|
||||
<system value="HPSystem" />
|
||||
<value value="Lab1" />
|
||||
</identifier>
|
||||
<name>
|
||||
<family value="Laboratory1" />
|
||||
</name>
|
||||
</Practitioner>
|
||||
</resource>
|
||||
<request>
|
||||
<method value="POST"/>
|
||||
<url value="Practitioner"/>
|
||||
</request>
|
||||
</entry>
|
||||
</Bundle>
|
Loading…
Reference in New Issue