VPR LAB ORDER (13)    ENTITY (1.5)

Name Value
NAME VPR LAB ORDER
DEFAULT FILE NUMBER 100
DATA MODEL SDA
DISPLAY NAME LabOrder
ITEM
  • EnteredAt
    SEQUENCE:   35
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100
    FIELD NUMBER:   6
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR FACILITY
    GET ACTION:   N X S X=$P($G(OR0),U,10) S:X VALUE=$$GET1^DIQ(44,+X,3,"I") S:'VALUE VALUE=$$SITE^VPRSDA ;#4 ien
  • ResultCopiesTo
    SEQUENCE:   29
    ITEM TYPE:   LIST
    FILE NUMBER:   100
    FIELD NUMBER:   35
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR PROVIDER
    LIST TYPE:   ARRAY
    XML NAME:   CareProvider
    GET ACTION:   N X S IEN=$S($G(ORDAD):ORDAD,1:DIEN),X=$$GET1^DIQ(100,IEN,35,"I") S:X DLIST(1)=X
  • Specimen
    SEQUENCE:   12
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100.045
    FIELD NUMBER:   1
    GET ACTION:   S VALUE=$$VALUE^ORX8(DIEN,"SPECIMEN",,"E") S:VALUE="" DDEOUT=1
  • SpecimenCollectedTime
    SEQUENCE:   13
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   21
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VPRCDT=$P($G(OR0),U,8),VALUE=VPRCDT
  • Status
    SEQUENCE:   18
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   5
    EXTENDED POINTER LKUP:   .02
    OUTPUT TRANSFORM:   N X S X=VALUE,VALUE=$S(X="dc":"D",X="canc":"C",X="laps":"C",X="dc/e":"R",X="comp":"E",X="exp":"E",X="hold":"H",X="part":"A",1:"IP")
  • Result
    SEQUENCE:   39
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100
    FIELD NUMBER:   33
    ENTITY:   VPR LRCH RESULT
    GET ACTION:   D RSLT^VPRSDAB
  • PlacerId
    SEQUENCE:   1
    ITEM TYPE:   ID
  • EnteringOrganization
    SEQUENCE:   9
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100
    FIELD NUMBER:   6
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR LOCATION
    OUTPUT TRANSFORM:   S VALUE=+VALUE
    GET ACTION:   S VALUE=$P($G(OR0),U,10) S:VALUE<1 DDEOUT=1
  • FromTime
    SEQUENCE:   37
    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=$G(VPRCDT)
  • ToTime
    SEQUENCE:   38
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   22
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$P($G(OR0),U,9)
  • UpdatedOn
    SEQUENCE:   50
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   31
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$P($G(OR3),U)
  • EnteredBy
    SEQUENCE:   34
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100
    FIELD NUMBER:   3
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR USER
    GET ACTION:   S VALUE=$P($G(OR0),U,6)
  • AuthorizationTime
    SEQUENCE:   26
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100.008
    FIELD NUMBER:   6
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$P($G(ORSIG),U,3),IEN="1,"_DIEN
  • Extension
    SEQUENCE:   53
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100
    ENTITY:   VPR ORDER EXTENSION
    GET ACTION:   S VALUE=DIEN
  • ExternalId
    SEQUENCE:   51
    ITEM TYPE:   ID
  • Comments
    SEQUENCE:   24
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100.045
    FIELD NUMBER:   1
    GET ACTION:   S VALUE=$$VALUE^ORX8(DIEN,"COMMENT") S:VALUE="" DDEOUT=1
  • GroupId
    SEQUENCE:   30
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   36
    RETURN INTERNAL VALUE:   YES
    GET ACTION:   S VALUE=$G(ORDAD) S:VALUE="" DDEOUT=1
  • EnteredOn
    SEQUENCE:   36
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   4
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$P($G(OR0),U,7)
  • FillerId
    SEQUENCE:   3
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   100
    FIELD NUMBER:   33
    GET ACTION:   S ORPK=$$PKGID^ORX8(DIEN),VALUE=ORPK S:VALUE?1.";" DDEOUT=1
  • OrderCategory
    SEQUENCE:   6
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100
    FIELD NUMBER:   23
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR DISPLAY GROUP
    OUTPUT TRANSFORM:   D DG^VPRSDAB(.VALUE) ;cks VALUE, sets LRSUB
    GET ACTION:   S VALUE=$P($G(OR0),U,11)
  • OrderItem
    SEQUENCE:   5
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100.001
    FIELD NUMBER:   .01
    ENTITY:   VPR ORDERABLE ITEM
    GET ACTION:   S ORIT=$$OI^ORX8(DIEN),VALUE=+ORIT S:VALUE<1 DDEOUT=1 ;first/only
  • OrderedBy
    SEQUENCE:   8
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100
    FIELD NUMBER:   1
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR PROVIDER
    GET ACTION:   S VALUE=$P($G(OR0),U,4)
  • Priority
    SEQUENCE:   19
    ITEM TYPE:   ENTITY
    FILE NUMBER:   100.045
    FIELD NUMBER:   1
    ENTITY:   VPR LAB URGENCY
    GET ACTION:   S VALUE=$$VALUE^ORX8(DIEN,"URGENCY") S:VALUE="" DDEOUT=1
DESCRIPTION
This entity populates the Lab Order container in HealthShare. It expects 
the ORDER (#100) file ien as its ID.
GET ENTRY ACTION S:'DFN&ID DFN=+$P($G(^OR(100,ID,0)),U,2) S LRDFN=+$G(^DPT(DFN,"LR"))
GET EXIT ACTION K LRDFN,LRSUB,ORDAD,ORIT,ORPK,VPRCDT,OR0,OR3,OR6,OR8,ORSIG
GET ID ACTION D OR1^VPRSDA(DIEN)
GET QUERY ROUTINE ORDERS^VPRSDAQ("LAB")