eHealth Infrastructure (v2019.5)

StructureDefinition: ehealth-questionnaire - Operation examples

DELETE [base]/Questionnaire/4425

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 4ms\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 4ms"
    }
  ]
}

GET [base]/Questionnaire?name=446fc7bf-3534-4cc4-a152-2f85055841e9

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": "5033610c-67bd-4f34-9280-9d3238aa47b2",
  "meta": {
    "lastUpdated": "2019-03-11T13:28:22.269+00:00"
  },
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "http://localhost:31000/hapi-fhir-server/fhir/Questionnaire?_format\u003djson\u0026_pretty\u003dtrue\u0026name\u003d446fc7bf-3534-4cc4-a152-2f85055841e9"
    }
  ],
  "entry": [
    {
      "fullUrl": "http://localhost:31000/hapi-fhir-server/fhir/Questionnaire/4431",
      "resource": {
        "resourceType": "Questionnaire",
        "id": "4431",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2019-03-11T13:28:22.103+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire"
          ]
        },
        "extension": [
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-custodian",
            "valueReference": {
              "reference": "Organization/4430"
            }
          },
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-author",
            "valueReference": {
              "reference": "Organization/4430"
            }
          }
        ],
        "version": "1.0",
        "name": "446fc7bf-3534-4cc4-a152-2f85055841e9",
        "status": "active",
        "code": [
          {
            "code": "code"
          }
        ]
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "http://localhost:31000/hapi-fhir-server/fhir/Questionnaire/4427",
      "resource": {
        "resourceType": "Questionnaire",
        "id": "4427",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2019-03-11T13:28:20.966+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire"
          ]
        },
        "extension": [
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-custodian",
            "valueReference": {
              "reference": "Organization/4426"
            }
          },
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-author",
            "valueReference": {
              "reference": "Organization/4426"
            }
          }
        ],
        "version": "1.0",
        "name": "446fc7bf-3534-4cc4-a152-2f85055841e9",
        "status": "active",
        "code": [
          {
            "code": "code"
          }
        ]
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

GET [base]/Questionnaire/4435/_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": "Questionnaire",
  "id": "4435",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2019-03-11T13:28:23.473+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-custodian",
      "valueReference": {
        "reference": "Organization/4434"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-author",
      "valueReference": {
        "reference": "Organization/4434"
      }
    }
  ],
  "version": "1.0",
  "name": "8d80d417-8aee-4763-b22b-ee443a09b17e",
  "status": "active",
  "code": [
    {
      "code": "code"
    }
  ]
}

POST [base]/Questionnaire

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": "Questionnaire",
  "meta": {
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-reuseCriteria",
      "extension": [
        {
          "url": "allowed",
          "valueBoolean": true
        },
        {
          "url": "dataActuality",
          "valueInteger": 2
        },
        {
          "url": "dataActualityUnit",
          "valueTiming": {
            "code": {
              "id": "3286a89d-c4e0-49cb-ad0f-ab5958e17a2b",
              "text": "4af85e37-7377-43db-b75e-072949920257"
            }
          }
        },
        {
          "url": "situationQuality",
          "valueCoding": {
            "code": "code"
          }
        },
        {
          "url": "operationQuality",
          "valueCoding": {
            "code": "code"
          }
        },
        {
          "url": "dataQuality",
          "valueCoding": {
            "code": "code"
          }
        }
      ]
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-custodian",
      "valueReference": {
        "reference": "Organization/4421"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-author",
      "valueReference": {
        "reference": "Organization/4421"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-intendedOrganization",
      "valueReference": {
        "reference": "Organization/4422"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-recommendation",
      "valueCoding": {
        "code": "code"
      }
    }
  ],
  "version": "1.0",
  "status": "active",
  "code": [
    {
      "code": "code"
    }
  ],
  "item": [
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-minOccurs",
          "valueInteger": 2
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs",
          "valueInteger": 7
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/minValue",
          "valueInteger": 1
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
          "valueInteger": 5
        },
        {
          "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-feedback",
          "extension": [
            {
              "url": "value",
              "valueString": "value"
            },
            {
              "url": "min",
              "valueInteger": 2
            },
            {
              "url": "max",
              "valueInteger": 4
            }
          ]
        },
        {
          "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-sliderStepValue",
          "valueInteger": 2
        }
      ],
      "linkId": "link",
      "type": "integer"
    }
  ]
}

Response

{
  "resourceType": "Questionnaire",
  "id": "4423",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-03-11T13:28:19.708+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-reuseCriteria",
      "extension": [
        {
          "url": "allowed",
          "valueBoolean": true
        },
        {
          "url": "dataActuality",
          "valueInteger": 2
        },
        {
          "url": "dataActualityUnit",
          "valueTiming": {
            "code": {
              "id": "3286a89d-c4e0-49cb-ad0f-ab5958e17a2b",
              "text": "4af85e37-7377-43db-b75e-072949920257"
            }
          }
        },
        {
          "url": "situationQuality",
          "valueCoding": {
            "code": "code"
          }
        },
        {
          "url": "operationQuality",
          "valueCoding": {
            "code": "code"
          }
        },
        {
          "url": "dataQuality",
          "valueCoding": {
            "code": "code"
          }
        }
      ]
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-custodian",
      "valueReference": {
        "reference": "Organization/4421"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-author",
      "valueReference": {
        "reference": "Organization/4421"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-intendedOrganization",
      "valueReference": {
        "reference": "Organization/4422"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-recommendation",
      "valueCoding": {
        "code": "code"
      }
    }
  ],
  "version": "1.0",
  "status": "active",
  "code": [
    {
      "code": "code"
    }
  ],
  "item": [
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-minOccurs",
          "valueInteger": 2
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs",
          "valueInteger": 7
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/minValue",
          "valueInteger": 1
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
          "valueInteger": 5
        },
        {
          "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-feedback",
          "extension": [
            {
              "url": "value",
              "valueString": "value"
            },
            {
              "url": "min",
              "valueInteger": 2
            },
            {
              "url": "max",
              "valueInteger": 4
            }
          ]
        },
        {
          "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-sliderStepValue",
          "valueInteger": 2
        }
      ],
      "linkId": "link",
      "type": "integer"
    }
  ]
}

PUT [base]/Questionnaire/4435

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": "Questionnaire",
  "id": "4435",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-03-11T13:28:23.275+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-custodian",
      "valueReference": {
        "reference": "Organization/4434"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-author",
      "valueReference": {
        "reference": "Organization/4434"
      }
    }
  ],
  "version": "1.0",
  "name": "8d80d417-8aee-4763-b22b-ee443a09b17e",
  "status": "active",
  "code": [
    {
      "code": "code"
    }
  ]
}

Response

{
  "resourceType": "Questionnaire",
  "id": "4435",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2019-03-11T13:28:23.473+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-custodian",
      "valueReference": {
        "reference": "Organization/4434"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaire-author",
      "valueReference": {
        "reference": "Organization/4434"
      }
    }
  ],
  "version": "1.0",
  "name": "8d80d417-8aee-4763-b22b-ee443a09b17e",
  "status": "active",
  "code": [
    {
      "code": "code"
    }
  ]
}