Search in sources :

Example 1 with PersistedObjectId

use of org.ehrbase.dao.access.jooq.party.PersistedObjectId in project ehrbase by ehrbase.

the class ContextAccess method getPartyIdentifiedFromRecord.

private static PartyIdentified getPartyIdentifiedFromRecord(PartyIdentifiedRecord partyIdentifiedRecord, List<DvIdentifier> identifiers) {
    PartyIdentified healthCareFacility;
    PartyRef partyRef = null;
    if (partyIdentifiedRecord.getPartyRefValue() != null && partyIdentifiedRecord.getPartyRefScheme() != null) {
        ObjectId objectID = new PersistedObjectId().fromDB(partyIdentifiedRecord);
        partyRef = new PartyRef(objectID, partyIdentifiedRecord.getPartyRefNamespace(), partyIdentifiedRecord.getPartyRefType());
    }
    healthCareFacility = new PartyIdentified(partyRef, partyIdentifiedRecord.getName(), identifiers.isEmpty() ? null : identifiers);
    return healthCareFacility;
}
Also used : PartyRef(com.nedap.archie.rm.support.identification.PartyRef) PartyIdentified(com.nedap.archie.rm.generic.PartyIdentified) ObjectId(com.nedap.archie.rm.support.identification.ObjectId) PersistedObjectId(org.ehrbase.dao.access.jooq.party.PersistedObjectId) PersistedObjectId(org.ehrbase.dao.access.jooq.party.PersistedObjectId)

Aggregations

PartyIdentified (com.nedap.archie.rm.generic.PartyIdentified)1 ObjectId (com.nedap.archie.rm.support.identification.ObjectId)1 PartyRef (com.nedap.archie.rm.support.identification.PartyRef)1 PersistedObjectId (org.ehrbase.dao.access.jooq.party.PersistedObjectId)1