VPR ALLERGY (31)    ENTITY (1.5)

Name Value
NAME VPR ALLERGY
DEFAULT FILE NUMBER 120.8
DATA MODEL SDA
DISPLAY NAME Allergy
ITEM
  • Allergy
    SEQUENCE:   3
    ITEM TYPE:   ENTITY
    FILE NUMBER:   120.8
    FIELD NUMBER:   1
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR CODE TABLE
    OUTPUT TRANSFORM:   S VALUE=$$ALLERGEN^VPRSDAL(VALUE)
    GET ACTION:   S VALUE=$P(VPRALG,U,9)
  • EnteredAt
    SEQUENCE:   23
    ITEM TYPE:   ENTITY
    FILE NUMBER:   120.8
    ENTITY:   VPR FACILITY
    GET ACTION:   S VALUE=$G(VASITE) ;default #4 ien
  • EnteredOn
    SEQUENCE:   24
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   120.8
    FIELD NUMBER:   4
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   N X,Y,%DT S X=$P($G(GMRAY),U,10),%DT="TSX" I $L(X) D ^%DT S:Y>0 VALUE=Y
  • Extension
    SEQUENCE:   2
    ITEM TYPE:   ENTITY
    FILE NUMBER:   120.8
    ENTITY:   VPR ALLERGY EXTENSION
    GET ACTION:   S VALUE=DIEN
  • Clinician
    SEQUENCE:   5
    ITEM TYPE:   ENTITY
    FILE NUMBER:   120.8
    FIELD NUMBER:   21
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR PROVIDER
  • AllergyCategory
    SEQUENCE:   4
    ITEM TYPE:   ENTITY
    FILE NUMBER:   120.8
    FIELD NUMBER:   3.1
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR CODE TABLE
    OUTPUT TRANSFORM:   N X S X=$$EXTERNAL^DILFD(120.8,3.1,,VALUE),VALUE=X_U_X_"^VHAT"
    GET ACTION:   S VALUE=$P(VPRALG,U,7)
  • Status
    SEQUENCE:   19
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   120.8
    FIELD NUMBER:   22
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$S(VALUE:"I",1:"A")
  • FromTime
    SEQUENCE:   25
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   120.85
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$$EVTDT^VPRSDAL(DIEN)
  • ToTime
    SEQUENCE:   26
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   120.8
    FIELD NUMBER:   23
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
  • InactiveTime
    SEQUENCE:   12
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   120.8
    FIELD NUMBER:   23
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$P($G(VPRALG("ERROR")),";",2)
  • InactiveComments
    SEQUENCE:   13
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   120.8
    GET ACTION:   S VALUE=$$CMT1^VPRSDAL(DIEN,"E")
  • ExternalId
    SEQUENCE:   27
    ITEM TYPE:   ID
  • EnteredBy
    SEQUENCE:   22
    ITEM TYPE:   ENTITY
    FILE NUMBER:   120.8
    FIELD NUMBER:   5
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR USER
  • Reaction
    SEQUENCE:   6
    ITEM TYPE:   ENTITY
    FILE NUMBER:   120.8
    ENTITY:   VPR ALLERGY SIGN/SYMPTOM
    GET ACTION:   I $D(VPRALG("S")) N X S X=$G(VPRALG("S",1)),VALUE=$P($P(X,U),";",2)_U_$P($P(X,U),";")_$S($L($P(X,U,2))>1:U_$P($P(X,U,2),";",2),1:"") ;first
  • Severity
    SEQUENCE:   7
    ITEM TYPE:   ENTITY
    FILE NUMBER:   120.85
    ENTITY:   VPR CODE TABLE
    GET ACTION:   S VALUE=$$SEVRTY^VPRSDAL(DIEN)
  • Certainty
    SEQUENCE:   8
    ITEM TYPE:   ENTITY
    FILE NUMBER:   120.8
    FIELD NUMBER:   19
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR CODE ONLY
    OUTPUT TRANSFORM:   S VALUE=$S(VALUE:"Confirmed",1:"") ;FHIR value
    GET ACTION:   S VALUE=($E($P($G(GMRAY),U,4))="V")
  • VerifiedTime
    SEQUENCE:   14
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   120.8
    FIELD NUMBER:   20
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$P($G(GMRAY),U,9)
  • FreeTextAllergy
    SEQUENCE:   17
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   120.8
    FIELD NUMBER:   .02
    GET ACTION:   S VALUE=$P(VPRALG,U,2) S:VALUE="" VALUE=$P($G(GMRAY),U)
DESCRIPTION
This entity populates the Allergy container in HealthShare from the
PATIENT ALLERGIES (#120.8) file; it expects the record IEN as the ID (DIEN).
 
This entity is supported by code in routine VPRSDAL, which uses the
GMRADPT and GMRAOR2 routines to extract allergies. Data in SDA is
maintained by monitoring the following protocol events:
  GMRA ENTERED IN ERROR
  GMRA SIGN-OFF ON DATA
  GMRA VERIFY DATA
GET ENTRY ACTION S VASITE=+$$SITE^VASITE S:VASITE'>0 VASITE=$$KSP^XUPARAM("INST")
GET EXIT ACTION K GMRAL,GMRAY,VPRALG,VASITE
GET ID ACTION D ALG1^VPRSDAL(DIEN)
GET QUERY ROUTINE QRY^VPRSDAL