VPR PATIENT (20)    ENTITY (1.5)

Name Value
NAME VPR PATIENT
DEFAULT FILE NUMBER 2
DATA MODEL SDA
DISPLAY NAME Patient
ITEM
  • Name
    SEQUENCE:   3
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .01
    ENTITY:   VPR NAME
    GET ACTION:   S VALUE=$G(VADM(1))
  • Gender
    SEQUENCE:   12
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .02
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR CODE TABLE
    GET ACTION:   S VALUE=$G(VADM(5))
  • Races
    SEQUENCE:   15
    ITEM TYPE:   LIST
    FILE NUMBER:   2.02
    ENTITY:   VPR RACE
    LIST TYPE:   ARRAY
    XML NAME:   Race
    GET ACTION:   N I S I=0 F S I=$O(VADM(12,I)) Q:I<1 S DLIST(I)=I ;M DLIST=VADM(12)
  • EthnicGroup
    SEQUENCE:   16
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2.06
    ENTITY:   VPR ETHNICITY
    GET ACTION:   S VALUE=$P($G(VADM(11,1)),U)
  • SupportContacts
    SEQUENCE:   17
    ITEM TYPE:   LIST
    FILE NUMBER:   2
    LIST TYPE:   COMPLEX
    XML NAME:   SupportContact
    COMPLEX TYPE:
    • COMPLEX ITEM SEQUENCE:   1
      COMPLEX ITEM NAME:   NOK
    • COMPLEX ITEM SEQUENCE:   2
      COMPLEX ITEM NAME:   ECON
    • COMPLEX ITEM SEQUENCE:   3
      COMPLEX ITEM NAME:   NOK2
    • COMPLEX ITEM SEQUENCE:   4
      COMPLEX ITEM NAME:   ECON2
  • BirthTime
    SEQUENCE:   18
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .03
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$P($G(VADM(3)),U) I $E(VALUE,4,5)="00"!($E(VALUE,6,7)="00") S DDEOUT=1
  • IsProtected
    SEQUENCE:   21
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   38.1
    FIELD NUMBER:   2
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$S(VALUE:"true",VALUE=0:"false",1:"")
    INPUT TRANSFORM:   S VALUE=$S(VALUE="true":1,VALUE="false":0,1:"")
  • ProtectedEffectiveDate
    SEQUENCE:   22
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   38.1
    FIELD NUMBER:   4
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
  • DeathTime
    SEQUENCE:   23
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .351
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$P($G(VADM(6)),U)
  • IsDead
    SEQUENCE:   24
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .351
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$S(VALUE:"true",1:"false")
    INPUT TRANSFORM:   S VALUE=""
    GET ACTION:   S VALUE=+$G(VADM(6))
  • PatientNumbers
    SEQUENCE:   28
    ITEM TYPE:   LIST
    LIST TYPE:   COMPLEX
    XML NAME:   PatientNumber
    COMPLEX TYPE:
    • COMPLEX ITEM SEQUENCE:   1
      COMPLEX ITEM NAME:   SSN
    • COMPLEX ITEM SEQUENCE:   2
      COMPLEX ITEM NAME:   MRN
  • Addresses
    SEQUENCE:   30
    ITEM TYPE:   LIST
    LIST TYPE:   COMPLEX
    XML NAME:   Address
    COMPLEX TYPE:
    • COMPLEX ITEM SEQUENCE:   1
      COMPLEX ITEM NAME:   PermanentAddress
    • COMPLEX ITEM SEQUENCE:   2
      COMPLEX ITEM NAME:   TemporaryAddress
  • ContactInfo
    SEQUENCE:   31
    ITEM TYPE:   COMPLEX GROUP
    COMPLEX TYPE:
    • COMPLEX ITEM SEQUENCE:   1
      COMPLEX ITEM NAME:   HomePhoneNumber
    • COMPLEX ITEM SEQUENCE:   2
      COMPLEX ITEM NAME:   WorkPhoneNumber
    • COMPLEX ITEM SEQUENCE:   3
      COMPLEX ITEM NAME:   MobilePhoneNumber
    • COMPLEX ITEM SEQUENCE:   4
      COMPLEX ITEM NAME:   EmailAddress
  • FamilyDoctor
    SEQUENCE:   32
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR FAMILY DOCTOR
    GET ACTION:   N X S X=$$OUTPTPR^SDUTL3(DIEN) S:X VALUE=+X ;pcProvider
  • Occupation
    SEQUENCE:   34
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .07
    ENTITY:   VPR TEXT ONLY
    GET ACTION:   S VALUE=$G(VAPD(6))
  • Comments
    SEQUENCE:   37
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .091
    GET ACTION:   S VALUE=$G(VADM(7))
  • EnteredBy
    SEQUENCE:   43
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR USER
    GET ACTION:   S DDEOUT=1 ;no longer used
  • EnteredAt
    SEQUENCE:   45
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR FACILITY
    GET ACTION:   S VALUE=$G(VASITE) ;default #4 ien
  • EnteredOn
    SEQUENCE:   46
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .097
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$$LAST^VPRSDAV(DFN)
  • PermanentAddress
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR PATIENT ADDRESS
    GET ACTION:   S VALUE=DIEN
  • HomePhoneNumber
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .131
    GET ACTION:   S VALUE=$G(VPRPHONE) ;from Addresses/Permanent
  • WorkPhoneNumber
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .132
  • MobilePhoneNumber
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .134
  • EmailAddress
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .133
  • SSN
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .09
    ENTITY:   VPR PATIENT NUMBER
    OUTPUT TRANSFORM:   S VALUE=VALUE_"^SSN^^SSA"
    GET ACTION:   S VALUE=$P($G(VADM(2)),U)
  • MothersMaidenName
    SEQUENCE:   5
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .2403
    OUTPUT TRANSFORM:   S VALUE=$P(VALUE,",")
    GET ACTION:   S VALUE=$G(VAPD(5))
  • MRN
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR PATIENT NUMBER
    GET ACTION:   S VALUE=DIEN_"^MRN^"_$G(VASTN)_U_$G(VASTN)
  • BirthPlace
    SEQUENCE:   19
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR PATIENT BIRTHPLACE
    GET ACTION:   S VALUE=DIEN
  • NOK
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR PATIENT NOK
    GET ACTION:   S VALUE=DIEN
  • ECON
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR PATIENT ECON
    GET ACTION:   S VALUE=DIEN
  • Extension
    SEQUENCE:   1
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR PATIENT EXTENSION
    GET ACTION:   S VALUE=DIEN
  • MothersFullName
    SEQUENCE:   6
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .2402
    ENTITY:   VPR NAME
    GET ACTION:   S VALUE=$G(VAPD(4))
  • OtherLanguages
    SEQUENCE:   9
    ITEM TYPE:   LIST
    ENTITY:   VPR PATIENT LANGUAGE
    LIST TYPE:   ARRAY
    XML NAME:   PatientLanguage
    GET ACTION:   N I S I=+$G(VADM(13,1)) I I,$G(VPRLNG) S DLIST(1)=I_","_$G(DFN)
  • TemporaryAddress
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR PATIENT TEMP ADDRESS
    GET ACTION:   S VALUE=DIEN S:'$L($P($G(^DPT(DIEN,.121)),U)) DDEOUT=1
  • NOK2
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR PATIENT NOK2
    GET ACTION:   S VALUE=DIEN
  • ECON2
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    ENTITY:   VPR PATIENT ECON2
    GET ACTION:   S VALUE=DIEN
  • CreatedBy
    SEQUENCE:   44
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .096
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR USER
  • CreatedOn
    SEQUENCE:   47
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   2
    FIELD NUMBER:   .097
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
  • Aliases
    SEQUENCE:   7
    ITEM TYPE:   LIST
    FILE NUMBER:   2.01
    ENTITY:   VPR PATIENT ALIAS
    LIST TYPE:   SUBFILE
    XML NAME:   Name
  • PrimaryLanguage
    SEQUENCE:   8
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2.07
    ENTITY:   VPR LANGUAGE
    GET ACTION:   N X S X=$P($G(VADM(13,1)),U,2) I $L(X) S DATA=X,VALUE=$$FIND1^DIC(.85,,"X",X) S:VALUE<1 DDEOUT=1 I VALUE>0 S VPRLNG=VALUE_U_DATA
  • Religion
    SEQUENCE:   10
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .08
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR RELIGION
    GET ACTION:   S VALUE=$P($G(VADM(9)),U),DATA=$P($G(VADM(9)),U,2)
  • MaritalStatus
    SEQUENCE:   11
    ITEM TYPE:   ENTITY
    FILE NUMBER:   2
    FIELD NUMBER:   .05
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR MARITAL STATUS
    GET ACTION:   N X S X=$G(VADM(10)) S:'X DDEOUT=1 I X S VALUE=+$G(^DIC(11,+X,"MASTER")) S:'VALUE DATA=X
DESCRIPTION
This entity populates the Patient container in HealthShare. Data is pulled
from the Registration package using supported calls to VADPT.
GET ENTRY ACTION N X S X=$$SITE^VASITE S:X>0 VASITE=+X,VASTN=$P(X,U,3) I X'>0 S VASITE=$$KSP^XUPARAM("INST"),VASTN=$$STA^XUAF4(VASITE)
GET EXIT ACTION K VA,VADM,VAPD,DDESC,VASITE,VASTN,VPRPHONE
GET ID ACTION S DFN=DIEN D DEM^VADPT,OPD^VADPT