Interface I_PartyIdentifiedAccess

    • Method Detail

      • getInstance

        static I_PartyIdentifiedAccess getInstance​(I_DomainAccess domain,
                                                   String partyName)
        get a new access layer instance for a party name
        Parameters:
        domain - SQL access
        partyName - a subject name or a dummy string...
        Returns:
        an new access layer instance
      • retrievePartyIdByPartyName

        static UUID retrievePartyIdByPartyName​(I_DomainAccess domainAccess,
                                               String partyName)
        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:
      • retrieveInstance

        static I_PartyIdentifiedAccess retrieveInstance​(I_DomainAccess domainAccess,
                                                        UUID id)
        retrieve a party identified from its UUID
        Parameters:
        domainAccess - SQL access
        id - UUID
        Returns:
        an access layer instance
      • deleteInstance

        static int deleteInstance​(I_DomainAccess domainAccess,
                                  UUID id)
        delete an instance and all its identifiers
        Parameters:
        domainAccess - SQL access
        id - UUID
        Returns:
        number of records deleted
      • getPartyIdentifiers

        static List<com.nedap.archie.rm.datavalues.DvIdentifier> getPartyIdentifiers​(I_DomainAccess domainAccess,
                                                                                     UUID partyId)
        get the list of identifiers for a party
        Parameters:
        domainAccess -
        partyId -
        Returns:
      • retrievePartyByIdentifier

        static UUID retrievePartyByIdentifier​(I_DomainAccess domainAccess,
                                              String value,
                                              String issuer)
        retrieve an identified party from its identification code and issuer
        Parameters:
        domainAccess - SQL access
        value - issued identification code
        issuer - authority issuing the code
        Returns:
        UUID of identified party or null
      • getOrCreateParty

        static UUID getOrCreateParty​(I_DomainAccess domainAccess,
                                     String name,
                                     String value,
                                     String issuer,
                                     String assigner,
                                     String type)
        retrieve or create a party with an identifier (NB. a party has n identifiers)
        Parameters:
        domainAccess -
        name - the party name
        value - the identifier value
        issuer - identifier issuer
        assigner - identifier assigner
        type - identifier type
        Returns:
      • getOrCreatePartyByExternalRef

        static UUID getOrCreatePartyByExternalRef​(I_DomainAccess domainAccess,
                                                  String name,
                                                  String code,
                                                  String scheme,
                                                  String namespace,
                                                  String type)
        retrieve or create a party by an external reference
        Parameters:
        domainAccess -
        name - the party name (optional)
        code - the external ref value
        scheme - the external ref scheme
        namespace - the external ref namespace
        type - the external ref type
        Returns:
      • getOrCreateParty

        static UUID getOrCreateParty​(I_DomainAccess domainAccess,
                                     com.nedap.archie.rm.generic.PartyIdentified partyIdentified)
        retrieve or create a party with a PartyIdentified (external ref)
        Parameters:
        domainAccess -
        partyIdentified -
        Returns:
      • retrievePartyIdentified

        static com.nedap.archie.rm.generic.PartyIdentified retrievePartyIdentified​(I_DomainAccess domainAccess,
                                                                                   UUID id)
        retrieve an identified party by its UUID
        Parameters:
        domainAccess -
        id -
        Returns:
      • findIdentifiedParty

        static UUID findIdentifiedParty​(I_DomainAccess domainAccess,
                                        List<com.nedap.archie.rm.datavalues.DvIdentifier> identifierList)
        retrieve an identified party from its identifier list. The list can be partial.
        Parameters:
        domainAccess -
        identifierList -
        Returns:
      • findReferencedParty

        static UUID findReferencedParty​(I_DomainAccess domainAccess,
                                        com.nedap.archie.rm.support.identification.PartyRef partyRef)
        retrieve a party by a party reference (NB. party ref Type is ignored)
        Parameters:
        domainAccess -
        partyRef -
        Returns:
      • findReferencedParty

        static UUID findReferencedParty​(I_DomainAccess domainAccess,
                                        String value,
                                        String scheme,
                                        String namespace,
                                        String type)
        retrieve a party by a party reference (NB. party ref Type is ignored)
        Parameters:
        domainAccess -
        value - party ref value
        scheme - party ref scheme
        namespace - party ref namespace
        type - party ref type
        Returns:
      • addIdentifier

        Integer addIdentifier​(String value,
                              String issuer,
                              String assigner,
                              String type)
        add an identifier to a party
        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
      • deleteIdentifier

        Integer deleteIdentifier​(String idCode,
                                 String issuer)
        delete a specific identifier for the current party
        Parameters:
        idCode - the subject code
        issuer - the issuer id
        Returns:
        number of record deleted
      • getPartyName

        String getPartyName()
        get the party name
        Returns:
      • setPartyName

        void setPartyName​(String name)
        set the party name
        Parameters:
        name -
      • getPartyRefValue

        String getPartyRefValue()
      • getPartyRefNamespace

        String getPartyRefNamespace()
      • getIdentifiersKeySet

        String[] getIdentifiersKeySet()
        get the list of identifier keys
        a key is formatted as 'code:issuer'
        Returns:
      • getId

        UUID getId()