eHealth Infrastructure (v2020.5)

StructureDefinition: ehealth-careteam - Operation examples

DELETE [base]/CareTeam/137

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiZTNjY2U4NmItYTliMS00MDhjLTlkOGQtOTdlNDlmOGJlZWEyIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNhcmVUZWFtLndyaXRlIl19LCJ1c2VyX3R5cGUiOiJTWVNURU0ifQ.
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 91ms</pre></td>\r\r\r</tr>\r</table>\r</div>"
  },
  "issue": [
    {
      "severity": "information",
      "code": "informational",
      "diagnostics": "Successfully deleted 1 resource(s) in 91ms"
    }
  ]
}

GET [base]/CareTeam?status=active&date=ge2020-06-22T19%3A59%3A50%2B00%3A00&date=le2020-06-22T19%3A59%3A50%2B00%3A00&managingOrganization=https%3A%2F%2Forganization.cit-organization-661.local%2Ffhir%2FOrganization%2F240%2F_history%2F1

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiYzk0ZDZlNDgtZWZmYS00ODc3LWFlOWEtYTYxYmIxNzg5MWI3IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNhcmVUZWFtLnNlYXJjaCJdfSwidXNlcl90eXBlIjoiU1lTVEVNIn0.
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": "be8322e9-48a5-4eed-80d6-a3f6ceeeac96",
  "meta": {
    "lastUpdated": "2020-06-22T19:59:51.399+00:00"
  },
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "https://organization.cit-organization-661.local/fhir/CareTeam?_format=json&_pretty=true&date=ge2020-06-22T19%3A59%3A50%2B00%3A00&date=le2020-06-22T19%3A59%3A50%2B00%3A00&managingOrganization=https%3A%2F%2Forganization.cit-organization-661.local%2Ffhir%2FOrganization%2F240%2F_history%2F1&status=active"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://organization.cit-organization-661.local/fhir/CareTeam/241",
      "resource": {
        "resourceType": "CareTeam",
        "id": "241",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-06-22T19:59:50.861+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
          ]
        },
        "identifier": [
          {
            "id": "080ad383-818c-44d6-9bfe-bf85d2462fa6",
            "system": "urn:ietf:rfc:3986"
          }
        ],
        "status": "active",
        "name": "ad9a97c2-b746-47e2-9977-ddc1cee35fba",
        "period": {
          "end": "2020-06-22T19:59:50+00:00"
        },
        "reasonCode": [
          {
            "coding": [
              {
                "system": "http://ehealth.sundhed.dk/cs/conditions",
                "code": "TBD"
              }
            ]
          }
        ],
        "managingOrganization": [
          {
            "reference": "https://organization.cit-organization-661.local/fhir/Organization/240"
          }
        ]
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "https://organization.cit-organization-661.local/fhir/CareTeam/242",
      "resource": {
        "resourceType": "CareTeam",
        "id": "242",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-06-22T19:59:50.997+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
          ]
        },
        "identifier": [
          {
            "id": "8f2da525-34bf-4dff-abb6-1b2e215b6221",
            "system": "urn:ietf:rfc:3986"
          }
        ],
        "status": "active",
        "name": "3cd6d98b-d2f9-4fc5-9181-062a9f8ec98e",
        "period": {
          "end": "2020-06-22T19:59:50+00:00"
        },
        "reasonCode": [
          {
            "coding": [
              {
                "system": "http://ehealth.sundhed.dk/cs/conditions",
                "code": "TBD"
              }
            ]
          }
        ],
        "managingOrganization": [
          {
            "reference": "https://organization.cit-organization-661.local/fhir/Organization/240"
          }
        ]
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

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

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiOWM1NGViMjEtZjA5ZS00YTZmLTk5ZjAtYTdjZTFkZDVjNmM1IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNhcmVUZWFtLnJlYWQiXX0sInVzZXJfdHlwZSI6IlNZU1RFTSJ9.
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": "183",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2020-06-22T19:59:30.121+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "23c0c64e-965c-400a-8d0a-4bd0a6657592",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "45fae93f-151c-4776-9a15-da76d8055876",
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ]
}

GET [base]/CareTeam/100

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiNjQ2YTExMDUtZjBmMy00OGIwLTg5MzQtMDg1MTI0Y2I4NWNhIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIlByYWN0aXRpb25lclJvbGUucmVhZCIsIiRwZXJzaXN0LWxvZ2luIiwiJHRlc3Qtb25seS1jcmVhdGUiXX0sInVzZXJfdHlwZSI6IlNZU1RFTSJ9.
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": "100",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2020-06-22T19:58:46.516+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "40917288-2a21-44ed-ae62-aedcdb168518",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "ec3e8b73-c245-499d-bb14-b4971bb92b4a",
  "participant": [
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://organization.cit-organization-661.local/fhir/Practitioner/102"
      },
      "period": {
        "start": "2020-06-22T19:58:46+00:00"
      }
    }
  ],
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ]
}

POST [base]/CareTeam

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiZjE2MDVhYjEtNDczZi00NTIzLTkwMDItZTRkYzRjMGYxMzJlIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNhcmVUZWFtLndyaXRlIl19LCJ1c2VyX3R5cGUiOiJTWVNURU0ifQ.
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": "3cb6d3b0-2618-4f91-af4b-8ee93947fe36",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "e4065779-aced-4acb-ad94-5f31d4c14d77",
  "participant": [
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://patient.cit-organization-661.local/fhir/RelatedPerson/11062"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://patient.cit-organization-661.local/fhir/Patient/28242"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://organization.cit-organization-661.local/fhir/CareTeam/132"
      }
    }
  ],
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ],
  "managingOrganization": [
    {
      "reference": "https://organization.cit-organization-661.local/fhir/Organization/133"
    }
  ]
}

Response

{
  "resourceType": "CareTeam",
  "id": "134",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-06-22T19:59:16.653+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "3cb6d3b0-2618-4f91-af4b-8ee93947fe36",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "e4065779-aced-4acb-ad94-5f31d4c14d77",
  "participant": [
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://patient.cit-organization-661.local/fhir/RelatedPerson/11062"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://patient.cit-organization-661.local/fhir/Patient/28242"
      }
    },
    {
      "role": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/careteam-participant-role",
            "code": "monitoringResponsible"
          }
        ]
      },
      "member": {
        "reference": "https://organization.cit-organization-661.local/fhir/CareTeam/132"
      }
    }
  ],
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ],
  "managingOrganization": [
    {
      "reference": "https://organization.cit-organization-661.local/fhir/Organization/133"
    }
  ]
}

POST [base]/CareTeam/185/$validate

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiZWY4NzU3NzQtZmI1Zi00YTgxLTkxZjUtN2RjOTRiYjA5NThlIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNhcmVUZWFtLnJlYWQiXX0sInVzZXJfdHlwZSI6IlNZU1RFTSJ9.
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": "185",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-06-22T19:59:30.916+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
          ]
        },
        "identifier": [
          {
            "id": "5b3d1ae1-a58d-4307-99a7-6216c44627f1",
            "system": "urn:ietf:rfc:3986"
          }
        ],
        "status": "active",
        "name": "3cfd74aa-54db-4bed-96d2-abf071cb111a",
        "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/183

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiMDU3NjBhZWUtZGFlZi00OGJiLTliMGEtZjI3NjFhMmNhNWJhIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNhcmVUZWFtLndyaXRlIl19LCJ1c2VyX3R5cGUiOiJTWVNURU0ifQ.
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": "183",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-06-22T19:59:29.998+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "23c0c64e-965c-400a-8d0a-4bd0a6657592",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "45fae93f-151c-4776-9a15-da76d8055876",
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ]
}

Response

{
  "resourceType": "CareTeam",
  "id": "183",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2020-06-22T19:59:30.121+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careteam"
    ]
  },
  "identifier": [
    {
      "id": "23c0c64e-965c-400a-8d0a-4bd0a6657592",
      "system": "urn:ietf:rfc:3986"
    }
  ],
  "status": "active",
  "name": "45fae93f-151c-4776-9a15-da76d8055876",
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://ehealth.sundhed.dk/cs/conditions",
          "code": "TBD"
        }
      ]
    }
  ]
}