VPR PTF (55)    ENTITY (1.5)

Name Value
NAME VPR PTF
DEFAULT FILE NUMBER 45
DATA MODEL SDA
DISPLAY NAME Diagnosis
ITEM
  • FromTime
    SEQUENCE:   2
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   45
    FIELD NUMBER:   2
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$G(VPRPTF("ADMISSION DATE"))
  • DiagnosisPriority
    SEQUENCE:   9
    ITEM TYPE:   FIXED STRING
    GET ACTION:   S:$G(VPRPTF)["-" VALUE=+$P(VPRPTF,"-",2)
  • Extension
    SEQUENCE:   5
    ITEM TYPE:   ENTITY
    FILE NUMBER:   45
    ENTITY:   VPR PTF EXTENSION
    GET ACTION:   S VALUE=DIEN
  • ToTime
    SEQUENCE:   3
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   45
    FIELD NUMBER:   70
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$G(VPRPTF("DISCHARGE DATE")),VPRDISDT=VALUE
  • DiagnosingClinician
    SEQUENCE:   6
    ITEM TYPE:   ENTITY
    FILE NUMBER:   45
    FIELD NUMBER:   79.1
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR PROVIDER
    GET ACTION:   S VALUE=$G(VPRPTF("DISCHARGE PROVIDER"))
  • Diagnosis
    SEQUENCE:   7
    ITEM TYPE:   ENTITY
    FILE NUMBER:   45
    FIELD NUMBER:   79
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR ICD
    GET ACTION:   S VALUE=$P($G(VPRPTF("DX")),U),DATA("DATE")=$G(VPRDISDT,DT)
  • DiagnosisType
    SEQUENCE:   8
    ITEM TYPE:   ENTITY
    FILE NUMBER:   45
    ENTITY:   VPR CODE TABLE
    GET ACTION:   S VALUE=$S($G(VPRPTF)["-":"S^SECONDARY",1:"DXLS^Diagnosis for Length of Stay")
  • EnteredAt
    SEQUENCE:   17
    ITEM TYPE:   ENTITY
    FILE NUMBER:   45
    FIELD NUMBER:   3
    ENTITY:   VPR FACILITY
    OUTPUT TRANSFORM:   S VALUE=+$O(^DIC(4,"D",VALUE,0)) ;PTF saves stn#
    GET ACTION:   S VALUE=$G(VPRPTF("FACILITY")) S:VALUE="" VALUE=$G(VASTN)
  • EncounterNumber
    SEQUENCE:   4
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   45
    GET ACTION:   S VALUE=$G(VPRPTF("VISIT"))
  • ExternalId
    SEQUENCE:   19
    ITEM TYPE:   ID
    OUTPUT TRANSFORM:   S VALUE=VALUE_";PTF"
    GET ACTION:   S VALUE=$G(VPRPTF)
DESCRIPTION
This entity populates the Diagnosis container in HealthShare with ICD
discharge diagnosis codes from the PTF (#45) file ien; it expects the
record IEN as the ID (DIEN).
 
This entity is supported by code in routine VPRSDADG, which uses the
RPC^DGPTFAPI and PTF^DGPTPXRM calls to extract PTF data. Data in SDA
is maintained by monitoring the DG PTF ICD DIAGNOSIS NOTIFIER protocol
event.
GET ENTRY ACTION S VASTN=$P($$SITE^VASITE,U,3)
GET EXIT ACTION K VPRDISDT,VPRPTF,VPRPOA,VASTN
GET ID ACTION D DX1^VPRSDADG
GET QUERY ROUTINE DXQ^VPRSDADG