source: WorldVistAEHR/trunk/r/WOMENS_HEALTH-WV/WVNOTIF1.m@ 660

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

initial load of WorldVistAEHR

File size: 2.1 KB
RevLine 
[613]1WVNOTIF1 ;HCIOFO/FT,JR IHS/ANMC/MWR - WV ADD/EDIT WV NOTIFICATIONS;
2 ;;1.0;WOMEN'S HEALTH;;Sep 30, 1998
3 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
4 ;; STUFFS A NORMAL LETTER FOR THIS PATIENT. CALLED BY WVNOTIF.
5 ;
6 ;
7NORMALL(WVDFN,WVACCN,WVSPEC,WVSPTX) ;EP
8 ;---> STUFF A NORMAP PAP/MAM RESULT LETTER ENTRY IN WV NOTIF FILE.
9 ;---> REQUIRED VARIABLES: WVDFN=IEN OF WV PATIENT (FILE 790),
10 ;---> WVACCN=ACCESSION# FOR PROCEDURE.
11 ;---> WVSPEC=1 FOR PAP, 3,4 OR 5 FOR MAM.
12 ;---> WVSPTX=TEXT OF THE SPECIAL PROCEDURE.
13 N WVPC,WVPURP,X
14 ;
15 I '$D(WVDFN)!('$D(WVACCN))!('$D(WVSPEC)) D D NOLETT Q
16 .W !!?5,"* Patient DFN or Accession# or Special Procedure Code "
17 .W "undefined.",!," Contact Site Manager."
18 ;
19 I '$D(^WV(790.02,DUZ(2),0)) D D NOLETT Q
20 .W !!?5,"* Site Parameters for ",$$INSTTX^WVUTL6(DUZ(2))
21 .W " have not been set."
22 ;
23 ;---> FIND PIECE OF ^WV(790.02, THAT IDENTIFIES PAP/MAM NORMAL LETTER.
24 S WVPC=$S(WVSPEC=1:4,WVSPEC=2:8,1:0)
25 S WVPURP=$P(^WV(790.02,DUZ(2),0),U,WVPC)
26 I 'WVPURP D D NOLETT Q
27 .W !!?5,"* The Normal ",WVSPTX," Result Letter is not identified in"
28 .W !?7,"the Site Parameter file. Check the Site Parameter File."
29 ;
30 I '$O(^WV(790.404,WVPURP,1,0)) D D NOLETT Q
31 .W !!?5,"* In the Site Parameter file, the Normal ",WVSPTX
32 .W " Result letter"
33 .W !?7,"chosen has no letter text entered. Check the Notification "
34 .W !?7,"Purpose&Letter File."
35 ;
36 ;---> NOW STUFF A PAP/MAM RESULT NORMAL LETTER WITH ALL FIELDS ENTERED,
37 ;---> QUEUED TO BE PRINTED TODAY.
38 N DIC,Y
39 S X=WVDFN
40 K DD,DO S DIC="^WV(790.4,",DIC(0)="ML",DLAYGO=790
41 S DIC("DR")=".02///T;.03///LETTER, FIRST;.04///"_WVPURP
42 S DIC("DR")=DIC("DR")_";.05///"_WVSPTX_" NORMAL LETTER SENT;.06///"
43 S DIC("DR")=DIC("DR")_WVACCN_";.07////"_DUZ(2)_";.08///T;.11///T"
44 S DIC("DR")=DIC("DR")_";.13///T;.14///CLOSED"
45 D FILE^DICN
46 ;---> IF Y<0, CHECK PERMISSIONS.
47 D:Y<0
48 .W !!?5,"COULD NOT ADD NOTIFICATION, PERMISSION PROBLEM."
49 .W !?5,"CONTACT YOUR SITE MANAGER." D NOLETT
50 Q
51 ;
52NOLETT ;EP
53 W !?5,"* NO LETTER QUEUED!" D DIRZ^WVUTL3
54 Q
Note: See TracBrowser for help on using the repository browser.