public static org.hl7.fhir.dstu2016may.model.NamingSystem convertNamingSystem(org.hl7.fhir.dstu3.model.NamingSystem src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.NamingSystem tgt = new org.hl7.fhir.dstu2016may.model.NamingSystem(); copyDomainResource(src, tgt); tgt.setName(src.getName()); tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); tgt.setKind(convertNamingSystemType(src.getKind())); tgt.setDate(src.getDate()); if (src.hasPublisher()) tgt.setPublisher(src.getPublisher()); for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); if (src.hasResponsible()) tgt.setResponsible(src.getResponsible()); tgt.setType(convertCodeableConcept(src.getType())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(convertCodeableConcept(t)); if (src.hasUsage()) tgt.setUsage(src.getUsage()); for (org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); tgt.setReplacedBy(convertReference(src.getReplacedBy())); return tgt; }
public org.hl7.fhir.dstu3.model.NamingSystem convertNamingSystem(org.hl7.fhir.instance.model.NamingSystem src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.NamingSystem tgt = new org.hl7.fhir.dstu3.model.NamingSystem(); copyDomainResource(src, tgt); tgt.setName(src.getName()); tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); tgt.setKind(convertNamingSystemType(src.getKind())); if (src.hasDate()) tgt.setDate(src.getDate()); tgt.setPublisher(src.getPublisher()); for (org.hl7.fhir.instance.model.NamingSystem.NamingSystemContactComponent t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); tgt.setResponsible(src.getResponsible()); tgt.setType(convertCodeableConcept(src.getType())); tgt.setDescription(src.getDescription()); for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) if (isJurisdiction(t)) tgt.addJurisdiction(convertCodeableConcept(t)); else tgt.addUseContext(convertCodeableConceptToUsageContext(t)); tgt.setUsage(src.getUsage()); for (org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); tgt.setReplacedBy(convertReference(src.getReplacedBy())); return tgt; }
public org.hl7.fhir.instance.model.NamingSystem convertNamingSystem(org.hl7.fhir.dstu3.model.NamingSystem src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.NamingSystem tgt = new org.hl7.fhir.instance.model.NamingSystem(); copyDomainResource(src, tgt); tgt.setName(src.getName()); tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); tgt.setKind(convertNamingSystemType(src.getKind())); if (src.hasDate()) tgt.setDate(src.getDate()); tgt.setPublisher(src.getPublisher()); for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); tgt.setResponsible(src.getResponsible()); tgt.setType(convertCodeableConcept(src.getType())); tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(convertCodeableConcept(t)); tgt.setUsage(src.getUsage()); for (org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); tgt.setReplacedBy(convertReference(src.getReplacedBy())); return tgt; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 3373707: return getNameElement(); case -892481550: return getStatusElement(); case 3292052: return getKindElement(); case 3076014: return getDateElement(); case 1447404028: return getPublisherElement(); case 951526432: return addContact(); case 1847674614: return getResponsibleElement(); case 3575610: return getType(); case -1724546052: return getDescriptionElement(); case -669707736: return addUseContext(); case -507075711: return addJurisdiction(); case 111574433: return getUsageElement(); case -294460212: return addUniqueId(); case -1233035097: return getReplacedBy(); default: return super.makeProperty(hash, name); } }
switch (hash) { case 3373707: // name this.name = castToString(value); // StringType return value; case -892481550: // status value = new PublicationStatusEnumFactory().fromType(castToCode(value)); this.status = (Enumeration) value; // Enumeration<PublicationStatus> return value; case 3292052: // kind value = new NamingSystemTypeEnumFactory().fromType(castToCode(value)); this.kind = (Enumeration) value; // Enumeration<NamingSystemType> return value; case 3076014: // date this.date = castToDateTime(value); // DateTimeType return value; case 1447404028: // publisher this.publisher = castToString(value); // StringType return value; case 951526432: // contact this.getContact().add(castToContactDetail(value)); // ContactDetail return value; case 1847674614: // responsible this.responsible = castToString(value); // StringType return value; case 3575610: // type this.type = castToCodeableConcept(value); // CodeableConcept return value; case -1724546052: // description this.description = castToMarkdown(value); // MarkdownType
return addContact(); return addUseContext(); return addJurisdiction(); return addUniqueId();
/** * @return The first repetition of repeating field {@link #uniqueId}, creating it if it does not already exist */ public NamingSystemUniqueIdComponent getUniqueIdFirstRep() { if (getUniqueId().isEmpty()) { addUniqueId(); } return getUniqueId().get(0); }
/** * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist */ public ContactDetail getContactFirstRep() { if (getContact().isEmpty()) { addContact(); } return getContact().get(0); }
/** * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist */ public CodeableConcept getJurisdictionFirstRep() { if (getJurisdiction().isEmpty()) { addJurisdiction(); } return getJurisdiction().get(0); }
/** * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist */ public UsageContext getUseContextFirstRep() { if (getUseContext().isEmpty()) { addUseContext(); } return getUseContext().get(0); }
static Function<NamingSystem, String> getValueOfType(NamingSystem.NamingSystemIdentifierType type) { return namingSystem -> namingSystem.getUniqueId().stream() .filter(uniqueId -> type == uniqueId.getType()) .findFirst() .map(NamingSystem.NamingSystemUniqueIdComponent::getValue) .orElse(null); } }
/** * @return {@link #replacedBy} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (For naming systems that are retired, indicates the naming system that should be used in their place (if any).) */ public NamingSystem getReplacedByTarget() { if (this.replacedByTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create NamingSystem.replacedBy"); else if (Configuration.doAutoCreate()) this.replacedByTarget = new NamingSystem(); // aa return this.replacedByTarget; }
public NamingSystem copy() { NamingSystem dst = new NamingSystem(); copyValues(dst); dst.name = name == null ? null : name.copy(); dst.status = status == null ? null : status.copy();
static Predicate<NamingSystem> byKind(NamingSystem.NamingSystemType kind) { return namingSystem -> Objects.equals(kind, namingSystem.getKind()); }
static Predicate<NamingSystem> byName(String name) { return namingSystem -> Objects.equals(name, namingSystem.getName()); }
public org.hl7.fhir.instance.model.NamingSystem convertNamingSystem(org.hl7.fhir.dstu3.model.NamingSystem src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.NamingSystem tgt = new org.hl7.fhir.instance.model.NamingSystem(); copyDomainResource(src, tgt); tgt.setName(src.getName()); tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); tgt.setKind(convertNamingSystemType(src.getKind())); if (src.hasDate()) tgt.setDate(src.getDate()); tgt.setPublisher(src.getPublisher()); for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); tgt.setResponsible(src.getResponsible()); tgt.setType(convertCodeableConcept(src.getType())); tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(convertCodeableConcept(t)); tgt.setUsage(src.getUsage()); for (org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); tgt.setReplacedBy(convertReference(src.getReplacedBy())); return tgt; }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("name")) { this.name = castToString(value); // StringType } else if (name.equals("status")) { value = new PublicationStatusEnumFactory().fromType(castToCode(value)); this.status = (Enumeration) value; // Enumeration<PublicationStatus> } else if (name.equals("kind")) { value = new NamingSystemTypeEnumFactory().fromType(castToCode(value)); this.kind = (Enumeration) value; // Enumeration<NamingSystemType> } else if (name.equals("date")) { this.date = castToDateTime(value); // DateTimeType } else if (name.equals("publisher")) { this.publisher = castToString(value); // StringType } else if (name.equals("contact")) { this.getContact().add(castToContactDetail(value)); } else if (name.equals("responsible")) { this.responsible = castToString(value); // StringType } else if (name.equals("type")) { this.type = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("description")) { this.description = castToMarkdown(value); // MarkdownType } else if (name.equals("useContext")) { this.getUseContext().add(castToUsageContext(value)); } else if (name.equals("jurisdiction")) { this.getJurisdiction().add(castToCodeableConcept(value)); } else if (name.equals("usage")) { this.usage = castToString(value); // StringType } else if (name.equals("uniqueId")) { this.getUniqueId().add((NamingSystemUniqueIdComponent) value);
static Predicate<NamingSystem> byTypeAndValue(NamingSystem.NamingSystemIdentifierType type, String value) { return namingSystem -> namingSystem.getUniqueId().stream() .anyMatch(uniqueId -> uniqueId.getType() == type && value.equals(uniqueId.getValue())); }
return new ProcessResponse(); if ("NamingSystem".equals(name)) return new NamingSystem(); if ("Schedule".equals(name)) return new Schedule();
public static org.hl7.fhir.dstu2016may.model.NamingSystem convertNamingSystem(org.hl7.fhir.dstu3.model.NamingSystem src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.NamingSystem tgt = new org.hl7.fhir.dstu2016may.model.NamingSystem(); copyDomainResource(src, tgt); tgt.setName(src.getName()); tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); tgt.setKind(convertNamingSystemType(src.getKind())); tgt.setDate(src.getDate()); if (src.hasPublisher()) tgt.setPublisher(src.getPublisher()); for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); if (src.hasResponsible()) tgt.setResponsible(src.getResponsible()); tgt.setType(convertCodeableConcept(src.getType())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(convertCodeableConcept(t)); if (src.hasUsage()) tgt.setUsage(src.getUsage()); for (org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); tgt.setReplacedBy(convertReference(src.getReplacedBy())); return tgt; }