Search in sources :

Example 21 with PartySelf

use of com.nedap.archie.rm.generic.PartySelf in project openEHR_SDK by ehrbase.

the class TestData method buildBodyTemperature2.

private static BodyTemperatureObservation buildBodyTemperature2() {
    BodyTemperatureObservation bodyTemperature = new BodyTemperatureObservation();
    bodyTemperature.setLanguage(Language.DE);
    bodyTemperature.setSubject(new PartySelf());
    bodyTemperature.setOriginValue(OffsetDateTime.now());
    bodyTemperature.setAnyEvent(new ArrayList<>());
    BodyTemperatureLocationOfMeasurementDvText locationOfMeasurement = new BodyTemperatureLocationOfMeasurementDvText();
    locationOfMeasurement.setLocationOfMeasurementValue("location");
    bodyTemperature.setLocationOfMeasurement(locationOfMeasurement);
    BodyTemperatureAnyEventPointEvent history1 = new BodyTemperatureAnyEventPointEvent();
    history1.setTemperatureMagnitude(22d);
    history1.setTemperatureUnits("Cel");
    history1.setCurrentDayOfMenstrualCycleMagnitude(3l);
    history1.setTimeValue(OffsetDateTime.now());
    bodyTemperature.getAnyEvent().add(history1);
    BodyTemperatureAnyEventPointEvent history2 = new BodyTemperatureAnyEventPointEvent();
    history2.setTemperatureMagnitude(11d);
    history2.setTemperatureUnits("Cel");
    history2.setCurrentDayOfMenstrualCycleMagnitude(3l);
    history2.setTimeValue(OffsetDateTime.now());
    bodyTemperature.getAnyEvent().add(history2);
    return bodyTemperature;
}
Also used : BodyTemperatureObservation(org.ehrbase.client.classgenerator.examples.ehrbasemultioccurrencedev1composition.definition.BodyTemperatureObservation) BodyTemperatureLocationOfMeasurementDvText(org.ehrbase.client.classgenerator.examples.ehrbasemultioccurrencedev1composition.definition.BodyTemperatureLocationOfMeasurementDvText) BodyTemperatureAnyEventPointEvent(org.ehrbase.client.classgenerator.examples.ehrbasemultioccurrencedev1composition.definition.BodyTemperatureAnyEventPointEvent) PartySelf(com.nedap.archie.rm.generic.PartySelf)

Example 22 with PartySelf

use of com.nedap.archie.rm.generic.PartySelf in project openEHR_SDK by ehrbase.

the class TestData method buildBodyTemperature1.

private static BodyTemperatureObservation buildBodyTemperature1() {
    BodyTemperatureObservation bodyTemperature = new BodyTemperatureObservation();
    bodyTemperature.setLanguage(Language.DE);
    bodyTemperature.setSubject(new PartySelf());
    bodyTemperature.setOriginValue(OffsetDateTime.now());
    bodyTemperature.setAnyEvent(new ArrayList<>());
    BodyTemperatureLocationOfMeasurementDvCodedText locationOfMeasurement = new BodyTemperatureLocationOfMeasurementDvCodedText();
    locationOfMeasurement.setLocationOfMeasurementDefiningCode(org.ehrbase.client.classgenerator.examples.ehrbasemultioccurrencedev1composition.definition.LocationOfMeasurementDefiningCode.FOREHEAD);
    bodyTemperature.setLocationOfMeasurement(locationOfMeasurement);
    BodyTemperatureAnyEventPointEvent history1 = new BodyTemperatureAnyEventPointEvent();
    history1.setTemperatureMagnitude(22d);
    history1.setTemperatureUnits("Cel");
    history1.setCurrentDayOfMenstrualCycleMagnitude(3l);
    history1.setTimeValue(OffsetDateTime.now());
    bodyTemperature.getAnyEvent().add(history1);
    BodyTemperatureAnyEventPointEvent history2 = new BodyTemperatureAnyEventPointEvent();
    history2.setTemperatureMagnitude(11d);
    history2.setTemperatureUnits("Cel");
    history2.setCurrentDayOfMenstrualCycleMagnitude(3l);
    history2.setTimeValue(OffsetDateTime.now());
    bodyTemperature.getAnyEvent().add(history2);
    return bodyTemperature;
}
Also used : BodyTemperatureLocationOfMeasurementDvCodedText(org.ehrbase.client.classgenerator.examples.ehrbasemultioccurrencedev1composition.definition.BodyTemperatureLocationOfMeasurementDvCodedText) BodyTemperatureObservation(org.ehrbase.client.classgenerator.examples.ehrbasemultioccurrencedev1composition.definition.BodyTemperatureObservation) BodyTemperatureAnyEventPointEvent(org.ehrbase.client.classgenerator.examples.ehrbasemultioccurrencedev1composition.definition.BodyTemperatureAnyEventPointEvent) PartySelf(com.nedap.archie.rm.generic.PartySelf)

Example 23 with PartySelf

use of com.nedap.archie.rm.generic.PartySelf in project openEHR_SDK by ehrbase.

the class TestData method buildTestStationarerVersorgungsfallComposition.

public static StationarerVersorgungsfallComposition buildTestStationarerVersorgungsfallComposition() {
    StationarerVersorgungsfallComposition stationarerVersorgungsfallComposition = new StationarerVersorgungsfallComposition();
    stationarerVersorgungsfallComposition.setComposer(new PartyIdentified(null, "Test", null));
    stationarerVersorgungsfallComposition.setCategoryDefiningCode(Category.EVENT);
    stationarerVersorgungsfallComposition.setLanguage(Language.DE);
    stationarerVersorgungsfallComposition.setTerritory(Territory.DE);
    // context
    stationarerVersorgungsfallComposition.setStartTimeValue(new DvDateTime("2020-04-02T12:00:00Z").getValue());
    stationarerVersorgungsfallComposition.setSettingDefiningCode(Setting.NURSING_HOME_CARE);
    // other_context
    stationarerVersorgungsfallComposition.setFalltypDefiningCode(FalltypDefiningCode.VERSORGUNGSFALL);
    stationarerVersorgungsfallComposition.setFallKennungValue("45657678");
    // openEHR-EHR-ADMIN_ENTRY.admission.v0
    AufnahmedatenAdminEntry aufnahmedatenAdminEntry = new AufnahmedatenAdminEntry();
    aufnahmedatenAdminEntry.setDatumUhrzeitDerAufnahmeValue(new DvDateTime("2020-04-02T12:00:00Z").getValue());
    aufnahmedatenAdminEntry.setLanguage(Language.DE);
    aufnahmedatenAdminEntry.setSubject(new PartySelf());
    // openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0
    EntlassungsdatenAdminEntry entlassungsdatenAdminEntry = new EntlassungsdatenAdminEntry();
    entlassungsdatenAdminEntry.setLanguage(Language.DE);
    entlassungsdatenAdminEntry.setSubject(new PartySelf());
    entlassungsdatenAdminEntry.setKlinischerZustandDesPatientenDefiningCode(KlinischerZustandDesPatientenDefiningCode.UNBESTIMMT);
    entlassungsdatenAdminEntry.setDatumUhrzeitDerEntlassungValue(new DvDateTime("2020-04-02T12:00:00Z").getValue());
    // assemble
    stationarerVersorgungsfallComposition.setAufnahmedaten(aufnahmedatenAdminEntry);
    stationarerVersorgungsfallComposition.setEntlassungsdaten(entlassungsdatenAdminEntry);
    return stationarerVersorgungsfallComposition;
}
Also used : StationarerVersorgungsfallComposition(org.ehrbase.client.classgenerator.examples.stationarerversorgungsfallcomposition.StationarerVersorgungsfallComposition) PartyIdentified(com.nedap.archie.rm.generic.PartyIdentified) AufnahmedatenAdminEntry(org.ehrbase.client.classgenerator.examples.stationarerversorgungsfallcomposition.definition.AufnahmedatenAdminEntry) EntlassungsdatenAdminEntry(org.ehrbase.client.classgenerator.examples.stationarerversorgungsfallcomposition.definition.EntlassungsdatenAdminEntry) DvDateTime(com.nedap.archie.rm.datavalues.quantity.datetime.DvDateTime) PartySelf(com.nedap.archie.rm.generic.PartySelf)

Example 24 with PartySelf

use of com.nedap.archie.rm.generic.PartySelf in project openEHR_SDK by ehrbase.

the class TestData method buildAlternativeEventsComposition.

public static AlternativeEventsComposition buildAlternativeEventsComposition() {
    AlternativeEventsComposition alternativeEventsComposition = new AlternativeEventsComposition();
    alternativeEventsComposition.setStartTimeValue(OffsetDateTime.of(2010, 11, 02, 12, 00, 00, 00, ZoneOffset.UTC));
    alternativeEventsComposition.setComposer(new PartyIdentified(null, "Test", null));
    alternativeEventsComposition.setLanguage(Language.EN);
    alternativeEventsComposition.setTerritory(Territory.DE);
    alternativeEventsComposition.setCategoryDefiningCode(Category.EVENT);
    alternativeEventsComposition.setSettingDefiningCode(Setting.COMPLEMENTARY_HEALTH_CARE);
    alternativeEventsComposition.setKorpergewicht(new ArrayList<>());
    KorpergewichtObservation korpergewichtObservation = new KorpergewichtObservation();
    korpergewichtObservation.setLanguage(Language.EN);
    korpergewichtObservation.setSubject(new PartySelf());
    korpergewichtObservation.setOriginValue(OffsetDateTime.of(1990, 11, 02, 12, 00, 00, 00, ZoneOffset.UTC));
    alternativeEventsComposition.getKorpergewicht().add(korpergewichtObservation);
    KorpergewichtBirthEnPointEvent birthEnEvent = new KorpergewichtBirthEnPointEvent();
    birthEnEvent.setGewichtMagnitude(30d);
    birthEnEvent.setGewichtUnits("kg");
    birthEnEvent.setTimeValue(OffsetDateTime.of(1990, 11, 02, 12, 00, 00, 00, ZoneOffset.UTC));
    korpergewichtObservation.setBirthEn(birthEnEvent);
    korpergewichtObservation.setAnyEventEn(new ArrayList<>());
    KorpergewichtAnyEventEnPointEvent pointEvent = new KorpergewichtAnyEventEnPointEvent();
    pointEvent.setGewichtMagnitude(55d);
    pointEvent.setGewichtUnits("kg");
    pointEvent.setTimeValue(OffsetDateTime.of(2013, 11, 02, 12, 00, 00, 00, ZoneOffset.UTC));
    korpergewichtObservation.getAnyEventEn().add(pointEvent);
    KorpergewichtAnyEventEnIntervalEvent intervalEvent = new KorpergewichtAnyEventEnIntervalEvent();
    intervalEvent.setGewichtMagnitude(60d);
    intervalEvent.setGewichtUnits("kg");
    intervalEvent.setTimeValue(OffsetDateTime.of(2015, 11, 02, 12, 00, 00, 00, ZoneOffset.UTC));
    intervalEvent.setWidthValue(Duration.ofDays(30));
    intervalEvent.setMathFunctionDefiningCode(MathFunction.MEAN);
    korpergewichtObservation.getAnyEventEn().add(intervalEvent);
    return alternativeEventsComposition;
}
Also used : KorpergewichtObservation(org.ehrbase.client.classgenerator.examples.alternativeeventscomposition.definition.KorpergewichtObservation) PartyIdentified(com.nedap.archie.rm.generic.PartyIdentified) KorpergewichtBirthEnPointEvent(org.ehrbase.client.classgenerator.examples.alternativeeventscomposition.definition.KorpergewichtBirthEnPointEvent) KorpergewichtAnyEventEnIntervalEvent(org.ehrbase.client.classgenerator.examples.alternativeeventscomposition.definition.KorpergewichtAnyEventEnIntervalEvent) KorpergewichtAnyEventEnPointEvent(org.ehrbase.client.classgenerator.examples.alternativeeventscomposition.definition.KorpergewichtAnyEventEnPointEvent) AlternativeEventsComposition(org.ehrbase.client.classgenerator.examples.alternativeeventscomposition.AlternativeEventsComposition) PartySelf(com.nedap.archie.rm.generic.PartySelf)

Example 25 with PartySelf

use of com.nedap.archie.rm.generic.PartySelf in project openEHR_SDK by ehrbase.

the class TestData method buildGeccoSerologischerBefundComposition.

public static GECCOSerologischerBefundComposition buildGeccoSerologischerBefundComposition() {
    GECCOSerologischerBefundComposition composition = new GECCOSerologischerBefundComposition();
    composition.setLanguage(Language.DE);
    composition.setTerritory(Territory.DE);
    composition.setCategoryDefiningCode(Category.EVENT);
    composition.setSettingDefiningCode(Setting.NURSING_HOME_CARE);
    composition.setComposer(new PartyIdentified(null, "Test", null));
    composition.setStartTimeValue(OffsetDateTime.of(2019, 04, 03, 22, 00, 00, 00, ZoneOffset.UTC));
    composition.setParticipations(new ArrayList<>());
    composition.setBefund(new ArrayList<>());
    var befundObservation = new org.ehrbase.client.classgenerator.examples.geccoserologischerbefundcomposition.definition.BefundObservation();
    composition.getBefund().add(befundObservation);
    befundObservation.setSubject(new PartySelf());
    befundObservation.setJedesEreignis(new ArrayList<>());
    befundObservation.setLanguage(Language.DE);
    befundObservation.setAnforderungDefiningCode(AnforderungDefiningCode.SARS_COV2_COVID19_AB_PANEL_SERUM_OR_PLASMA_BY_IMMUNOASSAY);
    befundObservation.setOriginValue(OffsetDateTime.of(2019, 04, 03, 22, 00, 00, 00, ZoneOffset.UTC));
    BefundJedesEreignisPointEvent event = new BefundJedesEreignisPointEvent();
    event.setTimeValue(OffsetDateTime.of(2019, 04, 03, 22, 00, 00, 00, ZoneOffset.UTC));
    event.setErgebnisStatusValue("registered");
    event.setLabortestBezeichnungDefiningCode(LabortestBezeichnungDefiningCode.SEROLOGIC_TEST_PROCEDURE);
    event.setVirusnachweistestDefiningCode(VirusnachweistestDefiningCode.SARS_COV2_COVID19_AB_PRESENCE_IN_SERUM_OR_PLASMA_BY_IMMUNOASSAY);
    befundObservation.getJedesEreignis().add(event);
    ProAnalytQuantitativesErgebnisDvCount quantitativesErgebnis = new ProAnalytQuantitativesErgebnisDvCount();
    quantitativesErgebnis.setQuantitativesErgebnisMagnitude(22l);
    event.setQuantitativesErgebnis(quantitativesErgebnis);
    return composition;
}
Also used : GECCOSerologischerBefundComposition(org.ehrbase.client.classgenerator.examples.geccoserologischerbefundcomposition.GECCOSerologischerBefundComposition) BefundJedesEreignisPointEvent(org.ehrbase.client.classgenerator.examples.geccoserologischerbefundcomposition.definition.BefundJedesEreignisPointEvent) BefundObservation(org.ehrbase.client.classgenerator.examples.virologischerbefundcomposition.definition.BefundObservation) PartyIdentified(com.nedap.archie.rm.generic.PartyIdentified) ProAnalytQuantitativesErgebnisDvCount(org.ehrbase.client.classgenerator.examples.geccoserologischerbefundcomposition.definition.ProAnalytQuantitativesErgebnisDvCount) PartySelf(com.nedap.archie.rm.generic.PartySelf)

Aggregations

PartySelf (com.nedap.archie.rm.generic.PartySelf)29 DvText (com.nedap.archie.rm.datavalues.DvText)9 EhrStatus (com.nedap.archie.rm.ehr.EhrStatus)9 PartyIdentified (com.nedap.archie.rm.generic.PartyIdentified)8 PartyRef (com.nedap.archie.rm.support.identification.PartyRef)8 HierObjectId (com.nedap.archie.rm.support.identification.HierObjectId)7 UUID (java.util.UUID)5 Test (org.junit.Test)4 DvDateTime (com.nedap.archie.rm.datavalues.quantity.datetime.DvDateTime)3 URI (java.net.URI)3 ItemTree (com.nedap.archie.rm.datastructures.ItemTree)2 DvCodedText (com.nedap.archie.rm.datavalues.DvCodedText)2 DvIdentifier (com.nedap.archie.rm.datavalues.DvIdentifier)2 GenericId (com.nedap.archie.rm.support.identification.GenericId)2 BodyTemperatureAnyEventPointEvent (org.ehrbase.client.classgenerator.examples.ehrbasemultioccurrencedev1composition.definition.BodyTemperatureAnyEventPointEvent)2 BodyTemperatureObservation (org.ehrbase.client.classgenerator.examples.ehrbasemultioccurrencedev1composition.definition.BodyTemperatureObservation)2 VirologischerBefundComposition (org.ehrbase.client.classgenerator.examples.virologischerbefundcomposition.VirologischerBefundComposition)2 ProVirusCluster (org.ehrbase.client.classgenerator.examples.virologischerbefundcomposition.definition.ProVirusCluster)2 DefaultValuePath (org.ehrbase.serialisation.walker.defaultvalues.DefaultValuePath)2 DefaultValues (org.ehrbase.serialisation.walker.defaultvalues.DefaultValues)2