Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Opdatering af medicinintolerens sker med HTTP Put kald Post kald til CAVE servicen. Body består af en FHIR bundle med nedenstående ressourcer. Alle ressourcerne er standard FHIR ressourcer. 

...

Code Block
{
  "resourceType": "CapabilityStatement",
  "status": "active",
  "date": "2019-03-01T10:12:17+01:00",
  "publisher": "Not provided",
  "kind": "instance",
  "software": {
    "name": "HAPI FHIR Server",
    "version": "3.7.0"
  },
  "implementation": {
    "description": "HAPI FHIR",
    "url": "http://cave.sdsd.dk/fhir"
  },
  "fhirVersion": "4.0.0",
  "format": [
    "application/fhir+xml",
    "application/fhir+json"
  ],
  "rest": [
    {
      "mode": "server",
      "resource": [
        {
          "type": "AllergyIntolerance",
          "profile": "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance",
          "interaction": [
            {
              "code": "read"
            },
            {
              "code": "vread"
            },
            {
              "code": "update"
            },
            {
              "code": "patch"
            },
            {
              "code": "delete"
            },
            {
              "code": "history-instance"
            },
            {
              "code": "history-type"
            },
            {
              "code": "create"
            },
            {
              "code": "search-type"
            }
          ],
          "conditionalCreate": true,
          "conditionalUpdate": true,
          "conditionalDelete": "multiple",
          "searchInclude": [
            "*",
            "AllergyIntolerance:asserter",
            "AllergyIntolerance:patient",
            "AllergyIntolerance:recorder"
          ],
          "searchParam": [
            {
              "name": "_content",
              "type": "string",
              "documentation": "Search the contents of the resource's data using a fulltext search"
            },
            {
              "name": "_has",
              "type": "string",
              "documentation": "Return resources linked to by the given target"
            },
            {
              "name": "_id",
              "type": "token",
              "documentation": "The ID of the resource"
            },
            {
              "name": "_language",
              "type": "string",
              "documentation": "The language of the resource"
            },
            {
              "name": "_lastUpdated",
              "type": "date",
              "documentation": "Only return resources which were last updated as specified by the given range"
            },
            {
              "name": "_profile",
              "type": "uri",
              "documentation": "Search for resources which have the given profile"
            },
            {
              "name": "_security",
              "type": "token",
              "documentation": "Search for resources which have the given security labels"
            },
            {
              "name": "_tag",
              "type": "token",
              "documentation": "Search for resources which have the given tag"
            },
            {
              "name": "_text",
              "type": "string",
              "documentation": "Search the contents of the resource's narrative using a fulltext search"
            },
            {
              "name": "asserter",
              "type": "reference",
              "documentation": "Source of the information about the allergy"
            },
            {
              "name": "category",
              "type": "token",
              "documentation": "food | medication | environment | biologic"
            },
            {
              "name": "clinical-status",
              "type": "token",
              "documentation": "active | inactive | resolved"
            },
            {
              "name": "code",
              "type": "token",
              "documentation": "Code that identifies the allergy or intolerance"
            },
            {
              "name": "criticality",
              "type": "token",
              "documentation": "low | high | unable-to-assess"
            },
            {
              "name": "date",
              "type": "date",
              "documentation": "Date first version of the resource instance was recorded"
            },
            {
              "name": "identifier",
              "type": "token",
              "documentation": "External ids for this item"
            },
            {
              "name": "last-date",
              "type": "date",
              "documentation": "Date(/time) of last known occurrence of a reaction"
            },
            {
              "name": "manifestation",
              "type": "token",
              "documentation": "Clinical symptoms/signs associated with the Event"
            },
            {
              "name": "onset",
              "type": "date",
              "documentation": "Date(/time) when manifestations showed"
            },
            {
              "name": "patient",
              "type": "reference",
              "documentation": "Who the sensitivity is for"
            },
            {
              "name": "recorder",
              "type": "reference",
              "documentation": "Who recorded the sensitivity"
            },
            {
              "name": "route",
              "type": "token",
              "documentation": "How the subject was exposed to the substance"
            },
            {
              "name": "severity",
              "type": "token",
              "documentation": "mild | moderate | severe (of event as a whole)"
            },
            {
              "name": "type",
              "type": "token",
              "documentation": "allergy | intolerance - Underlying mechanism (if known)"
            },
            {
              "name": "verification-status",
              "type": "token",
              "documentation": "unconfirmed | confirmed | refuted | entered-in-error"
            }
          ]
        },
        {
          "type": "OperationDefinition",
          "profile": "http://hl7.org/fhir/StructureDefinition/OperationDefinition",
          "interaction": [
            {
              "code": "read"
            }
          ]
        },
        {
          "type": "Organization",
          "profile": "http://hl7.org/fhir/StructureDefinition/Organization",
          "interaction": [
            {
              "code": "read"
            },
            {
              "code": "vread"
            },
            {
              "code": "update"
            },
            {
              "code": "patch"
            },
            {
              "code": "delete"
            },
            {
              "code": "history-instance"
            },
            {
              "code": "history-type"
            },
            {
              "code": "create"
            },
            {
              "code": "search-type"
            }
          ],
          "conditionalCreate": true,
          "conditionalUpdate": true,
          "conditionalDelete": "multiple",
          "searchInclude": [
            "*",
            "Organization:endpoint",
            "Organization:partof"
          ],
          "searchParam": [
            {
              "name": "_content",
              "type": "string",
              "documentation": "Search the contents of the resource's data using a fulltext search"
            },
            {
              "name": "_has",
              "type": "string",
              "documentation": "Return resources linked to by the given target"
            },
            {
              "name": "_id",
              "type": "token",
              "documentation": "The ID of the resource"
            },
            {
              "name": "_language",
              "type": "string",
              "documentation": "The language of the resource"
            },
            {
              "name": "_lastUpdated",
              "type": "date",
              "documentation": "Only return resources which were last updated as specified by the given range"
            },
            {
              "name": "_profile",
              "type": "uri",
              "documentation": "Search for resources which have the given profile"
            },
            {
              "name": "_security",
              "type": "token",
              "documentation": "Search for resources which have the given security labels"
            },
            {
              "name": "_tag",
              "type": "token",
              "documentation": "Search for resources which have the given tag"
            },
            {
              "name": "_text",
              "type": "string",
              "documentation": "Search the contents of the resource's narrative using a fulltext search"
            },
            {
              "name": "active",
              "type": "token",
              "documentation": "Is the Organization record active"
            },
            {
              "name": "address",
              "type": "string",
              "documentation": "A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text"
            },
            {
              "name": "address-city",
              "type": "string",
              "documentation": "A city specified in an address"
            },
            {
              "name": "address-country",
              "type": "string",
              "documentation": "A country specified in an address"
            },
            {
              "name": "address-postalcode",
              "type": "string",
              "documentation": "A postal code specified in an address"
            },
            {
              "name": "address-state",
              "type": "string",
              "documentation": "A state specified in an address"
            },
            {
              "name": "address-use",
              "type": "token",
              "documentation": "A use code specified in an address"
            },
            {
              "name": "endpoint",
              "type": "reference",
              "documentation": "Technical endpoints providing access to services operated for the organization"
            },
            {
              "name": "identifier",
              "type": "token",
              "documentation": "Any identifier for the organization (not the accreditation issuer's identifier)"
            },
            {
              "name": "name",
              "type": "string",
              "documentation": "A portion of the organization's name or alias"
            },
            {
              "name": "partof",
              "type": "reference",
              "documentation": "An organization of which this organization forms a part"
            },
            {
              "name": "phonetic",
              "type": "string",
              "documentation": "A portion of the organization's name using some kind of phonetic matching algorithm"
            },
            {
              "name": "type",
              "type": "token",
              "documentation": "A code for the type of organization"
            }
          ]
        },
        {
          "type": "Patient",
          "profile": "http://hl7.org/fhir/StructureDefinition/Patient",
          "interaction": [
            {
              "code": "read"
            },
            {
              "code": "vread"
            },
            {
              "code": "update"
            },
            {
              "code": "patch"
            },
            {
              "code": "delete"
            },
            {
              "code": "history-instance"
            },
            {
              "code": "history-type"
            },
            {
              "code": "create"
            },
            {
              "code": "search-type"
            }
          ],
          "conditionalCreate": true,
          "conditionalUpdate": true,
          "conditionalDelete": "multiple",
          "searchInclude": [
            "*",
            "Patient:general-practitioner",
            "Patient:link",
            "Patient:organization"
          ],
          "searchParam": [
            {
              "name": "_content",
              "type": "string",
              "documentation": "Search the contents of the resource's data using a fulltext search"
            },
            {
              "name": "_has",
              "type": "string",
              "documentation": "Return resources linked to by the given target"
            },
            {
              "name": "_id",
              "type": "token",
              "documentation": "The ID of the resource"
            },
            {
              "name": "_language",
              "type": "string",
              "documentation": "The language of the resource"
            },
            {
              "name": "_lastUpdated",
              "type": "date",
              "documentation": "Only return resources which were last updated as specified by the given range"
            },
            {
              "name": "_profile",
              "type": "uri",
              "documentation": "Search for resources which have the given profile"
            },
            {
              "name": "_security",
              "type": "token",
              "documentation": "Search for resources which have the given security labels"
            },
            {
              "name": "_tag",
              "type": "token",
              "documentation": "Search for resources which have the given tag"
            },
            {
              "name": "_text",
              "type": "string",
              "documentation": "Search the contents of the resource's narrative using a fulltext search"
            },
            {
              "name": "active",
              "type": "token",
              "documentation": "Whether the patient record is active"
            },
            {
              "name": "address",
              "type": "string",
              "documentation": "A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text"
            },
            {
              "name": "address-city",
              "type": "string",
              "documentation": "A city specified in an address"
            },
            {
              "name": "address-country",
              "type": "string",
              "documentation": "A country specified in an address"
            },
            {
              "name": "address-postalcode",
              "type": "string",
              "documentation": "A postalCode specified in an address"
            },
            {
              "name": "address-state",
              "type": "string",
              "documentation": "A state specified in an address"
            },
            {
              "name": "address-use",
              "type": "token",
              "documentation": "A use code specified in an address"
            },
            {
              "name": "birthdate",
              "type": "date",
              "documentation": "The patient's date of birth"
            },
            {
              "name": "death-date",
              "type": "date",
              "documentation": "The date of death has been provided and satisfies this search value"
            },
            {
              "name": "deceased",
              "type": "token",
              "documentation": "This patient has been marked as deceased, or as a death date entered"
            },
            {
              "name": "email",
              "type": "token",
              "documentation": "A value in an email contact"
            },
            {
              "name": "family",
              "type": "string",
              "documentation": "A portion of the family name of the patient"
            },
            {
              "name": "gender",
              "type": "token",
              "documentation": "Gender of the patient"
            },
            {
              "name": "general-practitioner",
              "type": "reference",
              "documentation": "Patient's nominated general practitioner, not the organization that manages the record"
            },
            {
              "name": "given",
              "type": "string",
              "documentation": "A portion of the given name of the patient"
            },
            {
              "name": "identifier",
              "type": "token",
              "documentation": "A patient identifier"
            },
            {
              "name": "language",
              "type": "token",
              "documentation": "Language code (irrespective of use value)"
            },
            {
              "name": "link",
              "type": "reference",
              "documentation": "All patients linked to the given patient"
            },
            {
              "name": "name",
              "type": "string",
              "documentation": "A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text"
            },
            {
              "name": "organization",
              "type": "reference",
              "documentation": "The organization that is the custodian of the patient record"
            },
            {
              "name": "phone",
              "type": "token",
              "documentation": "A value in a phone contact"
            },
            {
              "name": "phonetic",
              "type": "string",
              "documentation": "A portion of either family or given name using some kind of phonetic matching algorithm"
            },
            {
              "name": "telecom",
              "type": "token",
              "documentation": "The value in any kind of telecom details of the patient"
            }
          ]
        },
        {
          "type": "Practitioner",
          "profile": "http://hl7.org/fhir/StructureDefinition/Practitioner",
          "interaction": [
            {
              "code": "read"
            },
            {
              "code": "vread"
            },
            {
              "code": "update"
            },
            {
              "code": "patch"
            },
            {
              "code": "delete"
            },
            {
              "code": "history-instance"
            },
            {
              "code": "history-type"
            },
            {
              "code": "create"
            },
            {
              "code": "search-type"
            }
          ],
          "conditionalCreate": true,
          "conditionalUpdate": true,
          "conditionalDelete": "multiple",
          "searchInclude": [
            "*"
          ],
          "searchParam": [
            {
              "name": "_content",
              "type": "string",
              "documentation": "Search the contents of the resource's data using a fulltext search"
            },
            {
              "name": "_has",
              "type": "string",
              "documentation": "Return resources linked to by the given target"
            },
            {
              "name": "_id",
              "type": "token",
              "documentation": "The ID of the resource"
            },
            {
              "name": "_language",
              "type": "string",
              "documentation": "The language of the resource"
            },
            {
              "name": "_lastUpdated",
              "type": "date",
              "documentation": "Only return resources which were last updated as specified by the given range"
            },
            {
              "name": "_profile",
              "type": "uri",
              "documentation": "Search for resources which have the given profile"
            },
            {
              "name": "_security",
              "type": "token",
              "documentation": "Search for resources which have the given security labels"
            },
            {
              "name": "_tag",
              "type": "token",
              "documentation": "Search for resources which have the given tag"
            },
            {
              "name": "_text",
              "type": "string",
              "documentation": "Search the contents of the resource's narrative using a fulltext search"
            },
            {
              "name": "active",
              "type": "token",
              "documentation": "Whether the practitioner record is active"
            },
            {
              "name": "address",
              "type": "string",
              "documentation": "A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text"
            },
            {
              "name": "address-city",
              "type": "string",
              "documentation": "A city specified in an address"
            },
            {
              "name": "address-country",
              "type": "string",
              "documentation": "A country specified in an address"
            },
            {
              "name": "address-postalcode",
              "type": "string",
              "documentation": "A postalCode specified in an address"
            },
            {
              "name": "address-state",
              "type": "string",
              "documentation": "A state specified in an address"
            },
            {
              "name": "address-use",
              "type": "token",
              "documentation": "A use code specified in an address"
            },
            {
              "name": "communication",
              "type": "token",
              "documentation": "One of the languages that the practitioner can communicate with"
            },
            {
              "name": "email",
              "type": "token",
              "documentation": "A value in an email contact"
            },
            {
              "name": "family",
              "type": "string",
              "documentation": "A portion of the family name"
            },
            {
              "name": "gender",
              "type": "token",
              "documentation": "Gender of the practitioner"
            },
            {
              "name": "given",
              "type": "string",
              "documentation": "A portion of the given name"
            },
            {
              "name": "identifier",
              "type": "token",
              "documentation": "A practitioner's Identifier"
            },
            {
              "name": "name",
              "type": "string",
              "documentation": "A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text"
            },
            {
              "name": "phone",
              "type": "token",
              "documentation": "A value in a phone contact"
            },
            {
              "name": "phonetic",
              "type": "string",
              "documentation": "A portion of either family or given name using some kind of phonetic matching algorithm"
            },
            {
              "name": "telecom",
              "type": "token",
              "documentation": "The value in any kind of contact"
            }
          ]
        },
        {
          "type": "PractitionerRole",
          "profile": "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
          "interaction": [
            {
              "code": "read"
            },
            {
              "code": "vread"
            },
            {
              "code": "update"
            },
            {
              "code": "patch"
            },
            {
              "code": "delete"
            },
            {
              "code": "history-instance"
            },
            {
              "code": "history-type"
            },
            {
              "code": "create"
            },
            {
              "code": "search-type"
            }
          ],
          "conditionalCreate": true,
          "conditionalUpdate": true,
          "conditionalDelete": "multiple",
          "searchInclude": [
            "*",
            "PractitionerRole:endpoint",
            "PractitionerRole:location",
            "PractitionerRole:organization",
            "PractitionerRole:practitioner",
            "PractitionerRole:service"
          ],
          "searchParam": [
            {
              "name": "_content",
              "type": "string",
              "documentation": "Search the contents of the resource's data using a fulltext search"
            },
            {
              "name": "_has",
              "type": "string",
              "documentation": "Return resources linked to by the given target"
            },
            {
              "name": "_id",
              "type": "token",
              "documentation": "The ID of the resource"
            },
            {
              "name": "_language",
              "type": "string",
              "documentation": "The language of the resource"
            },
            {
              "name": "_lastUpdated",
              "type": "date",
              "documentation": "Only return resources which were last updated as specified by the given range"
            },
            {
              "name": "_profile",
              "type": "uri",
              "documentation": "Search for resources which have the given profile"
            },
            {
              "name": "_security",
              "type": "token",
              "documentation": "Search for resources which have the given security labels"
            },
            {
              "name": "_tag",
              "type": "token",
              "documentation": "Search for resources which have the given tag"
            },
            {
              "name": "_text",
              "type": "string",
              "documentation": "Search the contents of the resource's narrative using a fulltext search"
            },
            {
              "name": "active",
              "type": "token",
              "documentation": "Whether this practitioner role record is in active use"
            },
            {
              "name": "date",
              "type": "date",
              "documentation": "The period during which the practitioner is authorized to perform in these role(s)"
            },
            {
              "name": "email",
              "type": "token",
              "documentation": "A value in an email contact"
            },
            {
              "name": "endpoint",
              "type": "reference",
              "documentation": "Technical endpoints providing access to services operated for the practitioner with this role"
            },
            {
              "name": "identifier",
              "type": "token",
              "documentation": "A practitioner's Identifier"
            },
            {
              "name": "location",
              "type": "reference",
              "documentation": "One of the locations at which this practitioner provides care"
            },
            {
              "name": "organization",
              "type": "reference",
              "documentation": "The identity of the organization the practitioner represents / acts on behalf of"
            },
            {
              "name": "phone",
              "type": "token",
              "documentation": "A value in a phone contact"
            },
            {
              "name": "practitioner",
              "type": "reference",
              "documentation": "Practitioner that is able to provide the defined services for the organization"
            },
            {
              "name": "role",
              "type": "token",
              "documentation": "The practitioner can perform this role at for the organization"
            },
            {
              "name": "service",
              "type": "reference",
              "documentation": "The list of healthcare services that this worker provides for this role's Organization/Location(s)"
            },
            {
              "name": "specialty",
              "type": "token",
              "documentation": "The practitioner has this specialty at an organization"
            },
            {
              "name": "telecom",
              "type": "token",
              "documentation": "The value in any kind of contact"
            }
          ]
        },
        {
          "type": "StructureDefinition",
          "profile": "http://hl7.org/fhir/StructureDefinition/StructureDefinition",
          "interaction": [
            {
              "code": "read"
            },
            {
              "code": "search-type"
            }
          ]
        }
      ],
      "interaction": [
        {
          "code": "transaction"
        }
      ],
      "operation": [
        {
          "name": "meta",
          "definition": "OperationDefinition/AllergyIntolerance--meta"
        },
        {
          "name": "meta",
          "definition": "OperationDefinition/AllergyIntolerance-i-meta"
        },
        {
          "name": "meta-add",
          "definition": "OperationDefinition/AllergyIntolerance-i-meta-add"
        },
        {
          "name": "meta-delete",
          "definition": "OperationDefinition/AllergyIntolerance-i-meta-delete"
        },
        {
          "name": "validate",
          "definition": "OperationDefinition/AllergyIntolerance--validate"
        },
        {
          "name": "validate",
          "definition": "OperationDefinition/AllergyIntolerance-i-validate"
        },
        {
          "name": "expunge",
          "definition": "OperationDefinition/AllergyIntolerance--expunge"
        },
        {
          "name": "expunge",
          "definition": "OperationDefinition/AllergyIntolerance-i-expunge"
        },
        {
          "name": "meta",
          "definition": "OperationDefinition/Organization--meta"
        },
        {
          "name": "meta",
          "definition": "OperationDefinition/Organization-i-meta"
        },
        {
          "name": "meta-add",
          "definition": "OperationDefinition/Organization-i-meta-add"
        },
        {
          "name": "meta-delete",
          "definition": "OperationDefinition/Organization-i-meta-delete"
        },
        {
          "name": "validate",
          "definition": "OperationDefinition/Organization--validate"
        },
        {
          "name": "validate",
          "definition": "OperationDefinition/Organization-i-validate"
        },
        {
          "name": "expunge",
          "definition": "OperationDefinition/Organization--expunge"
        },
        {
          "name": "expunge",
          "definition": "OperationDefinition/Organization-i-expunge"
        },
        {
          "name": "everything",
          "definition": "OperationDefinition/Patient-i-everything"
        },
        {
          "name": "everything",
          "definition": "OperationDefinition/Patient--everything"
        },
        {
          "name": "meta",
          "definition": "OperationDefinition/Patient--meta"
        },
        {
          "name": "meta",
          "definition": "OperationDefinition/Patient-i-meta"
        },
        {
          "name": "meta-add",
          "definition": "OperationDefinition/Patient-i-meta-add"
        },
        {
          "name": "meta-delete",
          "definition": "OperationDefinition/Patient-i-meta-delete"
        },
        {
          "name": "validate",
          "definition": "OperationDefinition/Patient--validate"
        },
        {
          "name": "validate",
          "definition": "OperationDefinition/Patient-i-validate"
        },
        {
          "name": "expunge",
          "definition": "OperationDefinition/Patient--expunge"
        },
        {
          "name": "expunge",
          "definition": "OperationDefinition/Patient-i-expunge"
        },
        {
          "name": "meta",
          "definition": "OperationDefinition/Practitioner--meta"
        },
        {
          "name": "meta",
          "definition": "OperationDefinition/Practitioner-i-meta"
        },
        {
          "name": "meta-add",
          "definition": "OperationDefinition/Practitioner-i-meta-add"
        },
        {
          "name": "meta-delete",
          "definition": "OperationDefinition/Practitioner-i-meta-delete"
        },
        {
          "name": "validate",
          "definition": "OperationDefinition/Practitioner--validate"
        },
        {
          "name": "validate",
          "definition": "OperationDefinition/Practitioner-i-validate"
        },
        {
          "name": "expunge",
          "definition": "OperationDefinition/Practitioner--expunge"
        },
        {
          "name": "expunge",
          "definition": "OperationDefinition/Practitioner-i-expunge"
        },
        {
          "name": "meta",
          "definition": "OperationDefinition/PractitionerRole--meta"
        },
        {
          "name": "meta",
          "definition": "OperationDefinition/PractitionerRole-i-meta"
        },
        {
          "name": "meta-add",
          "definition": "OperationDefinition/PractitionerRole-i-meta-add"
        },
        {
          "name": "meta-delete",
          "definition": "OperationDefinition/PractitionerRole-i-meta-delete"
        },
        {
          "name": "validate",
          "definition": "OperationDefinition/PractitionerRole--validate"
        },
        {
          "name": "validate",
          "definition": "OperationDefinition/PractitionerRole-i-validate"
        },
        {
          "name": "expunge",
          "definition": "OperationDefinition/PractitionerRole--expunge"
        },
        {
          "name": "expunge",
          "definition": "OperationDefinition/PractitionerRole-i-expunge"
        }
      ]
    }
  ]
}


Eksempler

Læs allergyIntolerance uden historik

For at læse cave oplysninger i cave servicen anvendes et HTTP Get kald til CAVE Servicens REST snitflade. Nedenstående er den HTTP Get, der skal laves. Det med rødt markerede er den variable del i form af CPR nummer. 

...

Code Block
languagetext
{
    "resourceType": "Bundle",
    "id": "bae2ae59-8dd2-4a22-bc0e-5dbc4840569d",
    "meta": {
        "lastUpdated": "2019-02-13T07:25:27.572+01:00"
    },
    "type": "searchset",
    "total": 5,
    "link": [
        {
            "relation": "self",
            "url": "http://cave.sdsd.dk/fhir/AllergyIntolerance?_include=AllergyIntolerance%3Apatient&_include=AllergyIntolerance%3Arecorder&_include%3Arecurse=PractitionerRole%3Apractitioner&_include%3Arecurse=PractitionerRole%3Aorganization&patient.identifier=urn%3Aoid%3A1.2.208.176.1.2%7C0101010110"
        }
    ],
    "entry": [
        {
            "fullUrl": "http://cave.sdsd.dk/fhir/AllergyIntolerance/608",
            "resource": {
                "resourceType": "AllergyIntolerance",
                "id": "608",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2019-02-12T15:49:09.000+01:00"
                },
                "identifier": [
                    {
                        "value": "69a8c8f2-a410-41d4-af4d-57bcd6a9d721"
                    }
                ],
                "clinicalStatus": {
                    "coding": [
                        {
                            "code": "active"
                        }
                    ]
                },
                "verificationStatus": {
                    "coding": [
                        {
                            "code": "confirmed"
                        }
                    ]
                },
                "type": "allergy",
                "category": [
                    "medication"
                ],
                "criticality": "unable-to-assess",
                "code": {
                    "coding": [
                        {
                            "system": "urn:oid:2.16.840.1.113883.6.73",
                            "code": "N07B02"
                        }
                    ],
                    "text": "Metadon"
                },
                "patient": {
                    "reference": "Patient/607"
                },
                "onsetDateTime": "2019-01-11T09:01:03+01:00",
                "recorder": {
                    "reference": "PractitionerRole/606"
                },
                "lastOccurrence": "2019-01-11T09:01:03+01:00",
                "reaction": [
                    {
                        "manifestation": [
                            {
                                "coding": [
                                    {
                                        "system": "urn:oid:1.2.208.176.2.4.12",
                                        "code": "DT789"
                                    }
                                ],
                                "text": "Ser grønne elefanter!"
                            }
                        ],
                        "severity": "severe"
                    }
                ]
            },
            "search": {
                "mode": "match"
            },
            "response": {
                "status": "201 Created",
                "etag": "W/\"1\""
            }
        },
        {
            "fullUrl": "http://cave.sdsd.dk/fhir/PractitionerRole/606",
            "resource": {
                "resourceType": "PractitionerRole",
                "id": "606",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2019-02-12T15:49:09.000+01:00"
                },
                "practitioner": {
                    "reference": "Practitioner/604"
                },
                "organization": {
                    "reference": "Organization/605"
                }
            },
            "search": {
                "mode": "include"
            },
            "response": {
                "status": "201 Created",
                "etag": "W/\"1\""
            }
        },
        {
            "fullUrl": "http://cave.sdsd.dk/fhir/Patient/607",
            "resource": {
                "resourceType": "Patient",
                "id": "607",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2019-02-12T15:49:09.000+01:00"
                },
                "identifier": [
                    {
                        "system": "urn:oid:1.2.208.176.1.2",
                        "value": "0101010110"
                    }
                ]
            },
            "search": {
                "mode": "include"
            },
            "response": {
                "status": "201 Created",
                "etag": "W/\"1\""
            }
        },
        {
            "fullUrl": "http://cave.sdsd.dk/fhir/Practitioner/604",
            "resource": {
                "resourceType": "Practitioner",
                "id": "604",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2019-02-12T15:49:08.000+01:00"
                },
                "identifier": [
                    {
                        "system": "urn:oid:1.2.208.176.1.3",
                        "value": "AUT_ID2"
                    }
                ]
            },
            "search": {
                "mode": "include"
            },
            "response": {
                "status": "201 Created",
                "etag": "W/\"1\""
            }
        },
        {
            "fullUrl": "http://cave.sdsd.dk/fhir/Organization/605",
            "resource": {
                "resourceType": "Organization",
                "id": "605",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2019-02-12T15:49:08.000+01:00"
                },
                "identifier": [
                    {
                        "system": "urn:oid:1.2.208.176.1.1",
                        "value": "SOR_KODE1"
                    }
                ]
            },
            "search": {
                "mode": "include"
            },
            "response": {
                "status": "201 Created",
                "etag": "W/\"1\""
            }
        }
    ]
}

...

Læs allergyIntolerance med historik

For at registrere CAVE oplysninger sker det ved læse cave oplysninger i cave servicen anvendes et HTTP Get kald til CAVE Servicens REST snitflade. Nedenstående er den HTTP Get, der skal laves. Det med rødt markerede er den variable del i form af allergiens id. 


Post kald til http://cave.sdsd.dk/fhir/AllergyIntolerance. Body består af en fhir bundle med de ressourcer der ønskes oprettet. Nedenstående er eksempel på HTTP body til oprettelse af data. 

Den enkelte felter er beskrevet under snitfladebeskrivelse. 

/163/_history

Svaret på ovenstående request har nedenstående format. Der har været en enkelt opdatering til allergien i eksemplet, hvorfor der er 2 versioner i svaret. I svaret er det entry listen, der indeholder de enkelte versioner af ressourcen, man får tilbage. Svaret indeholder kun resourcer af typen AllergyIntolerance. Beskrivelse af de felter, der anvendes i hver resource, kan ses under snitfladebeskrivelse.

For at få detaljerne for de øvrige resourcer (Patient, PractitionerRole, Practitioner, Organization) skal de læses selvstændigt. Se source koden til cave servicen (klassen CaveClientAllergyHistory) for detaljer omkring dette. 

Code Block
languagetext
{
  
Code Block
{
  "resourceType": "Bundle",
    "id": "e9e84173-ea5f-4146-9e04-32a6dd6a87d1",
    "meta": {
        "lastUpdated": "2020-01-20T14:46:40.000+01:00"
    },
    "type": "history",
    "total": 2,
    "link": [
        {
            "relation": "self",
            "url": "http://cave.sdsd.dk/fhir/AllergyIntolerance/163/_history"
        }
    ],
    "entry": [
        {
            "fullUrl": "http://cave.sdsd.dk/fhir/AllergyIntolerance/163",
            "resource": {
                "resourceType": "AllergyIntolerance",
                "id": "163",
                "meta": {
                    "versionId": "2",
                    "lastUpdated": "2020-01-20T14:46:35.000+01:00"
                },
                "identifier": [
                    {
                        "value": "69a8c8f2-a410-41d4-af4d-57bcd6a9d723"
                    }
                ],
                "clinicalStatus": {
                    "coding": [
                        {
                            "code": "active"
                        }
                    ]
                },
                "verificationStatus": {
                    "coding": [
                        {
                            "code": "confirmed"
                        }
                    ]
                },
                "type": "allergy",
                "category": [
                    "medication"
                ],
                "criticality": "unable-to-assess",
                "code": {
                    "coding": [
                        {
                            "system": "urn:oid:2.16.840.1.113883.6.73",
                            "code": "N07B02"
                        }
                    ],
                    "text": "Metadon"
                },
                "patient": {
                    "reference": "Patient/162"
                },
                "onsetDateTime": "2019-01-11T09:01:03+01:00",
                "recorder": {
                    "reference": "PractitionerRole/161"
                },
                "lastOccurrence": "2019-01-11T09:01:03+01:00",
                "reaction": [
                    {
                        "manifestation": [
                            {
                                "coding": [
                                    {
                                        "system": "urn:oid:1.2.208.176.2.4.12",
                                        "code": "DT789"
                                    }
                                ],
                                "text": "Ser grønne elefanter version 2!"
                            }
                        ],
                        "severity": "severe"
                    }
                ]
            },
            "request": {
                "method": "PUT",
                "url": "http://cave.sdsd.dk/fhir/AllergyIntolerance/163/_history/2"
            },
            "response": {
                "status": "200 OK",
                "etag": "W/\"2\""
            }
        },
        {
            "fullUrl": "http://cave.sdsd.dk/fhir/AllergyIntolerance/163",
            "resource": {
                "resourceType": "AllergyIntolerance",
                "id": "163",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2020-01-20T14:36:37.000+01:00"
                },
                "identifier": [
                    {
                        "value": "69a8c8f2-a410-41d4-af4d-57bcd6a9d723"
                    }
                ],
                "clinicalStatus": {
                    "coding": [
                        {
                            "code": "active"
                        }
                    ]
                },
                "verificationStatus": {
                    "coding": [
                        {
                            "code": "confirmed"
                        }
                    ]
                },
                "type": "allergy",
                "category": [
                    "medication"
                ],
                "criticality": "unable-to-assess",
                "code": {
                    "coding": [
                        {
                            "system": "urn:oid:2.16.840.1.113883.6.73",
                            "code": "N07B02"
                        }
                    ],
                    "text": "Metadon"
                },
                "patient": {
                    "reference": "Patient/162"
                },
                "onsetDateTime": "2019-01-11T09:01:03+01:00",
                "recorder": {
                    "reference": "PractitionerRole/161"
                },
                "lastOccurrence": "2019-01-11T09:01:03+01:00",
                "reaction": [
                    {
                        "manifestation": [
                            {
                                "coding": [
                                    {
                                        "system": "urn:oid:1.2.208.176.2.4.12",
                                        "code": "DT789"
                                    }
                                ],
                                "text": "Ser grønne elefanter!"
                            }
                        ],
                        "severity": "severe"
                    }
                ]
            },
            "request": {
                "method": "POST",
                "url": "http://cave.sdsd.dk/fhir/AllergyIntolerance/163/_history/1"
            },
            "response": {
                "status": "201 Created",
                "etag": "W/\"1\""
            }
        }
    ]
}

Registrer cave oplysninger

For at registrere CAVE oplysninger sker det ved et HTTP Post kald til http://cave.sdsd.dk/fhir/AllergyIntolerance. Body består af en fhir bundle med de ressourcer der ønskes oprettet. Nedenstående er eksempel på HTTP body til oprettelse af data. 

Den enkelte felter er beskrevet under snitfladebeskrivelse. 




Code Block
{
  "resourceType": "Bundle",
  "type": "transaction",
  "entry": [
    {
      "fullUrl": "urn:uuid:67e31dec-71e5-4f7d-88d6-402499aaa4ce",
      "resource": {
        "resourceType": "Practitioner",
        "identifier": [
          {
            "system": "urn:oid:1.2.208.176.1.3",
            "value": "AUT_ID2"
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "Practitioner"
      }
    },
    {
      "fullUrl": "urn:uuid:0615d12d-08eb-482b-9a4b-200cfc6d8adc",
      "resource": {
        "resourceType": "Organization",
        "identifier": [
          {
            "system": "urn:oid:1.2.208.176.1.1",
            "value": "SOR_KODE1"
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "Organization"
      }
    },
    {
      "fullUrl": "urn:uuid:4de0c3d5-4beb-42aa-a3f3-326e41442577",
      "resource": {
        "resourceType": "PractitionerRole",
        "practitioner": {
          "id": "urn:uuid:67e31dec-71e5-4f7d-88d6-402499aaa4ce"
        },
        "organization": {
          "id": "urn:uuid:0615d12d-08eb-482b-9a4b-200cfc6d8adc"
        }
      },
      "request": {
        "method": "POST",
        "url": "PractitionerRole"
      }
    },
    {
      "fullUrl": "urn:uuid:9185fff5-7d2b-428d-bada-5641075b157d",
      "resource": {
        "resourceType": "Patient",
        "identifier": [
          {
            "system": "urn:oid:1.2.208.176.1.2",
            "value": "0101010110"
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "Patient"
      }
    },
    {
      "resource": {
        "resourceType": "AllergyIntolerance",
        "clinicalStatus": {
          "coding": [
            {
              "code": "active"
            }
          ]
        },
                "identifier": [
                    {
                        "value": "69a8c8f2-a410-41d4-af4d-57bcd6a9d723"
                    }
                ],        
        "verificationStatus": {
          "coding": [
            {
              "code": "confirmed"
            }
          ]
        },
        "type": "allergy",
        "category": [
          "medication"
        ],
        "criticality": "unable-to-assess",
        "code": {
          "coding": [
            {
              "system": "urn:oid:2.16.840.1.113883.6.73",
              "code": "N07B02"
            }
          ],
          "text": "Metadon"
        },
        "patient": {
          "id": "urn:uuid:9185fff5-7d2b-428d-bada-5641075b157d"
        },
        "onsetDateTime": "2019-01-11T09:01:03+01:00",
        "recorder": {
          "id": "urn:uuid:4de0c3d5-4beb-42aa-a3f3-326e41442577"
        },
        "lastOccurrence": "2019-01-11T09:01:03+01:00",
        "reaction": [
          {
            "manifestation": [
              {
                "coding": [
                  {
                    "system": "urn:oid:1.2.208.176.2.4.12",
                    "code": "DT789"
                  }
                ],
                "text": "Ser grønne elefanter!"
              }
            ],
            "severity": "severe"
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "AllergyIntolerance"
      }
    }
  ]
}



Ovenstående giver nedenstående svar. Savret indeholder de data, der er blevet oprettet. 


Code Block
{
    "resourceType": "Bundle",
    "type": "transaction-response",
    "link": [
        {
            "relation": "self",
            "url": "http://cave.sdsd.dk/fhir"
        }
    ],
    "entry": [
        {
            "resource": {
                "resourceType": "Practitioner",
                "id": "604",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2019-02-12T15:49:08.000+01:00"
                },
                "identifier": [
                    {
                        "system": "urn:oid:1.2.208.176.1.3",
                        "value": "AUT_ID2"
                    }
                ]
            }
        },
        {
            "resource": {
                "resourceType": "Organization",
                "id": "605",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2019-02-12T15:49:08.000+01:00"
                },
                "identifier": [
                    {
                        "system": "urn:oid:1.2.208.176.1.1",
                        "value": "SOR_KODE1"
                    }
                ]
            }
        },
        {
            "resource": {
                "resourceType": "PractitionerRole",
                "id": "606",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2019-02-12T15:49:09.000+01:00"
                },
                "practitioner": {
                    "reference": "Practitioner/604"
                },
                "organization": {
                    "reference": "Organization/605"
                }
            }
        },
        {
            "resource": {
                "resourceType": "Patient",
                "id": "607",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2019-02-12T15:49:09.000+01:00"
                },
                "identifier": [
                    {
                        "system": "urn:oid:1.2.208.176.1.2",
                        "value": "0101010110"
                    }
                ]
            }
        },
        {
            "resource": {
                "resourceType": "AllergyIntolerance",
                "id": "653",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2019-02-13T07:52:49.573+01:00"
                },
                "identifier": [
                    {
                        "value": "69a8c8f2-a410-41d4-af4d-57bcd6a9d723"
                    }
                ],
                "clinicalStatus": {
                    "coding": [
                        {
                            "code": "active"
                        }
                    ]
                },
                "verificationStatus": {
                    "coding": [
                        {
                            "code": "confirmed"
                        }
                    ]
                },
                "type": "allergy",
                "category": [
                    "medication"
                ],
                "criticality": "unable-to-assess",
                "code": {
                    "coding": [
                        {
                            "system": "urn:oid:2.16.840.1.113883.6.73",
                            "code": "N07B02"
                        }
                    ],
                    "text": "Metadon"
                },
                "patient": {
                    "reference": "Patient/607"
                },
                "onsetDateTime": "2019-01-11T09:01:03+01:00",
                "recorder": {
                    "reference": "PractitionerRole/606"
                },
                "lastOccurrence": "2019-01-11T09:01:03+01:00",
                "reaction": [
                    {
                        "manifestation": [
                            {
                                "coding": [
                                    {
                                        "system": "urn:oid:1.2.208.176.2.4.12",
                                        "code": "DT789"
                                    }
                                ],
                                "text": "Ser grønne elefanter!"
                            }
                        ],
                        "severity": "severe"
                    }
                ]
            }
        }
    ]
}



Opdater cave oplysninger

For at opdateret CAVE oplysninger sker det ved et HTTP Post kald til http://cave.sdsd.dk/fhir/AllergyIntolerance. Body består af en fhir bundle med de ressourcer der ønskes oprettet. Nedenstående er eksempel på HTTP body til oprettelse af data. 

Den enkelte felter er beskrevet under snitfladebeskrivelse. 


Code Block
{
  "resourceType": "Bundle",
  "type": "type": "transaction",
  "entry": [
    {
      "fullUrl": "urn:uuid:67e31dec-71e5-4f7d-88d6-402499aaa4ce",
      "resource": {
        "resourceType": "Practitioner",
        "identifier": [
          {
            "system": "urn:oid:1.2.208.176.1.3",
            "value": "AUT_ID2"
          }
        ]
      },
      "request": {
        "method": "POSTPUT",
        "url": "Practitioner"
      }
    },
    {
      "fullUrl": "urn:uuid:0615d12d-08eb-482b-9a4b-200cfc6d8adc",
      "resource": {
        "resourceType": "Organization",
        "identifier": [
          {
            "system": "urn:oid:1.2.208.176.1.1",
            "value": "SOR_KODE1"
          }
        ]
      },
      "request": {
        "method": "POSTPUT",
        "url": "Organization"
      }
    },
    {
      "fullUrl": "urn:uuid:4de0c3d5-4beb-42aa-a3f3-326e41442577",
      "resource": {
        "resourceType": "PractitionerRole",
        "practitioner": {
          "id": "urn:uuid:67e31dec-71e5-4f7d-88d6-402499aaa4ce"
        },
        "organization": {
          "id": "urn:uuid:0615d12d-08eb-482b-9a4b-200cfc6d8adc"
        }
      },
      "request": {
        "method": "POSTPUT",
        "url": "PractitionerRole"
      }
    },
    {
      "fullUrl": "urn:uuid:9185fff5-7d2b-428d-bada-5641075b157d",
      "resource": {
        "resourceType": "Patient",
        "identifier": [
          {
            "system": "urn:oid:1.2.208.176.1.2",
            "value": "0101010110"
          }
        ]
      },
      "request": {
        "method": "POSTPUT",
        "url": "Patient"
      }
    },
    {
      "resource": {
        "resourceType": "AllergyIntolerance",
        "clinicalStatus": {
          "coding": [
            {
              "code": "active"
            }
          ]
        },
        "id": "163",
        "meta": {
            "versionId": "1",
        	"lastUpdated": "2020-01-20T14:36:37.000+01:00"
    		},
                "identifier": [
                    {
                        "value": "69a8c8f2-a410-41d4-af4d-57bcd6a9d723"
                    }
                ],        
        "verificationStatus": {
          "coding": [
            {
              "code": "confirmed"
            }
          ]
        },
        "type": "allergy",
        "category": [
          "medication"
        ],
        "criticality": "unable-to-assess",
        "code": {
          "coding": [
            {
              "system": "urn:oid:2.16.840.1.113883.6.73",
              "code": "N07B02"
            }
          ],
          "text": "Metadon"
        },
        "patient": {
          "id": "urn:uuid:9185fff5-7d2b-428d-bada-5641075b157d"
        },
        "onsetDateTime": "2019-01-11T09:01:03+01:00",
        "recorder": {
          "id": "urn:uuid:4de0c3d5-4beb-42aa-a3f3-326e41442577"
        },
        "lastOccurrence": "2019-01-11T09:01:03+01:00",
        "reaction": [
          {
            "manifestation": [
              {
                "coding": [
                  {
                    "system": "urn:oid:1.2.208.176.2.4.12",
                    "code": "DT789"
                  }
                ],
                "text": "Ser grønne elefanter version 2!"
              }
            ],
            "severity": "severe"
          }
        ]
      },
      "request": {
        "method": "POSTPUT",
        "url": "AllergyIntolerance"
      }
    }
  ]
}



Ovenstående giver nedenstående svar. Savret Svaret indeholder de data, der er blevet oprettetopdateret


Code Block
{
    "resourceType": "Bundle",
    "type": "transaction-response",
    "link": [
        {
            "relation": "self",
            "url": "http://cave.sdsd.dk/fhir"
        }
    ],
    "entry": [
        {
            "resource": {
                "resourceType": "Practitioner",
                "id": "604159",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "20192020-0201-12T1520T14:4936:0836.000+01:00"
                },
                "identifier": [
                    {
                        "system": "urn:oid:1.2.208.176.1.3",
                        "value": "AUT_ID2"
                    }
                ]
            }
        },
        {
            "resource": {
                "resourceType": "Organization",
                "id": "605160",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "20192020-0201-12T1520T14:4936:0836.000+01:00"
                },
                "identifier": [
                    {
                        "system": "urn:oid:1.2.208.176.1.1",
                        "value": "SOR_KODE1"
                    }
                ]
            }
        },
        {
            "resource": {
                "resourceType": "PractitionerRole",
                "id": "606161",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "20192020-0201-12T1520T14:4936:0937.000+01:00"
                },
                "practitioner": {
                    "reference": "Practitioner/604159"
                },
                "organization": {
                    "reference": "Organization/605160"
                }
            }
        },
        {
            "resource": {
                "resourceType": "Patient",
                "id": "607162",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "20192020-0201-12T1520T14:4936:0937.000+01:00"
                },
                "identifier": [
                    {
                        "system": "urn:oid:1.2.208.176.1.2",
                        "value": "0101010110"
                    }
                ]
            }
        },
        {
            "resource": {
                "resourceType": "AllergyIntolerance",
                "id": "653163",
                "meta": {
                    "versionId": "12",
                    "lastUpdated": "20192020-0201-13T0720T14:5246:4935.573965+01:00"
                },
                "identifier": [
                    {
                        "value": "69a8c8f2-a410-41d4-af4d-57bcd6a9d723"
                    }
                ],
                "clinicalStatus": {
                    "coding": [
                        {
                            "code": "active"
                        }
                    ]
                },
                "verificationStatus": {
                    "coding": [
                        {
                            "code": "confirmed"
                        }
                    ]
                },
                "type": "allergy",
                "category": [
                    "medication"
                ],
                "criticality": "unable-to-assess",
                "code": {
                    "coding": [
                        {
                            "system": "urn:oid:2.16.840.1.113883.6.73",
                            "code": "N07B02"
                        }
                    ],
                    "text": "Metadon"
                },
                "patient": {
                    "reference": "Patient/607162"
                },
                "onsetDateTime": "2019-01-11T09:01:03+01:00",
                "recorder": {
                    "reference": "PractitionerRole/606161"
                },
                "lastOccurrence": "2019-01-11T09:01:03+01:00",
                "reaction": [
                    {
                        "manifestation": [
                            {
                                "coding": [
                                    {
                                        "system": "urn:oid:1.2.208.176.2.4.12",
                                        "code": "DT789"
                                    }
                                ],
                                "text": "Ser grønne elefanter version 2!"
                            }
                        ],
                        "severity": "severe"
                    }
                ]
            }
        }
    ]
}