eHealth Infrastructure (v2020.4)

StructureDefinition: ehealth-careteam - Operation examples

DELETE [base]/CareTeam/375

Header

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

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 25ms</pre></td>\r\r\r</tr>\r</table>\r</div>"
  },
  "issue": [
    {
      "severity": "information",
      "code": "informational",
      "diagnostics": "Successfully deleted 1 resource(s) in 25ms"
    }
  ]
}

GET [base]/CareTeam?status=active&date=ge2020-04-30T07%3A59%3A09%2B02%3A00&date=le2020-04-30T07%3A59%3A09%2B02%3A00&managingOrganization=https%3A%2F%2Forganization.local.ehealth.sundhed.dk%2Ffhir%2FOrganization%2F604%2F_history%2F1

Header

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

Response

{
  "resourceType": "Bundle",
  "id": "e3a0f32f-b5bc-4e41-92c3-f15597feeba3",
  "meta": {
    "lastUpdated": "2020-04-30T05:59:10.270+00:00"
  },
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "https://organization.local.ehealth.sundhed.dk/fhir/CareTeam?_format=json&_pretty=true&date=ge2020-04-30T07%3A59%3A09%2B02%3A00&date=le2020-04-30T07%3A59%3A09%2B02%3A00&managingOrganization=https%3A%2F%2Forganization.local.ehealth.sundhed.dk%2Ffhir%2FOrganization%2F604%2F_history%2F1&status=active"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://organization.local.ehealth.sundhed.dk/fhir/CareTeam/605",
      "resource": {
        "resourceType": "CareTeam",
        "id": "605",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-04-30T05:59:09.664+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
          ]
        },
        "identifier": [
          {
            "id": "7e88e6c2-136e-4738-8cdb-28f141c1a7cd",
            "system": "urn:ietf:rfc:3986"
          }
        ],
        "status": "active",
        "name": "3f690232-2b26-40a2-94b8-c87987f59abc",
        "period": {
          "end": "2020-04-30T07:59:09+02:00"
        },
        "reasonCode": [
          {
            "coding": [
              {
                "system": "http://ehealth.sundhed.dk/cs/conditions",
                "code": "TBD"
              }
            ]
          }
        ],
        "managingOrganization": [
          {
            "reference": "https://organization.local.ehealth.sundhed.dk/fhir/Organization/604"
          }
        ]
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "https://organization.local.ehealth.sundhed.dk/fhir/CareTeam/606",
      "resource": {
        "resourceType": "CareTeam",
        "id": "606",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-04-30T05:59:09.798+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
          ]
        },
        "identifier": [
          {
            "id": "9f317cac-a888-40da-956d-5828924b89e0",
            "system": "urn:ietf:rfc:3986"
          }
        ],
        "status": "active",
        "name": "b2f635d5-3f80-41be-9702-340f2986cb18",
        "period": {
          "end": "2020-04-30T07:59:09+02:00"
        },
        "reasonCode": [
          {
            "coding": [
              {
                "system": "http://ehealth.sundhed.dk/cs/conditions",
                "code": "TBD"
              }
            ]
          }
        ],
        "managingOrganization": [
          {
            "reference": "https://organization.local.ehealth.sundhed.dk/fhir/Organization/604"
          }
        ]
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

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

Header

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

Response

{
  "resourceType": "CareTeam",
  "id": "421",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2020-04-30T05:57:59.049+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "8a5b286a-8a0b-4b4a-9428-26b336cb03c6",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "1895d1b0-4342-4327-84af-c81128345c08",
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ]
}

GET [base]/CareTeam/730

Header

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

Response

{
  "resourceType": "CareTeam",
  "id": "730",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-04-30T05:59:32.032+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "0371537a-8acf-4719-b531-25eae9bc83c7",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "9b680790-e9f1-4477-8086-90598d138359",
  "participant": [
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/Patient/45186"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://organization.local.ehealth.sundhed.dk/fhir/CareTeam/727"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://organization.local.ehealth.sundhed.dk/fhir/Practitioner/729"
      }
    }
  ],
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ],
  "managingOrganization": [
    {
      "reference": "https://organization.local.ehealth.sundhed.dk/fhir/Organization/728"
    }
  ]
}

POST [base]/CareTeam

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiMjJiYTk0ZTMtMjMxZS00ZjBiLThmYmYtZjQ2MzJmY2NjMzU5IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNhcmVUZWFtLndyaXRlIl19LCJ1c2VyX3R5cGUiOiJTWVNURU0ifQ.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/3.8.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": "911d4b23-0d55-4525-8c6d-b8dafc4dbef5",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "91253183-006d-4a44-8add-ea3b073a3f2c",
  "participant": [
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/RelatedPerson/36583"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/Patient/78756"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://organization.local.ehealth.sundhed.dk/fhir/CareTeam/370"
      }
    }
  ],
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ],
  "managingOrganization": [
    {
      "reference": "https://organization.local.ehealth.sundhed.dk/fhir/Organization/371"
    }
  ]
}

Response

{
  "resourceType": "CareTeam",
  "id": "372",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-04-30T05:57:49.510+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "911d4b23-0d55-4525-8c6d-b8dafc4dbef5",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "91253183-006d-4a44-8add-ea3b073a3f2c",
  "participant": [
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/RelatedPerson/36583"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/Patient/78756"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://organization.local.ehealth.sundhed.dk/fhir/CareTeam/370"
      }
    }
  ],
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ],
  "managingOrganization": [
    {
      "reference": "https://organization.local.ehealth.sundhed.dk/fhir/Organization/371"
    }
  ]
}

POST [base]/CareTeam/423/$validate

Header

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

Body:

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "resource",
      "resource": {
        "resourceType": "CareTeam",
        "id": "423",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-04-30T05:57:59.612+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
          ]
        },
        "identifier": [
          {
            "id": "b5e1eca9-cb16-4bb5-9a45-c0234f66e263",
            "system": "urn:ietf:rfc:3986"
          }
        ],
        "status": "active",
        "name": "d6033488-a087-481d-8d80-4fcda91a56a1",
        "reasonCode": [
          {
            "coding": [
              {
                "system": "http://ehealth.sundhed.dk/cs/conditions",
                "code": "TBD"
              }
            ]
          }
        ]
      }
    }
  ]
}

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>No issues detected during validation</pre></td>\r\r\r</tr>\r<tr>\r<td style=\"font-weight: bold;\">INFORMATION</td>\r<td>[]</td>\r\r\r\r<td><pre>No issues detected during validation</pre></td>\r\r\r</tr>\r</table>\r</div>"
  },
  "issue": [
    {
      "severity": "information",
      "code": "informational",
      "diagnostics": "No issues detected during validation"
    },
    {
      "severity": "information",
      "code": "informational",
      "diagnostics": "No issues detected during validation"
    }
  ]
}

PUT [base]/CareTeam/421

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiMTBiZjVjYTktODExMy00ZDk3LThmMDUtZGQzYzIwNmY3ZDQ5IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNhcmVUZWFtLndyaXRlIl19LCJ1c2VyX3R5cGUiOiJTWVNURU0ifQ.
If-Match: "1"
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/3.8.0 (FHIR Client; FHIR 3.0.1/DSTU3; apache)
Accept-Encoding: gzip
Content-Type: application/fhir+json; charset=UTF-8

Body:

{
  "resourceType": "CareTeam",
  "id": "421",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-04-30T05:57:58.939+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "8a5b286a-8a0b-4b4a-9428-26b336cb03c6",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "1895d1b0-4342-4327-84af-c81128345c08",
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ]
}

Response

{
  "resourceType": "CareTeam",
  "id": "421",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2020-04-30T05:57:59.049+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "8a5b286a-8a0b-4b4a-9428-26b336cb03c6",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "1895d1b0-4342-4327-84af-c81128345c08",
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ]
}