Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleCreation of a patient (Java) using defined operation using the HAPI FHIR client framework
	    Parameters in = new Parameters();
	    in.addParameter().setName("crn").setValue(new Identifier().setSystem("urn:oid:1.2.208.176.1.2").setValue("2810887020"));
	    in.addParameter().setName("managingOrganization").setValue(new Reference("http://inttest.ehealth.sundhed.dk/organization/fhir/Organization/1"));
	    in.addParameter().setName("policy").setValue(new UriType().setValue("https://danskelove.dk/sundhedsloven"));

	    Parameters result = client.operation().onType(Patient.class).named("createPatient")
	    	    .withParameters(in).execute();

...

Code Block
languagexml
titleIntended HTTP server response
HTTP/1.1 200
status: 200
Date: Wed, 20 Feb 2019 09:00:35 GMT
X-Powered-By: Trifork
Content-Type: application/fhir+xml;charset=utf-8
Content-Encoding: gzip
Transfer-Encoding: chunked
Server: Jetty(9.4.14.v20181114)
<Parameters xmlns="http://hl7.org/fhir">
    <parameter>
        <resource>
            <Patient xmlns="http://hl7.org/fhir">
				<id value="9952"/>
				<meta>
                    <versionId value="1"/>
                    <lastUpdated value="2019-03-29T11:22:34.053+01:00"/>
                    <profile value="http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient"/>
                </meta>
                <text>...</text>
                <identifier>
                    <system value="urn:oid:1.2.208.176.1.2"/>
                    <value value="2810887020"/>
                </identifier>
                <name>
                    <family value="Møller"/>
                    <given value="Anne"/>
                    <given value="Holm"/>
                </name>
                <birthDate value="1988-10-28"/>
                <address>
                    <extension url="http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-municipality-code">
                        <valueCoding>
                            <system value="urn:oid:1.2.208.176.8.1.100"/>
                            <code value="370"/>
                            <display value="Næstved"/>
                        </valueCoding>
                    </extension>
                    <use value="home"/>
                    <type value="postal"/>
                    <line value="Bjergagervej 110"/>
                    <city value="Karrebæksminde"/>
                    <postalCode value="4736"/>
                    <country value="DK"/>
                </address>
                <generalPractitioner>
                    <identifier>
                        <system value="urn:oid:1.2.208.176.1.4"/>
                        <value value="12345"/>
                    </identifier>
                </generalPractitioner>
                <managingOrganization>
                    <reference value="http://inttest.ehealth.sundhed.dk/organization/fhir/Organization/1"/>
                </managingOrganization>generalPractitioner>
            </Patient>
        </resource>
    </parameter>
</Parameters>

...