Class StatusAccess

    • Constructor Detail

    • Method Detail

      • retrieveInstance

        public static I_StatusAccess retrieveInstance​(I_DomainAccess domainAccess,
                                                      UUID statusId)
        Description copied from interface: I_StatusAccess
        retrieve a status by given status ID
        Parameters:
        domainAccess - SQL access
        statusId - Id of an status to retrieve
        Returns:
        UUID or null
      • retrieveInstanceByNamedSubject

        public static I_StatusAccess retrieveInstanceByNamedSubject​(I_DomainAccess domainAccess,
                                                                    String partyName)
        Description copied from interface: I_StatusAccess
        retrieve a status for a named subject (patient)
        NB. for security reason, most deployment will not provide an explicit subject name, this method is provided for small deployment or test purpose.
        Parameters:
        domainAccess - SQL access
        partyName - a subject name
        Returns:
        UUID or null
      • retrieveInstanceByParty

        public static I_StatusAccess retrieveInstanceByParty​(I_DomainAccess domainAccess,
                                                             UUID partyIdentified)
        Description copied from interface: I_StatusAccess
        retrieve a status by an identified party id
        Parameters:
        domainAccess - SQL access
        partyIdentified - Id of an identified party
        Returns:
        UUID or null
      • retrieveInstanceByEhrId

        public static I_StatusAccess retrieveInstanceByEhrId​(I_DomainAccess domainAccess,
                                                             UUID ehrId)
        Description copied from interface: I_StatusAccess
        retrieve a status by given EHR ID
        Parameters:
        domainAccess - SQL access
        ehrId - Id of associated EHR
        Returns:
        UUID or null
      • commit

        @Deprecated
        public UUID commit()
        Deprecated.
        Description copied from interface: I_SimpleCRUD
        storeComposition a new entry in the DB, using a default transaction time
        only implemented with "root" tables: ehr, contribution and composition!
        Specified by:
        commit in interface I_SimpleCRUD
        Returns:
        the UUID of the newly created record
        Throws:
        InternalServerException - because inherited interface function isn't implemented in this class
      • commit

        public UUID commit​(Timestamp transactionTime,
                           UUID ehrId,
                           com.nedap.archie.rm.datastructures.ItemStructure otherDetails)
        Description copied from interface: I_StatusAccess
        Commit this status instance.
        Specified by:
        commit in interface I_StatusAccess
        Parameters:
        transactionTime - Time of transaction
        ehrId - Associated EHR
        otherDetails - Object representation of otherDetails
        Returns:
        ID of DB entry if successful
      • commitWithCustomContribution

        public UUID commitWithCustomContribution​(Timestamp transactionTime,
                                                 UUID ehrId,
                                                 com.nedap.archie.rm.datastructures.ItemStructure otherDetails)
        Description copied from interface: I_StatusAccess
        commit this instance, which has contribution already set with setContributionId(...) beforehand
        Specified by:
        commitWithCustomContribution in interface I_StatusAccess
        Parameters:
        transactionTime - Time of transaction
        ehrId - Associated EHR
        otherDetails - Object representation of otherDetails
        Returns:
        ID of DB entry if successful
      • update

        public Boolean update​(Timestamp transactionTime)
        Description copied from interface: I_SimpleCRUD
        updateComposition the current entry
        depending on the implementation, records are updated only if one or more field(s) have been changed
        Specified by:
        update in interface I_SimpleCRUD
        Returns:
      • update

        public Boolean update​(Timestamp transactionTime,
                              boolean force)
        Description copied from interface: I_SimpleCRUD
        updateComposition the current entry even if the record is not modified
        intended to be used with temporal tables to ensure that a set of interdependent tables are updated in sync. This approach is used to simplify versions retrieval.
        Specified by:
        update in interface I_SimpleCRUD
        Returns:
      • update

        public Boolean update​(Boolean force)
        Description copied from interface: I_SimpleCRUD
        updateComposition the current entry using time now as the system transaction time
        only implemented at root level object (contribution, composition, ehr). depending on the implementation, records are updated only if one or more field(s) have been changed
        Specified by:
        update in interface I_SimpleCRUD
        Returns:
      • update

        public Boolean update​(com.nedap.archie.rm.datastructures.ItemStructure otherDetails,
                              Timestamp transactionTime,
                              boolean force)
        Description copied from interface: I_StatusAccess
        Update this status instance.
        Specified by:
        update in interface I_StatusAccess
        Parameters:
        otherDetails - Object representation of otherDetails
        transactionTime - Time of transaction
        force - Option to force
        Returns:
        True if successful
      • update

        @Deprecated
        public Boolean update()
        Deprecated.
        Description copied from interface: I_SimpleCRUD
        updateComposition the current entry using time now as the system transaction time
        only implemented at root level object (contribution, composition, ehr). depending on the implementation, records are updated only if one or more field(s) have been changed
        Specified by:
        update in interface I_SimpleCRUD
        Returns:
        Throws:
        InternalServerException - because inherited interface function isn't implemented in this class
      • delete

        public Integer delete()
        Description copied from interface: I_SimpleCRUD
        delete the Versioned Object associated with the instance implementing this Data Access Interface. Relies on ON DELETE CASCADE
        Specified by:
        delete in interface I_SimpleCRUD
        Returns:
      • setAuditAndContributionAuditValues

        public void setAuditAndContributionAuditValues​(UUID systemId,
                                                       UUID committerId,
                                                       String description)
        Description copied from interface: I_StatusAccess
        Helper that sets values in Status' direct audit and Status' implicit contribution audit
        Specified by:
        setAuditAndContributionAuditValues in interface I_StatusAccess
        Parameters:
        systemId - ID of committing system
        committerId - ID of committer
        description - Optional description