Stream: german (d-a-ch)
Topic: Tutorial HL7 Jahrestagung
Simone Heckmann (Oct 10 2018 at 08:07):
Thread zum Austausch zwischen den Teilnehmern des Tutorials....
Alexander Kley (Oct 10 2018 at 08:55):
Hallo Simone, vielen Dank, tolle Einführung in FHIR. Das war eine schöner Wiedereinstieg in FHIR, nach 3 Jahren Abstinenz :-)
Dominik Buggenhagen (Oct 10 2018 at 10:02):
Klasse erste Session hoffentlich wird die zweite genauso Informativ :smiley:
Simone Heckmann (Oct 10 2018 at 10:18):
<Patient xmlns="http://hl7.org/fhir"> ... </Patient>
Simone Heckmann (Oct 10 2018 at 10:35):
<Patient xmlns="http://hl7.org/fhir"> <name> <family value="Heckmann"/> <given value="Simone"/> </name> <gender value="female"/> <birthDate value="1980-00-02"/> <maritalStatus> <coding> <system value="http://hl7.org/fhir/v3/NullFlavor"/> <code value="UNK"/> <display value="unknown"/> </coding> <coding> <system value="http://mydomain/ValueSets/personenstand"/> <code value="W"/> <display value="weissnich"/> </coding> </maritalStatus> </Patient>
Simone Heckmann (Oct 10 2018 at 10:37):
http://fhir.hl7.de:8080/baseDstu3/Patient
Simone Heckmann (Oct 10 2018 at 10:50):
profile value="http://fhir.de/StructureDefinition/medikationsplanplus/patient"/>
Simone Heckmann (Oct 10 2018 at 10:59):
Extension am Nachnamen:
<family value="Heckmann"> <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-name"> <valueString value="Heckmann"/> </extension> </family>
Patrick Werner (Oct 10 2018 at 11:48):
private static void erzeugeFhirContext() {
ctx = FhirContext.forDstu3();
String serverUrl = "http://fhir.hl7.de:8080/baseDstu3";
client = ctx.newRestfulGenericClient(serverUrl);
}
Simone Heckmann (Oct 10 2018 at 11:50):
Nebenbei: Wem beim Arbeiten mit dem MedikationsplanPlus-Profil irgendetwas seltsam vorkommt: Hier geht's zum Issue-Tracker:
Jeder, der/die einen GitHub Account hat, kann Issues erstellen: https://github.com/hl7germany/medikationsplanplusplus/issues
Patrick Werner (Oct 10 2018 at 12:01):
private static Patient patientenErzeugen() { String identSystem = getIdentSystem(); String identValue = "RickSanchez"; Patient patient = new Patient(); patient.addName().setFamily("Sanchez").addGiven("Rick"); patient.addIdentifier().setSystem(identSystem).setValue(identValue); patient.addAddress().setCity("Berlin").addLine("Am Lützowufer 12"); patient.setGender(AdministrativeGender.MALE); Date date = Date.from(LocalDate.of(1947, 1, 15).atStartOfDay(ZoneId.systemDefault()).toInstant()); patient.setBirthDate(date); validateResource(patient); // System.out.println(ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient)); MethodOutcome outcome = client.create().resource(patient).conditional().where(Patient.IDENTIFIER.exactly() .systemAndIdentifier(identSystem, identValue)).execute(); String id = outcome.getId().getValue(); patient.setId(id); String stringXmlPat = ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); System.out.println(outcome.getCreated()); System.out.println(stringXmlPat); return patient; }
Patrick Werner (Oct 10 2018 at 12:08):
private static void suchePatientenMitNamen() { Bundle result = client.search().forResource(Patient.class).where(Patient.NAME.matches().value("Sanchez")) .returnBundle(Bundle.class).execute(); System.out.println("found: " + result.getEntry().size()); Patient patient = (Patient) result.getEntryFirstRep().getResource(); System.out.println(patient.getNameFirstRep().getNameAsSingleString()); }
Patrick Werner (Oct 10 2018 at 12:53):
private static List<Medication> erzeugeMedikation() { // WEGEN SERVER EINSTELLUNG!!!!! ourPatient.setId(IdDt.newRandomUuid()); List<Medication> medications = new ArrayList<>(); Medication ass = (Medication) ctx.newXmlParser().parseResource(XMLTemplate.ASS_XML_MEDICATION); ass.setId(IdDt.newRandomUuid()); medications.add(ass); //TODO: Erzeuge eine Medication Resource für: IBUFLAM 400MG LICHTENSTEIN, PZN 6313361, Tablette, ATC Code: M01AE01 Medication ibu = new Medication(); ibu.getCode().addCoding().setCode("6313361").setSystem("http://fhir.de/CodeSystem/ifa/pzn"); ibu.getForm().addCoding().setCode("TAB").setSystem("http://hl7.org/fhir/v3/orderableDrugForm"); CodeableConcept ingredientConcept = new CodeableConcept(); ingredientConcept.addCoding().setCode("M01AE01").setSystem("http://www.whocc.no/atc"); ibu.addIngredient().setItem(ingredientConcept); // ACHTUNG NPE!!! //ibu.addIngredient().getItemCodeableConcept().addCoding().setCode("M01AE01").setSystem("http://www.whocc.no/atc"); ibu.getIngredientFirstRep().getAmount().getNumerator().setValue(400).setSystem("http://unitsofmeasure.org").setCode("mg"); ibu.getIngredientFirstRep().getAmount().getDenominator().setValue(1) .setSystem("http://hl7.org/fhir/v3/orderableDrugForm").setCode("TAB"); ibu.setId(IdDt.newRandomUuid()); medications.add(ibu); return medications; }
Patrick Werner (Oct 10 2018 at 18:32):
Kleiner Nachtrag meinerseits, den NullPointer dem man mittels getItemCodeableConcept provozieren konnte ist kein Problem von HAPI, sondern der FHIR Referenz Java Objekte.
Patrick Werner (Oct 10 2018 at 18:45):
hier habe ich es angesprochen:
https://chat.fhir.org/#narrow/stream/9-committers/subject/Java.20item.5Bx.5D.3A.20avoiding.20returning.20null
Christof Gessner (Oct 10 2018 at 19:45):
:thumbs_up:
Alexander Kley (Oct 11 2018 at 06:21):
@Patrick Werner könntest du bitte noch die Klasse, die wir gestern im Workshop bearbeitet haben in den Chat stellen. Danke
Last updated: Apr 12 2022 at 19:14 UTC