VPR PATIENT ADDRESS (24)    ENTITY (1.5)

Name Value
NAME VPR PATIENT ADDRESS
DEFAULT FILE NUMBER 2
DATA MODEL SDA
DISPLAY NAME Address
ITEM
  • Street
    SEQUENCE:   4
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .111
    GET ACTION:   S VALUE=$G(VAPA(1)) I $L(VALUE) N I F I=2,3 S:$L($G(VAPA(I))) VALUE=VALUE_";"_VAPA(I)
  • City
    SEQUENCE:   5
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .114
    ENTITY:   VPR CODE ONLY
    OUTPUT TRANSFORM:   S VALUE=$E(VALUE,1,50)
    GET ACTION:   S VALUE=$G(VAPA(4))
  • State
    SEQUENCE:   6
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .115
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR STATE
    GET ACTION:   S VALUE=$S($G(VAPA("HasCountry"))=1:$G(VAPA(23)),1:$P($G(VAPA(5)),U))
  • Zip
    SEQUENCE:   7
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .116
    ENTITY:   VPR CODE ONLY
    GET ACTION:   S VALUE=$S($G(VAPA("HasCountry"))=1:$G(VAPA(24)),$P($G(VAPA(11)),U,2)'="":$P(VAPA(11),U,2),1:$G(VAPA(6)))
  • Country
    SEQUENCE:   8
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .1173
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR COUNTRY
  • Extension
    SEQUENCE:   1
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR PATIENT ADDRESS EXTENSION
    GET ACTION:   S VALUE=DIEN N X S X=$G(^DPT(DIEN,.11)) I $L($P(X,U,1,6))<6,'$P(X,U,10) S DDEOUT=1
  • FromTime
    SEQUENCE:   2
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .118
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
  • County
    SEQUENCE:   9
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .117
    ENTITY:   VPR CODE TABLE
    GET ACTION:   N X S X=$G(VAPA(7)) S:X VALUE=X_"^VA5.01" I X<1 S DDEOUT=1
DESCRIPTION
This entity supports VPR PATIENT, and expects the Patient file #2 ien
as the ID.
GET ENTRY ACTION S DFN=DIEN,VAPA("P")="" D ADD^VADPT
GET EXIT ACTION K VAPA,VPR("ForeignCountryFlag")
GET ID ACTION D ADD^VPRSDAD(DFN)