BTPWPEV1 ;GDIT/HCS/ALA-Tracked Events continued ; 02 Mar 2017 8:27 AM
;;1.2;CARE MANAGEMENT EVENT TRACKING;;Jul 07, 2017;Build 71
;
;
RES(TIEN) ;EP - Calc Result
N TDATA,PRCDT,RES
S TDATA=$G(^BTPWP(TIEN,0))
S PRCDT=$$FMTE^BQIUL1($P(TDATA,U,3))
S RES=$$LNK^BTPWPTRG(TIEN,.06)
S:RES]"" RES=PRCDT_$C(28)_$P(RES,$C(26),2)_$C(28)_$P(RES,$C(26),3)
Q RES
;
CMTX ;EP - Community taxonomy
N CM,TREF
S TREF="COMM" K @TREF
D BLD^BQITUTL(COMMTX,TREF)
S (COMM,CM)="" F S CM=$O(COMM(CM)) Q:CM="" S COMM=$G(COMM)_$S($G(COMM)]"":$C(29),1:"")_CM K COMM(CM)
Q
;
HDR ;
S HDR="I00010HIDE_CMET_IEN^I00010HIDE_DFN^T00001SENS_FLAG^I00010HIDE_VISIT_IEN^I00010HIDE_EVENTTYPE_IEN^T00050HRN^D00015DOB^T00001COMM_FLAG^"
S HDR=HDR_"T00040CATEGORY^T00100PATIENT_NAME^T00010AGE^T00001SEX^T00050COMMUNITY^T00100DESIGNATED_PCP^T00060EVENT^D00030EVNT_DATE^"
S HDR=HDR_"T01024FINDINGS^T01024HIDE_FINDINGS^T01024FOLLOW_UPS^T01024HIDE_FOLLOW_UPS^T01024NOTIFICATIONS^T01024HIDE_NOTIFICATIONS^"
S HDR=HDR_"T00015STATE^T00050TRACKED_BY^D00030TRACKED_DTM^T00050INTERPRETATION^T00050HIDE_INTERPRETATION^D00030RESULT^T01024HIDE_RESULT^"
S HDR=HDR_"T01024FIND_SUMM^T01024HIDE_SEARCH"
Q
BTPWPEV1 ;GDIT/HCS/ALA-Tracked Events continued ; 02 Mar 2017 8:27 AM
+1 ;;1.2;CARE MANAGEMENT EVENT TRACKING;;Jul 07, 2017;Build 71
+2 ;
+3 ;
RES(TIEN) ;EP - Calc Result
+1 NEW TDATA,PRCDT,RES
+2 SET TDATA=$GET(^BTPWP(TIEN,0))
+3 SET PRCDT=$$FMTE^BQIUL1($PIECE(TDATA,U,3))
+4 SET RES=$$LNK^BTPWPTRG(TIEN,.06)
+5 IF RES]""
SET RES=PRCDT_$CHAR(28)_$PIECE(RES,$CHAR(26),2)_$CHAR(28)_$PIECE(RES,$CHAR(26),3)
+6 QUIT RES
+7 ;
CMTX ;EP - Community taxonomy
+1 NEW CM,TREF
+2 SET TREF="COMM"
KILL @TREF
+3 DO BLD^BQITUTL(COMMTX,TREF)
+4 SET (COMM,CM)=""
FOR
SET CM=$ORDER(COMM(CM))
IF CM=""
QUIT
SET COMM=$GET(COMM)_$SELECT($GET(COMM)]"":$CHAR(29),1:"")_CM
KILL COMM(CM)
+5 QUIT
+6 ;
HDR ;
+1 SET HDR="I00010HIDE_CMET_IEN^I00010HIDE_DFN^T00001SENS_FLAG^I00010HIDE_VISIT_IEN^I00010HIDE_EVENTTYPE_IEN^T00050HRN^D00015DOB^T00001COMM_FLAG^"
+2 SET HDR=HDR_"T00040CATEGORY^T00100PATIENT_NAME^T00010AGE^T00001SEX^T00050COMMUNITY^T00100DESIGNATED_PCP^T00060EVENT^D00030EVNT_DATE^"
+3 SET HDR=HDR_"T01024FINDINGS^T01024HIDE_FINDINGS^T01024FOLLOW_UPS^T01024HIDE_FOLLOW_UPS^T01024NOTIFICATIONS^T01024HIDE_NOTIFICATIONS^"
+4 SET HDR=HDR_"T00015STATE^T00050TRACKED_BY^D00030TRACKED_DTM^T00050INTERPRETATION^T00050HIDE_INTERPRETATION^D00030RESULT^T01024HIDE_RESULT^"
+5 SET HDR=HDR_"T01024FIND_SUMM^T01024HIDE_SEARCH"
+6 QUIT