source: WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMACT.m@ 701

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

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1PXRMACT ; SLC/PJH - Activity File Update ;06/03/1999
2 ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
3 ;
4 ; This is a bit ruff 'cos we don't have a file to update yet
5 ;
6 ;Initialize fields
7START N PXRMITEM,DFN,ADATE,ATYPE,RDATE,EDATE,STATUS,NDATE,ROLL,EPROC,AEDATE
8 N PSEX,AAGE,DOD,AFAC,HLOC,SPEC,CSTOP,CSEX,MINAGE,MAXAGE
9 ;
10 ;Get patient cache items
11 D CACHE
12 ;Get finding items
13 D FIND
14 ;Update Activity file
15 D UPD
16 ;
17END Q
18 ;
19 ;Get Cache items
20 ;---------------
21CACHE Q
22 ;
23 ;Get Finding Items
24FIND Q
25 ;
26 ;Create activity record - file #801 ??
27 ;-------------------------------------
28UPD N ARRAY,DATA,DESC,IEN,STRING,SUB,TAG,FDA,FDAIEN
29 ;Get each reminder in turn
30 S STRING="Building activity record"
31 D BMES^XPDUTL(STRING)
32 ;Build FDA array
33 K FDAIEN,FDA
34 S FDA(801,"+1,",.01)=PXRMITEM
35 S FDA(801,"+1,",.02)=DFN
36 S FDA(801,"+1,",.03)=ADATE
37 S FDA(801,"+1,",.04)=ATYPE
38 S FDA(801,"+1,",.05)=RDATE
39 S FDA(801,"+1,",.06)=EDATE
40 S FDA(801,"+1,",.07)=STATUS
41 S FDA(801,"+1,",.08)=NDATE
42 S FDA(801,"+1,",.09)=ROLL
43 S FDA(801,"+1,",.1)=EPROC
44 S FDA(801,"+1,",.11)=AEDATE
45 S FDA(801,"+1,",2.01)=PSEX
46 S FDA(801,"+1,",2.02)=AAGE
47 S FDA(801,"+1,",2.03)=DOD
48 S FDA(801,"+1,",4.01)=AFAC
49 S FDA(801,"+1,",4.02)=HLOC
50 S FDA(801,"+1,",4.03)=SPEC
51 S FDA(801,"+1,",4.04)=CSTOP
52 S FDA(801,"+1,",7.01)=CSEX
53 S FDA(801,"+1,",7.02)=MINAGE
54 S FDA(801,"+1,",7.03)=MAXAGE
55 ;
56 ;Store findings multiple(s)
57 N CNT S CNT=0
58 D MFDA(801.002,"?","?")
59 D MFDA(801.002,"?","?")
60 D MFDA(801.002,"?","?")
61 D MFDA(801.002,"?","?")
62 D MFDA(801.002,"?","?")
63 ;
64 S FDA(801,"+1,",200.1)="?"
65 D UPDATE^DIE("","FDA","FDAIEN","MSG")
66 I $D(MSG) D ERR
67 Q
68 ;
69MFDA(FILE,FIELD,DATA) ;
70 I FIELD=".01" S CNT=CNT+1
71 S FDA(FILE,"+"_CNT_",?1,",FIELD)=DATA
72 Q
73 ;
74 ;Error Handler
75 ;-------------
76ERR N ERROR,IC,REF
77 S ERROR(1)="Error in UPDATE^DIE, needs further investigation"
78 ;Move MSG into ERROR
79 S REF="MSG"
80 F IC=2:1 S REF=$Q(@REF) Q:REF="" S ERROR(IC)=REF_"="_@REF
81 ;Screen message
82 D BMES^XPDUTL(.ERROR)
83 ;Mail Message - this should become a standard facility
84 ;D ERR^PXRMPV1E(.ERROR)
85 Q
Note: See TracBrowser for help on using the repository browser.