eHealth Infrastructure (v2019.5)

StructureDefinition: ehealth-careteam - Operation examples

DELETE [base]/CareTeam/3809

Header

Accept-Charset: utf-8
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/3.7.0 (FHIR Client; FHIR 3.0.1/DSTU3; apache)
Accept-Encoding: gzip

Response

{
  "resourceType": "OperationOutcome",
  "text": {
    "status": "generated",
    "div": "\u003cdiv xmlns\u003d\"http://www.w3.org/1999/xhtml\"\u003e\u003ch1\u003eOperation Outcome\u003c/h1\u003e\u003ctable border\u003d\"0\"\u003e\u003ctr\u003e\u003ctd style\u003d\"font-weight: bold;\"\u003eINFORMATION\u003c/td\u003e\u003ctd\u003e[]\u003c/td\u003e\u003ctd\u003e\u003cpre\u003eSuccessfully deleted 1 resource(s) in 19ms\u003c/pre\u003e\u003c/td\u003e\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\u003c/tr\u003e\n\t\t\u003c/table\u003e\n\t\u003c/div\u003e"
  },
  "issue": [
    {
      "severity": "information",
      "code": "informational",
      "diagnostics": "Successfully deleted 1 resource(s) in 19ms"
    }
  ]
}

GET [base]/CareTeam?patient=Patient%2F3810

Header

Accept-Charset: utf-8
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/3.7.0 (FHIR Client; FHIR 3.0.1/DSTU3; apache)
Accept-Encoding: gzip

Response

{
  "resourceType": "Bundle",
  "id": "7b3a4290-7f48-4395-9d11-0b01e7a02ccb",
  "meta": {
    "lastUpdated": "2019-03-11T13:26:22.444+00:00"
  },
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "http://localhost:31000/hapi-fhir-server/fhir/CareTeam?_format\u003djson\u0026_pretty\u003dtrue\u0026patient\u003dPatient%2F3810"
    }
  ],
  "entry": [
    {
      "fullUrl": "http://localhost:31000/hapi-fhir-server/fhir/CareTeam/3814",
      "resource": {
        "resourceType": "CareTeam",
        "id": "3814",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2019-03-11T13:26:22.334+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
          ]
        },
        "identifier": [
          {
            "id": "7c29d5d0-70ea-4ac6-b9d0-6a50361a41f6"
          }
        ],
        "name": "5cd6a589-f552-440e-a399-7b805da51810",
        "subject": {
          "reference": "Patient/3810"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "http://localhost:31000/hapi-fhir-server/fhir/CareTeam/3811",
      "resource": {
        "resourceType": "CareTeam",
        "id": "3811",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2019-03-11T13:26:22.017+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
          ]
        },
        "identifier": [
          {
            "id": "cb28dcf3-2f65-4ff4-aa97-2870ab132e8e"
          }
        ],
        "name": "437f8caa-be67-4113-90fe-f5907b05543a",
        "subject": {
          "reference": "Patient/3810"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

GET [base]/CareTeam/3816/_history/2

Header

Accept-Charset: utf-8
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/3.7.0 (FHIR Client; FHIR 3.0.1/DSTU3; apache)
Accept-Encoding: gzip

Response

{
  "resourceType": "CareTeam",
  "id": "3816",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2019-03-11T13:26:22.718+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "23acf5ce-7b5c-4628-a2b9-833624b7b99e"
    }
  ],
  "name": "7f816f6c-3845-4429-a4ae-b294adbbd75f"
}

POST [base]/CareTeam

Header

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

Body:

{
  "resourceType": "CareTeam",
  "meta": {
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "c1ca59a2-4e8f-457b-a182-30c975968414"
    }
  ],
  "name": "67d0b128-58e4-4887-851c-94e51e7c53d3"
}

Response

{
  "resourceType": "CareTeam",
  "id": "3808",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-03-11T13:26:21.616+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "c1ca59a2-4e8f-457b-a182-30c975968414"
    }
  ],
  "name": "67d0b128-58e4-4887-851c-94e51e7c53d3"
}

PUT [base]/CareTeam/3816

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/3.7.0 (FHIR Client; FHIR 3.0.1/DSTU3; apache)
Accept-Encoding: gzip
Content-Type: application/fhir+json; charset=UTF-8

Body:

{
  "resourceType": "CareTeam",
  "id": "3816",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-03-11T13:26:22.629+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "23acf5ce-7b5c-4628-a2b9-833624b7b99e"
    }
  ],
  "name": "7f816f6c-3845-4429-a4ae-b294adbbd75f"
}

Response

{
  "resourceType": "CareTeam",
  "id": "3816",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2019-03-11T13:26:22.718+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "23acf5ce-7b5c-4628-a2b9-833624b7b99e"
    }
  ],
  "name": "7f816f6c-3845-4429-a4ae-b294adbbd75f"
}