Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

THIS SECTION IS STILL UNDER CONSTRUCTION.

Preparing for Submitting

Determining Resolved Timing to Use

The functionality described below is provided with eHealth Infrastructure Release 7 and after.

When submitting measurements, it is mandatory to specify resolved timing (see https://ehealth-dk.atlassian.net/wiki/spaces/EDTW/pages/1661665301/Adhering+to+Care+Plans+and+Measurement+Regimes#When-an-Activity-is-Supposed-to-Happen---The-Notion-of-Resolved-Timing ) information in the ehealth-resolved-timing element of Observation, QuestionnaireResponse and Media. The structure of ehealth-resolved-timing contains:

  • serviceRequestVersionId which must specify the current FHIR technical version of the ServiceRequestreferenced in basedOn element of Observation, QuestionnaireResponse and Media.

  • start - start datetime of resolved timing period. This is mandatory when type is Resolved.

  • end - end datetime of resolved timing period. This is mandatory when type is Resolved.

  • type

    • Resolved if the ServiceRequesthas a measurement regime supported by the infrastructure

    • Unresolved if the ServiceRequesthas a measurement regime not supported by the infrastructure

    • Adhoc if the ServiceRequestdoes not have a measurement regime or is specified as ad-hoc

One way to determine what resolved time to used is to invoke the get-patient-procedures operation.

Determining Qualities

The described approach is still under refinement. Neither the required Questionnaire nor Library is available in the eHealth Infrastructure at the time of writing.

Preparing an Observation for Score Calculated from a QuestionnaireResponse

Preparing an Observation for Body Mass Index

Submitting

TBD

Saving Draft QuestionnaireResponse

A QuestionnaireResponse can be saved as a draft, either by creating a new draft or by updating an old QuestionnaireResponse draft. In order to save the QuestionnaireResponse as a draft, both the existing QuestionnaireResponse if updating an old one, and the QuestionnaireResponse intended to be saved must contain a QuestionnaireResponseStatus of In-Progress. When a QuestionnaireResponse is saved, either by autosave or manually, it is checked weather the new QuestionnaireResponse has new data compared with the previous version. If a QuestionnaireResponse is saved without having new data added to it, Then the QuestionnaireResponse won’t be updated in the database.

When the final version of the QuestionnaireResponse is submitted with submit measurement or 30 days after being created, all the previous draft QuestionnaireResponse’s are automatically found and deleted from the database. When submit measurement is called, old drafts of the submitted QuestionnaireResponse are found with the following search criteria's:

  • QuestionnaireResponseStatus were only QuestionnaireResponse with status In-Progress are found.

  • BasedOn where only QuestionnaireResponse based on the same as the submitted QuestionnaireResponse are found.

  • ResolvedTiming has to match the submitted QuestionnaireResponse.

Every night an automatic job is run to delete any old QuestionnaireResponse drafts that have not been submitted. This job finds all draft QuestionnaireResponse’s that have not been edited in more then MEASUREMENT_MAX_AGE_DAYS. The draft QuestionnaireResponse that will get deleted are found with the following search criteria's:

  • QuestionnaireResponseStatus were only QuestionnaireResponse with status In-Progress are found.

  • LastUpdatedwere only QuestionnaireResponse last updated more then MEASUREMENT_MAX_AGE_DAYS ago are found.

  • No labels