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 3 Next »

EHealthQuestionnaireResponse createdQuestionnaireResponse = QuestionnaireResponseEntityFactory.createQuestionnaireResponse(questionnaireResponse -> {
            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