VPR PREGNANCY (85)    ENTITY (1.5)

Name Value
NAME VPR PREGNANCY
DEFAULT FILE NUMBER 790.05
DATA MODEL SDA
DISPLAY NAME SocialHistory
ITEM
  • ToTime
    SEQUENCE:   13
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   790.05
    FIELD NUMBER:   42
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$G(VPRPREG("TO TIME"))
  • EnteredBy
    SEQUENCE:   9
    ITEM TYPE:   ENTITY
    FILE NUMBER:   790.05
    FIELD NUMBER:   2
    RETURN INTERNAL VALUE:   YES
    ENTITY:   VPR USER
    GET ACTION:   S VALUE=$G(VPRPREG("ENTERED BY"))
  • FromTime
    SEQUENCE:   12
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   790.05
    FIELD NUMBER:   41
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$G(VPRPREG("FROM TIME"))
  • CustomPairs
    SEQUENCE:   14
    ITEM TYPE:   LIST
    ENTITY:   VPR CUSTOM PAIR
    GET ACTION:   N X S X=$G(VPRPREG("STATE")) I $L(X) S DLIST(1)="PregnancyState^"_$P(X,U,2)
  • SocialHabitComments
    SEQUENCE:   15
    ITEM TYPE:   FIXED STRING
    GET ACTION:   S VALUE=$G(VPRPREG("COMMENTS"))
  • SocialHabit
    SEQUENCE:   4
    ITEM TYPE:   ENTITY
    FILE NUMBER:   790.05
    ENTITY:   VPR CODE TABLE
    GET ACTION:   S VALUE="PREGNANCY^^VHAT"
  • SocialHabitCategory
    SEQUENCE:   6
    ITEM TYPE:   ENTITY
    FILE NUMBER:   790.05
    ENTITY:   VPR CODE ONLY
    GET ACTION:   S VALUE="PREGNANCY"
  • EnteredAt
    SEQUENCE:   10
    ITEM TYPE:   ENTITY
    FILE NUMBER:   790.05
    ENTITY:   VPR FACILITY
    GET ACTION:   S VALUE=$$SITE^VPRSDA
  • EnteredOn
    SEQUENCE:   11
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   790.05
    FIELD NUMBER:   .01
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$$DATE^VPRSDA(VALUE)
    GET ACTION:   S VALUE=$G(VPRPREG("ENTERED ON"))
  • Status
    SEQUENCE:   8
    ITEM TYPE:   SIMPLE FIELD
    FILE NUMBER:   790.05
    FIELD NUMBER:   21
    RETURN INTERNAL VALUE:   YES
    OUTPUT TRANSFORM:   S VALUE=$S(VALUE>0:"A",1:"I")
    GET ACTION:   S VALUE=$G(VPRPREG("STATE"))
DESCRIPTION
This entity populates the Social History container in HealthShare from 
the PREGNANCY STATUSES (#790.05) sub-file of the WV PATIENT (#790) file. 
It creates or updates a single record containing the current preganancy 
status for female patients; it expects the patient DFN as the ID (DIEN).
 
This entity is supported by code in routine VPRSDAHX, which uses the 
BASELINE^WVRPCVPR api to extract data. Data is maintained by monitoring 
the WV PREGNANCY STATUS CHANGE EVENT protocol event.
GET EXIT ACTION K VPRPREG,^TMP("WVPREGST",$J)
GET ID ACTION D WVPL1^VPRSDAHX(.DIEN)
GET QUERY ROUTINE WVPLQ^VPRSDAHX