source: WorldVistAEHR/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RANMPT1.m@ 1484

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1RANMPT1 ;HISC/GJC-Radiopharm interface; ;8/6/97 12:35
2 ;;5.0;Radiology/Nuclear Medicine;;Mar 16, 1998
3 ; 'RAX': Patient IEN, 'RAY': Exam Date (external) ,'RAZ' : Case #
4 ; 'RAIEN702': new IEN in file 70.2
5EN1(RAX,RAY,RAZ) ; add minimum entry info into file 70.2
6 S RAIEN702=$O(^RADPTN("AA",RAX,RAY,RAZ,0)) Q:RAIEN702 RAIEN702
7 N DIERR,RATMP
8 S RATMP(70.2,"+1,",.01)=RAX
9 S RATMP(70.2,"+1,",2)=RAY,RATMP(70.2,"+1,",3)=RAZ
10 D UPDATE^DIE("","RATMP","RAIEN702")
11 S RAIEN702=$S(+$G(RAIEN702(1))>0:RAIEN702(1),1:-1)
12 I RAIEN702=-1 W !,*7," ??",!!,"** Error -- Unable to file drug info **",! G EN1Q
13 N RA1,RA2,RAFDA,RAIEN,RAMSG
14 Q:'$D(RAOPT("REG")) RAIEN702 ;stuff only during registration
15 Q:'$G(RAPRI) RAIEN702
16 ; enter default radiopharmaceutical(s) into subflds of file 70.2
17 S RA1=0,RA2=RAIEN702
18LOOP1 K RAFDA,RAIEN,RAMSG S RA1=$O(^RAMIS(71,RAPRI,"NUC",RA1)) G:'RA1 EN1Q
19 S RA50PTR=+^RAMIS(71,RAPRI,"NUC",RA1,0)
20 S RAFDA(70.21,"+2,"_RA2_",",.01)=RA50PTR
21 D UPDATE^DIE("","RAFDA","RAIEN","RAMSG") G:'$D(RAMSG) LOOP1
22 W !,*7," ??",!!,"** Error -- unable to enter default radiopharmaceutical info **",!
23 ;keep RAIEN702 as it was, even tho can't insert radiopharm
24EN1Q Q RAIEN702
25 ;
26EN2(RADFN,RADTI,RACNI) ; enter default pharmceutical(s) into subflds of file 70
27 Q:'$G(RAPRI)
28 N RA1,RA2,RAFDA,RAIEN,RAMSG,DIERR
29 N RA50NDE ; Default Medications '0' node for this procedure
30 Q:$O(^RADPT(RADFN,"DT",RADTI,"P",RACNI,"RX",0)) ; old data ?
31 S RA1=0,RA2=RACNI_","_RADTI_","_RADFN
32LOOP2 K RAFDA,RAIEN,RAMSG S RA1=$O(^RAMIS(71,RAPRI,"P",RA1)) G:'RA1 EN2Q
33 S RA50NDE=$G(^RAMIS(71,RAPRI,"P",RA1,0))
34 S RAFDA(70.15,"+2,"_RA2_",",.01)=+RA50NDE
35 S RAFDA(70.15,"+2,"_RA2_",",2)=$P(RA50NDE,"^",2)
36 D UPDATE^DIE("","RAFDA","RAIEN","RAMSG")
37 G:'$D(RAMSG) LOOP2
38 W !,*7," ??",!!,"** Error -- unable to enter default pharmaceutical info **",!
39EN2Q Q
Note: See TracBrowser for help on using the repository browser.