private String describeReference(Type reference) { if (reference == null) return "null"; if (reference instanceof UriType) return ((UriType) reference).getValue(); if (reference instanceof Reference) return ((Reference) reference).getReference(); return "??"; }
public org.hl7.fhir.instance.model.CodeType convertUriToCode(org.hl7.fhir.dstu3.model.UriType src) throws FHIRException { org.hl7.fhir.instance.model.CodeType tgt = new org.hl7.fhir.instance.model.CodeType(src.getValue()); copyElement(src, tgt); return tgt; }
public org.hl7.fhir.instance.model.UriType convertUri(org.hl7.fhir.dstu3.model.UriType src) throws FHIRException { org.hl7.fhir.instance.model.UriType tgt = new org.hl7.fhir.instance.model.UriType(src.getValue()); copyElement(src, tgt); return tgt; }
public static org.hl7.fhir.dstu2016may.model.UriType convertUri(org.hl7.fhir.dstu3.model.UriType src) throws FHIRException { org.hl7.fhir.dstu2016may.model.UriType tgt = new org.hl7.fhir.dstu2016may.model.UriType(); if (src.hasValue()) tgt.setValue(src.getValue()); copyElement(src, tgt); return tgt; }
private ValueSet resolveBindingReference(DomainResource ctxt, Type reference, String uri) { if (reference instanceof UriType) { long t = System.nanoTime(); ValueSet fr = context.fetchResource(ValueSet.class, ((UriType) reference).getValue().toString()); txTime = txTime + (System.nanoTime() - t); return fr; } else if (reference instanceof Reference) { String s = ((Reference) reference).getReference(); if (s.startsWith("#")) { for (Resource c : ctxt.getContained()) { if (c.getId().equals(s.substring(1)) && (c instanceof ValueSet)) return (ValueSet) c; } return null; } else { long t = System.nanoTime(); String ref = ((Reference) reference).getReference(); if (!Utilities.isAbsoluteUrl(ref)) ref = resolve(uri, ref); ValueSet fr = context.fetchResource(ValueSet.class, ref); txTime = txTime + (System.nanoTime() - t); return fr; } } else return null; }
if (theUrl != null && isNotBlank(theUrl.getValue())) { url = theUrl; boolean haveIdentifier = url != null && isNotBlank(url.getValue()); boolean haveValueSet = theValueSet != null && theValueSet.isEmpty() == false; return dao.expand(theId, toFilterString(theFilter), theRequestDetails); } else if (haveIdentifier) { return dao.expandByIdentifier(url.getValue(), toFilterString(theFilter)); } else { return dao.expand(theValueSet, toFilterString(theFilter));
public org.hl7.fhir.instance.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent src, String noSystem) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetComposeComponent(); copyElement(src, tgt); for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getInclude()) { for (org.hl7.fhir.dstu3.model.UriType ti : t.getValueSet()) tgt.addImport(ti.getValue()); if (noSystem == null || !t.getSystem().equals(noSystem)) tgt.addInclude(convertConceptSetComponent(t)); } for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getExclude()) tgt.addExclude(convertConceptSetComponent(t)); return tgt; }
public static org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetComposeComponent(); copyElement(src, tgt); for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getInclude()) { for (org.hl7.fhir.dstu3.model.UriType ti : t.getValueSet()) tgt.addImport(ti.getValue()); tgt.addInclude(convertConceptSetComponent(t)); } for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getExclude()) tgt.addExclude(convertConceptSetComponent(t)); return tgt; }
public org.hl7.fhir.instance.model.Meta convertMeta(org.hl7.fhir.dstu3.model.Meta src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Meta tgt = new org.hl7.fhir.instance.model.Meta(); copyElement(src, tgt); tgt.setVersionId(src.getVersionId()); tgt.setLastUpdated(src.getLastUpdated()); for (org.hl7.fhir.dstu3.model.UriType t : src.getProfile()) tgt.addProfile(t.getValue()); for (org.hl7.fhir.dstu3.model.Coding t : src.getSecurity()) tgt.addSecurity(convertCoding(t)); for (org.hl7.fhir.dstu3.model.Coding t : src.getTag()) tgt.addTag(convertCoding(t)); return tgt; }
public org.hl7.fhir.instance.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptMetadataCapabilityComponent(); copyElement(src, tgt); tgt.setRequired(src.getRequired()); tgt.setValidated(src.getValidated()); tgt.setDescription(src.getDescription()); tgt.setDestination(src.getDestination()); for (org.hl7.fhir.dstu3.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); tgt.setConformance(convertReference(src.getCapabilities())); return tgt; }
public static org.hl7.fhir.dstu2016may.model.Meta convertMeta(org.hl7.fhir.dstu3.model.Meta src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Meta tgt = new org.hl7.fhir.dstu2016may.model.Meta(); copyElement(src, tgt); if (src.hasVersionId()) tgt.setVersionId(src.getVersionId()); if (src.hasLastUpdated()) tgt.setLastUpdated(src.getLastUpdated()); for (org.hl7.fhir.dstu3.model.UriType t : src.getProfile()) tgt.addProfile(t.getValue()); for (org.hl7.fhir.dstu3.model.Coding t : src.getSecurity()) tgt.addSecurity(convertCoding(t)); for (org.hl7.fhir.dstu3.model.Coding t : src.getTag()) tgt.addTag(convertCoding(t)); return tgt; }
if (theValueSetUrl != null && isNotBlank(theValueSetUrl.getValue())) { url = theValueSetUrl;
public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataCapabilityComponent(); copyElement(src, tgt); if (src.hasRequired()) tgt.setRequired(src.getRequired()); if (src.hasValidated()) tgt.setValidated(src.getValidated()); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu3.model.IntegerType t : src.getOrigin()) tgt.addOrigin(t.getValue()); if (src.hasDestination()) tgt.setDestination(src.getDestination()); for (org.hl7.fhir.dstu3.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); tgt.setConformance(convertReference(src.getCapabilities())); return tgt; }
public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent convertConformanceRestComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent(); copyElement(src, tgt); tgt.setMode(convertRestfulConformanceMode(src.getMode())); if (src.hasDocumentation()) tgt.setDocumentation(src.getDocumentation()); tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent t : src.getResource()) tgt.addResource(convertConformanceRestResourceComponent(t)); for (org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent t : src.getInteraction()) tgt.addInteraction(convertSystemInteractionComponent(t)); for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent t : src.getSearchParam()) tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t)); for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent t : src.getOperation()) tgt.addOperation(convertConformanceRestOperationComponent(t)); for (org.hl7.fhir.dstu3.model.UriType t : src.getCompartment()) tgt.addCompartment(t.getValue()); return tgt; }
public org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent convertAuditEventAgentComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent tgt = new org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent(); copyElement(src, tgt); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRole()) tgt.addRole(convertCodeableConcept(t)); tgt.setReference(convertReference(src.getReference())); tgt.setUserId(convertIdentifier(src.getUserId())); tgt.setAltId(src.getAltId()); tgt.setName(src.getName()); tgt.setRequestor(src.getRequestor()); tgt.setLocation(convertReference(src.getLocation())); for (org.hl7.fhir.dstu3.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue()); tgt.setMedia(convertCoding(src.getMedia())); tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork())); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getPurposeOfUse()) for (org.hl7.fhir.dstu3.model.Coding cc : t.getCoding()) tgt.addPurposeOfUse(convertCoding(cc)); return tgt; }
public org.hl7.fhir.instance.model.Provenance convertProvenance(org.hl7.fhir.dstu3.model.Provenance src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Provenance tgt = new org.hl7.fhir.instance.model.Provenance(); copyDomainResource(src, tgt); for (org.hl7.fhir.dstu3.model.Reference t : src.getTarget()) tgt.addTarget(convertReference(t)); tgt.setPeriod(convertPeriod(src.getPeriod())); tgt.setRecorded(src.getRecorded()); for (org.hl7.fhir.dstu3.model.Coding t : src.getReason()) tgt.addReason().addCoding(convertCoding(t)); tgt.setActivity(new org.hl7.fhir.instance.model.CodeableConcept().addCoding(convertCoding(src.getActivity()))); tgt.setLocation(convertReference(src.getLocation())); for (org.hl7.fhir.dstu3.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue()); for (org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentComponent t : src.getAgent()) tgt.addAgent(convertProvenanceAgentComponent(t)); for (org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent t : src.getEntity()) tgt.addEntity(convertProvenanceEntityComponent(t)); for (org.hl7.fhir.dstu3.model.Signature t : src.getSignature()) tgt.addSignature(convertSignature(t)); return tgt; }
tgt.addOperation(convertConformanceRestOperationComponent(t)); for (org.hl7.fhir.dstu3.model.UriType t : src.getCompartment()) tgt.addCompartment(t.getValue()); return tgt;
tgt.addGlobal(convertImplementationGuideGlobalComponent(t)); for (org.hl7.fhir.dstu3.model.UriType t : src.getBinary()) tgt.addBinary(t.getValue()); tgt.setPage(convertImplementationGuidePageComponent(src.getPage())); return tgt;
tgt.addGlobal(convertImplementationGuideGlobalComponent(t)); for (org.hl7.fhir.dstu3.model.UriType t : src.getBinary()) tgt.addBinary(t.getValue()); tgt.setPage(convertImplementationGuidePageComponent(src.getPage())); return tgt;