Versions Compared

Key

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

...

Expand
titleExamples of Searching for Observations

Searching for Observation

Some Below is a list of some of the possible common search parameters. An exhaustive list can be found in implementation guide at http://ehealth-documentation.s3-website-eu-west-1.amazonaws.com/latest/ig/measurement.openapi.json.

Name

Description

_tag

the tag of a resource

_id

The ID of the resource

text

Search the contents of the resource's narrative using a fulltext search

episodeOfCare

Episode associated with observation

based-on

Reference to the serviceRequest

identifier

The unique id for a particular observation

patient

The patient that the observation is about

resolvedTimingServiceRequestVersionId

The serviceRequestVersionID held in the Resolved Timing

resolvedTimingStart

Resolved Timing start

resolvedTimingEnd

Resolved Timing end

resolvedTimingType

Resolved Timing type

subject

The subject that the observation is about

codeepisodeOfCare

The code of the observation type

date

Obtained date/time. If the obtained element is a period, a date that falls in the period

qualityCode

The quality code of the observation

qualityType

The quality type of the observationEpisodeOfCare that the Observation is associated with

based-on

The ServiceRequest that the observation is based on

resolvedTimingStart

Resolved Timing start

resolvedTimingEnd

Resolved Timing end

Response:

  • Bundle of

    • Observation(s)

Examples:

Searching on Observations are done by use of a traditional GET request:

GET [base]/fhir/Observation?paramName1=param1&paramName2=param2

As an example one could perform searches like the following examples:

  • Searching by two resource Ids and and a Subject: GET [base]/fhir/Observation?_id=1,3&subject=https://patient.local.ehealth.sundhed.dk/fhir/Patient/34032

  • Searching by occurrence date: GET [base]/fhir/Observation?date=lt2023-01-22&date=gt2022-10-22 (lt=less than, gt=greater than)

  • Searching by resolvedTiming start and end: GET [base]/fhir/Observation?resolvedTimingEnd=gt2023-05-22T08:37:42+02:00&resolvedTimingStart=gt2023-05-22T08:37:42+02:00

  • Search by resource tag: GET [base]/fhir/Observation?_tag=http://ehealth.sundhed.dk/cs/ehealth-system|xa

An example of a response on for a search could be:

Code Block
{
  "resourceType": "Bundle",
  "id": "38696d91-c2e4-44c4-9745-9101fde22c68",
  "meta": {
    "lastUpdated": "2023-05-22T11:38:07.748+00:00"
  },
  "type": "searchset",
  "total": 2,
  "link": [ {
    "relation": "self",
    "url": "https://measurement.local.ehealth.sundhed.dk/fhir/Observation?_id=1,3&subject=https://patient.local.ehealth.sundhed.dk/fhir/Patient/11464"
  } ],
  "entry": [ {
    "fullUrl": "https://measurement.local.ehealth.sundhed.dk/fhir/Observation/3",
    "resource": {
      "resourceType": "Observation",
      "id": "3",
      "meta": {
        "versionId": "1",
        "lastUpdated": "2023-05-22T11:38:07.645+00:00",
        "source": "#681926ed-87a3-45",
        "profile": [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-observation" ]
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare",
        "valueReference": {
          "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/EpisodeOfCare/74121"
        }
      }, {
        "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-resolved-timing",
        "extension": [ {
          "url": "serviceRequestVersionId",
          "valueId": "42"
        }, {
          "url": "type",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/resolved-timing-type",
              "code": "Adhoc"
            } ]
          }
        } ]
      } ],
      "basedOn": [ {
        "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/ServiceRequest/68661"
      } ],
      "status": "final",
      "code": {
        "coding": [ {
          "system": "urn:oid:1.2.208.176.2.1",
          "code": "NPU03011"
        } ]
      },
      "subject": {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/Patient/11464"
      },
      "effectivePeriod": {
        "start": "2023-05-22T13:38:07+02:00",
        "end": "2023-05-22T13:38:07+02:00"
      },
      "performer": [ {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/Patient/11464"
      } ],
      "device": {
        "reference": "https://device.local.ehealth.sundhed.dk/fhir/Device/41502"
      }
    },
    "search": {
      "mode": "match"
    }
  }, {
    "fullUrl": "https://measurement.local.ehealth.sundhed.dk/fhir/Observation/1",
    "resource": {
      "resourceType": "Observation",
      "id": "1",
      "meta": {
        "versionId": "1",
        "lastUpdated": "2023-05-22T11:38:06.857+00:00",
        "source": "#ad7c2284-3eb3-47",
        "profile": [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-observation" ]
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare",
        "valueReference": {
          "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/EpisodeOfCare/14633"
        }
      }, {
        "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-resolved-timing",
        "extension": [ {
          "url": "serviceRequestVersionId",
          "valueId": "42"
        }, {
          "url": "type",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/resolved-timing-type",
              "code": "Adhoc"
            } ]
          }
        } ]
      } ],
      "basedOn": [ {
        "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/ServiceRequest/43518"
      } ],
      "status": "final",
      "code": {
        "coding": [ {
          "system": "urn:oid:1.2.208.176.2.1",
          "code": "NPU03011"
        } ]
      },
      "subject": {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/Patient/11464"
      },
      "effectivePeriod": {
        "start": "2023-05-22T13:38:05+02:00",
        "end": "2023-05-22T13:38:05+02:00"
      },
      "performer": [ {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/Patient/11464"
      } ],
      "device": {
        "reference": "https://device.local.ehealth.sundhed.dk/fhir/Device/72749"
      }
    },
    "search": {
      "mode": "match"
    }
  } ]
}

...

Expand
titleExample of Searching for Media(s)

Searching on Media

Some Below is a list of some of the possible common search parameters. An exhaustive list can be found in implementation guide at http://ehealth-documentation.s3-website-eu-west-1.amazonaws.com/latest/ig/measurement.openapi.json.

Name

Description

_tag

the tag of a resource

_id

The ID of the resource

identifier

The unique id for a particular observation

episodeOfCare

Episode associated with observation

subject

The subject that the observation is about

type

The type of the Media ("photo | video | audio")

created

When Media was collectedqualityCode

The quality code of the Media

qualityType

The quality type of the Media

based-on

ServiceRequest that caused this media to be created

resolvedTimingServiceRequestVersionId

The serviceRequestVersionID held in the Resolved Timing

resolvedTimingStart

Resolved Timing start

resolvedTimingEnd

Resolved Timing end

resolvedTimingType

Resolved Timing typebased-on

ServiceRequest that caused this media to be created

Response:

  • Bundle of

    • Media(s)

Examples:

Searching on Medias are done by use of a traditional GET request:

GET [base]/fhir/Media?paramName1=param1&paramName2=param2

As an example one could perform searches like the following examples:

  • Searching based on Media’s type: GET [base]/fhir/Media?type=audio

  • Searching based on when the media was created: GET [base]/fhir/Media?created=lt2023-03-22&created=gt2023-01-22

An example of a response on for a search could be:

Code Block
{
  "resourceType": "Bundle",
  "id": "b6164483-cb47-475d-9b3d-35b4ddff2178",
  "meta": {
    "lastUpdated": "2023-05-22T12:41:19.064+00:00"
  },
  "type": "searchset",
  "total": 4,
  "link": [ {
    "relation": "self",
    "url": "https://measurement.local.ehealth.sundhed.dk/fhir/Media?_format=json&created=lt2023-01-22&created=gt2022-10-22&subject=https://patient.local.ehealth.sundhed.dk/fhir/Patient/48739"
  } ],
  "entry": [ {
    "fullUrl": "https://measurement.local.ehealth.sundhed.dk/fhir/Media/14",
    "resource": {
      "resourceType": "Media",
      "id": "14",
      "meta": {
        "versionId": "1",
        "lastUpdated": "2023-05-22T12:41:18.641+00:00",
        "source": "#7ffe0a24-79cb-4a",
        "profile": [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-media" ]
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare",
        "valueReference": {
          "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/EpisodeOfCare/38702"
        }
      }, {
        "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-quality",
        "extension": [ {
          "url": "qualityType",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/quality-types",
              "code": "TBD"
            } ]
          }
        }, {
          "url": "qualityCode",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/usage-quality",
              "code": "TBD"
            } ]
          }
        } ]
      }, {
        "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-resolved-timing",
        "extension": [ {
          "url": "serviceRequestVersionId",
          "valueId": "42"
        }, {
          "url": "type",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/resolved-timing-type",
              "code": "Adhoc"
            } ]
          }
        } ]
      } ],
      "basedOn": [ {
        "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/ServiceRequest/8100"
      } ],
      "status": "completed",
      "type": {
        "coding": [ {
          "system": "http://terminology.hl7.org/CodeSystem/media-type",
          "code": "audio"
        } ]
      },
      "subject": {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/Patient/48739"
      },
      "createdPeriod": {
        "start": "2022-09-22T14:41:18+02:00",
        "end": "2022-12-22T14:41:18+01:00"
      },
      "content": {
        "language": "en"
      }
    },
    "search": {
      "mode": "match"
    }
  }, {
    "fullUrl": "https://measurement.local.ehealth.sundhed.dk/fhir/Media/15",
    "resource": {
      "resourceType": "Media",
      "id": "15",
      "meta": {
        "versionId": "1",
        "lastUpdated": "2023-05-22T12:41:18.749+00:00",
        "source": "#0f8ec44e-ddee-47",
        "profile": [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-media" ]
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare",
        "valueReference": {
          "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/EpisodeOfCare/27960"
        }
      }, {
        "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-quality",
        "extension": [ {
          "url": "qualityType",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/quality-types",
              "code": "TBD"
            } ]
          }
        }, {
          "url": "qualityCode",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/usage-quality",
              "code": "TBD"
            } ]
          }
        } ]
      }, {
        "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-resolved-timing",
        "extension": [ {
          "url": "serviceRequestVersionId",
          "valueId": "42"
        }, {
          "url": "type",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/resolved-timing-type",
              "code": "Adhoc"
            } ]
          }
        } ]
      } ],
      "basedOn": [ {
        "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/ServiceRequest/42867"
      } ],
      "status": "completed",
      "type": {
        "coding": [ {
          "system": "http://terminology.hl7.org/CodeSystem/media-type",
          "code": "audio"
        } ]
      },
      "subject": {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/Patient/48739"
      },
      "createdPeriod": {
        "start": "2022-11-22T14:41:18+01:00",
        "end": "2022-12-22T14:41:18+01:00"
      },
      "content": {
        "language": "en"
      }
    },
    "search": {
      "mode": "match"
    }
  }, {
    "fullUrl": "https://measurement.local.ehealth.sundhed.dk/fhir/Media/13",
    "resource": {
      "resourceType": "Media",
      "id": "13",
      "meta": {
        "versionId": "1",
        "lastUpdated": "2023-05-22T12:41:18.520+00:00",
        "source": "#c642ec8c-b6bb-4e",
        "profile": [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-media" ]
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare",
        "valueReference": {
          "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/EpisodeOfCare/57058"
        }
      }, {
        "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-quality",
        "extension": [ {
          "url": "qualityType",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/quality-types",
              "code": "TBD"
            } ]
          }
        }, {
          "url": "qualityCode",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/usage-quality",
              "code": "TBD"
            } ]
          }
        } ]
      }, {
        "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-resolved-timing",
        "extension": [ {
          "url": "serviceRequestVersionId",
          "valueId": "42"
        }, {
          "url": "type",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/resolved-timing-type",
              "code": "Adhoc"
            } ]
          }
        } ]
      } ],
      "basedOn": [ {
        "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/ServiceRequest/49636"
      } ],
      "status": "completed",
      "type": {
        "coding": [ {
          "system": "http://terminology.hl7.org/CodeSystem/media-type",
          "code": "audio"
        } ]
      },
      "subject": {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/Patient/48739"
      },
      "createdPeriod": {
        "start": "2022-12-22T14:41:18+01:00",
        "end": "2023-02-22T14:41:18+01:00"
      },
      "content": {
        "language": "en"
      }
    },
    "search": {
      "mode": "match"
    }
  }, {
    "fullUrl": "https://measurement.local.ehealth.sundhed.dk/fhir/Media/17",
    "resource": {
      "resourceType": "Media",
      "id": "17",
      "meta": {
        "versionId": "1",
        "lastUpdated": "2023-05-22T12:41:18.968+00:00",
        "source": "#4999c426-89d7-40",
        "profile": [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-media" ]
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare",
        "valueReference": {
          "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/EpisodeOfCare/27864"
        }
      }, {
        "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-quality",
        "extension": [ {
          "url": "qualityType",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/quality-types",
              "code": "TBD"
            } ]
          }
        }, {
          "url": "qualityCode",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/usage-quality",
              "code": "TBD"
            } ]
          }
        } ]
      }, {
        "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-resolved-timing",
        "extension": [ {
          "url": "serviceRequestVersionId",
          "valueId": "42"
        }, {
          "url": "type",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/resolved-timing-type",
              "code": "Adhoc"
            } ]
          }
        } ]
      } ],
      "basedOn": [ {
        "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/ServiceRequest/20345"
      } ],
      "status": "completed",
      "type": {
        "coding": [ {
          "system": "http://terminology.hl7.org/CodeSystem/media-type",
          "code": "audio"
        } ]
      },
      "subject": {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/Patient/48739"
      },
      "createdPeriod": {
        "start": "2022-09-22T14:41:18+02:00",
        "end": "2023-02-22T14:41:18+01:00"
      },
      "content": {
        "language": "en"
      }
    },
    "search": {
      "mode": "match"
    }
  } ]
}

...

Expand
titleExample of Searching for QuestionnaireResponse(s)

Searching for QuestionnaireResponse

Some Below is a list of some of the possible common search parameters. An exhaustive list can be found in implementation guide at http://ehealth-documentation.s3-website-eu-west-1.amazonaws.com/latest/ig/measurement.openapi.json.

Name

Description

_tag

the tag of a resource

_id

The ID of the resource

identifier

The unique id for a particular observation

status

The status of the QuestionnaireResponse

episodeOfCare

Episode associated with observation

questionnaire

The questionnaire the answers are provided for

subject

The subject that the observation is about

authored

When the questionnaire response was last changed

qualityCode

The quality code of the Media

qualityType

The quality type of the Media

based-on

ServiceRequest that this QuestionnaireResponse is related to

resolvedTimingServiceRequestVersionId

The serviceRequestVersionID held in the Resolved Timing

resolvedTimingStart

Resolved Timing start

resolvedTimingEnd

Resolved Timing end

resolvedTimingType

Resolved Timing type

Response:

  • Bundle of

    • QuestionnaireResponse(s)

Examples:

Searching on QuestionnaireResponses are done by use of a traditional GET request:

GET [base]/fhir/QuestionnaireResponse?paramName1=param1&paramName2=param2

As an example one could perform searches like the following examples:

  • Searching based on QuestionnaireResponse authored date: GET [base]/fhir/QuestionnaireResponse?authored=lt2023-03-22&authored=gt2023-01-22

  • Searching based on the Questionnaire which the QuestionnaireResponse answers: GET [base]/fhir/QuestionnaireResponse?questionnaire=https://questionnaire.local.ehealth.sundhed.dk/fhir/Questionnaire/16023

  • Searching on the status of a QuestionnaireResponse: GET [base]/fhir/QuestionnaireResponse?status=completed

An example of a response on for a search could be:

Code Block
{
  "resourceType": "Bundle",
  "id": "92503c25-13b5-416b-80ca-c49704bc73cb",
  "meta": {
    "lastUpdated": "2023-05-22T12:50:37.166+00:00"
  },
  "type": "searchset",
  "total": 1,
  "link": [ {
    "relation": "self",
    "url": "https://measurement.local.ehealth.sundhed.dk/fhir/QuestionnaireResponse?_format=json&authored=lt2023-05-22&authored=gt2023-03-22&based-on=https://careplan.local.ehealth.sundhed.dk/fhir/ServiceRequest/37748&status=completed"
  } ],
  "entry": [ {
    "fullUrl": "https://measurement.local.ehealth.sundhed.dk/fhir/QuestionnaireResponse/28",
    "resource": {
      "resourceType": "QuestionnaireResponse",
      "id": "28",
      "meta": {
        "versionId": "1",
        "lastUpdated": "2023-05-22T12:50:36.849+00:00",
        "source": "#6cabd658-10e5-4b",
        "profile": [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-questionnaireresponse" ]
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare",
        "valueReference": {
          "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/EpisodeOfCare/26793"
        }
      }, {
        "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-resolved-timing",
        "extension": [ {
          "url": "serviceRequestVersionId",
          "valueId": "42"
        }, {
          "url": "type",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://ehealth.sundhed.dk/cs/resolved-timing-type",
              "code": "Adhoc"
            } ]
          }
        } ]
      } ],
      "basedOn": [ {
        "reference": "https://careplan.local.ehealth.sundhed.dk/fhir/ServiceRequest/37748"
      } ],
      "questionnaire": "https://questionnaire.local.ehealth.sundhed.dk/fhir/Questionnaire/49398",
      "status": "completed",
      "subject": {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/Patient/96689"
      },
      "authored": "2023-04-22T14:50:36+02:00",
      "source": {
        "reference": "https://patient.local.ehealth.sundhed.dk/fhir/Patient/25628"
      }
    },
    "search": {
      "mode": "match"
    }
  } ]
}

...