네트워크/HL7 FHIR

[HL7 FHIR API] 3. Location (Ward)

IT 기술자 2024. 11. 22. 11:00

Create

[POST] http://192.168.1.100:8080/fhir/Location
Request
Body/Json

{
  "resourceType": "Location",
  "identifier": [
    {
      "value": "ward2"
    }
  ],
  "status": "active",
  "name": "제2병동",
  "mode": "instance",
  "physicalType": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
        "code" : "wa",
        "display" : "Ward"
      }
    ]
  },
  "partOf" : {
    "reference": "Location/2"
  },
  "managingOrganization": {
    "reference": "Organization/1"
  }
}

Response
Status: 201 Created

{
  "resourceType": "Location",
  "id": "3",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2022-08-19T05:46:44.908+00:00"
  },
  "identifier": [
    {
      "value": "ward2"
    }
  ],
  "status": "active",
  "name": "제2병동",
  "mode": "instance",
  "physicalType": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
        "code": "wa",
        "display": "Ward"
      }
    ]
  },
  "managingOrganization": {
    "reference": "Organization/1"
  },
  "partOf": {
    "reference": "Location/2"
  }
}

 

Read

[GET] http://192.168.1.100:8080/fhir/Location/[id]
Response
Status: 200 OK

{
  "resourceType": "Location",
  "id": "3",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2022-08-19T05:46:44.908+00:00",
    "source": "#IHiLHT3UcVxy1NgY"
  },
  "identifier": [
    {
      "value": "ward2"
    }
  ],
  "status": "active",
  "name": "제2병동",
  "mode": "instance",
  "physicalType": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
        "code": "wa",
        "display": "Ward"
      }
    ]
  },
  "managingOrganization": {
    "reference": "Organization/1"
  },
  "partOf": {
    "reference": "Location/2"
  }
}