VPR MED EXTENSION (122)    ENTITY (1.5)

Name Value
NAME VPR MED EXTENSION
DEFAULT FILE NUMBER 100
DATA MODEL SDA
DISPLAY NAME MedicationExtension
ITEM
  • Sig
    SEQUENCE:   5
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100.045
    FIELD NUMBER:   1
    GET ACTION:   S VALUE=$$SIG^VPRSDAP(DIEN) S:VALUE="" DDEOUT=1
  • IVRate
    SEQUENCE:   27
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100.045
    FIELD NUMBER:   1
    GET ACTION:   S:$G(PSTYPE)="V" VALUE=$P($G(@VPRPS@(0)),U,2) S:VALUE="" DDEOUT=1
  • VAStatus
    SEQUENCE:   14
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100
    ENTITY:   VPR CODE TABLE
    GET ACTION:   N X S X=$P($G(@VPRPS@(0)),U,6) I $L(X) S VALUE=X_U_X_"^VHAT"
  • PharmacyOrderItem
    SEQUENCE:   20
    ITEM TYPE:   FIXED STRING
    GET ACTION:   S VALUE=$G(PSOI)
  • IsNonFormulary
    SEQUENCE:   21
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   50.7
    FIELD NUMBER:   5
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$S(VALUE:"true",1:"false")
    GET ACTION:   S IEN=+$G(PSOI) S:'IEN DDEOUT=1
  • Released
    SEQUENCE:   1
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100.008
    FIELD NUMBER:   16
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$P($G(OR8),U,16),IEN="1,"_DIEN
  • OrderType
    SEQUENCE:   6
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   8.1
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$S(VALUE=1:"EDIT",VALUE=2:"RENEW",1:"NEW")
    GET ACTION:   S VALUE=$P($G(OR3),U,11)
  • IVCategory
    SEQUENCE:   25
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100.045
    FIELD NUMBER:   1
    GET ACTION:   S:$G(PSTYPE)="V" VALUE=$$VALUE^ORX8(DIEN,"TYPE") S:VALUE="" DDEOUT=1
  • IVType
    SEQUENCE:   26
    ITEM TYPE:   FIXED STRING
    GET ACTION:   I $G(PSTYPE)="V" S VALUE=$$IVTYPE^VPRSDAP(DIEN)
  • NatureOfOrder
    SEQUENCE:   7
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100.008
    FIELD NUMBER:   12
    GET ACTION:   S IEN=$$LASTACT^VPRSDA(DIEN)_","_DIEN
  • IsServiceConnected
    SEQUENCE:   23
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100.045
    FIELD NUMBER:   1
    OUTPUT TRANSFORM:   S VALUE=$S(VALUE:"true",1:"false")
    GET ACTION:   N X S X=$$VALUE^ORX8(ORIFN,"SC") S:$L(X) VALUE=X S:VALUE="" DDEOUT=1
  • IsIMO
    SEQUENCE:   24
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   6
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$IMO^VPRSDAP(+VALUE,$G(PSTYPE)) ;true or false
    GET ACTION:   S VALUE=$P($G(OR0),U,10)
  • DiscontinuedDateTime
    SEQUENCE:   11
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   63
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$P($G(OR6),U,3)
  • DiscontinueType
    SEQUENCE:   10
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   61
    GET ACTION:   I $G(PSTYPE)="O",$G(ORPK)["R" S VALUE=$$GET1^DIQ(52,+ORPK,100.1)
  • Statement
    SEQUENCE:   28
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100.045
    FIELD NUMBER:   1
    GET ACTION:   S VALUE=$$WP^VPRSDA(ORIFN,"STATEMENTS") S:VALUE="" DDEOUT=1
  • TradeName
    SEQUENCE:   34
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   52
    FIELD NUMBER:   6.5
    GET ACTION:   S:$S($G(PSTYPE)'="O":1,$G(ORPK)'["R":1,1:0) DDEOUT=1 I '$G(DDEOUT) S IEN=+$G(ORPK)
  • PickupInstructions
    SEQUENCE:   35
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   52
    FIELD NUMBER:   35
    GET ACTION:   S:$S($G(PSTYPE)'="O":1,$G(ORPK)'["R":1,1:0) DDEOUT=1 I '$G(DDEOUT) S IEN=+$G(ORPK)
  • WasPatientCounseled
    SEQUENCE:   36
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   52
    FIELD NUMBER:   41
    OUTPUT TRANSFORM:   S VALUE=$S(VALUE:"true",1:"false")
    GET ACTION:   S:$S($G(PSTYPE)'="O":1,$G(ORPK)'["R":1,1:0) DDEOUT=1 I '$G(DDEOUT) S IEN=+$G(ORPK)
  • Remarks
    SEQUENCE:   37
    ITEM TYPE:   FIXED STRING
    GET ACTION:   I $G(PSTYPE)="O",$G(ORPK)["R" S VALUE=$G(@VPRX52@(12))
  • OutpatientSite
    SEQUENCE:   38
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100
    ENTITY:   VPR CODE TABLE
    GET ACTION:   I $G(PSTYPE)="O",$G(ORPK)["R" S:$G(@VPRX52@(20)) VALUE=@VPRX52@(20)_"^VA59"
  • CopayTransactionType
    SEQUENCE:   39
    ITEM TYPE:   FIXED STRING
    GET ACTION:   I $G(PSTYPE)="O",$G(ORPK)["R" S VALUE=$P($G(@VPRX52@(105)),U,2)
  • CMOP
    SEQUENCE:   40
    ITEM TYPE:   FIXED STRING
    GET ACTION:   I $G(PSTYPE)="O",$G(ORPK)["R" S VALUE=$$CMOP^VPRSDAP(+ORPK)
  • IsSupply
    SEQUENCE:   29
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   50.7
    FIELD NUMBER:   .09
    RETURN INTERNAL VALUE:   YES
    GET ACTION:   S:$G(PSTYPE)="O" VALUE=$$SUPPLY^VPRSDAP(DIEN),IEN=+$G(PSOI) S:VALUE="" DDEOUT=1
  • Titration
    SEQUENCE:   41
    ITEM TYPE:   FIXED STRING
    GET ACTION:   I $G(PSTYPE)="O" S VALUE=$S($G(ORPK)["R":$$TITRX^PSOUTL(+ORPK),$$VALUE^ORX8(ORIFN,"TITR"):"t",1:"")
  • EBilling
    SEQUENCE:   42
    ITEM TYPE:   FIXED STRING
    GET ACTION:   I $G(PSTYPE)="O",$G(ORPK)["R" S VALUE=$$ECME^PSOBPSUT(+ORPK)
  • IsERX
    SEQUENCE:   43
    ITEM TYPE:   FIXED STRING
    GET ACTION:   N X S X=+$O(^PS(52.49,"ORN",ORIFN,0)),VALUE=$S(X:"true",1:"false")
  • DiscontinuedBy
    SEQUENCE:   12
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100
    FIELD NUMBER:   62
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR PROVIDER
    GET ACTION:   S VALUE=$P($G(OR6),U,2)
  • DiscontinuedReason
    SEQUENCE:   13
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   65
    GET ACTION:   N X S X=$P($G(OR6),U,4),VALUE=$S(X:$$GET1^DIQ(100.03,X,.01),1:$P(OR6,U,5)) S:VALUE="" DDEOUT=1
  • SignedBy
    SEQUENCE:   4
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100.008
    FIELD NUMBER:   5
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR PROVIDER
    GET ACTION:   S VALUE=$P($G(ORSIG),U,2),IEN="1,"_DIEN
  • SignatureStatus
    SEQUENCE:   3
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100.008
    FIELD NUMBER:   4
    GET ACTION:   S VALUE=$P($G(ORSIG),U),IEN="1,"_DIEN
  • ReleasedBy
    SEQUENCE:   2
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100.008
    FIELD NUMBER:   17
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR USER
    GET ACTION:   S VALUE=$P($G(OR8),U,17),IEN="1,"_DIEN
  • ReplacedOrder
    SEQUENCE:   8
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   9
    RETURN INTERNAL VALUE:   YES
    GET ACTION:   S VALUE=$P($G(OR3),U,5)
  • ReplacementOrder
    SEQUENCE:   9
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   9.1
    RETURN INTERNAL VALUE:   YES
    GET ACTION:   S VALUE=$P($G(OR3),U,6)
  • Routing
    SEQUENCE:   30
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100.045
    FIELD NUMBER:   1
    GET ACTION:   S:$G(PSTYPE)="O" VALUE=$$VALUE^ORX8(DIEN,"PICKUP",1,"E") S:VALUE="" DDEOUT=1
  • PatientClass
    SEQUENCE:   15
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   10
    RETURN INTERNAL VALUE:   YES
    GET ACTION:   S VALUE=$P($G(OR0),U,12)
  • Specialty
    SEQUENCE:   16
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100
    FIELD NUMBER:   11
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR SPECIALTY
    GET ACTION:   S VALUE=$P($G(OR0),U,13)
  • OrderEvent
    SEQUENCE:   17
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100
    FIELD NUMBER:   15
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR ORDER EVENT
    GET ACTION:   S IEN=$S($G(ORDAD):ORDAD,1:DIEN)
  • VAStartDate
    SEQUENCE:   18
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   21
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$P($G(OR0),U,8)
  • IsParked
    SEQUENCE:   44
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   52
    OUTPUT TRANSFORM:   S VALUE=$S(VALUE:"true",1:"false")
    GET ACTION:   I $G(PSTYPE)="O",$G(ORPK) S VALUE=$P($G(^PSRX(+ORPK,"PARK")),U)
  • Expires
    SEQUENCE:   22
    ITEM TYPE:   FIXED STRING
    GET ACTION:   N X S X=$P($G(@VPRPS@(0)),U,3) S:X VALUE=$$DATE^VPRSDA(X)
  • DaysSupply
    SEQUENCE:   31
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100.045
    FIELD NUMBER:   1
    GET ACTION:   S:$G(PSTYPE)="O" VALUE=$S($G(ORPK)["S":$G(@VPRX52P@(101)),1:$P($G(@VPRPS@(0)),U,7)) S:VALUE="" DDEOUT=1
  • LastFilled
    SEQUENCE:   32
    ITEM TYPE:   FIXED STRING
    GET ACTION:   I $G(PSTYPE)="O" N X S X=$P($G(@VPRPS@(0)),U,12) S:X VALUE=$$DATE^VPRSDA(X)
  • Fills
    SEQUENCE:   33
    ITEM TYPE:   LIST
    ENTITY:   VPR MED FILL
    LIST TYPE:   ARRAY
    XML NAME:   Fill
    GET ACTION:   I $G(PSTYPE)="O" D GETFILLS^VPRSDAP
DESCRIPTION
This entity extends VPR MEDICATION; it expects the VPRPS array defined by
the GET ID ACTION for each med order.
GET EXIT ACTION K:$D(VPRX52) @VPRX52 K:$D(VPRX52P) @VPRX52P K VPRX52,VPRX52P
GET ID ACTION D PSRX^VPRSDAP($G(ORPK))