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

Version 1 Next »

When posting Measurements the Citizen application is required to establish Situation Quality and Usage Quality as context to Observations, QuestionnaireResponses and Media resources.

The eHealth Infrastructure exposed Library resource to help calculate the Quality attributes.

Calling an instance of a Library resource is done using the $evaluate operation.

Qualities are based on responses on Questionnaires designed specifically for this purpose.

Code example returning a GuidanceResponse

EHealthQuestionnaireResponse createdQuestionnaireResponse = QuestionnaireResponseEntityFactory.createQuestionnaireResponse(questionnaireResponse ->

Unknown macro: { questionnaireResponse.setId(ReferenceFactory.createReference(EHealthQuestionnaireResponse.class).getReference()); questionnaireResponse.setSubject(new Reference(patient)); questionnaireResponse.setQuestionnaire(new Reference(questionnaire)); questionnaireResponse.addItem().setLinkId("question1").addAnswer().setValue(new BooleanType(true)); }

);

Parameters inParams = new Parameters();
Parameters questionnaireResponseParameter = new Parameters();
questionnaireResponseParameter.addParameter().setName("questionnaireResponse").setResource(createdQuestionnaireResponse);
inParams.addParameter().setName("parameters").setResource(questionnaireResponseParameter);

// Act
EHealthGuidanceResponse guidanceResponse = genericClient
.operation()
.onInstance(library.getIdElement())
.named("$evaluate")
.withParameters(inParams)
.returnResourceType(EHealthGuidanceResponse.class)
.execute();

  • No labels