@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -1618432855: return getIdentifier(); case -332612366: return addBasedOn(); case -995410646: return addPartOf(); case -1017049693: return getQuestionnaireElement(); case -892481550: return getStatusElement(); case -1867885268: return getSubject(); case 1524132147: return getEncounter(); case 1433073514: return getAuthoredElement(); case -1406328437: return getAuthor(); case -896505829: return getSource(); case 3242771: return addItem(); default: return super.makeProperty(hash, name); } }
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; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -1618432855: return getIdentifier(); case -332612366: return addBasedOn(); case -995410646: return addPartOf(); case -1017049693: return getQuestionnaireElement(); case -892481550: return getStatusElement(); case -1867885268: return getSubject(); case 1524132147: return getEncounter(); case 1433073514: return getAuthoredElement(); case -1406328437: return getAuthor(); case -896505829: return getSource(); case 3242771: return addItem(); default: return super.makeProperty(hash, name); } }
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; }