eHealth Infrastructure (v2020.8)

StructureDefinition: ehealth-definedquestion - Operation examples

DELETE [base]/StructureDefinition/16

Header

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

GET [base]/StructureDefinition?name=9482a45d-c10d-467b-b519-48844d43b596

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiUXVlc3Rpb25uYWlyZS5kZWxldGUiLCJRdWVzdGlvbm5haXJlLnNlYXJjaCIsIlF1ZXN0aW9ubmFpcmUucmVhZCIsIlF1ZXN0aW9ubmFpcmUuY3JlYXRlIiwiJHRlc3Qtb25seS1jcmVhdGUiLCJRdWVzdGlvbm5haXJlLnVwZGF0ZSJdfSwidXNlcl90eXBlIjoiU1lTVEVNIn0.
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": "b0035f2e-e0ca-48b2-8c7d-5d40d146f503",
  "meta": {
    "lastUpdated": "2020-12-21T12:51:23.199+00:00"
  },
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "https://questionnaire.cit-questionnaire-623.local/fhir/StructureDefinition?_format=json&_pretty=true&name=9482a45d-c10d-467b-b519-48844d43b596"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://questionnaire.cit-questionnaire-623.local/fhir/StructureDefinition/19",
      "resource": {
        "resourceType": "StructureDefinition",
        "id": "19",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-12-21T12:51:23.061+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-definedquestion"
          ]
        },
        "url": "d8da5e59-77bf-4c70-a616-f4ae96f881a4",
        "name": "9482a45d-c10d-467b-b519-48844d43b596",
        "status": "draft",
        "kind": "logical",
        "abstract": true,
        "type": "7ad3e4b7-bdac-431e-b159-9e30f43eca20",
        "snapshot": {
          "element": [
            {
              "id": "7ad3e4b7-bdac-431e-b159-9e30f43eca20",
              "path": "7ad3e4b7-bdac-431e-b159-9e30f43eca20",
              "definition": "85113d0f-1993-4231-963b-8eb79876ab06",
              "min": 0,
              "max": "1"
            }
          ]
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "https://questionnaire.cit-questionnaire-623.local/fhir/StructureDefinition/17",
      "resource": {
        "resourceType": "StructureDefinition",
        "id": "17",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-12-21T12:51:22.609+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-definedquestion"
          ]
        },
        "url": "104c1f73-20e3-4ff9-8aeb-334578709a47",
        "name": "9482a45d-c10d-467b-b519-48844d43b596",
        "status": "draft",
        "kind": "logical",
        "abstract": true,
        "type": "efcbb366-83ec-489b-ae7e-5851257af694",
        "snapshot": {
          "element": [
            {
              "id": "efcbb366-83ec-489b-ae7e-5851257af694",
              "path": "efcbb366-83ec-489b-ae7e-5851257af694",
              "definition": "521ebd91-583d-4907-a710-694f7b7b322a",
              "min": 0,
              "max": "1"
            }
          ]
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

GET [base]/StructureDefinition/20/_history/2

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiUXVlc3Rpb25uYWlyZS5kZWxldGUiLCJRdWVzdGlvbm5haXJlLnNlYXJjaCIsIlF1ZXN0aW9ubmFpcmUucmVhZCIsIlF1ZXN0aW9ubmFpcmUuY3JlYXRlIiwiJHRlc3Qtb25seS1jcmVhdGUiLCJRdWVzdGlvbm5haXJlLnVwZGF0ZSJdfSwidXNlcl90eXBlIjoiU1lTVEVNIn0.
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": "StructureDefinition",
  "id": "20",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2020-12-21T12:51:23.818+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-definedquestion"
    ]
  },
  "url": "a4345704-beba-43f0-a903-0d97a871d1e4",
  "name": "a518461e-a5f9-4f9b-aac2-ddf4398d8c74",
  "status": "draft",
  "kind": "logical",
  "abstract": true,
  "type": "fc44c1f5-291e-448c-8ded-55f9f0e66a2d",
  "snapshot": {
    "element": [
      {
        "id": "fc44c1f5-291e-448c-8ded-55f9f0e66a2d",
        "path": "fc44c1f5-291e-448c-8ded-55f9f0e66a2d",
        "definition": "66ac31aa-16a3-40c4-b944-6d25cd243a48",
        "min": 0,
        "max": "1"
      }
    ]
  }
}

POST [base]/StructureDefinition

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiUXVlc3Rpb25uYWlyZS5kZWxldGUiLCJRdWVzdGlvbm5haXJlLnNlYXJjaCIsIlF1ZXN0aW9ubmFpcmUucmVhZCIsIlF1ZXN0aW9ubmFpcmUuY3JlYXRlIiwiJHRlc3Qtb25seS1jcmVhdGUiLCJRdWVzdGlvbm5haXJlLnVwZGF0ZSJdfSwidXNlcl90eXBlIjoiU1lTVEVNIn0.
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": "StructureDefinition",
  "meta": {
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-definedquestion"
    ]
  },
  "url": "747dc389-94cf-4a40-86b8-f4a2a38eceb5",
  "version": "99a4bebe-3a56-4203-ac3b-e4baffd85917",
  "name": "d14d872b-c4a0-4fa5-8f40-73c9f33a9523",
  "status": "draft",
  "kind": "logical",
  "abstract": true,
  "type": "c5f6a502-82cc-4a90-a54c-331f672abda3",
  "snapshot": {
    "element": [
      {
        "id": "c5f6a502-82cc-4a90-a54c-331f672abda3",
        "path": "c5f6a502-82cc-4a90-a54c-331f672abda3",
        "definition": "77d4acd9-14f6-416b-9e97-b8e3f520a52b",
        "min": 0,
        "max": "1"
      }
    ]
  }
}

Response

{
  "resourceType": "StructureDefinition",
  "id": "15",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-12-21T12:51:21.608+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-definedquestion"
    ]
  },
  "url": "747dc389-94cf-4a40-86b8-f4a2a38eceb5",
  "version": "99a4bebe-3a56-4203-ac3b-e4baffd85917",
  "name": "d14d872b-c4a0-4fa5-8f40-73c9f33a9523",
  "status": "draft",
  "kind": "logical",
  "abstract": true,
  "type": "c5f6a502-82cc-4a90-a54c-331f672abda3",
  "snapshot": {
    "element": [
      {
        "id": "c5f6a502-82cc-4a90-a54c-331f672abda3",
        "path": "c5f6a502-82cc-4a90-a54c-331f672abda3",
        "definition": "77d4acd9-14f6-416b-9e97-b8e3f520a52b",
        "min": 0,
        "max": "1"
      }
    ]
  }
}

POST [base]/StructureDefinition/$validate

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiUXVlc3Rpb25uYWlyZS5kZWxldGUiLCJRdWVzdGlvbm5haXJlLnNlYXJjaCIsIlF1ZXN0aW9ubmFpcmUucmVhZCIsIlF1ZXN0aW9ubmFpcmUuY3JlYXRlIiwiJHRlc3Qtb25seS1jcmVhdGUiLCJRdWVzdGlvbm5haXJlLnVwZGF0ZSJdfSwidXNlcl90eXBlIjoiU1lTVEVNIn0.
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": "StructureDefinition",
        "meta": {
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-definedquestion"
          ]
        },
        "url": "391c64a7-aabc-443f-a81f-b2c83372194b",
        "name": "57c17be9-96f9-4808-a6f2-8bb3b344797a",
        "status": "draft",
        "kind": "logical",
        "abstract": true,
        "type": "f67effea-517f-450d-928f-74bfb6e0fb87",
        "snapshot": {
          "element": [
            {
              "id": "f67effea-517f-450d-928f-74bfb6e0fb87",
              "path": "f67effea-517f-450d-928f-74bfb6e0fb87",
              "definition": "a165ce44-8d6b-484a-9af5-2bc160883e1c",
              "min": 0,
              "max": "1"
            }
          ]
        }
      }
    }
  ]
}

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]/StructureDefinition/20

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiUXVlc3Rpb25uYWlyZS5kZWxldGUiLCJRdWVzdGlvbm5haXJlLnNlYXJjaCIsIlF1ZXN0aW9ubmFpcmUucmVhZCIsIlF1ZXN0aW9ubmFpcmUuY3JlYXRlIiwiJHRlc3Qtb25seS1jcmVhdGUiLCJRdWVzdGlvbm5haXJlLnVwZGF0ZSJdfSwidXNlcl90eXBlIjoiU1lTVEVNIn0.
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": "StructureDefinition",
  "id": "20",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-12-21T12:51:23.413+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-definedquestion"
    ]
  },
  "url": "a4345704-beba-43f0-a903-0d97a871d1e4",
  "name": "a518461e-a5f9-4f9b-aac2-ddf4398d8c74",
  "status": "draft",
  "kind": "logical",
  "abstract": true,
  "type": "fc44c1f5-291e-448c-8ded-55f9f0e66a2d",
  "snapshot": {
    "element": [
      {
        "id": "fc44c1f5-291e-448c-8ded-55f9f0e66a2d",
        "path": "fc44c1f5-291e-448c-8ded-55f9f0e66a2d",
        "definition": "66ac31aa-16a3-40c4-b944-6d25cd243a48",
        "min": 0,
        "max": "1"
      }
    ]
  }
}

Response

{
  "resourceType": "StructureDefinition",
  "id": "20",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2020-12-21T12:51:23.818+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-definedquestion"
    ]
  },
  "url": "a4345704-beba-43f0-a903-0d97a871d1e4",
  "name": "a518461e-a5f9-4f9b-aac2-ddf4398d8c74",
  "status": "draft",
  "kind": "logical",
  "abstract": true,
  "type": "fc44c1f5-291e-448c-8ded-55f9f0e66a2d",
  "snapshot": {
    "element": [
      {
        "id": "fc44c1f5-291e-448c-8ded-55f9f0e66a2d",
        "path": "fc44c1f5-291e-448c-8ded-55f9f0e66a2d",
        "definition": "66ac31aa-16a3-40c4-b944-6d25cd243a48",
        "min": 0,
        "max": "1"
      }
    ]
  }
}