Search in sources :

Example 26 with Bundle

use of ca.uhn.fhir.model.dstu2.resource.Bundle in project synthea by synthetichealth.

the class FhirPractitionerExporterDstu2 method export.

/**
 * Export the practitioner in FHIR DSTU2 format.
 */
public static void export(long stop) {
    if (Config.getAsBoolean("exporter.practitioner.fhir_dstu2.export")) {
        Bundle bundle = new Bundle();
        if (Config.getAsBoolean("exporter.fhir.transaction_bundle")) {
            bundle.setType(BundleTypeEnum.BATCH);
        } else {
            bundle.setType(BundleTypeEnum.COLLECTION);
        }
        for (Provider h : Provider.getProviderList()) {
            // filter - exports only those hospitals in use
            Table<Integer, String, AtomicInteger> utilization = h.getUtilization();
            int totalEncounters = utilization.column(Provider.ENCOUNTERS).values().stream().mapToInt(ai -> ai.get()).sum();
            if (totalEncounters > 0) {
                Map<String, ArrayList<Clinician>> clinicians = h.clinicianMap;
                for (String specialty : clinicians.keySet()) {
                    ArrayList<Clinician> docs = clinicians.get(specialty);
                    for (Clinician doc : docs) {
                        if (doc.getEncounterCount() > 0) {
                            Entry entry = FhirDstu2.practitioner(bundle, doc);
                            Practitioner practitioner = (Practitioner) entry.getResource();
                            ExtensionDt extension = new ExtensionDt();
                            extension.setUrl(EXTENSION_URI);
                            extension.setValue(new IntegerDt(doc.getEncounterCount()));
                            practitioner.addUndeclaredExtension(extension);
                        }
                    }
                }
            }
        }
        String bundleJson = FhirDstu2.getContext().newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle);
        // get output folder
        List<String> folders = new ArrayList<>();
        folders.add("fhir_dstu2");
        String baseDirectory = Config.get("exporter.baseDirectory");
        File f = Paths.get(baseDirectory, folders.toArray(new String[0])).toFile();
        f.mkdirs();
        Path outFilePath = f.toPath().resolve("practitionerInformation" + stop + ".json");
        try {
            Files.write(outFilePath, Collections.singleton(bundleJson), StandardOpenOption.CREATE_NEW);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
Also used : Config(org.mitre.synthea.helpers.Config) Files(java.nio.file.Files) Clinician(org.mitre.synthea.world.agents.Clinician) ExtensionDt(ca.uhn.fhir.model.api.ExtensionDt) IntegerDt(ca.uhn.fhir.model.primitive.IntegerDt) StandardOpenOption(java.nio.file.StandardOpenOption) IOException(java.io.IOException) Bundle(ca.uhn.fhir.model.dstu2.resource.Bundle) File(java.io.File) BundleTypeEnum(ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum) ArrayList(java.util.ArrayList) Provider(org.mitre.synthea.world.agents.Provider) List(java.util.List) Entry(ca.uhn.fhir.model.dstu2.resource.Bundle.Entry) Practitioner(ca.uhn.fhir.model.dstu2.resource.Practitioner) Paths(java.nio.file.Paths) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) Table(com.google.common.collect.Table) Path(java.nio.file.Path) Collections(java.util.Collections) Path(java.nio.file.Path) IntegerDt(ca.uhn.fhir.model.primitive.IntegerDt) Bundle(ca.uhn.fhir.model.dstu2.resource.Bundle) ArrayList(java.util.ArrayList) IOException(java.io.IOException) Provider(org.mitre.synthea.world.agents.Provider) Clinician(org.mitre.synthea.world.agents.Clinician) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Practitioner(ca.uhn.fhir.model.dstu2.resource.Practitioner) Entry(ca.uhn.fhir.model.dstu2.resource.Bundle.Entry) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) File(java.io.File) ExtensionDt(ca.uhn.fhir.model.api.ExtensionDt)

Example 27 with Bundle

use of ca.uhn.fhir.model.dstu2.resource.Bundle in project synthea by synthetichealth.

the class CodeResolveAndExportTest method verifyEncounterCodeStu3.

private void verifyEncounterCodeStu3() throws IOException {
    InputStream inputStream = new FileInputStream(stu3OutputPath.toFile().getAbsolutePath());
    Bundle bundle = (Bundle) FhirStu3.getContext().newJsonParser().parseResource(inputStream);
    // Find encounter reason code.
    Optional<BundleEntryComponent> maybeEncounterEntry = bundle.getEntry().stream().filter(entry -> entry.getResource().getResourceType().equals(ResourceType.Encounter)).findFirst();
    assertTrue(maybeEncounterEntry.isPresent());
    org.hl7.fhir.dstu3.model.Encounter encounterResource = (org.hl7.fhir.dstu3.model.Encounter) maybeEncounterEntry.get().getResource();
    assertEquals(encounterResource.getReason().size(), 1);
    CodeableConcept encounterReason = encounterResource.getReason().get(0);
    assertEquals(encounterReason.getCoding().size(), 1);
    Coding reasonCoding = encounterReason.getCoding().get(0);
    // Check encounter reason code.
    assertEquals(SNOMED_URI, reasonCoding.getSystem());
    assertEquals(EXPECTED_REASON_CODE, reasonCoding.getCode());
    assertEquals(EXPECTED_REASON_DISPLAY, reasonCoding.getDisplay());
    Optional<BundleEntryComponent> maybeObservationEntry = bundle.getEntry().stream().filter(entry -> entry.getResource().getResourceType().equals(ResourceType.Observation)).findFirst();
    assertTrue(maybeObservationEntry.isPresent());
    // Find observation type code.
    org.hl7.fhir.dstu3.model.Observation observationResource = (org.hl7.fhir.dstu3.model.Observation) maybeObservationEntry.get().getResource();
    CodeableConcept observationType = observationResource.getCode();
    assertNotNull(observationType);
    assertEquals(observationType.getCoding().size(), 1);
    Coding observationTypeCoding = observationType.getCoding().get(0);
    // Check observation type code.
    assertEquals(LOINC_URI, observationTypeCoding.getSystem());
    assertEquals(OBSERVATION_CODE, observationTypeCoding.getCode());
    assertEquals(OBSERVATION_DISPLAY, observationTypeCoding.getDisplay());
    // Find observation value code.
    CodeableConcept observationValue = observationResource.getValueCodeableConcept();
    assertNotNull(observationValue);
    assertEquals(observationValue.getCoding().size(), 1);
    Coding observationValueCoding = observationValue.getCoding().get(0);
    // Check observation value code.
    assertEquals(LOINC_URI, observationValueCoding.getSystem());
    assertEquals(EXPECTED_VALUE_CODE, observationValueCoding.getCode());
    assertEquals(EXPECTED_VALUE_DISPLAY, observationValueCoding.getDisplay());
    inputStream.close();
}
Also used : TestHelper.years(org.mitre.synthea.TestHelper.years) Arrays(java.util.Arrays) XPathExpressionException(javax.xml.xpath.XPathExpressionException) Location(org.mitre.synthea.world.geography.Location) Bundle(org.hl7.fhir.dstu3.model.Bundle) BundleEntryComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent) Coding(org.hl7.fhir.dstu3.model.Coding) CodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept) Person(org.mitre.synthea.world.agents.Person) Document(org.w3c.dom.Document) After(org.junit.After) Path(java.nio.file.Path) Encounter(org.mitre.synthea.world.concepts.HealthRecord.Encounter) RestTemplate(org.springframework.web.client.RestTemplate) RandomCodeGenerator(org.mitre.synthea.helpers.RandomCodeGenerator) List(java.util.List) SAXException(org.xml.sax.SAXException) LOINC_URI(org.mitre.synthea.TestHelper.LOINC_URI) Optional(java.util.Optional) TestHelper(org.mitre.synthea.TestHelper) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) EncounterType(org.mitre.synthea.world.concepts.HealthRecord.EncounterType) XPath(javax.xml.xpath.XPath) XPathConstants(javax.xml.xpath.XPathConstants) SimpleDateFormat(java.text.SimpleDateFormat) TestHelper.isHttpRecordingEnabled(org.mitre.synthea.TestHelper.isHttpRecordingEnabled) XPathExpression(javax.xml.xpath.XPathExpression) Generator(org.mitre.synthea.engine.Generator) CodingDt(ca.uhn.fhir.model.dstu2.composite.CodingDt) WireMock(com.github.tomakehurst.wiremock.client.WireMock) CodeableConceptDt(ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt) WireMockRule(com.github.tomakehurst.wiremock.junit.WireMockRule) ResourceType(org.hl7.fhir.dstu3.model.ResourceType) Node(org.w3c.dom.Node) Code(org.mitre.synthea.world.concepts.HealthRecord.Code) LOINC_OID(org.mitre.synthea.TestHelper.LOINC_OID) Before(org.junit.Before) TestHelper.wiremockOptions(org.mitre.synthea.TestHelper.wiremockOptions) Config(org.mitre.synthea.helpers.Config) NodeList(org.w3c.dom.NodeList) Assert.assertNotNull(org.junit.Assert.assertNotNull) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) FileInputStream(java.io.FileInputStream) Payer(org.mitre.synthea.world.agents.Payer) File(java.io.File) Provider(org.mitre.synthea.world.agents.Provider) SNOMED_URI(org.mitre.synthea.TestHelper.SNOMED_URI) XPathFactory(javax.xml.xpath.XPathFactory) Rule(org.junit.Rule) Entry(ca.uhn.fhir.model.dstu2.resource.Bundle.Entry) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) DocumentBuilder(javax.xml.parsers.DocumentBuilder) ProviderTest(org.mitre.synthea.world.agents.ProviderTest) Assert.assertEquals(org.junit.Assert.assertEquals) TestHelper.getTxRecordingSource(org.mitre.synthea.TestHelper.getTxRecordingSource) InputStream(java.io.InputStream) FileInputStream(java.io.FileInputStream) InputStream(java.io.InputStream) Bundle(org.hl7.fhir.dstu3.model.Bundle) FileInputStream(java.io.FileInputStream) BundleEntryComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent) Coding(org.hl7.fhir.dstu3.model.Coding) Encounter(org.mitre.synthea.world.concepts.HealthRecord.Encounter) CodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept)

Example 28 with Bundle

use of ca.uhn.fhir.model.dstu2.resource.Bundle in project synthea by synthetichealth.

the class CodeResolveAndExportTest method verifyEncounterCodeR4.

private void verifyEncounterCodeR4() throws IOException {
    InputStream inputStream = new FileInputStream(r4OutputPath.toFile().getAbsolutePath());
    org.hl7.fhir.r4.model.Bundle bundle = (org.hl7.fhir.r4.model.Bundle) FhirR4.getContext().newJsonParser().parseResource(inputStream);
    // Find encounter reason code.
    Optional<org.hl7.fhir.r4.model.Bundle.BundleEntryComponent> maybeEncounterEntry = bundle.getEntry().stream().filter(entry -> entry.getResource().getResourceType().equals(org.hl7.fhir.r4.model.ResourceType.Encounter)).findFirst();
    assertTrue(maybeEncounterEntry.isPresent());
    org.hl7.fhir.r4.model.Encounter encounterResource = (org.hl7.fhir.r4.model.Encounter) maybeEncounterEntry.get().getResource();
    assertEquals(encounterResource.getReasonCode().size(), 1);
    org.hl7.fhir.r4.model.CodeableConcept encounterReason = encounterResource.getReasonCode().get(0);
    assertEquals(encounterReason.getCoding().size(), 1);
    org.hl7.fhir.r4.model.Coding reasonCoding = encounterReason.getCoding().get(0);
    // Check encounter reason code.
    assertEquals(SNOMED_URI, reasonCoding.getSystem());
    assertEquals(EXPECTED_REASON_CODE, reasonCoding.getCode());
    assertEquals(EXPECTED_REASON_DISPLAY, reasonCoding.getDisplay());
    Optional<org.hl7.fhir.r4.model.Bundle.BundleEntryComponent> maybeObservationEntry = bundle.getEntry().stream().filter(entry -> entry.getResource().getResourceType().equals(org.hl7.fhir.r4.model.ResourceType.Observation)).findFirst();
    assertTrue(maybeObservationEntry.isPresent());
    // Find observation type code.
    org.hl7.fhir.r4.model.Observation observationResource = (org.hl7.fhir.r4.model.Observation) maybeObservationEntry.get().getResource();
    org.hl7.fhir.r4.model.CodeableConcept observationType = observationResource.getCode();
    assertNotNull(observationType);
    assertEquals(observationType.getCoding().size(), 1);
    org.hl7.fhir.r4.model.Coding observationTypeCoding = observationType.getCoding().get(0);
    // Check observation type code.
    assertEquals(LOINC_URI, observationTypeCoding.getSystem());
    assertEquals(OBSERVATION_CODE, observationTypeCoding.getCode());
    assertEquals(OBSERVATION_DISPLAY, observationTypeCoding.getDisplay());
    // Find observation value code.
    org.hl7.fhir.r4.model.CodeableConcept observationValue = observationResource.getValueCodeableConcept();
    assertNotNull(observationValue);
    assertEquals(observationValue.getCoding().size(), 1);
    org.hl7.fhir.r4.model.Coding observationValueCoding = observationValue.getCoding().get(0);
    // Check observation value code.
    assertEquals(LOINC_URI, observationValueCoding.getSystem());
    assertEquals(EXPECTED_VALUE_CODE, observationValueCoding.getCode());
    assertEquals(EXPECTED_VALUE_DISPLAY, observationValueCoding.getDisplay());
    inputStream.close();
}
Also used : TestHelper.years(org.mitre.synthea.TestHelper.years) Arrays(java.util.Arrays) XPathExpressionException(javax.xml.xpath.XPathExpressionException) Location(org.mitre.synthea.world.geography.Location) Bundle(org.hl7.fhir.dstu3.model.Bundle) BundleEntryComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent) Coding(org.hl7.fhir.dstu3.model.Coding) CodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept) Person(org.mitre.synthea.world.agents.Person) Document(org.w3c.dom.Document) After(org.junit.After) Path(java.nio.file.Path) Encounter(org.mitre.synthea.world.concepts.HealthRecord.Encounter) RestTemplate(org.springframework.web.client.RestTemplate) RandomCodeGenerator(org.mitre.synthea.helpers.RandomCodeGenerator) List(java.util.List) SAXException(org.xml.sax.SAXException) LOINC_URI(org.mitre.synthea.TestHelper.LOINC_URI) Optional(java.util.Optional) TestHelper(org.mitre.synthea.TestHelper) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) EncounterType(org.mitre.synthea.world.concepts.HealthRecord.EncounterType) XPath(javax.xml.xpath.XPath) XPathConstants(javax.xml.xpath.XPathConstants) SimpleDateFormat(java.text.SimpleDateFormat) TestHelper.isHttpRecordingEnabled(org.mitre.synthea.TestHelper.isHttpRecordingEnabled) XPathExpression(javax.xml.xpath.XPathExpression) Generator(org.mitre.synthea.engine.Generator) CodingDt(ca.uhn.fhir.model.dstu2.composite.CodingDt) WireMock(com.github.tomakehurst.wiremock.client.WireMock) CodeableConceptDt(ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt) WireMockRule(com.github.tomakehurst.wiremock.junit.WireMockRule) ResourceType(org.hl7.fhir.dstu3.model.ResourceType) Node(org.w3c.dom.Node) Code(org.mitre.synthea.world.concepts.HealthRecord.Code) LOINC_OID(org.mitre.synthea.TestHelper.LOINC_OID) Before(org.junit.Before) TestHelper.wiremockOptions(org.mitre.synthea.TestHelper.wiremockOptions) Config(org.mitre.synthea.helpers.Config) NodeList(org.w3c.dom.NodeList) Assert.assertNotNull(org.junit.Assert.assertNotNull) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) FileInputStream(java.io.FileInputStream) Payer(org.mitre.synthea.world.agents.Payer) File(java.io.File) Provider(org.mitre.synthea.world.agents.Provider) SNOMED_URI(org.mitre.synthea.TestHelper.SNOMED_URI) XPathFactory(javax.xml.xpath.XPathFactory) Rule(org.junit.Rule) Entry(ca.uhn.fhir.model.dstu2.resource.Bundle.Entry) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) DocumentBuilder(javax.xml.parsers.DocumentBuilder) ProviderTest(org.mitre.synthea.world.agents.ProviderTest) Assert.assertEquals(org.junit.Assert.assertEquals) TestHelper.getTxRecordingSource(org.mitre.synthea.TestHelper.getTxRecordingSource) InputStream(java.io.InputStream) FileInputStream(java.io.FileInputStream) InputStream(java.io.InputStream) Bundle(org.hl7.fhir.dstu3.model.Bundle) FileInputStream(java.io.FileInputStream) BundleEntryComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent) Encounter(org.mitre.synthea.world.concepts.HealthRecord.Encounter)

Example 29 with Bundle

use of ca.uhn.fhir.model.dstu2.resource.Bundle in project synthea by synthetichealth.

the class FHIRDSTU2ExporterTest method testSampledDataExport.

@Test
public void testSampledDataExport() throws Exception {
    Person person = new Person(0L);
    person.attributes.put(Person.GENDER, "F");
    person.attributes.put(Person.FIRST_LANGUAGE, "spanish");
    person.attributes.put(Person.RACE, "other");
    person.attributes.put(Person.ETHNICITY, "hispanic");
    person.attributes.put(Person.INCOME, Integer.parseInt(Config.get("generate.demographics.socioeconomic.income.poverty")) * 2);
    person.attributes.put(Person.OCCUPATION_LEVEL, 1.0);
    person.history = new LinkedList<>();
    Provider mock = Mockito.mock(Provider.class);
    Mockito.when(mock.getResourceID()).thenReturn("Mock-UUID");
    person.setProvider(EncounterType.AMBULATORY, mock);
    person.setProvider(EncounterType.WELLNESS, mock);
    person.setProvider(EncounterType.EMERGENCY, mock);
    person.setProvider(EncounterType.INPATIENT, mock);
    Long time = System.currentTimeMillis();
    int age = 35;
    long birthTime = time - Utilities.convertTime("years", age);
    person.attributes.put(Person.BIRTHDATE, birthTime);
    Payer.loadNoInsurance();
    for (int i = 0; i < age; i++) {
        long yearTime = time - Utilities.convertTime("years", i);
        person.coverage.setPayerAtTime(yearTime, Payer.noInsurance);
    }
    Module module = TestHelper.getFixture("observation.json");
    State encounter = module.getState("SomeEncounter");
    assertTrue(encounter.process(person, time));
    person.history.add(encounter);
    State physiology = module.getState("Simulate_CVS");
    assertTrue(physiology.process(person, time));
    person.history.add(physiology);
    State sampleObs = module.getState("SampledDataObservation");
    assertTrue(sampleObs.process(person, time));
    person.history.add(sampleObs);
    FhirContext ctx = FhirDstu2.getContext();
    IParser parser = ctx.newJsonParser().setPrettyPrint(true);
    String fhirJson = FhirDstu2.convertToFHIRJson(person, System.currentTimeMillis());
    Bundle bundle = parser.parseResource(Bundle.class, fhirJson);
    for (Entry entry : bundle.getEntry()) {
        if (entry.getResource() instanceof Observation) {
            Observation obs = (Observation) entry.getResource();
            assertTrue(obs.getValue() instanceof SampledDataDt);
            SampledDataDt data = (SampledDataDt) obs.getValue();
            // 0.01s == 10ms
            assertEquals(10, data.getPeriod().doubleValue(), 0.001);
            assertEquals(3, (int) data.getDimensions());
        }
    }
}
Also used : FhirContext(ca.uhn.fhir.context.FhirContext) Bundle(ca.uhn.fhir.model.dstu2.resource.Bundle) Provider(org.mitre.synthea.world.agents.Provider) Entry(ca.uhn.fhir.model.dstu2.resource.Bundle.Entry) SampledDataDt(ca.uhn.fhir.model.dstu2.composite.SampledDataDt) State(org.mitre.synthea.engine.State) Observation(ca.uhn.fhir.model.dstu2.resource.Observation) Module(org.mitre.synthea.engine.Module) Person(org.mitre.synthea.world.agents.Person) IParser(ca.uhn.fhir.parser.IParser) Test(org.junit.Test)

Example 30 with Bundle

use of ca.uhn.fhir.model.dstu2.resource.Bundle in project synthea by synthetichealth.

the class FHIRDSTU2ExporterTest method testFHIRDSTU2Export.

@Test
public void testFHIRDSTU2Export() throws Exception {
    TestHelper.loadTestProperties();
    Generator.DEFAULT_STATE = Config.get("test_state.default", "Massachusetts");
    Config.set("exporter.baseDirectory", tempFolder.newFolder().toString());
    FhirContext ctx = FhirDstu2.getContext();
    IParser parser = ctx.newJsonParser().setPrettyPrint(true);
    FhirValidator validator = ctx.newValidator();
    validator.setValidateAgainstStandardSchema(true);
    validator.setValidateAgainstStandardSchematron(true);
    List<String> errors = ParallelTestingService.runInParallel((person) -> {
        List<String> validationErrors = new ArrayList<String>();
        Config.set("exporter.fhir_dstu2.export", "true");
        FhirDstu2.TRANSACTION_BUNDLE = person.randBoolean();
        String fhirJson = FhirDstu2.convertToFHIRJson(person, System.currentTimeMillis());
        // (these should have been converted into URIs)
        if (fhirJson.contains("SNOMED-CT")) {
            validationErrors.add("JSON contains unconverted references to 'SNOMED-CT' (should be URIs)");
        }
        // let's crack open the Bundle and validate
        // each individual entry.resource to get context-sensitive error
        // messages...
        Bundle bundle = parser.parseResource(Bundle.class, fhirJson);
        for (Entry entry : bundle.getEntry()) {
            ValidationResult eresult = validator.validateWithResult(entry.getResource());
            if (!eresult.isSuccessful()) {
                for (SingleValidationMessage emessage : eresult.getMessages()) {
                    if (emessage.getMessage().contains("start SHALL have a lower value than end")) {
                        continue;
                    }
                    System.out.println(parser.encodeResourceToString(entry.getResource()));
                    System.out.println("ERROR: " + emessage.getMessage());
                    validationErrors.add(emessage.getMessage());
                }
            }
            if (entry.getResource() instanceof DiagnosticReport) {
                DiagnosticReport report = (DiagnosticReport) entry.getResource();
                if (report.getPerformer().isEmpty()) {
                    validationErrors.add("Performer is a required field on DiagnosticReport!");
                }
            }
        }
        if (!validationErrors.isEmpty()) {
            Exporter.export(person, System.currentTimeMillis());
        }
        return validationErrors;
    });
    assertTrue("Validation of exported FHIR bundle failed: " + String.join("|", errors), errors.size() == 0);
}
Also used : FhirContext(ca.uhn.fhir.context.FhirContext) Entry(ca.uhn.fhir.model.dstu2.resource.Bundle.Entry) SingleValidationMessage(ca.uhn.fhir.validation.SingleValidationMessage) Bundle(ca.uhn.fhir.model.dstu2.resource.Bundle) ArrayList(java.util.ArrayList) DiagnosticReport(org.hl7.fhir.dstu3.model.DiagnosticReport) FhirValidator(ca.uhn.fhir.validation.FhirValidator) ValidationResult(ca.uhn.fhir.validation.ValidationResult) IParser(ca.uhn.fhir.parser.IParser) Test(org.junit.Test)

Aggregations

Bundle (ca.uhn.fhir.model.dstu2.resource.Bundle)37 Entry (ca.uhn.fhir.model.dstu2.resource.Bundle.Entry)34 Date (java.util.Date)20 ResourceReferenceDt (ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt)18 ArrayList (java.util.ArrayList)16 CodeableConceptDt (ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt)15 IBaseBundle (org.hl7.fhir.instance.model.api.IBaseBundle)15 Code (org.mitre.synthea.world.concepts.HealthRecord.Code)15 HashMap (java.util.HashMap)11 GET (javax.ws.rs.GET)11 Path (javax.ws.rs.Path)11 Produces (javax.ws.rs.Produces)11 Condition (ca.uhn.fhir.model.dstu2.resource.Condition)10 Encounter (org.mitre.synthea.world.concepts.HealthRecord.Encounter)9 CodingDt (ca.uhn.fhir.model.dstu2.composite.CodingDt)8 JsonObject (javax.json.JsonObject)8 Provider (org.mitre.synthea.world.agents.Provider)8 Observation (ca.uhn.fhir.model.dstu2.resource.Observation)7 Patient (ca.uhn.fhir.model.dstu2.resource.Patient)7 DateTimeDt (ca.uhn.fhir.model.primitive.DateTimeDt)7