VPSOBJ ;WOIFO/BT - PDO OUTPUT DISPLAY - UTILITIES ;11/20/11 15:30
;;1.0;VA POINT OF SERVICE (KIOSKS);**3**;Nov 14, 2012;Build 64
;;Per VHA Directive 2004-038, this routine should not be modified.
;;
Q
;IA #10104 - supported use of XLFSTR function
;
NEW(PATIEN,PDOARY) ; Object Construction - create a new PDO object
K:PDOARY'="" @PDOARY
K ^TMP("VPSPUTL1",$J)
K ^TMP("VPSOBJ",$J)
;
N LASTOREF S LASTOREF=$O(^TMP("VPSOBJ",$J,""),-1)+1
D SETDFN(LASTOREF,PATIEN)
D SETPDO(LASTOREF,PDOARY)
D SETFORMT(LASTOREF) ; SET UP OF NOTE FORMATTING REFERENCES
Q LASTOREF
;
CLOSE(OREF) ; Destroy object - clean up pdo
K ^TMP("VPSOBJ",$J,OREF)
Q
;
; ====== Properties =============
; -- Property DFN (Read/Write)
SETDFN(OREF,VAL) ; set DFN property
D SET(OREF,"DFN",VAL)
Q
GETDFN(OREF) ; get DFN property
Q $$GET(OREF,"DFN")
;
; -- Property PDOARY (Read/Write)
SETPDO(OREF,VAL) ; set PDOARY property
D SET(OREF,"PDOARY",VAL)
Q
GETPDO(OREF) ; get PDOARY property
Q $$GET(OREF,"PDOARY")
;
; -- Property LASTMRAR (Read/Write)
SETLSTMR(OREF,VAL) ; set LASTMRAR property
D SET(OREF,"LASTMRAR",VAL)
Q
GETLSTMR(OREF) ; get LASTMRAR property
Q $$GET(OREF,"LASTMRAR")
;
; -- Property ISSTAFF (Read/Write)
SETSTAFF(OREF,VAL) ; set ISSTAFF property
D SET(OREF,"ISSTAFF",VAL)
Q
GETSTAFF(OREF) ; get ISSTAFF property
Q $$GET(OREF,"ISSTAFF")
;
; -- Property ALLRNM (Read/Write)
SETALRNM(OREF,VAL) ; set ALLRNM (allergy name) property
D SET(OREF,"ALLRNM",VAL)
Q
GETALRNM(OREF) ; get ALLRNM property
Q $$GET(OREF,"ALLRNM")
;
; -- Property PATRESP (Read/Write)
SETPATRP(OREF,VAL) ; set PATRESP (patient response) property
D SET(OREF,"PATRESP",VAL)
Q
GETPATRP(OREF) ; get PATRESP property
Q $$GET(OREF,"PATRESP")
;
; -- Property STATION (Read/Write)
SETSTATN(OREF,VAL) ; set STATION property
D SET(OREF,"STATION",VAL)
Q
GETSTATN(OREF) ; get STATION property
Q $$GET(OREF,"STATION")
;
; -- Property MARKFOL (Read/Write)
SETMKFOL(OREF,VAL) ; set MARKFOL property
D SET(OREF,"MARKFOL",VAL)
Q
GETMKFOL(OREF) ; get STATION property
Q $$GET(OREF,"MARKFOL")
;
; -- Property ALLERGIES (Read/Write)
SETALLR(OREF,VAL) ; set array of ALLERGIES property
K ^TMP("VPSOBJ",$J,OREF,"ALLERGIES")
M ^TMP("VPSOBJ",$J,OREF,"ALLERGIES")=VAL
Q
GETALLR(OREF,VAL) ; get array of ALLERGIES property
K VAL M VAL=^TMP("VPSOBJ",$J,OREF,"ALLERGIES")
Q
;
; -- Property ADDALLERGY-DONTKNOW (Read/Write)
SETDKNW(OREF,VAL) ;
D SET(OREF,"ADDALLERGY-DONTKNOW",VAL)
Q
GETDKNW(OREF) ;
Q $$GET(OREF,"ADDALLERGY-DONTKNOW")
;
; -- Property ADDALLERGY-VET (Read/Write)
SETADDVT(OREF,VAL) ;
K ^TMP("VPSOBJ",$J,OREF,"ADDALLERGY-VET")
M ^TMP("VPSOBJ",$J,OREF,"ADDALLERGY-VET")=VAL
Q
GETADDVT(OREF,VAL) ;
K VAL M VAL=^TMP("VPSOBJ",$J,OREF,"ADDALLERGY-VET")
Q
;
; -- Property ADDALLERGY-PROVIDER (Read/Write)
SETADDPR(OREF,VAL) ;
K ^TMP("VPSOBJ",$J,OREF,"ADDALLERGY-PRV")
M ^TMP("VPSOBJ",$J,OREF,"ADDALLERGY-PRV")=VAL
Q
GETADDPR(OREF,VAL) ;
K VAL M VAL=^TMP("VPSOBJ",$J,OREF,"ADDALLERGY-PRV")
Q
;
; -- Property ADDALLERGY-REACTION (Read/Write)
SETADRCT(OREF,VAL) ;
D SET(OREF,"ADDALLERGY-REACTION",VAL)
Q
GETADRCT(OREF) ;
Q $$GET(OREF,"ADDALLERGY-REACTION")
;
; -- Property ADDALLERGY-MARKFOL (Read/Write)
SETADDMF(OREF,VAL) ;
D SET(OREF,"ADDALLERGY-MARKFOL",VAL)
Q
GETADDMF(OREF) ;
Q $$GET(OREF,"ADDALLERGY-MARKFOL")
;
; -- Property FORMATTED ADDALLERGY-VET (Read/Write)
SETADDFV(OREF,VAL) ;
K ^TMP("VPSOBJ",$J,OREF,"FORMATTED ADDALLERGY-VET")
M ^TMP("VPSOBJ",$J,OREF,"FORMATTED ADDALLERGY-VET")=VAL
Q
GETADDFV(OREF,VAL) ;
K VAL M VAL=^TMP("VPSOBJ",$J,OREF,"FORMATTED ADDALLERGY-VET")
Q
;
; -- Property FORMATTED ADDALLERGY-PROVIDER (Read/Write)
SETADDFP(OREF,VAL) ;
K ^TMP("VPSOBJ",$J,OREF,"FORMATTED ADDALLERGY-PROVIDER")
M ^TMP("VPSOBJ",$J,OREF,"FORMATTED ADDALLERGY-PROVIDER")=VAL
Q
GETADDFP(OREF,VAL) ;
K VAL M VAL=^TMP("VPSOBJ",$J,OREF,"FORMATTED ADDALLERGY-PROVIDER")
Q
;
; -- Property FORMATTED ADDALLERGY-REACTION (Read/Write)
SETADDFR(OREF,VAL) ;
K ^TMP("VPSOBJ",$J,OREF,"FORMATTED ADDALLERGY-REACTION")
M ^TMP("VPSOBJ",$J,OREF,"FORMATTED ADDALLERGY-REACTION")=VAL
Q
GETADDFR(OREF,VAL) ;
K VAL M VAL=^TMP("VPSOBJ",$J,OREF,"FORMATTED ADDALLERGY-REACTION")
Q
;
; -- Property NONVA med(Read/Write)
KILNONVA(OREF) ; Initialize prop
K ^TMP("VPSOBJ",$J,OREF,"NONVA-MED")
Q
APDNONVA(OREF,VAL) ; Append VAL
M ^TMP("VPSOBJ",$J,OREF,"NONVA-MED")=VAL
Q
GETNONVA(OREF,VAL) ;
K VAL M VAL=^TMP("VPSOBJ",$J,OREF,"NONVA-MED")
Q
;
; -- Property IS MED ACTIVE (Read/Write)
SETACTIV(OREF,VAL) ;
D SET(OREF,"ISMEDACTIVE",VAL)
Q
GETACTIV(OREF) ;
Q $$GET(OREF,"ISMEDACTIVE")
;
; -- Property IS MED NONVA (Read/Write)
SETISNVA(OREF,VAL) ;
D SET(OREF,"ISNONVA",VAL)
Q
GETISNVA(OREF) ;
Q $$GET(OREF,"ISNONVA")
;
; -- Property PATCOMM (Read/Write)
SETPATCM(OREF,VAL) ; Patient comments
K ^TMP("VPSOBJ",$J,OREF,"PATCOMM")
M ^TMP("VPSOBJ",$J,OREF,"PATCOMM")=VAL
Q
GETPATCM(OREF,VAL) ; Patient comments
K VAL M VAL=^TMP("VPSOBJ",$J,OREF,"PATCOMM")
Q
;
; -- Property NEXTFILLDT (Read/Write)
SETNFILL(OREF,VAL) ; DATE NEXT FILLED
D SET(OREF,"NEXTFILLDT",VAL)
Q
GETNFILL(OREF) ; DATE NEXT FILLED
Q $$GET(OREF,"NEXTFILLDT")
;
; -- Property PROVIDER (Read/Write)
SETPROV(OREF,VAL) ; PROVIDER
D SET(OREF,"PROVIDER",VAL)
Q
GETPROV(OREF) ; PROVIDER
Q $$GET(OREF,"PROVIDER")
;
; -- Property SIG (Read/Write)
SETSIG(OREF,VAL) ; SIG INSTRUCTION
D SET(OREF,"SIG",VAL)
Q
GETSIG(OREF,VAL) ; SIG INSTRUCTION
Q $$GET(OREF,"SIG")
;
; -- Property DAYS-SUPPLIED (Read/Write)
SETDSPLY(OREF,VAL) ; DAYS SUPPLIED
D SET(OREF,"DAYSUPPLIED",VAL)
Q
GETDSPLY(OREF) ; DAYS SUPPLIED
Q $$GET(OREF,"DAYSUPPLIED")
;
; -- Property MEDFILL (Read/Write)
SETMFILL(OREF,VAL) ;
D SET(OREF,"MEDFILL",VAL)
Q
GETMFILL(OREF) ;
Q $$GET(OREF,"MEDFILL")
;
; -- Property LEFTREFILL (Read/Write)
SETLREFL(OREF,VAL) ;
D SET(OREF,"LEFTREFILL",VAL)
Q
GETLREFL(OREF) ;
Q $$GET(OREF,"LEFTREFILL")
;
; -- Property MAXREFILL (Read/Write)
SETMREFL(OREF,VAL) ;
D SET(OREF,"MAXREFILL",VAL)
Q
GETMREFL(OREF) ;
Q $$GET(OREF,"MAXREFILL")
;
; -- Property MEDTYPE (Read/Write)
SETMTYPE(OREF,VAL) ; MEDICATION TYPE
D SET(OREF,"MEDTYPE",VAL)
Q
GETMTYPE(OREF) ; MEDICATION TYPE
Q $$GET(OREF,"MEDTYPE")
;
; -- Property ISREMOTE (Read/Write)
SETREMOT(OREF,VAL) ;
D SET(OREF,"ISREMOTE",VAL)
Q
GETREMOT(OREF) ;
Q $$GET(OREF,"ISREMOTE")
;
; -- Property MEDNAME (Read/Write)
SETMEDNM(OREF,VAL) ; Med name
D SET(OREF,"MEDNAME",VAL)
Q
GETMEDNM(OREF) ; Med Name
Q $$GET(OREF,"MEDNAME")
;
; -- Property REMLOC (Read/Write)
SETRMLOC(OREF,VAL) ; REMOTE LOCATION
D SET(OREF,"REMLOC",VAL)
Q
GETRMLOC(OREF) ; REMOTE LOCATION
Q $$GET(OREF,"REMLOC")
;
SETFORMT(OREF) ; Set column attributes when formatting the note
N LN,LINE,STR,DEFS
F LN=2:1 S LINE=$T(DISFLDS+LN),STR=$P(LINE,";;",2) Q:STR="" S DEFS($P(STR,U))=$P(STR,U,2,4)
K ^TMP("VPSOBJ",$J,OREF,"COLFORMAT")
M ^TMP("VPSOBJ",$J,OREF,"COLFORMAT")=DEFS
K DEFS
Q
GETFORMT(OREF,DEFS) ; get column attributes when formatting the note
K DEFS M DEFS=^TMP("VPSOBJ",$J,OREF,"COLFORMAT")
Q
;
; -- Property ERROR (Write Only)
SETERR(OREF,ERR) ; set error PROPERTY
N PDOARY S PDOARY=$$GET(OREF,"PDOARY")
S @PDOARY@(1,0)=ERR
D SET(OREF,"ERROR",ERR)
Q
;
; ====== External Methods =============
ADDPDO(OREF,STRING) ; Add STRING to PDO array
I STRING'="",$TR(STRING," ")="" Q
N PDOARY S PDOARY=$$GETPDO(OREF)
D ADDLN^VPSPUTL1(PDOARY,STRING)
Q
;
ADDBLANK(OREF) ; add blank line to PDOARY
N STRING S STRING=""
D ADDPDO^VPSOBJ(OREF,STRING)
Q
;
ADDUNDLN(OREF) ; add underline to PDOARY
N STRING S STRING=$$REPEAT^XLFSTR("_",75)
D ADDPDO^VPSOBJ(OREF,STRING)
Q
;
ADDLJ(OREF,STRING) ; left justify the string before add to PDOARY
N LJSTR S LJSTR=$$LJ^XLFSTR(STRING,75)
D ADDPDO^VPSOBJ(OREF,LJSTR)
Q
;
ADDCJ(OREF,STRING) ; Center justify the string before add to PDOARY
N CJSTR S CJSTR=$$CJ^XLFSTR(STRING,75)
D ADDPDO^VPSOBJ(OREF,CJSTR)
Q
; -- internal Set/Get property (should not be used externally). Each property should have its own set get methods
SET(OREF,PROP,VAL) ; set property PROP with value VAL
S ^TMP("VPSOBJ",$J,OREF,PROP)=VAL
Q
GET(OREF,PROP) ; get value from property PROP
Q $G(^TMP("VPSOBJ",$J,OREF,PROP))
;
DISFLDS ; get the attributes of each column when formatting and displaying the lines on the note
;;ITEM NAME^COL^WIDTH^DISPLAY TEXT^comments
;;FOLLOWUP^1^3^Followup
;;PATRESP^4^1^
;;ALLERNM^7^20^Name
;;REACTION^31^20^Reaction
;;SITE^55^20^Site
;;ACTION^55^10^Action
;;ADDALLERGY-VET^5^65
;;MEDNAME^7^20
;;DOSE^29^16
;;DOSEFORM^47^16
;;SIG^9^34
;;REFILLS^47^25
;;PROVIDER^9^34
;;DAYS SUPPLIED^47^25
;;MEDS ACTION^47^25
;;PENDING STMT^4^70
;;COMMENTS^9^34
;;REMOTE^9^34
;;FILLED^47^25
;;NEXTFILL^47^25
;;MRNAME^7^25^Name
;;MRDIR^35^20^Direction
;;MRFREQ^57^20^Frequency
;;ADDMED^7^25^Name/Directions/Frequency (Pt input)
;;ADDSTAFFCOMM^35^30^Staff Comments
;;ADDMEDSTAFF^7^25^Name/Dose/Indication
;;ADDSTAFFCOMM2^35^30^Comments
;;DISCUSS^7^70
;;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVPSOBJ 9342 printed Nov 22, 2024@17:53:06 Page 2
VPSOBJ ;WOIFO/BT - PDO OUTPUT DISPLAY - UTILITIES ;11/20/11 15:30
+1 ;;1.0;VA POINT OF SERVICE (KIOSKS);**3**;Nov 14, 2012;Build 64
+2 ;;Per VHA Directive 2004-038, this routine should not be modified.
+3 ;;
+4 QUIT
+5 ;IA #10104 - supported use of XLFSTR function
+6 ;
NEW(PATIEN,PDOARY) ; Object Construction - create a new PDO object
+1 if PDOARY'=""
KILL @PDOARY
+2 KILL ^TMP("VPSPUTL1",$JOB)
+3 KILL ^TMP("VPSOBJ",$JOB)
+4 ;
+5 NEW LASTOREF
SET LASTOREF=$ORDER(^TMP("VPSOBJ",$JOB,""),-1)+1
+6 DO SETDFN(LASTOREF,PATIEN)
+7 DO SETPDO(LASTOREF,PDOARY)
+8 ; SET UP OF NOTE FORMATTING REFERENCES
DO SETFORMT(LASTOREF)
+9 QUIT LASTOREF
+10 ;
CLOSE(OREF) ; Destroy object - clean up pdo
+1 KILL ^TMP("VPSOBJ",$JOB,OREF)
+2 QUIT
+3 ;
+4 ; ====== Properties =============
+5 ; -- Property DFN (Read/Write)
SETDFN(OREF,VAL) ; set DFN property
+1 DO SET(OREF,"DFN",VAL)
+2 QUIT
GETDFN(OREF) ; get DFN property
+1 QUIT $$GET(OREF,"DFN")
+2 ;
+3 ; -- Property PDOARY (Read/Write)
SETPDO(OREF,VAL) ; set PDOARY property
+1 DO SET(OREF,"PDOARY",VAL)
+2 QUIT
GETPDO(OREF) ; get PDOARY property
+1 QUIT $$GET(OREF,"PDOARY")
+2 ;
+3 ; -- Property LASTMRAR (Read/Write)
SETLSTMR(OREF,VAL) ; set LASTMRAR property
+1 DO SET(OREF,"LASTMRAR",VAL)
+2 QUIT
GETLSTMR(OREF) ; get LASTMRAR property
+1 QUIT $$GET(OREF,"LASTMRAR")
+2 ;
+3 ; -- Property ISSTAFF (Read/Write)
SETSTAFF(OREF,VAL) ; set ISSTAFF property
+1 DO SET(OREF,"ISSTAFF",VAL)
+2 QUIT
GETSTAFF(OREF) ; get ISSTAFF property
+1 QUIT $$GET(OREF,"ISSTAFF")
+2 ;
+3 ; -- Property ALLRNM (Read/Write)
SETALRNM(OREF,VAL) ; set ALLRNM (allergy name) property
+1 DO SET(OREF,"ALLRNM",VAL)
+2 QUIT
GETALRNM(OREF) ; get ALLRNM property
+1 QUIT $$GET(OREF,"ALLRNM")
+2 ;
+3 ; -- Property PATRESP (Read/Write)
SETPATRP(OREF,VAL) ; set PATRESP (patient response) property
+1 DO SET(OREF,"PATRESP",VAL)
+2 QUIT
GETPATRP(OREF) ; get PATRESP property
+1 QUIT $$GET(OREF,"PATRESP")
+2 ;
+3 ; -- Property STATION (Read/Write)
SETSTATN(OREF,VAL) ; set STATION property
+1 DO SET(OREF,"STATION",VAL)
+2 QUIT
GETSTATN(OREF) ; get STATION property
+1 QUIT $$GET(OREF,"STATION")
+2 ;
+3 ; -- Property MARKFOL (Read/Write)
SETMKFOL(OREF,VAL) ; set MARKFOL property
+1 DO SET(OREF,"MARKFOL",VAL)
+2 QUIT
GETMKFOL(OREF) ; get STATION property
+1 QUIT $$GET(OREF,"MARKFOL")
+2 ;
+3 ; -- Property ALLERGIES (Read/Write)
SETALLR(OREF,VAL) ; set array of ALLERGIES property
+1 KILL ^TMP("VPSOBJ",$JOB,OREF,"ALLERGIES")
+2 MERGE ^TMP("VPSOBJ",$JOB,OREF,"ALLERGIES")=VAL
+3 QUIT
GETALLR(OREF,VAL) ; get array of ALLERGIES property
+1 KILL VAL
MERGE VAL=^TMP("VPSOBJ",$JOB,OREF,"ALLERGIES")
+2 QUIT
+3 ;
+4 ; -- Property ADDALLERGY-DONTKNOW (Read/Write)
SETDKNW(OREF,VAL) ;
+1 DO SET(OREF,"ADDALLERGY-DONTKNOW",VAL)
+2 QUIT
GETDKNW(OREF) ;
+1 QUIT $$GET(OREF,"ADDALLERGY-DONTKNOW")
+2 ;
+3 ; -- Property ADDALLERGY-VET (Read/Write)
SETADDVT(OREF,VAL) ;
+1 KILL ^TMP("VPSOBJ",$JOB,OREF,"ADDALLERGY-VET")
+2 MERGE ^TMP("VPSOBJ",$JOB,OREF,"ADDALLERGY-VET")=VAL
+3 QUIT
GETADDVT(OREF,VAL) ;
+1 KILL VAL
MERGE VAL=^TMP("VPSOBJ",$JOB,OREF,"ADDALLERGY-VET")
+2 QUIT
+3 ;
+4 ; -- Property ADDALLERGY-PROVIDER (Read/Write)
SETADDPR(OREF,VAL) ;
+1 KILL ^TMP("VPSOBJ",$JOB,OREF,"ADDALLERGY-PRV")
+2 MERGE ^TMP("VPSOBJ",$JOB,OREF,"ADDALLERGY-PRV")=VAL
+3 QUIT
GETADDPR(OREF,VAL) ;
+1 KILL VAL
MERGE VAL=^TMP("VPSOBJ",$JOB,OREF,"ADDALLERGY-PRV")
+2 QUIT
+3 ;
+4 ; -- Property ADDALLERGY-REACTION (Read/Write)
SETADRCT(OREF,VAL) ;
+1 DO SET(OREF,"ADDALLERGY-REACTION",VAL)
+2 QUIT
GETADRCT(OREF) ;
+1 QUIT $$GET(OREF,"ADDALLERGY-REACTION")
+2 ;
+3 ; -- Property ADDALLERGY-MARKFOL (Read/Write)
SETADDMF(OREF,VAL) ;
+1 DO SET(OREF,"ADDALLERGY-MARKFOL",VAL)
+2 QUIT
GETADDMF(OREF) ;
+1 QUIT $$GET(OREF,"ADDALLERGY-MARKFOL")
+2 ;
+3 ; -- Property FORMATTED ADDALLERGY-VET (Read/Write)
SETADDFV(OREF,VAL) ;
+1 KILL ^TMP("VPSOBJ",$JOB,OREF,"FORMATTED ADDALLERGY-VET")
+2 MERGE ^TMP("VPSOBJ",$JOB,OREF,"FORMATTED ADDALLERGY-VET")=VAL
+3 QUIT
GETADDFV(OREF,VAL) ;
+1 KILL VAL
MERGE VAL=^TMP("VPSOBJ",$JOB,OREF,"FORMATTED ADDALLERGY-VET")
+2 QUIT
+3 ;
+4 ; -- Property FORMATTED ADDALLERGY-PROVIDER (Read/Write)
SETADDFP(OREF,VAL) ;
+1 KILL ^TMP("VPSOBJ",$JOB,OREF,"FORMATTED ADDALLERGY-PROVIDER")
+2 MERGE ^TMP("VPSOBJ",$JOB,OREF,"FORMATTED ADDALLERGY-PROVIDER")=VAL
+3 QUIT
GETADDFP(OREF,VAL) ;
+1 KILL VAL
MERGE VAL=^TMP("VPSOBJ",$JOB,OREF,"FORMATTED ADDALLERGY-PROVIDER")
+2 QUIT
+3 ;
+4 ; -- Property FORMATTED ADDALLERGY-REACTION (Read/Write)
SETADDFR(OREF,VAL) ;
+1 KILL ^TMP("VPSOBJ",$JOB,OREF,"FORMATTED ADDALLERGY-REACTION")
+2 MERGE ^TMP("VPSOBJ",$JOB,OREF,"FORMATTED ADDALLERGY-REACTION")=VAL
+3 QUIT
GETADDFR(OREF,VAL) ;
+1 KILL VAL
MERGE VAL=^TMP("VPSOBJ",$JOB,OREF,"FORMATTED ADDALLERGY-REACTION")
+2 QUIT
+3 ;
+4 ; -- Property NONVA med(Read/Write)
KILNONVA(OREF) ; Initialize prop
+1 KILL ^TMP("VPSOBJ",$JOB,OREF,"NONVA-MED")
+2 QUIT
APDNONVA(OREF,VAL) ; Append VAL
+1 MERGE ^TMP("VPSOBJ",$JOB,OREF,"NONVA-MED")=VAL
+2 QUIT
GETNONVA(OREF,VAL) ;
+1 KILL VAL
MERGE VAL=^TMP("VPSOBJ",$JOB,OREF,"NONVA-MED")
+2 QUIT
+3 ;
+4 ; -- Property IS MED ACTIVE (Read/Write)
SETACTIV(OREF,VAL) ;
+1 DO SET(OREF,"ISMEDACTIVE",VAL)
+2 QUIT
GETACTIV(OREF) ;
+1 QUIT $$GET(OREF,"ISMEDACTIVE")
+2 ;
+3 ; -- Property IS MED NONVA (Read/Write)
SETISNVA(OREF,VAL) ;
+1 DO SET(OREF,"ISNONVA",VAL)
+2 QUIT
GETISNVA(OREF) ;
+1 QUIT $$GET(OREF,"ISNONVA")
+2 ;
+3 ; -- Property PATCOMM (Read/Write)
SETPATCM(OREF,VAL) ; Patient comments
+1 KILL ^TMP("VPSOBJ",$JOB,OREF,"PATCOMM")
+2 MERGE ^TMP("VPSOBJ",$JOB,OREF,"PATCOMM")=VAL
+3 QUIT
GETPATCM(OREF,VAL) ; Patient comments
+1 KILL VAL
MERGE VAL=^TMP("VPSOBJ",$JOB,OREF,"PATCOMM")
+2 QUIT
+3 ;
+4 ; -- Property NEXTFILLDT (Read/Write)
SETNFILL(OREF,VAL) ; DATE NEXT FILLED
+1 DO SET(OREF,"NEXTFILLDT",VAL)
+2 QUIT
GETNFILL(OREF) ; DATE NEXT FILLED
+1 QUIT $$GET(OREF,"NEXTFILLDT")
+2 ;
+3 ; -- Property PROVIDER (Read/Write)
SETPROV(OREF,VAL) ; PROVIDER
+1 DO SET(OREF,"PROVIDER",VAL)
+2 QUIT
GETPROV(OREF) ; PROVIDER
+1 QUIT $$GET(OREF,"PROVIDER")
+2 ;
+3 ; -- Property SIG (Read/Write)
SETSIG(OREF,VAL) ; SIG INSTRUCTION
+1 DO SET(OREF,"SIG",VAL)
+2 QUIT
GETSIG(OREF,VAL) ; SIG INSTRUCTION
+1 QUIT $$GET(OREF,"SIG")
+2 ;
+3 ; -- Property DAYS-SUPPLIED (Read/Write)
SETDSPLY(OREF,VAL) ; DAYS SUPPLIED
+1 DO SET(OREF,"DAYSUPPLIED",VAL)
+2 QUIT
GETDSPLY(OREF) ; DAYS SUPPLIED
+1 QUIT $$GET(OREF,"DAYSUPPLIED")
+2 ;
+3 ; -- Property MEDFILL (Read/Write)
SETMFILL(OREF,VAL) ;
+1 DO SET(OREF,"MEDFILL",VAL)
+2 QUIT
GETMFILL(OREF) ;
+1 QUIT $$GET(OREF,"MEDFILL")
+2 ;
+3 ; -- Property LEFTREFILL (Read/Write)
SETLREFL(OREF,VAL) ;
+1 DO SET(OREF,"LEFTREFILL",VAL)
+2 QUIT
GETLREFL(OREF) ;
+1 QUIT $$GET(OREF,"LEFTREFILL")
+2 ;
+3 ; -- Property MAXREFILL (Read/Write)
SETMREFL(OREF,VAL) ;
+1 DO SET(OREF,"MAXREFILL",VAL)
+2 QUIT
GETMREFL(OREF) ;
+1 QUIT $$GET(OREF,"MAXREFILL")
+2 ;
+3 ; -- Property MEDTYPE (Read/Write)
SETMTYPE(OREF,VAL) ; MEDICATION TYPE
+1 DO SET(OREF,"MEDTYPE",VAL)
+2 QUIT
GETMTYPE(OREF) ; MEDICATION TYPE
+1 QUIT $$GET(OREF,"MEDTYPE")
+2 ;
+3 ; -- Property ISREMOTE (Read/Write)
SETREMOT(OREF,VAL) ;
+1 DO SET(OREF,"ISREMOTE",VAL)
+2 QUIT
GETREMOT(OREF) ;
+1 QUIT $$GET(OREF,"ISREMOTE")
+2 ;
+3 ; -- Property MEDNAME (Read/Write)
SETMEDNM(OREF,VAL) ; Med name
+1 DO SET(OREF,"MEDNAME",VAL)
+2 QUIT
GETMEDNM(OREF) ; Med Name
+1 QUIT $$GET(OREF,"MEDNAME")
+2 ;
+3 ; -- Property REMLOC (Read/Write)
SETRMLOC(OREF,VAL) ; REMOTE LOCATION
+1 DO SET(OREF,"REMLOC",VAL)
+2 QUIT
GETRMLOC(OREF) ; REMOTE LOCATION
+1 QUIT $$GET(OREF,"REMLOC")
+2 ;
SETFORMT(OREF) ; Set column attributes when formatting the note
+1 NEW LN,LINE,STR,DEFS
+2 FOR LN=2:1
SET LINE=$TEXT(DISFLDS+LN)
SET STR=$PIECE(LINE,";;",2)
if STR=""
QUIT
SET DEFS($PIECE(STR,U))=$PIECE(STR,U,2,4)
+3 KILL ^TMP("VPSOBJ",$JOB,OREF,"COLFORMAT")
+4 MERGE ^TMP("VPSOBJ",$JOB,OREF,"COLFORMAT")=DEFS
+5 KILL DEFS
+6 QUIT
GETFORMT(OREF,DEFS) ; get column attributes when formatting the note
+1 KILL DEFS
MERGE DEFS=^TMP("VPSOBJ",$JOB,OREF,"COLFORMAT")
+2 QUIT
+3 ;
+4 ; -- Property ERROR (Write Only)
SETERR(OREF,ERR) ; set error PROPERTY
+1 NEW PDOARY
SET PDOARY=$$GET(OREF,"PDOARY")
+2 SET @PDOARY@(1,0)=ERR
+3 DO SET(OREF,"ERROR",ERR)
+4 QUIT
+5 ;
+6 ; ====== External Methods =============
ADDPDO(OREF,STRING) ; Add STRING to PDO array
+1 IF STRING'=""
IF $TRANSLATE(STRING," ")=""
QUIT
+2 NEW PDOARY
SET PDOARY=$$GETPDO(OREF)
+3 DO ADDLN^VPSPUTL1(PDOARY,STRING)
+4 QUIT
+5 ;
ADDBLANK(OREF) ; add blank line to PDOARY
+1 NEW STRING
SET STRING=""
+2 DO ADDPDO^VPSOBJ(OREF,STRING)
+3 QUIT
+4 ;
ADDUNDLN(OREF) ; add underline to PDOARY
+1 NEW STRING
SET STRING=$$REPEAT^XLFSTR("_",75)
+2 DO ADDPDO^VPSOBJ(OREF,STRING)
+3 QUIT
+4 ;
ADDLJ(OREF,STRING) ; left justify the string before add to PDOARY
+1 NEW LJSTR
SET LJSTR=$$LJ^XLFSTR(STRING,75)
+2 DO ADDPDO^VPSOBJ(OREF,LJSTR)
+3 QUIT
+4 ;
ADDCJ(OREF,STRING) ; Center justify the string before add to PDOARY
+1 NEW CJSTR
SET CJSTR=$$CJ^XLFSTR(STRING,75)
+2 DO ADDPDO^VPSOBJ(OREF,CJSTR)
+3 QUIT
+4 ; -- internal Set/Get property (should not be used externally). Each property should have its own set get methods
SET(OREF,PROP,VAL) ; set property PROP with value VAL
+1 SET ^TMP("VPSOBJ",$JOB,OREF,PROP)=VAL
+2 QUIT
GET(OREF,PROP) ; get value from property PROP
+1 QUIT $GET(^TMP("VPSOBJ",$JOB,OREF,PROP))
+2 ;
DISFLDS ; get the attributes of each column when formatting and displaying the lines on the note
+1 ;;ITEM NAME^COL^WIDTH^DISPLAY TEXT^comments
+2 ;;FOLLOWUP^1^3^Followup
+3 ;;PATRESP^4^1^
+4 ;;ALLERNM^7^20^Name
+5 ;;REACTION^31^20^Reaction
+6 ;;SITE^55^20^Site
+7 ;;ACTION^55^10^Action
+8 ;;ADDALLERGY-VET^5^65
+9 ;;MEDNAME^7^20
+10 ;;DOSE^29^16
+11 ;;DOSEFORM^47^16
+12 ;;SIG^9^34
+13 ;;REFILLS^47^25
+14 ;;PROVIDER^9^34
+15 ;;DAYS SUPPLIED^47^25
+16 ;;MEDS ACTION^47^25
+17 ;;PENDING STMT^4^70
+18 ;;COMMENTS^9^34
+19 ;;REMOTE^9^34
+20 ;;FILLED^47^25
+21 ;;NEXTFILL^47^25
+22 ;;MRNAME^7^25^Name
+23 ;;MRDIR^35^20^Direction
+24 ;;MRFREQ^57^20^Frequency
+25 ;;ADDMED^7^25^Name/Directions/Frequency (Pt input)
+26 ;;ADDSTAFFCOMM^35^30^Staff Comments
+27 ;;ADDMEDSTAFF^7^25^Name/Dose/Indication
+28 ;;ADDSTAFFCOMM2^35^30^Comments
+29 ;;DISCUSS^7^70
+30 ;;