public org.hl7.fhir.instance.model.QuestionnaireResponse convertQuestionnaireResponse(org.hl7.fhir.r4.model.QuestionnaireResponse src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.QuestionnaireResponse tgt = new org.hl7.fhir.instance.model.QuestionnaireResponse(); copyDomainResource(src, tgt); tgt.setIdentifier(convertIdentifier(src.getIdentifier())); tgt.setQuestionnaire(convertCanonicalToReference(src.getQuestionnaireElement())); tgt.setStatus(convertQuestionnaireResponseStatus(src.getStatus())); tgt.setSubject(convertReference(src.getSubject())); tgt.setAuthor(convertReference(src.getAuthor())); tgt.setAuthored(src.getAuthored()); tgt.setSource(convertReference(src.getSource())); tgt.setEncounter(convertReference(src.getEncounter())); if (src.getItem().size() != 1) throw new FHIRException("multiple root items not supported"); // though we could define a placeholder group? tgt.setGroup(convertQuestionnaireItemToGroup(src.getItem().get(0))); return tgt; }
public static org.hl7.fhir.dstu2016may.model.QuestionnaireResponse convertQuestionnaireResponse(org.hl7.fhir.r4.model.QuestionnaireResponse src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.QuestionnaireResponse tgt = new org.hl7.fhir.dstu2016may.model.QuestionnaireResponse(); copyDomainResource(src, tgt); tgt.setIdentifier(convertIdentifier(src.getIdentifier())); tgt.setQuestionnaire(convertCanonicalToReference(src.getQuestionnaireElement())); tgt.setStatus(convertQuestionnaireResponseStatus(src.getStatus())); tgt.setSubject(convertReference(src.getSubject())); tgt.setEncounter(convertReference(src.getEncounter())); tgt.setAuthor(convertReference(src.getAuthor())); if (src.hasAuthored()) tgt.setAuthored(src.getAuthored()); tgt.setSource(convertReference(src.getSource())); for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) tgt.addItem(convertQuestionnaireResponseItemComponent(t)); return tgt; }
public org.hl7.fhir.instance.model.QuestionnaireResponse convertQuestionnaireResponse(org.hl7.fhir.r4.model.QuestionnaireResponse src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.QuestionnaireResponse tgt = new org.hl7.fhir.instance.model.QuestionnaireResponse(); copyDomainResource(src, tgt); tgt.setIdentifier(convertIdentifier(src.getIdentifier())); tgt.setQuestionnaire(convertCanonicalToReference(src.getQuestionnaireElement())); tgt.setStatus(convertQuestionnaireResponseStatus(src.getStatus())); tgt.setSubject(convertReference(src.getSubject())); tgt.setAuthor(convertReference(src.getAuthor())); tgt.setAuthored(src.getAuthored()); tgt.setSource(convertReference(src.getSource())); tgt.setEncounter(convertReference(src.getEncounter())); if (src.getItem().size() != 1) throw new FHIRException("multiple root items not supported"); // though we could define a placeholder group? tgt.setGroup(convertQuestionnaireItemToGroup(src.getItem().get(0))); return tgt; }
public static org.hl7.fhir.dstu2016may.model.QuestionnaireResponse convertQuestionnaireResponse(org.hl7.fhir.r4.model.QuestionnaireResponse src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.QuestionnaireResponse tgt = new org.hl7.fhir.dstu2016may.model.QuestionnaireResponse(); copyDomainResource(src, tgt); tgt.setIdentifier(convertIdentifier(src.getIdentifier())); tgt.setQuestionnaire(convertCanonicalToReference(src.getQuestionnaireElement())); tgt.setStatus(convertQuestionnaireResponseStatus(src.getStatus())); tgt.setSubject(convertReference(src.getSubject())); tgt.setEncounter(convertReference(src.getEncounter())); tgt.setAuthor(convertReference(src.getAuthor())); if (src.hasAuthored()) tgt.setAuthored(src.getAuthored()); tgt.setSource(convertReference(src.getSource())); for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) tgt.addItem(convertQuestionnaireResponseItemComponent(t)); return tgt; }