VPR PATIENT TEMP ADDRESS (178)    ENTITY (1.5)

Name Value
NAME VPR PATIENT TEMP ADDRESS
DEFAULT FILE NUMBER 2
DATA MODEL SDA
DISPLAY NAME Address
ITEM
  • Street
    SEQUENCE:   4
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .1211
    OUTPUT TRANSFORM:   N I F I=2,3 S:$L($P(VATEMP,U,I)) VALUE=VALUE_";"_$P(VATEMP,U,I)
    GET ACTION:   S VALUE=$P($G(VATEMP),U)
  • Extension
    SEQUENCE:   1
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR PAT TEMP ADD EXTENSION
    GET ACTION:   S VALUE=DIEN
  • City
    SEQUENCE:   5
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .1214
    ENTITY:   VPR CODE ONLY
    OUTPUT TRANSFORM:   S VALUE=$E(VALUE,1,50)
    GET ACTION:   S VALUE=$P($G(VATEMP),U,4)
  • State
    SEQUENCE:   6
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .1215
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR STATE
    GET ACTION:   S VALUE=$S(VATEMP("HasCountry")=1:VATEMP("Province"),1:$P($G(VATEMP),U,5))
  • Zip
    SEQUENCE:   7
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .1216
    ENTITY:   VPR CODE ONLY
    GET ACTION:   S VALUE=$S(VATEMP("HasCountry")=1:VATEMP("PostalCode"),$P($G(VATEMP),U,12)'="":$P(VATEMP,U,12),1:$P($G(VATEMP),U,6))
  • Country
    SEQUENCE:   8
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .1223
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR COUNTRY
  • County
    SEQUENCE:   9
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .12111
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR CODE TABLE
    GET ACTION:   S VALUE=$$COUNTY^VPRSDA($P($G(VATEMP),U,5),$P($G(VATEMP),U,11)) S:'VALUE DDEOUT=1 I VALUE S VALUE=VALUE_"^VA5.01" ;subfile ptr, can't use FM
  • FromTime
    SEQUENCE:   2
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .1217
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$P($G(VATEMP),U,7)
  • ToTime
    SEQUENCE:   3
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .1218
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$P($G(VATEMP),U,8)
DESCRIPTION
This entity supports VPR PATIENT, and expects the Patient file #2 ien
as the ID.
GET ENTRY ACTION S DFN=ID,VATEMP=$G(^DPT(DFN,.121))
GET EXIT ACTION K VATEMP,VPR("ForeignCountryFlag")
GET ID ACTION D TEMP^VPRSDAD(DFN) I '$L($P($G(VATEMP),U)) S DDEOUT=1 ;no temp address