eHealth Infrastructure
2.4.0 - release

Publish Box goes here

Resource Profile: ehealth-relatedperson - Examples

Examples for the ehealth-relatedperson Profile:

  • relatedperson01
  • StructureDefinition: ehealth-relatedperson - Operation examples

    POST [base]/RelatedPerson

    Header

    Accept-Charset: utf-8
    Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
    User-Agent: HAPI-FHIR/5.5.0 (FHIR Client; FHIR 4.0.1/R4; apache)
    Accept-Encoding: gzip
    Content-Type: application/fhir+json; charset=UTF-8
    

    Body:

    {
      "resourceType" : "RelatedPerson",
      "meta" : {
        "profile" : [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson" ]
      },
      "extension" : [ {
        "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient-contactnote",
        "valueString" : "This is a contact note"
      } ],
      "patient" : {
        "reference" : "https://patient.fut.trifork.com/fhir/Patient/179103"
      },
      "name" : [ {
        "use" : "official",
        "family" : "Test",
        "given" : [ "RelatedPerson" ]
      } ],
      "address" : [ {
        "extension" : [ {
          "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-municipality-code",
          "valueCoding" : {
            "system" : "http://danmarksadresser.dk/kommunekode",
            "code" : "0101"
          }
        }, {
          "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-regional-subdivision-code",
          "valueCodeableConcept" : {
            "coding" : [ {
              "system" : "https://www.iso.org/obp/ui/#iso:code:3166:DK",
              "code" : "DK-85"
            } ]
          }
        } ],
        "use" : "home",
        "line" : [ "Mønsgade 20 5. tv" ],
        "city" : "Aarhus",
        "postalCode" : "8000",
        "country" : "Danmark"
      } ]
    }
    

    Response

    {
      "resourceType" : "RelatedPerson",
      "id" : "180822",
      "meta" : {
        "versionId" : "1",
        "lastUpdated" : "2021-09-09T07:08:55.691+00:00",
        "profile" : [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson" ]
      },
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><table class=\"hapiPropertyTable\"><tbody><tr><td>Name</td><td><span>RelatedPerson Test</span></td></tr><tr><td>Related to patient</td><td><span>Patient/179103</span></td></tr></tbody></table></div>"
      },
      "extension" : [ {
        "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient-contactnote",
        "valueString" : "This is a contact note"
      } ],
      "patient" : {
        "reference" : "https://patient.fut.trifork.com/fhir/Patient/179103"
      },
      "name" : [ {
        "use" : "official",
        "family" : "Test",
        "given" : [ "RelatedPerson" ]
      } ],
      "address" : [ {
        "extension" : [ {
          "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-municipality-code",
          "valueCoding" : {
            "system" : "http://danmarksadresser.dk/kommunekode",
            "code" : "0101"
          }
        }, {
          "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-regional-subdivision-code",
          "valueCodeableConcept" : {
            "coding" : [ {
              "system" : "https://www.iso.org/obp/ui/#iso:code:3166:DK",
              "code" : "DK-85"
            } ]
          }
        } ],
        "use" : "home",
        "line" : [ "Mønsgade 20 5. tv" ],
        "city" : "Aarhus",
        "postalCode" : "8000",
        "country" : "Danmark"
      } ]
    }
    

    PUT [base]/RelatedPerson/180822

    Header

    Accept-Charset: utf-8
    If-Match: "1"
    Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
    User-Agent: HAPI-FHIR/5.5.0 (FHIR Client; FHIR 4.0.1/R4; apache)
    Accept-Encoding: gzip
    Content-Type: application/fhir+json; charset=UTF-8
    

    Body:

    {
      "resourceType" : "RelatedPerson",
      "id" : "180822",
      "meta" : {
        "versionId" : "1",
        "lastUpdated" : "2021-09-09T07:08:55.691+00:00",
        "profile" : [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson" ]
      },
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><table class=\"hapiPropertyTable\"><tbody><tr><td>Name</td><td><span>RelatedPerson Test</span></td></tr><tr><td>Related to patient</td><td><span>Patient/179103</span></td></tr></tbody></table></div>"
      },
      "extension" : [ {
        "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient-contactnote",
        "valueString" : "new contact note"
      } ],
      "patient" : {
        "reference" : "https://patient.fut.trifork.com/fhir/Patient/179103"
      },
      "name" : [ {
        "use" : "official",
        "family" : "Test",
        "given" : [ "RelatedPerson" ]
      } ],
      "address" : [ {
        "extension" : [ {
          "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-municipality-code",
          "valueCoding" : {
            "system" : "http://danmarksadresser.dk/kommunekode",
            "code" : "0101"
          }
        }, {
          "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-regional-subdivision-code",
          "valueCodeableConcept" : {
            "coding" : [ {
              "system" : "https://www.iso.org/obp/ui/#iso:code:3166:DK",
              "code" : "DK-85"
            } ]
          }
        } ],
        "use" : "home",
        "line" : [ "Mønsgade 20 5. tv" ],
        "city" : "Aarhus",
        "postalCode" : "8000",
        "country" : "Danmark"
      } ]
    }
    

    Response

    {
      "resourceType" : "RelatedPerson",
      "id" : "180822",
      "meta" : {
        "versionId" : "2",
        "lastUpdated" : "2021-09-09T07:08:56.336+00:00",
        "profile" : [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson" ]
      },
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><table class=\"hapiPropertyTable\"><tbody><tr><td>Name</td><td><span>RelatedPerson Test</span></td></tr><tr><td>Related to patient</td><td><span>Patient/179103</span></td></tr></tbody></table></div>"
      },
      "extension" : [ {
        "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient-contactnote",
        "valueString" : "new contact note"
      } ],
      "patient" : {
        "reference" : "https://patient.fut.trifork.com/fhir/Patient/179103"
      },
      "name" : [ {
        "use" : "official",
        "family" : "Test",
        "given" : [ "RelatedPerson" ]
      } ],
      "address" : [ {
        "extension" : [ {
          "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-municipality-code",
          "valueCoding" : {
            "system" : "http://danmarksadresser.dk/kommunekode",
            "code" : "0101"
          }
        }, {
          "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-regional-subdivision-code",
          "valueCodeableConcept" : {
            "coding" : [ {
              "system" : "https://www.iso.org/obp/ui/#iso:code:3166:DK",
              "code" : "DK-85"
            } ]
          }
        } ],
        "use" : "home",
        "line" : [ "Mønsgade 20 5. tv" ],
        "city" : "Aarhus",
        "postalCode" : "8000",
        "country" : "Danmark"
      } ]
    }
    

    PATCH [base]/RelatedPerson/180822

    Header

    Accept-Charset: utf-8
    Accept: application/fhir+xml;q=1.0, application/fhir+json;q=1.0, application/xml+fhir;q=0.9, application/json+fhir;q=0.9
    User-Agent: HAPI-FHIR/5.5.0 (FHIR Client; FHIR 4.0.1/R4; apache)
    Accept-Encoding: gzip
    Content-Type: application/json-patch+json; charset=UTF-8
    

    Body:

    [ {
      "op" : "add",
      "path" : "/extension",
      "value" : [ {
        "valueString" : "patch contact note",
        "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient-contactnote"
      } ]
    } ]
    

    Response

    {
      "resourceType" : "RelatedPerson",
      "id" : "180822",
      "meta" : {
        "versionId" : "3",
        "lastUpdated" : "2021-09-09T07:08:56.874+00:00",
        "source" : "#c7c52539-151d-40",
        "profile" : [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson" ]
      },
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><table class=\"hapiPropertyTable\"><tbody><tr><td>Name</td><td><span>RelatedPerson Test</span></td></tr><tr><td>Related to patient</td><td><span>Patient/179103</span></td></tr></tbody></table></div>"
      },
      "extension" : [ {
        "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient-contactnote",
        "valueString" : "patch contact note"
      } ],
      "patient" : {
        "reference" : "https://patient.fut.trifork.com/fhir/Patient/179103"
      },
      "name" : [ {
        "use" : "official",
        "family" : "Test",
        "given" : [ "RelatedPerson" ]
      } ],
      "address" : [ {
        "extension" : [ {
          "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-municipality-code",
          "valueCoding" : {
            "system" : "http://danmarksadresser.dk/kommunekode",
            "code" : "0101"
          }
        }, {
          "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-regional-subdivision-code",
          "valueCodeableConcept" : {
            "coding" : [ {
              "system" : "https://www.iso.org/obp/ui/#iso:code:3166:DK",
              "code" : "DK-85"
            } ]
          }
        } ],
        "use" : "home",
        "line" : [ "Mønsgade 20 5. tv" ],
        "city" : "Aarhus",
        "postalCode" : "8000",
        "country" : "Danmark"
      } ]
    }
    

    GET [base]/RelatedPerson?patient=https%3A%2F%2Fpatient.fut.trifork.com%2Ffhir%2FPatient%2F179103&_sort=-_id

    Header

    Accept-Charset: utf-8
    Accept: application/fhir+xml;q=1.0, application/fhir+json;q=1.0, application/xml+fhir;q=0.9, application/json+fhir;q=0.9
    User-Agent: HAPI-FHIR/5.5.0 (FHIR Client; FHIR 4.0.1/R4; apache)
    Accept-Encoding: gzip
    

    Body:

    
    

    Response

    {
      "resourceType" : "Bundle",
      "id" : "acc3d3a9-e5af-458f-80dc-2bf5b83f93ad",
      "meta" : {
        "lastUpdated" : "2021-09-09T07:08:57.468+00:00"
      },
      "type" : "searchset",
      "total" : 1,
      "link" : [ {
        "relation" : "self",
        "url" : "https://patient.fut.trifork.com/fhir/RelatedPerson?_sort=-_id&patient=https%3A%2F%2Fpatient.fut.trifork.com%2Ffhir%2FPatient%2F179103&patient=Patient%2F179103"
      } ],
      "entry" : [ {
        "fullUrl" : "https://patient.fut.trifork.com/fhir/RelatedPerson/180822",
        "resource" : {
          "resourceType" : "RelatedPerson",
          "id" : "180822",
          "meta" : {
            "versionId" : "3",
            "lastUpdated" : "2021-09-09T07:08:56.874+00:00",
            "source" : "#8c0ac329-0f6b-4f",
            "profile" : [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson" ]
          },
          "text" : {
            "status" : "generated",
            "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><table class=\"hapiPropertyTable\"><tbody><tr><td>Name</td><td><span>RelatedPerson Test</span></td></tr><tr><td>Related to patient</td><td><span>Patient/179103</span></td></tr></tbody></table></div>"
          },
          "extension" : [ {
            "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient-contactnote",
            "valueString" : "patch contact note"
          } ],
          "patient" : {
            "reference" : "https://patient.fut.trifork.com/fhir/Patient/179103"
          },
          "name" : [ {
            "use" : "official",
            "family" : "Test",
            "given" : [ "RelatedPerson" ]
          } ],
          "address" : [ {
            "extension" : [ {
              "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-municipality-code",
              "valueCoding" : {
                "system" : "http://danmarksadresser.dk/kommunekode",
                "code" : "0101"
              }
            }, {
              "url" : "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-regional-subdivision-code",
              "valueCodeableConcept" : {
                "coding" : [ {
                  "system" : "https://www.iso.org/obp/ui/#iso:code:3166:DK",
                  "code" : "DK-85"
                } ]
              }
            } ],
            "use" : "home",
            "line" : [ "Mønsgade 20 5. tv" ],
            "city" : "Aarhus",
            "postalCode" : "8000",
            "country" : "Danmark"
          } ]
        },
        "search" : {
          "mode" : "match"
        }
      } ]
    }
    

    DELETE [base]/RelatedPerson/180822

    Header

    Accept-Charset: utf-8
    Accept: application/fhir+xml;q=1.0, application/fhir+json;q=1.0, application/xml+fhir;q=0.9, application/json+fhir;q=0.9
    User-Agent: HAPI-FHIR/5.5.0 (FHIR Client; FHIR 4.0.1/R4; apache)
    Accept-Encoding: gzip
    

    Body:

    
    

    Response

    {
      "resourceType" : "OperationOutcome",
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 30ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
      },
      "issue" : [ {
        "severity" : "information",
        "code" : "informational",
        "diagnostics" : "Successfully deleted 1 resource(s) in 30ms"
      } ]
    }