public org.hl7.fhir.dstu3.model.Narrative convertNarrative(org.hl7.fhir.instance.model.Narrative src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Narrative tgt = new org.hl7.fhir.dstu3.model.Narrative(); copyElement(src, tgt); tgt.setStatus(convertNarrativeStatus(src.getStatus())); tgt.setDiv(src.getDiv()); return tgt; }
public static org.hl7.fhir.dstu3.model.Narrative convertNarrative(org.hl7.fhir.dstu2016may.model.Narrative src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Narrative tgt = new org.hl7.fhir.dstu3.model.Narrative(); copyElement(src, tgt); tgt.setStatus(convertNarrativeStatus(src.getStatus())); tgt.setDiv(src.getDiv()); return tgt; }
protected String addReference(DomainResource r, String title, String id) throws Exception { if (r.getText() == null) r.setText(new Narrative()); if (r.getText().getDiv() == null) { r.getText().setStatus(NarrativeStatus.GENERATED); new NarrativeGenerator("", "", context).generate(r); } r.setMeta(new Meta().setLastUpdatedElement(InstantType.now())); r.setId(id); feed.getEntry().add(new BundleEntryComponent().setResource(r)); return id; }
/** * @return {@link #text} (A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.) */ public Narrative getText() { if (this.text == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create SectionComponent.text"); else if (Configuration.doAutoCreate()) this.text = new Narrative(); // cc return this.text; }
/** * @return {@link #text} (A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.) */ public Narrative getText() { if (this.text == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create DomainResource.text"); else if (Configuration.doAutoCreate()) this.text = new Narrative(); // cc return this.text; }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("text")) { this.text = new Narrative(); return this.text; } else if (name.equals("contained")) { throw new FHIRException("Cannot call addChild on an abstract type DomainResource.contained"); } else if (name.equals("extension")) { return addExtension(); } else if (name.equals("modifierExtension")) { return addModifierExtension(); } else return super.addChild(name); }
public Narrative copy() { Narrative dst = new Narrative(); copyValues(dst); dst.status = status == null ? null : status.copy(); dst.div = div == null ? null : div.copy(); return dst; }
this.text = new Narrative(); return this.text;
/** * @param text - * @return fhir narrative object containing the given text wrapped in an html "div". */ static public Narrative createNarrative( final String text ) { final Narrative narrative = new Narrative(); narrative.setStatus( Narrative.NarrativeStatus.GENERATED ); final XhtmlNode htmlNode = new XhtmlNode( NodeType.Element, "div" ); htmlNode.addText( text ); narrative.setDiv( htmlNode ); return narrative; }
public org.hl7.fhir.dstu3.model.Narrative convertNarrative(org.hl7.fhir.instance.model.Narrative src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Narrative tgt = new org.hl7.fhir.dstu3.model.Narrative(); copyElement(src, tgt); tgt.setStatus(convertNarrativeStatus(src.getStatus())); tgt.setDiv(src.getDiv()); return tgt; }
return new Identifier(); if ("Narrative".equals(name)) return new Narrative(); if ("Coding".equals(name)) return new Coding();
public static org.hl7.fhir.dstu3.model.Narrative convertNarrative(org.hl7.fhir.dstu2016may.model.Narrative src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Narrative tgt = new org.hl7.fhir.dstu3.model.Narrative(); copyElement(src, tgt); tgt.setStatus(convertNarrativeStatus(src.getStatus())); tgt.setDiv(src.getDiv()); return tgt; }
public static Narrative newNarrative(NarrativeStatus status, String html) throws IOException, FHIRException { Narrative n = new Narrative(); n.setStatus(status); try { n.setDiv(new XhtmlParser().parseFragment("<div>"+Utilities.escapeXml(html)+"</div>")); } catch (org.hl7.fhir.exceptions.FHIRException e) { throw new FHIRException(e.getMessage(), e); } return n; }
protected String addReference(DomainResource r, String title, String id) throws Exception { if (r.getText() == null) r.setText(new Narrative()); if (r.getText().getDiv() == null) { r.getText().setStatus(NarrativeStatus.GENERATED); new NarrativeGenerator("", "", context).generate(r); } r.setMeta(new Meta().setLastUpdatedElement(InstantType.now())); r.setId(id); feed.getEntry().add(new BundleEntryComponent().setResource(r)); return id; }
case 74526880: return new Money(); case 369315063: return new NamingSystem(); case -540546990: return new Narrative(); case 1247831734: return new NutritionOrder(); case 1790214156: return new Observation();