/** * @return {@link #agent} (An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.) */ // syntactic sugar public ProvenanceAgentComponent addAgent() { //3 ProvenanceAgentComponent t = new ProvenanceAgentComponent(); if (this.agent == null) this.agent = new ArrayList<ProvenanceAgentComponent>(); this.agent.add(t); return t; }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("role")) { throw new FHIRException("Cannot call addChild on a primitive type Provenance.role"); } else if (name.equals("type")) { this.type = new Coding(); return this.type; } else if (name.equals("reference")) { throw new FHIRException("Cannot call addChild on a primitive type Provenance.reference"); } else if (name.equals("display")) { throw new FHIRException("Cannot call addChild on a primitive type Provenance.display"); } else if (name.equals("agent")) { this.agent = new ProvenanceAgentComponent(); return this.agent; } else return super.addChild(name); }
/** * @return {@link #agent} (The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity.) */ public ProvenanceAgentComponent getAgent() { if (this.agent == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ProvenanceEntityComponent.agent"); else if (Configuration.doAutoCreate()) this.agent = new ProvenanceAgentComponent(); // cc return this.agent; }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("role")) { throw new FHIRException("Cannot call addChild on a primitive type Provenance.role"); } else if (name.equals("type")) { this.type = new Coding(); return this.type; } else if (name.equals("reference")) { throw new FHIRException("Cannot call addChild on a primitive type Provenance.reference"); } else if (name.equals("display")) { throw new FHIRException("Cannot call addChild on a primitive type Provenance.display"); } else if (name.equals("agent")) { this.agent = new ProvenanceAgentComponent(); return this.agent; } else return super.addChild(name); }
public ProvenanceAgentComponent copy() { ProvenanceAgentComponent dst = new ProvenanceAgentComponent(); copyValues(dst); dst.role = role == null ? null : role.copy(); dst.actor = actor == null ? null : actor.copy(); dst.userId = userId == null ? null : userId.copy(); if (relatedAgent != null) { dst.relatedAgent = new ArrayList<ProvenanceAgentRelatedAgentComponent>(); for (ProvenanceAgentRelatedAgentComponent i : relatedAgent) dst.relatedAgent.add(i.copy()); }; return dst; }
/** * @return {@link #agent} (The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity.) */ public ProvenanceAgentComponent getAgent() { if (this.agent == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ProvenanceEntityComponent.agent"); else if (Configuration.doAutoCreate()) this.agent = new ProvenanceAgentComponent(); // cc return this.agent; }
public org.hl7.fhir.instance.model.Provenance.ProvenanceAgentComponent convertProvenanceAgentComponent(org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Provenance.ProvenanceAgentComponent tgt = new org.hl7.fhir.instance.model.Provenance.ProvenanceAgentComponent(); copyElement(src, tgt); // tgt.setRole(convertCoding(src.getRole())); if (src.hasWhoReference()) tgt.setActor(convertReference(src.getWhoReference())); return tgt; }
/** * @return {@link #agent} (An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.) */ // syntactic sugar public ProvenanceAgentComponent addAgent() { //3 ProvenanceAgentComponent t = new ProvenanceAgentComponent(); if (this.agent == null) this.agent = new ArrayList<ProvenanceAgentComponent>(); this.agent.add(t); return t; }
public ProvenanceAgentComponent copy() { ProvenanceAgentComponent dst = new ProvenanceAgentComponent(); copyValues(dst); dst.role = role == null ? null : role.copy(); dst.actor = actor == null ? null : actor.copy(); dst.userId = userId == null ? null : userId.copy(); if (relatedAgent != null) { dst.relatedAgent = new ArrayList<ProvenanceAgentRelatedAgentComponent>(); for (ProvenanceAgentRelatedAgentComponent i : relatedAgent) dst.relatedAgent.add(i.copy()); }; return dst; }
public org.hl7.fhir.instance.model.Provenance.ProvenanceAgentComponent convertProvenanceAgentComponent(org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Provenance.ProvenanceAgentComponent tgt = new org.hl7.fhir.instance.model.Provenance.ProvenanceAgentComponent(); copyElement(src, tgt); // tgt.setRole(convertCoding(src.getRole())); if (src.hasWhoReference()) tgt.setActor(convertReference(src.getWhoReference())); return tgt; }