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"))
  • 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("DXLS")),U),DATA("DATE")=$G(VPRDISDT,DT)
  • DiagnosisType
    SEQUENCE:   8
    ITEM TYPE:   ENTITY
    FILE NUMBER:   45
    ENTITY:   VPR CODE TABLE
    GET ACTION:   S VALUE="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"
DESCRIPTION
This entity populates the Diagnosis container in HealthShare. It expects 
the PTF (#45) file ien as its ID.
GET ENTRY ACTION S VASTN=$P($$SITE^VASITE,U,3)
GET EXIT ACTION K VPRDISDT,VPRPTF,VASTN
GET ID ACTION D PTF1^VPRSDAV
GET QUERY ROUTINE PTF^VPRSDAQ