Class ChEmedEprDocument

java.lang.Object
org.hl7.fhir.r4.model.Base
org.hl7.fhir.r4.model.BaseResource
org.hl7.fhir.r4.model.Resource
org.hl7.fhir.r4.model.Bundle
org.projecthusky.fhir.emed.ch.epr.resource.ChEmedEprDocument
All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IAnyResource, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseBundle, org.hl7.fhir.instance.model.api.IBaseResource
Direct Known Subclasses:
ChEmedEprDocumentDis, ChEmedEprDocumentMtp, ChEmedEprDocumentPadv, ChEmedEprDocumentPml, ChEmedEprDocumentPmlc, ChEmedEprDocumentPre

public abstract class ChEmedEprDocument extends org.hl7.fhir.r4.model.Bundle
The HAPI custom structure for CH-EMED-EPR Document Bundles.
Author:
Quentin Ligier
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.hl7.fhir.r4.model.Bundle

    org.hl7.fhir.r4.model.Bundle.BundleEntryComponent, org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent, org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent, org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent, org.hl7.fhir.r4.model.Bundle.BundleLinkComponent, org.hl7.fhir.r4.model.Bundle.BundleType, org.hl7.fhir.r4.model.Bundle.BundleTypeEnumFactory, org.hl7.fhir.r4.model.Bundle.HTTPVerb, org.hl7.fhir.r4.model.Bundle.HTTPVerbEnumFactory, org.hl7.fhir.r4.model.Bundle.SearchEntryMode, org.hl7.fhir.r4.model.Bundle.SearchEntryModeEnumFactory
  • Field Summary

    Fields inherited from class org.hl7.fhir.r4.model.Bundle

    COMPOSITION, entry, identifier, IDENTIFIER, INCLUDE_COMPOSITION, INCLUDE_MESSAGE, link, MESSAGE, signature, SP_COMPOSITION, SP_IDENTIFIER, SP_MESSAGE, SP_TIMESTAMP, SP_TYPE, timestamp, TIMESTAMP, total, type, TYPE

    Fields inherited from class org.hl7.fhir.r4.model.Resource

    id, implicitRules, language, meta

    Fields inherited from interface org.hl7.fhir.instance.model.api.IAnyResource

    RES_ID, SP_RES_ID

    Fields inherited from interface org.hl7.fhir.instance.model.api.IBaseBundle

    LINK_NEXT, LINK_PREV, LINK_SELF

    Fields inherited from interface org.hl7.fhir.instance.model.api.IBaseResource

    INCLUDE_ALL, WILDCARD_ALL_SET
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Empty constructor for the parser.
    protected
    ChEmedEprDocument(UUID documentId, Instant timestamp)
    Constructor that pre-populates fields.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.hl7.fhir.r4.model.Bundle.BundleEntryComponent
     
     
    @Nullable org.hl7.fhir.r4.model.Bundle.BundleEntryComponent
    getEntryByResourceType(Class<?> resourceType)
    Finds a bundle entry by the type of its resource or null, without creating it.
    protected <T> List<T>
    Gets the resources in the package entries by the specified resource type.
     
    Resolves the document UUID or throws.
    Resolves the patient targeted by this medication treatment plan.
    Resolves the document timestamp.
    setCreationTime(Instant creationTime)
    Sets the document's creation date and time.
    setIdentifier(UUID documentUUID)
    Sets the document UUID.
    org.hl7.fhir.r4.model.Bundle.BundleEntryComponent
    Sets the patient targeted by this document.

    Methods inherited from class org.hl7.fhir.r4.model.Bundle

    addChild, addEntry, addEntry, addLink, addLink, copy, copyValues, equalsDeep, equalsShallow, fhirType, getEntry, getEntryFirstRep, getIdentifier, getLink, getLink, getLinkFirstRep, getLinkOrCreate, getNamedProperty, getProperty, getResourceType, getSignature, getTimestamp, getTimestampElement, getTotal, getTotalElement, getType, getTypeElement, getTypesForProperty, hasEntry, hasIdentifier, hasLink, hasSignature, hasTimestamp, hasTimestampElement, hasTotal, hasTotalElement, hasType, hasTypeElement, isEmpty, listChildren, makeProperty, removeChild, setEntry, setIdentifier, setLink, setProperty, setProperty, setSignature, setTimestamp, setTimestampElement, setTotal, setTotalElement, setType, setTypeElement, typedCopy

    Methods inherited from class org.hl7.fhir.r4.model.Resource

    copyValues, getId, getIdBase, getIdElement, getIdPart, getImplicitRules, getImplicitRulesElement, getLanguage, getLanguage, getLanguageElement, getMeta, hasId, hasIdElement, hasImplicitRules, hasImplicitRulesElement, hasLanguage, hasLanguageElement, hasMeta, setId, setIdBase, setIdElement, setImplicitRules, setImplicitRulesElement, setLanguage, setLanguageElement, setMeta

    Methods inherited from class org.hl7.fhir.r4.model.BaseResource

    getStructureFhirVersionEnum, isResource, setId

    Methods inherited from class org.hl7.fhir.r4.model.Base

    castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCanonical, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExpression, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMarketingStatus, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPopulation, castToPositiveInt, castToProdCharacteristic, castToProductShelfLife, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToSubstanceAmount, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUrl, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, copyValues, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, getXhtml, hasFormatComment, hasPrimitiveValue, hasType, hasUserData, isBooleanPrimitive, isDateTime, isMetadataBased, isPrimitive, listChildrenByName, listChildrenByName, primitiveValue, setUserData, setUserDataINN

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.hl7.fhir.instance.model.api.IAnyResource

    getUserData, setUserData

    Methods inherited from interface org.hl7.fhir.instance.model.api.IBase

    getFormatCommentsPost, getFormatCommentsPre, hasFormatComment

    Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseResource

    getMeta, getStructureFhirVersionEnum, isDeleted, setId
  • Constructor Details

    • ChEmedEprDocument

      protected ChEmedEprDocument()
      Empty constructor for the parser.
    • ChEmedEprDocument

      protected ChEmedEprDocument(UUID documentId, Instant timestamp)
      Constructor that pre-populates fields.
      Parameters:
      documentId - The document ID.
      timestamp - The document creation date.
  • Method Details

    • resolveComposition

      public abstract ChEmedEprComposition resolveComposition()
    • getEmedType

      public abstract EmedDocumentType getEmedType()
    • getCompositionEntry

      public abstract org.hl7.fhir.r4.model.Bundle.BundleEntryComponent getCompositionEntry()
    • resolveIdentifier

      @ExpectsValidResource public UUID resolveIdentifier() throws InvalidEmedContentException
      Resolves the document UUID or throws.
      Returns:
      the document UUID.
      Throws:
      InvalidEmedContentException - if the id is missing.
    • resolvePatient

      Resolves the patient targeted by this medication treatment plan.
      Returns:
      The patient targeted by this medication treatment plan.
      Throws:
      InvalidEmedContentException - if the patient is missing.
    • resolveTimestamp

      @ExpectsValidResource public Instant resolveTimestamp() throws InvalidEmedContentException
      Resolves the document timestamp.
      Returns:
      the document timestamp.
      Throws:
      InvalidEmedContentException - if the timestamp is missing.
    • setCreationTime

      public ChEmedEprDocument setCreationTime(Instant creationTime)
      Sets the document's creation date and time.
      Parameters:
      creationTime - the document's creation date and time.
      Returns:
      this.
    • setIdentifier

      public ChEmedEprDocument setIdentifier(UUID documentUUID)
      Sets the document UUID.
      Parameters:
      documentUUID - The document UUID.
      Returns:
      this.
    • setPatient

      public org.hl7.fhir.r4.model.Bundle.BundleEntryComponent setPatient(ChCorePatientEpr patient)
      Sets the patient targeted by this document.
      Parameters:
      patient - the patient targeted by this document.
      Returns:
      the bundle entry.
    • getEntryByResourceType

      public @Nullable org.hl7.fhir.r4.model.Bundle.BundleEntryComponent getEntryByResourceType(Class<?> resourceType)
      Finds a bundle entry by the type of its resource or null, without creating it.
      Parameters:
      resourceType - The type of the resource.
      Returns:
      the bundle entry or null.
    • getEntryResourceByResourceType

      protected <T> List<T> getEntryResourceByResourceType(Class<T> resourceType)
      Gets the resources in the package entries by the specified resource type.
      Parameters:
      resourceType - The type of the resource.
      Returns:
      the list with the resource.