@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("severity")) { value = new IssueSeverityEnumFactory().fromType(castToCode(value)); this.severity = (Enumeration) value; // Enumeration<IssueSeverity> } else if (name.equals("code")) { value = new IssueTypeEnumFactory().fromType(castToCode(value)); this.code = (Enumeration) value; // Enumeration<IssueType> } else if (name.equals("details")) { this.details = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("diagnostics")) { this.diagnostics = castToString(value); // StringType } else if (name.equals("location")) { this.getLocation().add(castToString(value)); } else if (name.equals("expression")) { this.getExpression().add(castToString(value)); } else return super.setProperty(name, value); return value; }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case 1478300413: // severity value = new IssueSeverityEnumFactory().fromType(castToCode(value)); this.severity = (Enumeration) value; // Enumeration<IssueSeverity> return value; case 3059181: // code value = new IssueTypeEnumFactory().fromType(castToCode(value)); this.code = (Enumeration) value; // Enumeration<IssueType> return value; case 1557721666: // details this.details = castToCodeableConcept(value); // CodeableConcept return value; case -740386388: // diagnostics this.diagnostics = castToString(value); // StringType return value; case 1901043637: // location this.getLocation().add(castToString(value)); // StringType return value; case -1795452264: // expression this.getExpression().add(castToString(value)); // StringType return value; default: return super.setProperty(hash, name, value); } }
public static org.hl7.fhir.dstu2016may.model.OperationOutcome.OperationOutcomeIssueComponent convertOperationOutcomeIssueComponent(org.hl7.fhir.dstu3.model.OperationOutcome.OperationOutcomeIssueComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.OperationOutcome.OperationOutcomeIssueComponent tgt = new org.hl7.fhir.dstu2016may.model.OperationOutcome.OperationOutcomeIssueComponent(); copyElement(src, tgt); tgt.setSeverity(convertIssueSeverity(src.getSeverity())); tgt.setCode(convertIssueType(src.getCode())); tgt.setDetails(convertCodeableConcept(src.getDetails())); if (src.hasDiagnostics()) tgt.setDiagnostics(src.getDiagnostics()); for (org.hl7.fhir.dstu3.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); for (org.hl7.fhir.dstu3.model.StringType t : src.getExpression()) tgt.addExpression(t.getValue()); return tgt; }
public static org.hl7.fhir.dstu2016may.model.OperationOutcome.OperationOutcomeIssueComponent convertOperationOutcomeIssueComponent(org.hl7.fhir.dstu3.model.OperationOutcome.OperationOutcomeIssueComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.OperationOutcome.OperationOutcomeIssueComponent tgt = new org.hl7.fhir.dstu2016may.model.OperationOutcome.OperationOutcomeIssueComponent(); copyElement(src, tgt); tgt.setSeverity(convertIssueSeverity(src.getSeverity())); tgt.setCode(convertIssueType(src.getCode())); tgt.setDetails(convertCodeableConcept(src.getDetails())); if (src.hasDiagnostics()) tgt.setDiagnostics(src.getDiagnostics()); for (org.hl7.fhir.dstu3.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); for (org.hl7.fhir.dstu3.model.StringType t : src.getExpression()) tgt.addExpression(t.getValue()); return tgt; }