eHealth Infrastructure (v2020.7)

StructureDefinition: ehealth-careteam - Operation examples

DELETE [base]/CareTeam/143

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiYmRhOThkNzItYTA5Ni00ZDgzLWI1NjItYmYyNTYzNjIyODU3IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNhcmVUZWFtLndyaXRlIl19LCJ1c2VyX3R5cGUiOiJTWVNURU0ifQ.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/5.0.2 (FHIR Client; FHIR 3.0.2/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 57ms</pre></td></tr></table></div>"
  },
  "issue": [
    {
      "severity": "information",
      "code": "informational",
      "diagnostics": "Successfully deleted 1 resource(s) in 57ms"
    }
  ]
}

GET [base]/CareTeam?status=active&date=ge2020-10-22T13%3A56%3A23%2B00%3A00&date=le2020-10-22T13%3A56%3A23%2B00%3A00&managingOrganization=https%3A%2F%2Forganization.cit-organization-740.local%2Ffhir%2FOrganization%2F246%2F_history%2F1

Header

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

Response

{
  "resourceType": "Bundle",
  "id": "843d24b0-daef-49ac-b44d-249924611c50",
  "meta": {
    "lastUpdated": "2020-10-22T13:56:24.688+00:00"
  },
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "https://organization.cit-organization-740.local/fhir/CareTeam?_format=json&_pretty=true&date=ge2020-10-22T13%3A56%3A23%2B00%3A00&date=le2020-10-22T13%3A56%3A23%2B00%3A00&managingOrganization=https%3A%2F%2Forganization.cit-organization-740.local%2Ffhir%2FOrganization%2F246%2F_history%2F1&status=active"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://organization.cit-organization-740.local/fhir/CareTeam/248",
      "resource": {
        "resourceType": "CareTeam",
        "id": "248",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-10-22T13:56:24.176+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
          ]
        },
        "identifier": [
          {
            "id": "388638a1-b3e5-4e3e-9896-18f185af93ca",
            "system": "urn:ietf:rfc:3986"
          }
        ],
        "status": "active",
        "name": "11a5f6b5-ffff-4584-90c1-2fe5e737b576",
        "period": {
          "end": "2020-10-22T13:56:23+00:00"
        },
        "reasonCode": [
          {
            "coding": [
              {
                "system": "http://ehealth.sundhed.dk/cs/conditions",
                "code": "TBD"
              }
            ]
          }
        ],
        "managingOrganization": [
          {
            "reference": "https://organization.cit-organization-740.local/fhir/Organization/246"
          }
        ]
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "https://organization.cit-organization-740.local/fhir/CareTeam/247",
      "resource": {
        "resourceType": "CareTeam",
        "id": "247",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-10-22T13:56:24.015+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
          ]
        },
        "identifier": [
          {
            "id": "5c0f23cb-2f08-45e4-99f4-3fc8300801ce",
            "system": "urn:ietf:rfc:3986"
          }
        ],
        "status": "active",
        "name": "b18b39e6-5625-4855-aa84-f77bf31f3d44",
        "period": {
          "end": "2020-10-22T13:56:23+00:00"
        },
        "reasonCode": [
          {
            "coding": [
              {
                "system": "http://ehealth.sundhed.dk/cs/conditions",
                "code": "TBD"
              }
            ]
          }
        ],
        "managingOrganization": [
          {
            "reference": "https://organization.cit-organization-740.local/fhir/Organization/246"
          }
        ]
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

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

Header

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

Response

{
  "resourceType": "CareTeam",
  "id": "189",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2020-10-22T13:56:02.935+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "7617dff2-c92e-47ac-ba8a-56fa64a209c2",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "6d38a105-92ac-4c6c-bf07-8f3958d28cd0",
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ]
}

GET [base]/CareTeam/106

Header

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

Response

{
  "resourceType": "CareTeam",
  "id": "106",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2020-10-22T13:55:04.325+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "0be7ac3d-7e0d-4d52-8e14-977779954070",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "b0d73a07-f015-4371-aec1-7aec0cca733e",
  "participant": [
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoring_adjuster"
          }
        ]
      },
      "member": {
        "reference": "https://organization.cit-organization-740.local/fhir/Practitioner/108"
      },
      "period": {
        "start": "2020-10-22T13:55:04+00:00"
      }
    }
  ],
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ]
}

POST [base]/CareTeam

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiZTc2Y2YwYzUtYTExOC00ZmVlLWFjYTUtMWRlNmIwNzZkYzliIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNhcmVUZWFtLndyaXRlIl19LCJ1c2VyX3R5cGUiOiJTWVNURU0ifQ.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/5.0.2 (FHIR Client; FHIR 3.0.2/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": "d81efc98-754e-477d-8b45-a64a26575ef6",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "81e6db34-80b5-436f-8d19-d1deba3185ab",
  "participant": [
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoring_adjuster"
          }
        ]
      },
      "member": {
        "reference": "https://patient.cit-organization-740.local/fhir/RelatedPerson/80469"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoring_adjuster"
          }
        ]
      },
      "member": {
        "reference": "https://patient.cit-organization-740.local/fhir/Patient/63213"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoring_adjuster"
          }
        ]
      },
      "member": {
        "reference": "https://organization.cit-organization-740.local/fhir/CareTeam/138"
      }
    }
  ],
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ],
  "managingOrganization": [
    {
      "reference": "https://organization.cit-organization-740.local/fhir/Organization/139"
    }
  ]
}

Response

{
  "resourceType": "CareTeam",
  "id": "140",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-10-22T13:55:47.674+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "d81efc98-754e-477d-8b45-a64a26575ef6",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "81e6db34-80b5-436f-8d19-d1deba3185ab",
  "participant": [
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoring_adjuster"
          }
        ]
      },
      "member": {
        "reference": "https://patient.cit-organization-740.local/fhir/RelatedPerson/80469"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoring_adjuster"
          }
        ]
      },
      "member": {
        "reference": "https://patient.cit-organization-740.local/fhir/Patient/63213"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoring_adjuster"
          }
        ]
      },
      "member": {
        "reference": "https://organization.cit-organization-740.local/fhir/CareTeam/138"
      }
    }
  ],
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ],
  "managingOrganization": [
    {
      "reference": "https://organization.cit-organization-740.local/fhir/Organization/139"
    }
  ]
}

POST [base]/CareTeam/191/$validate

Header

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

Body:

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "resource",
      "resource": {
        "resourceType": "CareTeam",
        "id": "191",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-10-22T13:56:03.774+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
          ]
        },
        "identifier": [
          {
            "id": "174b0317-4416-4092-a4a0-6165c95237f0",
            "system": "urn:ietf:rfc:3986"
          }
        ],
        "status": "active",
        "name": "d91c10c8-c835-4e71-8620-bba4815e856b",
        "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></tr><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>No issues detected during validation</pre></td></tr></table></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/189

Header

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

Body:

{
  "resourceType": "CareTeam",
  "id": "189",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-10-22T13:56:02.774+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "7617dff2-c92e-47ac-ba8a-56fa64a209c2",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "6d38a105-92ac-4c6c-bf07-8f3958d28cd0",
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ]
}

Response

{
  "resourceType": "CareTeam",
  "id": "189",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2020-10-22T13:56:02.935+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "7617dff2-c92e-47ac-ba8a-56fa64a209c2",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "6d38a105-92ac-4c6c-bf07-8f3958d28cd0",
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ]
}