source: WorldVistAEHR/trunk/r/ICR_IMMUNOLOGY_CASE_REGISTRY-IMR/IMRODAT1.m@ 771

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1IMRODAT1 ;HCIOFO-NCA,FT/FAI-DATA EXTRACTION (cont.) ; 03/09/02 15:03
2 ;;2.1;IMMUNOLOGY CASE REGISTRY;**15**;Feb 09, 1998
3 Q
4GETDAT ; Get Lab & Outpatient
5LAB ; Get Lab Data
6 S IMRLD=+$P(IMR101,"^",9),IMRLD1=+$P(IMR101,"^",10) ;piece 9=LAST LABORATORY DATE NOTED,piece 10=LAST MICROBIOLOGY DATE NOTED
7 D CHK^IMRODLAB
8 D ^IMRBDLB
9 D ^IMRBKLOD
10 S IMRLD=$S(IMRLAB>IMRLD:IMRLAB,1:IMRLD),IMRLD1=$S(IMRMI>IMRLD1:IMRMI,1:IMRLD1) S:'IMRLD IMRLD=""
11 S $P(IMR101,"^",9,10)=IMRLD_"^"_IMRLD1,$P(IMR101,"^",13)=IMRLD,$P(IMR101,"^",17)=IMRLD1 K IMRLD,IMRLD1 ;piece 13=last limited lab date, piece 17=last limited micro date
12OP ; Get Outpatient Activity Data
13 S IMRLD=+$P(IMR101,"^",16) D OP^IMRODSCH S:'IMRLD IMRLD="" ;last OP date
14 S $P(IMR101,"^",16)=$S(IMROP>IMRLD:IMROP,1:IMRLD) K IMRLD ;check latest scheduling date/time against last OP date
15WRAP S:IMRT2="NEW"!(IMRNXT2<IMRFN) IMRNXT2=IMRFN ;IMRNXT2=last new case
16 S ^IMR(158,IMRFN,101)=IMRDT_"^"_$P(IMR101,"^",2,99) ;IMRDT=LAST DATE DATA SURVEYED
17 Q
18SEND ; Send Message To National Registry
19 N DIFROM K XMY
20 S XMTEXT="^TMP($J,""IMRX"",",XMSUB="IMMUNOLOGY DATA. "_IMRSTN_" "_$E(IMRDTT,4,5)_"-"_$E(IMRDTT,6,7)_"-"_$E(IMRDTT,2,3)_" ("_IMRSET_")",XMDUZ=.5,XMY(IMRDOMN)="",XMY(DUZ)="" ;set up mail message variables
21 D ^XMD ;send message if more than START,PA,DE & TIME segments
22 K ^TMP($J),XMTEXT,XMDUZ,XMY,XMSUB,IMRGI
23 S IMRFLAG=1
24 S IMRSET=IMRSET+1
25 S IMRC=IMRC+1,^TMP($J,"IMRX",IMRC)="START"_"^"_IMRSTN_"^"_IMRDT_"^"_IMRSET_"^"_IMRCODE_"^"_$$VERSION^XPDUTL("IMR")_"^15" D SEGS^IMRODATA,LCHK^IMRODATA
26 Q
Note: See TracBrowser for help on using the repository browser.