Class PartyIdentifiedAccess

    • Constructor Detail

      • PartyIdentifiedAccess

        public PartyIdentifiedAccess​(org.jooq.DSLContext context,
                                     ServerConfig serverConfig,
                                     String partyName)
    • Method Detail

      • retrievePartyIdByPartyName

        public static UUID retrievePartyIdByPartyName​(I_DomainAccess domainAccess,
                                                      String partyName)
        Description copied from interface: I_PartyIdentifiedAccess
        retrieve an instance by its name
        should be used for test purpose as the subject should not be known in this context
        Parameters:
        domainAccess - SQL access
        partyName - a subject name
        Returns:
      • getOrCreateParty

        public static UUID getOrCreateParty​(I_DomainAccess domainAccess,
                                            String name,
                                            String idCode,
                                            String issuer,
                                            String assigner,
                                            String typeName)
        Description copied from interface: I_PartyIdentifiedAccess
        retrieve or create a party with an identifier (NB. a party has n identifiers)
        name - the party name
        idCode - the identifier value
        issuer - identifier issuer
        assigner - identifier assigner
        typeName - identifier type
        Returns:
      • findIdentifiedParty

        public static UUID findIdentifiedParty​(org.jooq.DSLContext context,
                                               List<com.nedap.archie.rm.datavalues.DvIdentifier> identifierList)
      • findReferencedParty

        public static UUID findReferencedParty​(org.jooq.DSLContext context,
                                               com.nedap.archie.rm.support.identification.PartyRef partyRef)
      • getOrCreateParty

        public static UUID getOrCreateParty​(I_DomainAccess domainAccess,
                                            com.nedap.archie.rm.generic.PartyIdentified partyIdentified)
        Description copied from interface: I_PartyIdentifiedAccess
        retrieve or create a party with a PartyIdentified (external ref)
        Returns:
      • retrievePartyIdentified

        public static com.nedap.archie.rm.generic.PartyIdentified retrievePartyIdentified​(I_DomainAccess domainAccess,
                                                                                          UUID id)
        Description copied from interface: I_PartyIdentifiedAccess
        retrieve an identified party by its UUID
        Returns:
      • retrievePartyIdentified

        public static com.nedap.archie.rm.generic.PartyIdentified retrievePartyIdentified​(String name,
                                                                                          String refScheme,
                                                                                          String refNamespace,
                                                                                          String refValue,
                                                                                          String refType)
      • commit

        public UUID commit​(Timestamp transactionTime)
        Description copied from interface: I_SimpleCRUD
        storeComposition a new entry in the DB
        Specified by:
        commit in interface I_SimpleCRUD
        Returns:
        the UUID of the newly created record
      • commit

        public UUID commit()
        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
      • 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

        @Deprecated
        public Boolean update​(Timestamp transactionTime,
                              boolean force)
        Deprecated.
        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:
        Throws:
        InternalServerException - because inherited interface function isn't implemented in this class
      • update

        public Boolean update()
        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

        @Deprecated
        public Boolean update​(Boolean force)
        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:
      • addIdentifier

        public Integer addIdentifier​(String value,
                                     String issuer,
                                     String assigner,
                                     String type)
        Description copied from interface: I_PartyIdentifiedAccess
        add an identifier to a party
        Specified by:
        addIdentifier in interface I_PartyIdentifiedAccess
        Parameters:
        value - a subject id code
        issuer - the authority issuing the subject Id Code (ex. NHS)
        assigner - the authority that assign the id to the identified item
        type - a descriptive literal following a conventional vocabulary (SSN, prescription etc.)
        Returns:
        number of record added