use of com.nedap.archie.rm.generic.PartyIdentified in project openEHR_SDK by ehrbase.
the class PartyIdentifiedStdConfig method buildChildValues.
/**
* {@inheritDoc}
*/
@Override
public Map<String, Object> buildChildValues(String currentTerm, PartyIdentified rmObject, Context<Map<String, Object>> context) {
Map<String, Object> result = new HashMap<>();
addValue(result, currentTerm, "name", rmObject.getName());
addValue(result, currentTerm, "id", Optional.of(rmObject).map(PartyProxy::getExternalRef).map(ObjectRef::getId).map(ObjectId::getValue).orElse(null));
addValue(result, currentTerm, "id_namespace", Optional.of(rmObject).map(PartyProxy::getExternalRef).map(ObjectRef::getNamespace).orElse(null));
GenericId genericId = Optional.of(rmObject).map(PartyProxy::getExternalRef).map(ObjectRef::getId).filter(i -> i.getClass().equals(GenericId.class)).map(i -> (GenericId) i).orElse(null);
if (genericId != null) {
addValue(result, currentTerm, "id_scheme", genericId.getScheme());
}
if (rmObject.getIdentifiers() != null) {
IntStream.range(0, rmObject.getIdentifiers().size()).forEach(i -> result.putAll(DV_IDENTIFIER_CONFIG.buildChildValues(currentTerm + "/_identifier:" + i, rmObject.getIdentifiers().get(i), context)));
}
return result;
}
use of com.nedap.archie.rm.generic.PartyIdentified 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;
}
use of com.nedap.archie.rm.generic.PartyIdentified 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;
}
use of com.nedap.archie.rm.generic.PartyIdentified 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;
}
use of com.nedap.archie.rm.generic.PartyIdentified in project openEHR_SDK by ehrbase.
the class TestData method buildEpisodeOfCareComposition.
public static EpisodeOfCareComposition buildEpisodeOfCareComposition() {
EpisodeOfCareComposition episode = new EpisodeOfCareComposition();
episode.setComposer(new PartyIdentified(null, "Test", null));
episode.setCategoryDefiningCode(Category.EVENT);
episode.setLanguage(Language.DE);
episode.setTerritory(Territory.DE);
episode.setEpisodeofcare(new ArrayList<>());
episode.setStartTimeValue(OffsetDateTime.now());
episode.setSettingDefiningCode(Setting.NURSING_HOME_CARE);
FeederAudit audit = new FeederAudit();
audit.setFeederSystemAudit(new FeederAuditDetails());
audit.getFeederSystemAudit().setSystemId("System 1");
audit.setOriginatingSystemAudit(new FeederAuditDetails());
audit.getOriginatingSystemAudit().setSystemId("System 2");
episode.setFeederAudit(audit);
EpisodeofcareAdminEntry episodeofcareAdminEntry = new EpisodeofcareAdminEntry();
episodeofcareAdminEntry.setUpperValue(OffsetDateTime.now());
episodeofcareAdminEntry.setLowerValue(OffsetDateTime.now());
episodeofcareAdminEntry.setLanguage(Language.DE);
episodeofcareAdminEntry.setSubject(new PartySelf());
episodeofcareAdminEntry.setIdentifier(new ArrayList<>());
EpisodeofcareIdentifierElement identifierElement = new EpisodeofcareIdentifierElement();
DvIdentifier value = new DvIdentifier();
value.setId("123");
identifierElement.setValue(value);
episodeofcareAdminEntry.getIdentifier().add(identifierElement);
EpisodeofcareIdentifierElement identifierElement2 = new EpisodeofcareIdentifierElement();
DvIdentifier value2 = new DvIdentifier();
value2.setId("456");
identifierElement2.setValue(value2);
episodeofcareAdminEntry.getIdentifier().add(identifierElement2);
episodeofcareAdminEntry.setTeam(new ArrayList<>());
EpisodeofcareTeamElement teamElement1 = new EpisodeofcareTeamElement();
teamElement1.setValue(URI.create("https://github.com/ehrbase"));
episodeofcareAdminEntry.getTeam().add(teamElement1);
episode.getEpisodeofcare().add(episodeofcareAdminEntry);
return episode;
}
Aggregations