@Override public Base addChild(String name) throws FHIRException { if (name.equals("attachment")) { this.attachment = new Attachment(); return this.attachment; } else if (name.equals("format")) { return addFormat(); } else return super.addChild(name); }
/** * @return {@link #content} (The document and format referenced. There may be multiple content element repetitions, each with a different format.) */ // syntactic sugar public DocumentReferenceContentComponent addContent() { //3 DocumentReferenceContentComponent t = new DocumentReferenceContentComponent(); if (this.content == null) this.content = new ArrayList<DocumentReferenceContentComponent>(); this.content.add(t); return t; }
@Override public void setProperty(String name, Base value) throws FHIRException { if (name.equals("attachment")) this.attachment = castToAttachment(value); // Attachment else if (name.equals("format")) this.getFormat().add(castToCoding(value)); else super.setProperty(name, value); }
DocumentReference dr = (DocumentReference) resource; for (DocumentReference.DocumentReferenceContentComponent content : dr.getContent()) { expectedBinaryFullUrls.add(content.getAttachment().getUrl());
DocumentReference dr = (DocumentReference) resource; for (DocumentReference.DocumentReferenceContentComponent content : dr.getContent()) { expectedBinaryFullUrls.add(content.getAttachment().getUrl());
.setDisplay("History and Physical"); reference.addContent() .setAttachment( new Attachment() .setContentType("text/plain") .setHash(MessageDigest.getInstance("SHA-1").digest(documentContent)) .setUrl(BINARY_FULL_URL)) .addFormat() .setCode("urn:ihe:pcc:handp:2008") .setSystem("urn:oid:1.3.6.1.4.1.19376.1.2.3");
public boolean hasContent() { if (this.content == null) return false; for (DocumentReferenceContentComponent item : this.content) if (!item.isEmpty()) return true; return false; }
/** * @return {@link #content} (The document and format referenced. There may be multiple content element repetitions, each with a different format.) */ // syntactic sugar public DocumentReferenceContentComponent addContent() { //3 DocumentReferenceContentComponent t = new DocumentReferenceContentComponent(); if (this.content == null) this.content = new ArrayList<DocumentReferenceContentComponent>(); this.content.add(t); return t; }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("attachment")) { this.attachment = new Attachment(); return this.attachment; } else if (name.equals("format")) { return addFormat(); } else return super.addChild(name); }
@Override public boolean equalsDeep(Base other) { if (!super.equalsDeep(other)) return false; if (!(other instanceof DocumentReferenceContentComponent)) return false; DocumentReferenceContentComponent o = (DocumentReferenceContentComponent) other; return compareDeep(attachment, o.attachment, true) && compareDeep(format, o.format, true); }
public org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent(); copyElement(src, tgt); tgt.setAttachment(convertAttachment(src.getAttachment())); for (org.hl7.fhir.instance.model.Coding t : src.getFormat()) tgt.setFormat(convertCoding(t)); return tgt; }
public org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent(); copyElement(src, tgt); tgt.setAttachment(convertAttachment(src.getAttachment())); tgt.addFormat(convertCoding(src.getFormat())); return tgt; }
public DocumentReferenceContentComponent copy() { DocumentReferenceContentComponent dst = new DocumentReferenceContentComponent(); copyValues(dst); dst.attachment = attachment == null ? null : attachment.copy(); if (format != null) { dst.format = new ArrayList<Coding>(); for (Coding i : format) dst.format.add(i.copy()); }; return dst; }
@Override public void setProperty(String name, Base value) throws FHIRException { if (name.equals("attachment")) this.attachment = castToAttachment(value); // Attachment else if (name.equals("format")) this.getFormat().add(castToCoding(value)); else super.setProperty(name, value); }
public org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent(); copyElement(src, tgt); tgt.setAttachment(convertAttachment(src.getAttachment())); tgt.addFormat(convertCoding(src.getFormat())); return tgt; }
public org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent(); copyElement(src, tgt); tgt.setAttachment(convertAttachment(src.getAttachment())); for (org.hl7.fhir.instance.model.Coding t : src.getFormat()) tgt.setFormat(convertCoding(t)); return tgt; }
public boolean hasContent() { if (this.content == null) return false; for (DocumentReferenceContentComponent item : this.content) if (!item.isEmpty()) return true; return false; }
public org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent(); copyElement(src, tgt); tgt.setAttachment(convertAttachment(src.getAttachment())); for (org.hl7.fhir.instance.model.Coding t : src.getFormat()) tgt.setFormat(convertCoding(t)); return tgt; }
@Override public boolean equalsDeep(Base other) { if (!super.equalsDeep(other)) return false; if (!(other instanceof DocumentReferenceContentComponent)) return false; DocumentReferenceContentComponent o = (DocumentReferenceContentComponent) other; return compareDeep(attachment, o.attachment, true) && compareDeep(format, o.format, true); }
public org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent(); copyElement(src, tgt); tgt.setAttachment(convertAttachment(src.getAttachment())); for (org.hl7.fhir.instance.model.Coding t : src.getFormat()) tgt.setFormat(convertCoding(t)); return tgt; }