source: WorldVistAEHR/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSO145PS.m@ 1211

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

initial load of WorldVistAEHR

File size: 1.0 KB
RevLine 
[613]1PSO145PS ;BIRM/PDW-POST INIT TO POPULATE TPB INSTITUTION LETTERS 52.92 ;AUG 5, 2003
2 ;;7.0;OUTPATIENT PHARMACY;**145**;DEC 1997
3 Q
4EN ;Take institution entries from 52.91 & stuff into 52.92
5 S LOCDA=0 F S LOCDA=$O(^PS(52.91,"AC",LOCDA)) Q:LOCDA'>0 D LOCDA
6 Q
7LOCDA ;Get physical and mailing address
8 I $D(^PS(52.92,LOCDA,0)) Q ;Do not duplicate a site
9 N FAC,FDA
10 ; set FAC(FLD#)=(INTvalue of FLD#); ex: FAC(.01)=500 :"Birmingham VAMC"
11 ;
12 F XX=.01,.02,1.01,1.02,1.03,1.04 S FAC(XX)=$$GET1^DIQ(4,LOCDA,XX,"I")
13 F XX=4.01,4.02,4.03,4.04,4.05 S FAC(XX)=$$GET1^DIQ(4,LOCDA,XX,"I")
14 ;
15 ; build/map fields from iNSTITUTION file to TPB INSTITUTION LETTER
16 ; file into FDA for FM update
17 ;
18 ; "XFDL^YFLD" stuff file #52.92(XFLD) FDA with file #4(YFLD)
19 ;
20 F XX=".01^.01",".05^1.01",".06^1.02",".07^1.03",".08^1.04",".09^.02","1.01^4.01","1.02^4.02","1.03^4.03","1.04^4.04","1.05^4.05" D
21 . S XFLD=+XX,YFLD=$P(XX,U,2)
22 . S FDA(52.92,"+1,",XFLD)=FAC(YFLD)
23 S FDA(52.92,"+1,",.01)=LOCDA,LOCDA(1)=LOCDA
24 D UPDATE^DIE("","FDA","LOCDA","MSG")
25 Q
Note: See TracBrowser for help on using the repository browser.