Interface ChEmedEprDocumentAuthorable<T>
- All Known Implementing Classes:
ChEmedEprMedicationDispensePml
,ChEmedEprMedicationRequestChangedPml
,ChEmedEprMedicationRequestPml
,ChEmedEprMedicationStatementChangedPml
,ChEmedEprMedicationStatementPml
,ChEmedEprMedicationStatementPmlBase
,ChEmedEprMedicationStatementPmlc
,ChEmedEprObservationPml
public interface ChEmedEprDocumentAuthorable<T>
Interface defining common methods for all the resources having an authorDocument element.
This interfaces includes some default implementation so that the interface can be used with a composition approach,
so that the implementing resource can inherit from the base resource it is extending and yet implement this interface
and benefit from the default implementations of most methods.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
copyAuthorDocumentValues
(org.hl7.fhir.r4.model.Resource dst) Copies the author document resource to another object.@Nullable org.hl7.fhir.r4.model.Reference
Gets the authorDocument element in resource.default boolean
Returns whether the author document exists.default @Nullable Author
Resolves the last author document resource if available.setAuthorDocument
(@Nullable org.hl7.fhir.r4.model.Reference reference) Sets the authorDocument element in the resource.default T
setAuthorDocument
(org.hl7.fhir.instance.model.api.IBaseResource author) Sets the author of the original document.default T
setAuthorDocument
(Author author) Sets the author of the original document.
-
Method Details
-
getAuthorDocument
@Nullable org.hl7.fhir.r4.model.Reference getAuthorDocument()Gets the authorDocument element in resource.- Returns:
- the author document element.
-
setAuthorDocument
Sets the authorDocument element in the resource.- Parameters:
reference
- The reference to be set as authorDocument.- Returns:
- this.
-
setAuthorDocument
Sets the author of the original document. This method creates a reference from the provided resource.- Parameters:
author
- the author.- Returns:
- this.
-
setAuthorDocument
Sets the author of the original document. This method creates a reference from the provided Author.- Parameters:
author
- the author.- Returns:
- this.
-
hasAuthorDocument
default boolean hasAuthorDocument()Returns whether the author document exists.- Returns:
true
if the author document exists,false
otherwise.
-
resolveAuthorDocument
@ExpectsValidResource default @Nullable Author resolveAuthorDocument() throws InvalidEmedContentExceptionResolves the last author document resource if available.- Returns:
- the author document resource or
null
. - Throws:
InvalidEmedContentException
- if the author document resource is invalid.
-
copyAuthorDocumentValues
default void copyAuthorDocumentValues(org.hl7.fhir.r4.model.Resource dst) Copies the author document resource to another object.- Parameters:
dst
- The destination resource.
-