expression = expression + "'" + escapedString + "'"; } else if (fixed instanceof UriType) { expression = expression + "'" + ((UriType)fixed).asStringValue() + "'"; } else if (fixed instanceof IntegerType) { expression = expression + ((IntegerType)fixed).asStringValue();
public org.hl7.fhir.instance.model.ClinicalImpression convertClinicalImpression(org.hl7.fhir.dstu3.model.ClinicalImpression src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.ClinicalImpression tgt = new org.hl7.fhir.instance.model.ClinicalImpression(); copyDomainResource(src, tgt); tgt.setPatient(convertReference(src.getSubject())); tgt.setAssessor(convertReference(src.getAssessor())); tgt.setStatus(convertClinicalImpressionStatus(src.getStatus())); if (src.hasDate()) tgt.setDate(src.getDate()); tgt.setDescription(src.getDescription()); tgt.setPrevious(convertReference(src.getPrevious())); for (org.hl7.fhir.dstu3.model.Reference t : src.getProblem()) tgt.addProblem(convertReference(t)); // for (org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent t : src.getInvestigations()) // tgt.addInvestigations(convertClinicalImpressionInvestigationsComponent(t)); for (UriType t : src.getProtocol()) tgt.setProtocol(t.asStringValue()); tgt.setSummary(src.getSummary()); for (org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) tgt.addFinding(convertClinicalImpressionFindingComponent(t)); tgt.setPrognosis(src.getPrognosisCodeableConceptFirstRep().getText()); // for (org.hl7.fhir.dstu3.model.Reference t : src.getPlan()) // tgt.addPlan(convertReference(t)); for (org.hl7.fhir.dstu3.model.Reference t : src.getAction()) tgt.addAction(convertReference(t)); return tgt; }
private Slicer generateSlicer(ElementDefinition child, ElementDefinitionSlicingComponent slicing, StructureDefinition structure) { // given a child in a structure, it's sliced. figure out the slicing xpath if (child.getPath().endsWith(".extension")) { ElementDefinition ued = getUrlFor(structure, child); if ((ued == null || !ued.hasFixed()) && !(child.hasType() && (child.getType().get(0).hasProfile()))) return new Slicer(false); else { Slicer s = new Slicer(true); String url = (ued == null || !ued.hasFixed()) ? child.getType().get(0).getProfile() : ((UriType) ued.getFixed()).asStringValue(); s.name = " with URL = '"+url+"'"; s.criteria = "[@url = '"+url+"']"; return s; } } else return new Slicer(false); }
expression = expression + "'" + escapedString + "'"; } else if (fixed instanceof UriType) { expression = expression + "'" + ((UriType)fixed).asStringValue() + "'"; } else if (fixed instanceof IntegerType) { expression = expression + ((IntegerType)fixed).asStringValue();
public org.hl7.fhir.instance.model.ClinicalImpression convertClinicalImpression(org.hl7.fhir.dstu3.model.ClinicalImpression src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.ClinicalImpression tgt = new org.hl7.fhir.instance.model.ClinicalImpression(); copyDomainResource(src, tgt); tgt.setPatient(convertReference(src.getSubject())); tgt.setAssessor(convertReference(src.getAssessor())); tgt.setStatus(convertClinicalImpressionStatus(src.getStatus())); if (src.hasDate()) tgt.setDate(src.getDate()); tgt.setDescription(src.getDescription()); tgt.setPrevious(convertReference(src.getPrevious())); for (org.hl7.fhir.dstu3.model.Reference t : src.getProblem()) tgt.addProblem(convertReference(t)); // for (org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent t : src.getInvestigations()) // tgt.addInvestigations(convertClinicalImpressionInvestigationsComponent(t)); for (UriType t : src.getProtocol()) tgt.setProtocol(t.asStringValue()); tgt.setSummary(src.getSummary()); for (org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) tgt.addFinding(convertClinicalImpressionFindingComponent(t)); tgt.setPrognosis(src.getPrognosisCodeableConceptFirstRep().getText()); // for (org.hl7.fhir.dstu3.model.Reference t : src.getPlan()) // tgt.addPlan(convertReference(t)); for (org.hl7.fhir.dstu3.model.Reference t : src.getAction()) tgt.addAction(convertReference(t)); return tgt; }