- Created by Erik Nielsen, last modified by Andreas Harfeld Jakobsen on 22-05-2023
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 4 Next »
Patient
Patients can search for measurements by:
$search-measurement
Searching measurements with $search-measurement
POST $search-measurement request body:
Parameters available:
Amount | Parameter Name | Type |
---|---|---|
0..1 |
| Reference (Patient) |
0..1 |
| Reference (EpisodeOfCare) |
0..1 |
| Reference (Device) |
1..1 |
| Period |
0..* |
| Reference (ServiceRequests) |
Combinations allow for:
broad searches (Patient and Period only)
very specific searches (Period and ServiceRequest) and other combinations
Response:
The response is a bundle of nested bundles that each contain a full set of related resources (Observation, Media, QuestionnaireResponse and Provenance) for a found measurement. If a QuestionnaireResponse is part of a bundle the Questionnaire it answers is also included in the bundle. Related resources are the set of resources created by a single invocation of the submit-measurement operation.
Bundle of:
Bundle for each submitted together:
0..* Observation
0..* Media
0..* QuestionnaireResponse
1..* Questionnaire
0..* Provenance indicating reuse of measurement
Examples:
Below example is from here: http://ehealth-documentation.s3-website-eu-west-1.amazonaws.com/latest/ig/POST_search-measurements.html#post-search-measurements
Unlike a regular search operation which would be a GET request, the $search-measurement is a POST request to the URL:
POST [base]/$search-measurements
The search parameters are sent by including them in the request body (below is a JSON example of a body):
{ "resourceType": "Parameters", "parameter": [ { "name": "patient", "valueReference": { "reference": "https://patient.cit-measurement-1414.local/fhir/Patient/47556" } }, { "name": "period", "valuePeriod": { "start": "2020-12-21T00:00:00+00:00" } } ] }
The response will then contain a bundle of bundles with the found resources (Below is a JSON example of a return bundle):
{ "resourceType": "Bundle", "type": "collection", "entry": [ { "fullUrl": "f1e15387-6e84-4a5f-ab0d-076b4c6ea906", "resource": { "resourceType": "Bundle", "id": "f1e15387-6e84-4a5f-ab0d-076b4c6ea906", "type": "collection", "entry": [ { "fullUrl": "https://measurement.cit-measurement-1414.local/fhir/Observation/350", "resource": { "resourceType": "Observation", "id": "350", "meta": { "versionId": "1", "lastUpdated": "2021-12-21T14:10:01.692+00:00", "source": "#b2ec62fc-7f07-44", "profile": [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-observation" ] }, "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare", "valueReference": { "reference": "https://careplan.cit-measurement-1414.local/fhir/EpisodeOfCare/73880" } }, { "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.cit-measurement-1414.local/fhir/ServiceRequest/48367" } ], "status": "final", "code": { "coding": [ { "system": "urn:oid:1.2.208.176.2.1", "code": "NPU03011" } ] }, "subject": { "reference": "https://patient.cit-measurement-1414.local/fhir/Patient/47556" }, "effectivePeriod": { "start": "2021-12-21T14:10:01+00:00", "end": "2021-12-21T14:10:01+00:00" }, "performer": [ { "reference": "https://patient.cit-measurement-1414.local/fhir/Patient/47556" } ], "device": { "reference": "https://device.cit-measurement-1414.local/fhir/Device/38078" } } }, { "fullUrl": "https://measurement.cit-measurement-1414.local/fhir/Media/351", "resource": { "resourceType": "Media", "id": "351", "meta": { "versionId": "1", "lastUpdated": "2021-12-21T14:10:01.982+00:00", "source": "#38603316-dade-48", "profile": [ "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-media" ] }, "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare", "valueReference": { "reference": "https://careplan.cit-measurement-1414.local/fhir/EpisodeOfCare/23583" } }, { "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.cit-measurement-1414.local/fhir/ServiceRequest/13775" } ], "status": "completed", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/media-type", "code": "audio" } ] }, "subject": { "reference": "https://patient.cit-measurement-1414.local/fhir/Patient/47556" }, "createdDateTime": "2021-12-21T14:10:01+00:00", "content": { "language": "en" } } } ] } } ] }
Search on Observation
Searching for Observation
Some of the possible search parameters:
Name | Description |
---|---|
| the tag of a resource |
| The ID of the resource |
| Search the contents of the resource's narrative using a fulltext search |
| Episode associated with observation |
| Reference to the serviceRequest |
| The unique id for a particular observation |
| The patient that the observation is about |
| The serviceRequestVersionID held in the Resolved Timing |
| Resolved Timing start |
| Resolved Timing end |
| Resolved Timing type |
| The subject that the observation is about |
| The code of the observation type |
| Obtained date/time. If the obtained element is a period, a date that falls in the period |
| The quality code of the observation |
| The quality type of the observation |
Response:
Bundle of
Observation(s)
Examples:
Searching on Observations are done by use of a traditional GET request:
GET [base]/fhir/Observation?paramName1=param1¶mName2=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:
{ "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" } } ] }
Search on Media
Searching on Media
Some of the possible search parameters:
Name | Description |
---|---|
| the tag of a resource |
| The ID of the resource |
| The unique id for a particular observation |
| Episode associated with observation |
| The subject that the observation is about |
| The type of the Media ("photo | video | audio") |
| When Media was collected |
| The quality code of the Media |
| The quality type of the Media |
| ServiceRequest that caused this media to be created |
| The serviceRequestVersionID held in the Resolved Timing |
| Resolved Timing start |
| Resolved Timing end |
| Resolved Timing type |
Response:
Bundle of
Media(s)
Examples:
Searching on Medias are done by use of a traditional GET request:
GET [base]/fhir/Media?paramName1=param1¶mName2=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:
{ "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" } } ] }
Search on QuestionnaireResponse
Searching for QuestionnaireResponse
Some of the possible search parameters:
Name | Description |
---|---|
| the tag of a resource |
| The ID of the resource |
| The unique id for a particular observation |
| The status of the QuestionnaireResponse |
| Episode associated with observation |
| The questionnaire the answers are provided for |
| The subject that the observation is about |
| When the questionnaire response was last changed |
| The quality code of the Media |
| The quality type of the Media |
| ServiceRequest that this QuestionnaireResponse is related to |
| The serviceRequestVersionID held in the Resolved Timing |
| Resolved Timing start |
| Resolved Timing end |
| 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¶mName2=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:
{ "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" } } ] }
Practitioner
Practitioners can search for measurements by same methods as Patient, but restrictions apply:
Practitioner must be logged in using a CareTeam that, in generic terms, ”plays a role in the corresponding EpisodeOfCare or CarePlan”
- No labels