Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DBTSPULL

DBTSPULL.m

Go to the documentation of this file.
  1. DBTSPULL ;routine to pull diab. pats from diabetic register [ 04/29/1999 1:23 PM ]
  1. ;from the case mgt. system
  1. ;2/1/99
  1. S CT=0
  1. O 51:("/usr/spool/uucppublic/diabeticspo.txt":"W")
  1. S N=0
  1. F S N=$O(^ACM(41,N)) Q:+N=0 D
  1. .S REC=^ACM(41,N,0)
  1. .I $P(REC,"^",1)'=6 Q ;6 is dfn for ihs diabetic case mgt. register
  1. .S PAT=$P(REC,"^",2)
  1. .Q:PAT=""
  1. .S S=$P($G(^ACM(41,N,"DT")),"^",1)
  1. .S STATUS=$S(S="D":5,S="A":1,S="I":2,S="U":0,S="N":4,S="T":3,1:"")
  1. .S ID=404510_"|2|"_PAT
  1. .S OUTREC=404510_$C(9)_PAT_$C(9)_ID_$C(9)_STATUS
  1. .U 51 W OUTREC,!
  1. .S CT=CT+1
  1. .Q
  1. C 51
  1. U 0 W "TOTAL: ",CT
  1. K CT
  1. Q