Class EmedReference

java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.common.EmedReference

public class EmedReference extends Object
A reference to an eMedication document and/or entry.
Author:
Quentin Ligier
  • Constructor Details

    • EmedReference

      public EmedReference(@Nullable UUID documentId, @Nullable UUID entryId)
      Constructs a new eMedication reference from IDs.
      Parameters:
      documentId - The document ID or null if not specified.
      entryId - The entry ID or null if not specified.
      Throws:
      IllegalArgumentException - if both documentId and entryId are null.
    • EmedReference

      public EmedReference(@Nullable UUID documentId, @Nullable UUID entryId, @Nullable EmedDocumentType documentType, @Nullable EmedEntryType entryType)
      Constructs a new eMedication reference from IDs and types.
      Parameters:
      documentId - The document ID or null if not specified.
      entryId - The entry ID or null if not specified.
      documentType - The document type or null if not specified.
      entryType - The entry type or null if not specified.
      Throws:
      IllegalArgumentException - if both documentId and entryId are null.
  • Method Details

    • isEntryReference

      public boolean isEntryReference()
      Returns whether this instance references an entry (true) or a document (false).
    • toText

      public String toText()
    • getDocumentId

      public @Nullable UUID getDocumentId()
    • getEntryId

      public @Nullable UUID getEntryId()
    • setDocumentId

      public void setDocumentId(@Nullable UUID documentId)
    • setEntryId

      public void setEntryId(@Nullable UUID entryId)
    • getDocumentType

      public @Nullable EmedDocumentType getDocumentType()
    • setDocumentType

      public void setDocumentType(@Nullable EmedDocumentType documentType)
    • getEntryType

      public @Nullable EmedEntryType getEntryType()
    • setEntryType

      public void setEntryType(@Nullable EmedEntryType entryType)
    • toString

      public String toString()
      Overrides:
      toString in class Object