Stream: hapi
Topic: Relate QuestionnaireResponse to Questionnaire
Mohsen Jafari (Feb 18 2022 at 10:53):
I'm going to relate QuestionnaireResponse to Questionnaire in Java like the following:
QuestionnaireResponse qr = new QuestionnaireResponse();
String some_identifier = "1234";
qr.setQuestionnaire(new Reference().setReference("Questionnaire?identifier=" + some_identifier));
But it complains The method setQuestionnaire(String) in the type QuestionnaireResponse is not applicable for the arguments (Reference)
How can I relate a QuestionnaireResponse to a Questionnaire using the identifier of the Questionnaire?
Grahame Grieve (Feb 18 2022 at 11:21):
which version are you using?
Grahame Grieve (Feb 18 2022 at 11:21):
of FHIR, that is
Mohsen Jafari (Feb 18 2022 at 11:29):
Grahame Grieve said:
which version are you using?
I'm importing the QuestionnaireResponse like the following:
import org.hl7.fhir.r4.model.QuestionnaireResponse;
Brian Postlethwaite (Feb 20 2022 at 02:44):
The questionnaire field on the QR is a canonical type field not a reference type field. Not sure how that works in the Java object model, but it's meant to be the value in the questionnaire.url field (with optional Q.version field appended) not an identifier or resource id.
Last updated: Apr 12 2022 at 19:14 UTC