public org.hl7.fhir.dstu3.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.instance.model.OperationDefinition src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.OperationDefinition tgt = new org.hl7.fhir.dstu3.model.OperationDefinition(); copyDomainResource(src, tgt); tgt.setUrl(src.getUrl()); tgt.setVersion(src.getVersion()); tgt.setName(src.getName()); tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); tgt.setKind(convertOperationKind(src.getKind())); if (src.hasExperimental()) tgt.setExperimental(src.getExperimental()); if (src.hasDate()) tgt.setDate(src.getDate()); tgt.setPublisher(src.getPublisher()); for (org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); tgt.setDescription(src.getDescription()); tgt.setPurpose(src.getRequirements()); if (src.hasIdempotent()) tgt.setIdempotent(src.getIdempotent()); tgt.setCode(src.getCode()); tgt.setComment(src.getNotes()); tgt.setBase(convertReference(src.getBase())); tgt.setSystem(src.getSystem()); for (org.hl7.fhir.instance.model.CodeType t : src.getType()) tgt.addResource(t.getValue()); tgt.setType(tgt.hasResource()); tgt.setInstance(src.getInstance()); for (org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter())
public static org.hl7.fhir.dstu2016may.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.dstu3.model.OperationDefinition src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.OperationDefinition tgt = new org.hl7.fhir.dstu2016may.model.OperationDefinition(); copyDomainResource(src, tgt); if (src.hasUrl()) tgt.setUrl(src.getUrl()); if (src.hasVersion()) tgt.setVersion(src.getVersion()); tgt.setName(src.getName()); tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); tgt.setKind(convertOperationKind(src.getKind())); if (src.hasExperimental()) tgt.setExperimental(src.getExperimental()); if (src.hasDate()) tgt.setDate(src.getDate()); if (src.hasPublisher()) tgt.setPublisher(src.getPublisher()); for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); 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.hasPurpose()) tgt.setRequirements(src.getPurpose()); if (src.hasIdempotent())
public org.hl7.fhir.instance.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.dstu3.model.OperationDefinition src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.OperationDefinition tgt = new org.hl7.fhir.instance.model.OperationDefinition(); copyDomainResource(src, tgt); tgt.setUrl(src.getUrl()); tgt.setVersion(src.getVersion()); tgt.setName(src.getName()); tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); tgt.setKind(convertOperationKind(src.getKind())); if (src.hasExperimental()) tgt.setExperimental(src.getExperimental()); if (src.hasDate()) tgt.setDate(src.getDate()); tgt.setPublisher(src.getPublisher()); for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); tgt.setDescription(src.getDescription()); tgt.setRequirements(src.getPurpose()); tgt.setIdempotent(src.getIdempotent()); tgt.setCode(src.getCode()); tgt.setNotes(src.getComment()); if (src.hasBase()) tgt.setBase(convertReference(src.getBase())); tgt.setSystem(src.getSystem()); if (src.getType()) for (org.hl7.fhir.dstu3.model.CodeType t : src.getResource()) tgt.addType(t.getValue()); tgt.setInstance(src.getInstance()); for (org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter())
private OperationDefinition readOperationDefinitionForNamedSearch(List<SearchMethodBinding> bindings) { OperationDefinition op = new OperationDefinition(); op.setStatus(PublicationStatus.ACTIVE); op.setKind(OperationKind.QUERY); op.setIdempotent(true); op.setSystem(false); op.setType(false); op.setInstance(false); op.setDescription(binding.getDescription()); op.setSystem(true); } else { op.setType(true); op.addResourceElement().setValue(binding.getResourceProviderResourceName()); op.setCode(binding.getQueryName()); for (IParameter nextParamUntyped : binding.getParameters()) { if (nextParamUntyped instanceof SearchParameter) { OperationDefinitionParameterComponent param = op.addParameter(); param.setUse(OperationParameterUse.IN); param.setType("string"); if (isBlank(op.getName())) { if (isNotBlank(op.getDescription())) { op.setName(op.getDescription()); } else { op.setName(op.getCode());
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 116079: return getUrlElement(); case 351608024: return getVersionElement(); case 3373707: return getNameElement(); case -892481550: return getStatusElement(); case 3292052: return getKindElement(); case -404562712: return getExperimentalElement(); case 3076014: return getDateElement(); case 1447404028: return getPublisherElement(); case 951526432: return addContact(); case -1724546052: return getDescriptionElement(); case -669707736: return addUseContext(); case -507075711: return addJurisdiction(); case -220463842: return getPurposeElement(); case 1680468793: return getIdempotentElement(); case 3059181: return getCodeElement(); case 950398559: return getCommentElement(); case 3016401: return getBase(); case -341064690: return addResourceElement(); case -887328209: return getSystemElement(); case 3575610: return getTypeElement(); case 555127957: return getInstanceElement(); case 1954460585: return addParameter(); case 529823674: return addOverload(); default: return super.makeProperty(hash, name); } }
switch (hash) { case 116079: // url this.url = castToUri(value); // UriType return value; case 351608024: // version this.version = castToString(value); // StringType return value; 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 OperationKindEnumFactory().fromType(castToCode(value)); this.kind = (Enumeration) value; // Enumeration<OperationKind> return value; case -404562712: // experimental this.experimental = castToBoolean(value); // BooleanType 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 addContact(); return addUseContext(); return addJurisdiction(); return addParameter(); return addOverload();
/** * @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); }
/** * @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 #parameter}, creating it if it does not already exist */ public OperationDefinitionParameterComponent getParameterFirstRep() { if (getParameter().isEmpty()) { addParameter(); } return getParameter().get(0); }
/** * @return {@link #base} 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. (Indicates that this operation definition is a constraining profile on the base.) */ public OperationDefinition getBaseTarget() { if (this.baseTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create OperationDefinition.base"); else if (Configuration.doAutoCreate()) this.baseTarget = new OperationDefinition(); // aa return this.baseTarget; }
public OperationDefinition copy() { OperationDefinition dst = new OperationDefinition(); copyValues(dst); dst.url = url == null ? null : url.copy(); dst.version = version == null ? null : version.copy();
public org.hl7.fhir.instance.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.dstu3.model.OperationDefinition src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.OperationDefinition tgt = new org.hl7.fhir.instance.model.OperationDefinition(); copyDomainResource(src, tgt); tgt.setUrl(src.getUrl()); tgt.setVersion(src.getVersion()); tgt.setName(src.getName()); tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); tgt.setKind(convertOperationKind(src.getKind())); if (src.hasExperimental()) tgt.setExperimental(src.getExperimental()); if (src.hasDate()) tgt.setDate(src.getDate()); tgt.setPublisher(src.getPublisher()); for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); tgt.setDescription(src.getDescription()); tgt.setRequirements(src.getPurpose()); tgt.setIdempotent(src.getIdempotent()); tgt.setCode(src.getCode()); tgt.setNotes(src.getComment()); if (src.hasBase()) tgt.setBase(convertReference(src.getBase())); tgt.setSystem(src.getSystem()); if (src.getType()) for (org.hl7.fhir.dstu3.model.CodeType t : src.getResource()) tgt.addType(t.getValue()); tgt.setInstance(src.getInstance()); for (org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter())
private OperationDefinition readOperationDefinitionForOperation(List<OperationMethodBinding> bindings) { OperationDefinition op = new OperationDefinition(); op.setStatus(PublicationStatus.ACTIVE); op.setKind(OperationKind.OPERATION); op.setIdempotent(true); op.setSystem(false); op.setType(false); op.setInstance(false); op.setDescription(sharedDescription.getDescription()); op.setInstance(true); op.setSystem(true); op.setType(true); op.setIdempotent(sharedDescription.isIdempotent()); op.setCode(sharedDescription.getName().substring(1)); if (sharedDescription.isCanOperateAtInstanceLevel()) { op.setInstance(sharedDescription.isCanOperateAtInstanceLevel()); op.setSystem(sharedDescription.isCanOperateAtServerLevel()); op.addResourceElement().setValue(sharedDescription.getResourceName()); if (nextParamUntyped instanceof OperationParameter) { OperationParameter nextParam = (OperationParameter) nextParamUntyped;
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("url")) { this.url = castToUri(value); // UriType } else if (name.equals("version")) { this.version = castToString(value); // StringType } else 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 OperationKindEnumFactory().fromType(castToCode(value)); this.kind = (Enumeration) value; // Enumeration<OperationKind> } else if (name.equals("experimental")) { this.experimental = castToBoolean(value); // BooleanType } 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("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("purpose")) { this.purpose = castToMarkdown(value); // MarkdownType
/** * @return {@link #definition} 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. (Where the formal definition can be found.) */ public OperationDefinition getDefinitionTarget() { if (this.definitionTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create CapabilityStatementRestOperationComponent.definition"); else if (Configuration.doAutoCreate()) this.definitionTarget = new OperationDefinition(); // aa return this.definitionTarget; }
public static org.hl7.fhir.dstu3.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.dstu2016may.model.OperationDefinition src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.OperationDefinition tgt = new org.hl7.fhir.dstu3.model.OperationDefinition(); copyDomainResource(src, tgt); if (src.hasUrl()) tgt.setUrl(src.getUrl()); if (src.hasVersion()) tgt.setVersion(src.getVersion()); tgt.setName(src.getName()); tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); tgt.setKind(convertOperationKind(src.getKind())); if (src.hasExperimental()) tgt.setExperimental(src.getExperimental()); if (src.hasDate()) tgt.setDate(src.getDate()); if (src.hasPublisher()) tgt.setPublisher(src.getPublisher()); for (org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (isJurisdiction(t)) tgt.addJurisdiction(convertCodeableConcept(t)); else tgt.addUseContext(convertCodeableConceptToUsageContext(t)); if (src.hasRequirements()) tgt.setPurpose(src.getRequirements()); if (src.hasIdempotent())
public static org.hl7.fhir.dstu2016may.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.dstu3.model.OperationDefinition src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.OperationDefinition tgt = new org.hl7.fhir.dstu2016may.model.OperationDefinition(); copyDomainResource(src, tgt); if (src.hasUrl()) tgt.setUrl(src.getUrl()); if (src.hasVersion()) tgt.setVersion(src.getVersion()); tgt.setName(src.getName()); tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); tgt.setKind(convertOperationKind(src.getKind())); if (src.hasExperimental()) tgt.setExperimental(src.getExperimental()); if (src.hasDate()) tgt.setDate(src.getDate()); if (src.hasPublisher()) tgt.setPublisher(src.getPublisher()); for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); 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.hasPurpose()) tgt.setRequirements(src.getPurpose()); if (src.hasIdempotent())
/** * @return {@link #operationDefinition} 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. (A reference to the operation that is used to invoke this service.) */ public OperationDefinition getOperationDefinitionTarget() { if (this.operationDefinitionTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ServiceDefinition.operationDefinition"); else if (Configuration.doAutoCreate()) this.operationDefinitionTarget = new OperationDefinition(); // aa return this.operationDefinitionTarget; }