source: WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMCDEF.m@ 1361

Last change on this file since 1361 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.0 KB
Line 
1PXRMCDEF ; SLC/AGP - Computed findings for Reminder Definition. ;06/09/2006
2 ;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21
3 ;
4 ;======================================================
5RDEF(DFN,TEST,DATE,VALUE,TEXT) ;Computed finding for returing a Reminder
6 ;definition evaluation status
7 I TEST="" S TEST=0 Q
8 N NAME,PNAME,RIEN,TEMP,PARAM
9 S NAME=$P(TEST,U)
10 S PARAM=$P(TEST,U,2),PARAM=$P($G(PARAM),"=",2),TEST=0,DATE=$$NOW^PXRMDATE
11 S RIEN=$O(^PXD(811.9,"B",NAME,"")) Q:RIEN'>0
12 I +$P(^PXD(811.9,RIEN,0),U,6)=1 Q
13 K ^TMP("PXRHM",$J,RIEN)
14 S PNAME=$S($P($G(^PXD(811.9,RIEN,0)),U,3)'="":$P(^PXD(811.9,RIEN,0),U,3),1:NAME)
15 D MAIN^PXRM(DFN,RIEN,1)
16 S TEMP=$G(^TMP("PXRHM",$J,RIEN,PNAME))
17 K ^TMP("PXRHM",$J,RIEN)
18 S TEST=$S(TEMP="":0,TEMP["ERROR":0,TEMP["CNBD":0,1:1)
19 Q:'TEST
20 S VALUE=$P(TEMP,U)
21 S VALUE("STATUS")=VALUE
22 S VALUE("DUEDATE")=$P(TEMP,U,2)
23 S VALUE("LASTDONE")=$P(TEMP,U,3)
24 Q:PARAM=""
25 I PARAM="DUE DATE",+VALUE("DUEDATE")>0 S DATE=VALUE("DUEDATE")
26 I PARAM="LAST DONE",+VALUE("LASTDONE")>0 S DATE=VALUE("LASTDONE")
27 Q
28 ;
Note: See TracBrowser for help on using the repository browser.