source: WorldVistAEHR/trunk/r/CLINICAL_PROCEDURES-MD/MDCVTU.m@ 1046

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

initial load of WorldVistAEHR

File size: 1.1 KB
Line 
1MDCVTU ; HOIFO/NCA - Medicine Conversion Verification Utility ; [08-28-2003 11:34]
2 ;;1.0;CLINICAL PROCEDURES;**5**;Apr 01, 2004;Build 1
3 ; Integration Agreement:
4 ; IA #10155 Access 3rd piece of ^DD(filenumber,fieldnumber,0)
5 ;
6EN ; [Procedure] Verify the Medicine Records Are Converted
7 N CNT,CNTS,MDC,MDK,MDL,MDTIT
8 S MDTIT=";"_$P($G(^DD(703.92,.02,0)),U,3)
9 D EN1 W !!!
10 S MDK="" F S MDK=$O(MDC(MDK)) Q:MDK="" S MDX=$G(MDC(MDK)) D
11 .I +MDX S MDL=$F(MDTIT,";"_MDK_":") W !,$P($E(MDTIT,MDL,999),";")_": ",?30,+MDX
12 I '$D(MDC) W !,"Verified Medicine Reports Conversion Completed.",!
13 W !,"Reports Converted ",?30,CNT
14 W !,"Reports Skipped: ",?30,CNTS
15 Q
16EN1 ; Loop to Check Medicine Records
17 N MDP,MDPTR,MDREC,MDS,MDX
18 S MDREC=$NA(^MCAR(690,"AC")),(CNT,CNTS)=0
19 F S MDREC=$Q(@MDREC) Q:MDREC="" Q:$QS(MDREC,2)'="AC" D
20 .S MDPTR=$QS(MDREC,6)_";"_$QS(MDREC,5)_","
21 .S MDP=$O(^MDD(703.9,1,2,"B",MDPTR,0))
22 .I 'MDP S MDS=$$STATUS^MDCVT(MDPTR) S:$G(MDC(MDS))="" MDC(MDS)=0 S MDC(MDS)=MDC(MDS)+1 Q
23 .S MDS=$P(^MDD(703.9,1,2,MDP,0),U,2)
24 .I MDS="CR" S CNT=CNT+1 Q
25 .I MDS="S" S CNTS=CNTS+1 Q
26 .S:$G(MDC(MDS))="" MDC(MDS)=0 S MDC(MDS)=MDC(MDS)+1
27 .Q
28 Q
Note: See TracBrowser for help on using the repository browser.