Merge pull request #330 from ItayGoren/converting-allergy

Converting allergy intolerance
This commit is contained in:
Grahame Grieve 2020-09-01 07:38:53 +10:00 committed by GitHub
commit 8e8f72d636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 437 additions and 0 deletions

View File

@ -3072,6 +3072,8 @@ public class VersionConvertor_10_30 {
return Appointment10_30.convertAppointment((org.hl7.fhir.dstu2.model.Appointment) src);
if (src instanceof org.hl7.fhir.dstu2.model.AppointmentResponse)
return AppointmentResponse10_30.convertAppointmentResponse((org.hl7.fhir.dstu2.model.AppointmentResponse) src);
if (src instanceof org.hl7.fhir.dstu2.model.AllergyIntolerance)
return AllergyIntolerance10_30.convertAllergyIntolerance((org.hl7.fhir.dstu2.model.AllergyIntolerance) src);
if (src instanceof org.hl7.fhir.dstu2.model.AuditEvent)
return AuditEvent10_30.convertAuditEvent((org.hl7.fhir.dstu2.model.AuditEvent) src);
if (src instanceof org.hl7.fhir.dstu2.model.Basic)

View File

@ -5,6 +5,7 @@ import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import org.hl7.fhir.convertors.conv10_40.AllergyIntolerance10_40;
import org.hl7.fhir.convertors.conv10_40.Appointment10_40;
import org.hl7.fhir.convertors.conv10_40.AppointmentResponse10_40;
import org.hl7.fhir.convertors.conv10_40.AuditEvent10_40;
@ -3174,6 +3175,8 @@ public class VersionConvertor_10_40 {
return Parameters10_40.convertParameters((org.hl7.fhir.dstu2.model.Parameters) src);
if (src instanceof org.hl7.fhir.dstu2.model.Appointment)
return Appointment10_40.convertAppointment((org.hl7.fhir.dstu2.model.Appointment) src);
if (src instanceof org.hl7.fhir.dstu2.model.AllergyIntolerance)
return AllergyIntolerance10_40.convertAllergyIntolerance((org.hl7.fhir.dstu2.model.AllergyIntolerance) src);
if (src instanceof org.hl7.fhir.dstu2.model.AppointmentResponse)
return AppointmentResponse10_40.convertAppointmentResponse((org.hl7.fhir.dstu2.model.AppointmentResponse) src);
if (src instanceof org.hl7.fhir.dstu2.model.AuditEvent)

View File

@ -0,0 +1,121 @@
package org.hl7.fhir.convertors.conv10_30;
import org.hl7.fhir.convertors.VersionConvertor_10_30;
import org.hl7.fhir.dstu2.model.AllergyIntolerance;
import org.hl7.fhir.exceptions.FHIRException;
public class AllergyIntolerance10_30 {
public static org.hl7.fhir.dstu3.model.AllergyIntolerance convertAllergyIntolerance(org.hl7.fhir.dstu2.model.AllergyIntolerance src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.AllergyIntolerance tgt = new org.hl7.fhir.dstu3.model.AllergyIntolerance();
VersionConvertor_10_30.copyDomainResource(src, tgt);
for (org.hl7.fhir.dstu2.model.Identifier identifier : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(identifier));
if (src.hasOnset())
tgt.setOnset(new org.hl7.fhir.dstu3.model.DateTimeType(src.getOnset()));
if (src.hasRecordedDate())
tgt.setAssertedDate(src.getRecordedDate());
if (src.hasRecorder())
tgt.setRecorder(VersionConvertor_10_30.convertReference(src.getRecorder()));
if (src.hasPatient())
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
if (src.hasReporter())
tgt.setAsserter(VersionConvertor_10_30.convertReference(src.getReporter()));
if (src.hasSubstance())
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getSubstance()));
if (src.hasStatus()) {
if (src.getStatus() != org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceStatus.REFUTED
&& src.getStatus() != org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceStatus.ENTEREDINERROR) {
tgt.setClinicalStatus(translateAllergyIntoleranceClinicalStatus(src.getStatus()));
}
if (src.getStatus() != org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceStatus.ACTIVE
&& src.getStatus() != org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceStatus.RESOLVED) {
tgt.setVerificationStatus(translateAllergyIntoleranceVerificationStatus(src.getStatus()));
}
}
if (src.hasCriticality())
tgt.setCriticality(translateAllergyIntoleranceCriticality(src.getCriticality()));
if (src.hasType())
tgt.setType(org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceType.fromCode(src.getType().toCode()));
if (src.hasCategory())
tgt.addCategory(org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceCategory.fromCode(src.getCategory().toCode()));
if (src.hasLastOccurence())
tgt.setLastOccurrence(src.getLastOccurence());
if (src.hasNote())
tgt.addNote(VersionConvertor_10_30.convertAnnotation(src.getNote()));
for (org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceReactionComponent reaction : src.getReaction())
tgt.addReaction(algReaction(reaction));
return tgt;
}
private static org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceReactionComponent algReaction(AllergyIntolerance.AllergyIntoleranceReactionComponent src) {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceReactionComponent tgt = new org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceReactionComponent();
VersionConvertor_10_30.copyElement(src, tgt);
for (org.hl7.fhir.dstu2.model.Extension extension : src.getModifierExtension()) tgt.addExtension(VersionConvertor_10_30.convertExtension(extension));
if (src.hasSubstance())
tgt.setSubstance(VersionConvertor_10_30.convertCodeableConcept(src.getSubstance()));
if (src.hasCertainty())
tgt.addExtension(new org.hl7.fhir.dstu3.model.Extension(
"http://hl7.org/fhir/AllergyIntolerance-r2-certainty",
new org.hl7.fhir.dstu3.model.StringType(src.getCertainty().toCode())
));
for (org.hl7.fhir.dstu2.model.CodeableConcept concept : src.getManifestation()) tgt.addManifestation(VersionConvertor_10_30.convertCodeableConcept(concept));
if (src.hasDescription())
src.setDescription(src.getDescription());
if (src.hasOnset())
tgt.setOnset(src.getOnset());
if (src.hasSeverity())
tgt.setSeverity(org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceSeverity.fromCode(src.getSeverity().toCode()));
if (src.hasExposureRoute())
tgt.setExposureRoute(VersionConvertor_10_30.convertCodeableConcept(src.getExposureRoute()));
if (src.hasNote())
tgt.addNote(VersionConvertor_10_30.convertAnnotation(src.getNote()));
return tgt;
}
public static org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus translateAllergyIntoleranceVerificationStatus(org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceStatus src) {
switch(src) {
case UNCONFIRMED:
case INACTIVE:
return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.UNCONFIRMED;
case CONFIRMED:
return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.CONFIRMED;
case REFUTED:
return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.REFUTED;
case ENTEREDINERROR:
return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.ENTEREDINERROR;
default:
return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.NULL;
}
}
public static org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus translateAllergyIntoleranceClinicalStatus(org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceStatus src) {
switch(src) {
case ACTIVE:
case UNCONFIRMED:
case CONFIRMED:
return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.ACTIVE;
case INACTIVE:
return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.INACTIVE;
case RESOLVED:
return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.RESOLVED;
default:
return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.NULL;
}
}
public static org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceCriticality translateAllergyIntoleranceCriticality(org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceCriticality src) {
switch(src) {
case CRITL:
return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceCriticality.LOW;
case CRITH:
return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceCriticality.HIGH;
case CRITU:
return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceCriticality.UNABLETOASSESS;
default:
return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceCriticality.NULL;
}
}
}

View File

@ -0,0 +1,95 @@
package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.dstu2.model.AllergyIntolerance;
import org.hl7.fhir.exceptions.FHIRException;
public class AllergyIntolerance10_40 {
public static org.hl7.fhir.r4.model.AllergyIntolerance convertAllergyIntolerance(org.hl7.fhir.dstu2.model.AllergyIntolerance src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.AllergyIntolerance tgt = new org.hl7.fhir.r4.model.AllergyIntolerance();
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
if (src.hasOnset())
tgt.setOnset(VersionConvertor_10_40.convertType(src.getOnsetElement()));
if (src.hasRecordedDate())
tgt.setRecordedDate(src.getRecordedDate());
if (src.hasRecorder())
tgt.setRecorder(VersionConvertor_10_40.convertReference(src.getRecorder()));
if (src.hasPatient())
tgt.setPatient(VersionConvertor_10_40.convertReference(src.getPatient()));
if (src.hasReporter())
tgt.setAsserter(VersionConvertor_10_40.convertReference(src.getReporter()));
if (src.hasSubstance())
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getSubstance()));
if (src.hasStatus()) {
if (src.getStatus() != org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceStatus.REFUTED
&& src.getStatus() != org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceStatus.ENTEREDINERROR) {
org.hl7.fhir.r4.model.Coding code = new org.hl7.fhir.r4.model.Coding();
code.setSystem("http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical");
code.setCode(src.getStatus().toCode());
tgt.setClinicalStatus(new org.hl7.fhir.r4.model.CodeableConcept(code));
}
if (src.getStatus() != org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceStatus.ACTIVE
&& src.getStatus() != org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceStatus.RESOLVED) {
org.hl7.fhir.r4.model.Coding code = new org.hl7.fhir.r4.model.Coding();
code.setSystem("http://terminology.hl7.org/CodeSystem/allergyintolerance-verification");
code.setCode(src.getStatus().toCode());
tgt.setVerificationStatus(new org.hl7.fhir.r4.model.CodeableConcept(code));
}
}
if (src.hasCriticality())
tgt.setCriticality(translateAllergyIntoleranceCriticality(src.getCriticality()));
if (src.hasType())
tgt.setType(org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceType.fromCode(src.getType().toCode()));
if (src.hasCategory())
tgt.addCategory(org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceCategory.fromCode(src.getCategory().toCode()));
if (src.hasLastOccurence())
tgt.setLastOccurrence(src.getLastOccurence());
if (src.hasNote())
tgt.addNote(VersionConvertor_10_40.convertAnnotation(src.getNote()));
for (org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceReactionComponent reaction : src.getReaction())
tgt.addReaction(algReaction(reaction));
return tgt;
}
private static org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceReactionComponent algReaction(AllergyIntolerance.AllergyIntoleranceReactionComponent src) {
if (src == null)
return null;
org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceReactionComponent tgt = new org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceReactionComponent();
VersionConvertor_10_40.copyElement(src, tgt);
for (org.hl7.fhir.dstu2.model.Extension extension : src.getModifierExtension()) tgt.addExtension(VersionConvertor_10_40.convertExtension(extension));
if (src.hasSubstance())
tgt.setSubstance(VersionConvertor_10_40.convertCodeableConcept(src.getSubstance()));
if (src.hasCertainty())
tgt.addExtension(new org.hl7.fhir.r4.model.Extension(
"http://hl7.org/fhir/AllergyIntolerance-r2-certainty",
new org.hl7.fhir.r4.model.StringType(src.getCertainty().toCode())
));
for (org.hl7.fhir.dstu2.model.CodeableConcept concept : src.getManifestation()) tgt.addManifestation(VersionConvertor_10_40.convertCodeableConcept(concept));
if (src.hasDescription())
src.setDescription(src.getDescription());
if (src.hasOnset())
tgt.setOnset(src.getOnset());
if (src.hasSeverity())
tgt.setSeverity(org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceSeverity.fromCode(src.getSeverity().toCode()));
if (src.hasExposureRoute())
tgt.setExposureRoute(VersionConvertor_10_40.convertCodeableConcept(src.getExposureRoute()));
if (src.hasNote())
tgt.addNote(VersionConvertor_10_40.convertAnnotation(src.getNote()));
return tgt;
}
public static org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceCriticality translateAllergyIntoleranceCriticality(org.hl7.fhir.dstu2.model.AllergyIntolerance.AllergyIntoleranceCriticality src) {
switch(src) {
case CRITL:
return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceCriticality.LOW;
case CRITH:
return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceCriticality.HIGH;
case CRITU:
return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceCriticality.UNABLETOASSESS;
default:
return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceCriticality.NULL;
}
}
}

View File

@ -0,0 +1,43 @@
package org.hl7.fhir.convertors.conv10_30;
import org.hl7.fhir.convertors.VersionConvertorAdvisor30;
import org.hl7.fhir.convertors.VersionConvertor_10_30;
import org.hl7.fhir.convertors.loaders.R2ToR3Loader;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import java.io.IOException;
import java.io.InputStream;
import java.util.stream.Stream;
public class AllergyIntolerance10_30Test {
private static Stream<Arguments> filesPaths() {
return Stream.of(
Arguments.of("/0_allergy_intolerance_10.json", "/0_allergy_intolerance_30.json"),
Arguments.of("/1_allergy_intolerance_10.json", "/1_allergy_intolerance_30.json")
);
}
@ParameterizedTest
@MethodSource("filesPaths")
@DisplayName("Test 10_30 AllergyIntolerance conversion")
public void testMedicationRequestConversion(String dstu2_path, String stu_path) throws IOException {
InputStream dstu2_input = this.getClass().getResourceAsStream(dstu2_path);
InputStream stu_exepected_input = this.getClass().getResourceAsStream(stu_path);
org.hl7.fhir.dstu2.model.AllergyIntolerance dstu2 = (org.hl7.fhir.dstu2.model.AllergyIntolerance) new org.hl7.fhir.dstu2.formats.JsonParser().parse(dstu2_input);
VersionConvertorAdvisor30 advisor = new R2ToR3Loader();
org.hl7.fhir.dstu3.model.Resource stu_actual = VersionConvertor_10_30.convertResource(dstu2, advisor);
org.hl7.fhir.dstu3.formats.JsonParser stu_parser = new org.hl7.fhir.dstu3.formats.JsonParser();
org.hl7.fhir.dstu3.model.Resource stu_expected = stu_parser.parse(stu_exepected_input);
Assertions.assertTrue(stu_expected.equalsDeep(stu_actual),
"Failed comparing\n" + stu_parser.composeString(stu_actual) + "\nand\n" + stu_parser.composeString(stu_expected)
);
}
}

View File

@ -0,0 +1,43 @@
package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertorAdvisor40;
import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.convertors.misc.IGR2ConvertorAdvisor;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import java.io.IOException;
import java.io.InputStream;
import java.util.stream.Stream;
public class AllergyIntolerance10_40Test {
private static Stream<Arguments> filesPaths() {
return Stream.of(
Arguments.of("/0_allergy_intolerance_10.json", "/0_allergy_intolerance_40.json"),
Arguments.of("/1_allergy_intolerance_10.json", "/1_allergy_intolerance_40.json")
);
}
@ParameterizedTest
@MethodSource("filesPaths")
@DisplayName("Test 10_40 AllergyIntolerance conversion")
public void testMedicationRequestConversion(String dstu2_path, String r4_path) throws IOException {
InputStream dstu2_input = this.getClass().getResourceAsStream(dstu2_path);
InputStream r4_exepected_input = this.getClass().getResourceAsStream(r4_path);
org.hl7.fhir.dstu2.model.AllergyIntolerance dstu2 = (org.hl7.fhir.dstu2.model.AllergyIntolerance) new org.hl7.fhir.dstu2.formats.JsonParser().parse(dstu2_input);
VersionConvertorAdvisor40 advisor = new IGR2ConvertorAdvisor();
org.hl7.fhir.r4.model.Resource r4_actual = VersionConvertor_10_40.convertResource(dstu2, advisor);
org.hl7.fhir.r4.formats.JsonParser r4_parser = new org.hl7.fhir.r4.formats.JsonParser();
org.hl7.fhir.r4.model.Resource r4_expected = r4_parser.parse(r4_exepected_input);
Assertions.assertTrue(r4_expected.equalsDeep(r4_actual),
"Failed comparing\n" + r4_parser.composeString(r4_actual) + "\nand\n" + r4_parser.composeString(r4_expected)
);
}
}

View File

@ -0,0 +1,20 @@
{"resourceType": "AllergyIntolerance",
"recordedDate": "2015-08-25T02:11:36",
"status": "confirmed",
"criticality": "CRITL",
"id": "TBwnNbrAqC0Qw5Ha7AFT-2AB",
"onset": "2012-11-07T00:00:00Z",
"recorder": {"display": "MOORE, NICK",
"reference": "https://open-ic.epic.com/Argonaut/api/FHIR/DSTU2/Practitioner/TItWfhjChtlo0pFh9nzctSQB"},
"patient": {"display": "Jason Argonaut",
"reference": "https://open-ic.epic.com/Argonaut/api/FHIR/DSTU2/Patient/Tbt3KuCY0B5PSrJvCu2j-PlK.aiHsu2xUjUM8bWpetXoB"},
"substance": {"text": "PENICILLIN G",
"coding": [{"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "7980",
"display": "PENICILLIN G"},
{"system": "http://fdasis.nlm.nih.gov",
"code": "Q42T66VG0C",
"display": "PENICILLIN G"}]},
"reaction": [{"certainty": "confirmed",
"onset": "2012-11-07T00:00:00Z",
"manifestation": [{"text": "Hives"}]}]}

View File

@ -0,0 +1,22 @@
{"resourceType": "AllergyIntolerance",
"id": "TBwnNbrAqC0Qw5Ha7AFT-2AB",
"clinicalStatus": "active",
"verificationStatus": "confirmed",
"criticality": "low",
"code": {"coding": [{"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "7980",
"display": "PENICILLIN G"},
{"system": "http://fdasis.nlm.nih.gov",
"code": "Q42T66VG0C",
"display": "PENICILLIN G"}],
"text": "PENICILLIN G"},
"patient": {"reference": "https://open-ic.epic.com/Argonaut/api/FHIR/DSTU2/Patient/Tbt3KuCY0B5PSrJvCu2j-PlK.aiHsu2xUjUM8bWpetXoB",
"display": "Jason Argonaut"},
"onsetDateTime": "2012-11-07T00:00:00",
"assertedDate": "2015-08-25T02:11:36",
"recorder": {"reference": "https://open-ic.epic.com/Argonaut/api/FHIR/DSTU2/Practitioner/TItWfhjChtlo0pFh9nzctSQB",
"display": "MOORE, NICK"},
"reaction": [{"extension": [{"url": "http://hl7.org/fhir/AllergyIntolerance-r2-certainty",
"valueString": "confirmed"}],
"manifestation": [{"text": "Hives"}],
"onset": "2012-11-07T00:00:00"}]}

View File

@ -0,0 +1,23 @@
{"resourceType": "AllergyIntolerance",
"clinicalStatus": {"coding": [{"system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
"code": "confirmed"}]},
"verificationStatus": {"coding": [{"system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
"code": "confirmed"}]},
"criticality": "low",
"code": {"coding": [{"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "7980",
"display": "PENICILLIN G"},
{"system": "http://fdasis.nlm.nih.gov",
"code": "Q42T66VG0C",
"display": "PENICILLIN G"}],
"text": "PENICILLIN G"},
"patient": {"reference": "https://open-ic.epic.com/Argonaut/api/FHIR/DSTU2/Patient/Tbt3KuCY0B5PSrJvCu2j-PlK.aiHsu2xUjUM8bWpetXoB",
"display": "Jason Argonaut"},
"onsetDateTime": "2012-11-07T00:00:00Z",
"recordedDate": "2015-08-25T02:11:36",
"recorder": {"reference": "https://open-ic.epic.com/Argonaut/api/FHIR/DSTU2/Practitioner/TItWfhjChtlo0pFh9nzctSQB",
"display": "MOORE, NICK"},
"reaction": [{"extension": [{"url": "http://hl7.org/fhir/AllergyIntolerance-r2-certainty",
"valueString": "confirmed"}],
"manifestation": [{"text": "Hives"}],
"onset": "2012-11-07T00:00:00"}]}

View File

@ -0,0 +1,20 @@
{"resourceType": "AllergyIntolerance",
"recordedDate": "2015-11-07T22:56:34",
"status": "confirmed",
"criticality": "CRITH",
"id": "TKebKfLXzu6Sp.LY-IpvpmQB",
"onset": "2014-03-07T00:00:00Z",
"recorder": {"display": "MOORE, NICK",
"reference": "https://open-ic.epic.com/Argonaut/api/FHIR/DSTU2/Practitioner/TItWfhjChtlo0pFh9nzctSQB"},
"patient": {"display": "Jason Argonaut",
"reference": "https://open-ic.epic.com/Argonaut/api/FHIR/DSTU2/Patient/Tbt3KuCY0B5PSrJvCu2j-PlK.aiHsu2xUjUM8bWpetXoB"},
"substance": {"text": "STRAWBERRY",
"coding": [{"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "892484",
"display": "STRAWBERRY"},
{"system": "http://fdasis.nlm.nih.gov",
"code": "4J2TY8Y81V",
"display": "STRAWBERRY"}]},
"reaction": [{"certainty": "confirmed",
"onset": "2014-03-07T00:00:00Z",
"manifestation": [{"text": "Anaphylaxis"}]}]}

View File

@ -0,0 +1,22 @@
{"resourceType": "AllergyIntolerance",
"id": "TKebKfLXzu6Sp.LY-IpvpmQB",
"clinicalStatus": "active",
"verificationStatus": "confirmed",
"criticality": "high",
"code": {"coding": [{"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "892484",
"display": "STRAWBERRY"},
{"system": "http://fdasis.nlm.nih.gov",
"code": "4J2TY8Y81V",
"display": "STRAWBERRY"}],
"text": "STRAWBERRY"},
"patient": {"reference": "https://open-ic.epic.com/Argonaut/api/FHIR/DSTU2/Patient/Tbt3KuCY0B5PSrJvCu2j-PlK.aiHsu2xUjUM8bWpetXoB",
"display": "Jason Argonaut"},
"onsetDateTime": "2014-03-07T00:00:00",
"assertedDate": "2015-11-07T22:56:34",
"recorder": {"reference": "https://open-ic.epic.com/Argonaut/api/FHIR/DSTU2/Practitioner/TItWfhjChtlo0pFh9nzctSQB",
"display": "MOORE, NICK"},
"reaction": [{"extension": [{"url": "http://hl7.org/fhir/AllergyIntolerance-r2-certainty",
"valueString": "confirmed"}],
"manifestation": [{"text": "Anaphylaxis"}],
"onset": "2014-03-07T00:00:00"}]}

View File

@ -0,0 +1,23 @@
{"resourceType": "AllergyIntolerance",
"clinicalStatus": {"coding": [{"system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
"code": "confirmed"}]},
"verificationStatus": {"coding": [{"system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
"code": "confirmed"}]},
"criticality": "high",
"code": {"coding": [{"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "892484",
"display": "STRAWBERRY"},
{"system": "http://fdasis.nlm.nih.gov",
"code": "4J2TY8Y81V",
"display": "STRAWBERRY"}],
"text": "STRAWBERRY"},
"patient": {"reference": "https://open-ic.epic.com/Argonaut/api/FHIR/DSTU2/Patient/Tbt3KuCY0B5PSrJvCu2j-PlK.aiHsu2xUjUM8bWpetXoB",
"display": "Jason Argonaut"},
"onsetDateTime": "2014-03-07T00:00:00Z",
"recordedDate": "2015-11-07T22:56:34",
"recorder": {"reference": "https://open-ic.epic.com/Argonaut/api/FHIR/DSTU2/Practitioner/TItWfhjChtlo0pFh9nzctSQB",
"display": "MOORE, NICK"},
"reaction": [{"extension": [{"url": "http://hl7.org/fhir/AllergyIntolerance-r2-certainty",
"valueString": "confirmed"}],
"manifestation": [{"text": "Anaphylaxis"}],
"onset": "2014-03-07T00:00:00"}]}