Standard Jet DBnb` Ugr@?~1y0̝cßFNc7=ܜ(s.`4 {6߱lC73Ty[-|*|I{2f_Љ$g'DeFx -bT4.0 dv YMSS  Y   Y Y  Y Y  Y  Y  Y  r Y s Y E Y a Y d Y 2Y  Y   Y  jY ConnectDatabaseDateCreateDateUpdate FlagsForeignNameIdLvLvExtraLvModule LvPropName OwnerParentIdRmtInfoLongRmtInfoShortTypeni\-YYIdParentIdName        OYOSY Y Y  Y 2ACMFInheritableObjectIdSID YObjectId Y MSS Y  Y Y Y  Y  Y Y  Y AttributeExpressionFlagLvExtra Name1 Name2ObjectId Ordernzf edY"ObjectIdAttribute -YMSSY Y Y  Y  Y  Y  Y  Y ccolumn grbiticolumnszColumnszObject$szReferencedColumn$szReferencedObjectszRelationship   YYYszObject$szReferencedObjectszRelationshipYv1b N  : k & W  C t/  <@@   @   kf^JkWLJkJomdQuQMLJkMd``dbSY^QLJk^Yb\QOmJL^QkOJmJJMMQkkfJUQkOJmJLJkQkSdi`k `dOo^Qk iQ^JmYdbkWYfkiQfdimk kMiYfmk kvkiQ^ mJL^Qk`kvkJMMQkkdL[QMmk`kvkJMQk`kvkdL[QMmk`kvkhoQiYQk`kvkiQ^JmYdbkWYfkhoQiv8mL^OQ`dmL^^JLm^\fMidkksJ^\JMMQkk^Jvdom`kvkOLko``JivYbSdokQiOQSYbQO6  @ @ @          Y  @ @ @ @ @ @ @ @ @ @444444444 4 4 4 4444444444444$4% 4& 4' 4( 4) 4* 4+ 4, 4- 4. 4/ 40 41 4C 4D 4E4F4G4H4I4J4K4L::494:4;4<4647484=4>4?4@4A4B424344454444 44 4444!4"4#N  @  1 1 1 1 1 1 1 1 1  1   0d _ Z g  ~ ) }  Nx rxN@xN@ tlkpCrosswalku@3tlkpCrosswalk @-@8zzznbbbHH<: eN@N@ tblLabu@3tblLab,ƐRRRRFFF::., %K@K@ tblDemou@3tblDemo*VVVVJJJ<<0. % PO@O@0Query1uo@8@@9F::......., @|g @ @MSysAccessObjectsuDDDDDDDDDDB  /~q @} My@basLinkedTablesud@8LLL@@@@@@@> @ J~q @} My@basCommonFileuj@8HHH<<<<<<<: @ S*~q @} My@basAutoExecuf@8DDD88888886 @  ۋwq @} My@splashu..........,  6 @6 @UserDefinedu88888888886  6 @6 @SummaryInfou@8DDD88888886 @ !@xH@AccessLayoutu4MR2KeepLocal T#5szz:::::::8 @' @' @SysRelu.........., ' @' @Scriptsu0000000000. ' @' @Reportsu0000000000. ' @' @Modulesu0000000000. ' @' @Formsu,,,,,,,,,,* j\Ly@j\Ly@DataAccessPagesu@@@@@@@@@@> Z' @Z' @MSysRelationshipstDDDDDDDDDDB Z' @L\M@MSysQueriest88888888886 Z' @L\M@MSysACEst22222222220 Z' @Z' @MSysObjectst88888888886 Z' @T My@MSysDbu@8:::......., @Z' @Z' @Relationshipst<<<<<<<<<<: Z' @Z' @Databasest44444444442 Z' @Z' @Tablest..........,  Y,ȕklN,Y Y DataIDx\0YAOIndexv1K[ (0ctLLS@LL\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\` P\MSysAccountsbxaK[ࡱ>  , !"#$%&'()*+./012345789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijmnopqrstuvwxyz{|}~Root Entry pvA3VBApvApvAVBAProjectpvApvAVBApvApvAdir __SRP_0__SRP_1Pm__SRP_2 Z.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOQRSTUVWXY[\]^_`abcdefghijklmnpqrsuvwxyz{|}0* pHd paml1 @8= Vh @JiF J< rstdole>stdole f%\*\G{00020430-C 0046}#2.0#0#C:\WINNT\Sys@tem32\c2.tlb#OLE Automation^!DAO>IDAO@ @5E01@5@Program Files\CommonMicrosoft S@hared\;\dao360.dll# 3.6 Object Library HVBIDE> VB@IDE\ \E157 \3CN).VBA\6E6EXT.OLB/Visual Basic for Applic]s Extensibility 5.3+š h@basLinkedTDabTGasLink@dT@bBsXHJBZEFTXIQHUDNYYYZFJJGHTKCC28APHJNZ@NFU@X@QQURNDYBZFJGTKC@A1B8+%@΁,q0b!Bf3G*2Cmm@ni21SWUELJIGRNFAQDZFDCZIFAZODGIE1SWU0L*I*RNXAQ1/D,ZE6FZO@GM@EI15(` hExe0cGAuxo@x`2c0GKZMFUNAVWJFYDOVXGQMBQRDPQOFJG*ZMU@AVUJY@OXUQB@R`Q200 fForm_splashF /r/Z_Jp/KhOZFLAAMHQJWYWDXBRTHPNUWONOB$0O,L+AHJ@Y`(DXLRKHPU`OO10K"@,\3I"K*mrU~~~~~~~~~~~~~~~~~~~? I-y;rzLz  a q 9 Y K[y a q iyYAya q Q A 1  )  !IbasLinkedTables basCommonFile basAutoExec Form_splashpaml1F /C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\VBE6.DLLVBA a `J_N? 3C:\Program Files\Microsoft Office\Office\MSACC9.OLBAccess Y p0FC:\WINNT\System32\stdole2.tlbstdole a^F=C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dllDAO aWFCC:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLBVBIDE y1dFCur* h3oEmzB$|*y7P)>Dx?2TAC7?Label231?Form@C7?txtCntSC7?DetailEC7?Command1Label0 Form_OpenCommand1_ClickParseConvertUnixFile TAutoExec fĤIx8<ɤs h)aN? `GXGP Error# : VBE6.DLL     S  cdem_dta.mdb tblLab CheckLinkGetDBDiradhVerifyLinks AutoExec adhVerifyLinks &The required file ' *' could not be found. B You can use the next dialog box  Dto locate the file on your system. B If you cannot find this file or  *.mdb Fare unsure what to do choose CANCEL B at the next screen and call the  hlocal database administrator, or program developer:  P Washington State Department of Health 6 Diabetes Control Program (360) 236-3738 Access (*.mdb) ,,LL, $,0<Hadh_apiGetOpenFileName comdlg32.dll GetOpenFileNameA 0adh_apiGetSaveFileName GetSaveFileNameA PCommDlgExtendedError CommDlgExtendedError padhCommonFileOpenSaveadhAddFilterItem adhTrimNullSm. 2Locate Data database file ZYou can't run database until you can locate ' '.qm.m. Relinking tablesIm. ;DATABASE=     `   0 Km.Qm.zrU~~~~~u    A  (  8 IHCancelinstringsection compoK[nentUnixFileDOSFilestrTablestrDataDatabasestrSampleTableofnFlags InitialDirFilter FilterIndex DefaultExtFileName DialogTitleOpenFile strFilterstrDescriptionvarItemstrItemrU 0  9 1 Y Q @4Aaivvv@8 @<xxx@@ 1ppp@ DIqtttI@HAarrrdWHd dUpv5d\ `` l\qX`lX j `$ `` `x\ `` H LL ,''xM4@l\#T*#P*#DlH*Fd 2TPDH)`L6d ( x0 TPHD`Ld0   0   0   8D@rU T(__SRP_3o__SRP_4 tt__SRP_5~g__SRP_6 x`0&$A` 8`9Q0&&/0` q00/nrU~|  9 1 Y Q TK'CTTCXX DD\2XT \D cDlP fDlK$$'4%'D%$ |$\ fD% $ ` P K   lq }     ,'':D N l#X*#T *# l*F$ 2XT ) 6$ RT, l\4 XT  $krU $`nrU~| * y) A A A)aK[Q  YI9 i9 Y  Kk04(8%HL FP%`d$ d D` 0'L `!H 0(4 ,)>0F h) d`LH4$ #dd $ldpzpz`( h(0d`LH4 0 x  KSC@l (h h7pz" 1d'ld *F #?/5}ld *FL *#*1`/gl`*#*F      `1`/6l` *# *1`/Ol` *# *F    `1`/6 -l`*F  `1`6-l`*F  `1`6 l`*1`)''@M@`M(@ 6':(NC<  1@\ D@ k>pD@)kDD%:( %$ |hpF@\ DQ@[8H4!H (!lJ/ kFpF :("LH ,!/5K H l!$0 #@@ $l0@pz"*'%kFD(%$ |h H4!YpzK$'%'(%$ |hK0 #@@ $l0q,@x0 #@@ $ #$$ ,$''@M(@%l0#*#(&*#l *F 2( )@$6 " `L 4 84h<H@`L\d@ ( @$arU (`0$`,`00nrU~| 0 x  __SRP_7__SRP_8 __SRP_9_VBA_PROJECT 0 x  0   arU , p4,(p4$PpL` )Aay0` 9a00(`y nID="{7E32B1EB-8F32-4D8C-9F4C-90947CF38EFD}" Module=basLinkedTables Module=basCommonFile Module=basAutoExec DocClass=Form_splash/&H00000000 Name="paml1" HelpContextID="0" VersionCompatible32="393222000" CMG="C7C5E472E4967A9A7A9A7A9A7A9A" DPB="6163428743874387" GC="FBF9D886738773878C" [Host Extender Info] &am  *\G{000204EF-0000-0000-C000-00K[0000000046}#4.0#9#C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\VBE6.DLL#Visual Basic For Applications*\G{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}#9.0#0#C:\Program Files\Microsoft Office\Office\MSACC9.OLB#Microsoft Access 9.0 Object Library*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\stdole2.tlb#OLE Automation*\G{00025E01-0000-0000-C000-000000000046}#5.0#0#C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll#Microsoft DAO 3.6 Object LibraryZ*\G{0002E157-0000-0000-C000-000000000046}#5.3#0#C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB#Microsoft Visual Basic for Applications Extensibility 5.3 JiF h8XHJBZEFTXIQHUDNYYYZFJJGHTKCC0346a8cea7basLinkedTablesb+8SWUELJIGRNFAQDZFDCZIFAZODGIE0446a8cea7basCommonFile`5(8GKZMFUNAVWJFYDOVXGQMBQRDQOFJ0246a8cea7basAutoExecf00 8OZFLAAMHQJWYWDXBRTHPNUWONOBE0146a8cea7Form_splash0HKh0H(!d@s :N\]#jıHjwBdνWBBbG Access VBAWin16~Win32MacVBA6# paml1stdole` DAO VBIDEA basLinkedTablesd _Evaluate (CheckLinkZstrTablervarRet CurrentDbS TableDefs%iFields7Erro(GetDBDir GetDBDirErr dbCurrent= strDbName strProcNameƣRight UCase5  GetDBDirDoneMsgBoxRNumber- Description vbOKOnly vbCritical+}(adhVerifyLinksstrDataDatabase6strSampleTableadhVerifyLinksErrd varReturn`DstrDBDir#strMsgG&DB\ varFileNametdfTableDefmintI\ intNumTablesIX strFilterӥlngFlags adhVerifyLinksDonemChrK~(adhAddFilterItem(adhOFN_HIDEREADONLYXO(adhOFN_NOCHANGEDIR(adhCommonFileOpenSaveOpenFileFilter;Flagso DialogTitle߄IsNull (adhTrimNullCount0vSysCmdGacSysCmdInitMeterm!Connect\ RefreshLinkntacSysCmdUpdateMeter acSysCmdRemoveMeter basCommonFile(!tagOPENFILENAMEy lStructSize/r hWndOwner hInstance strCustomFilterژnMaxCustFilter` NFilterIndexcstrFile XnMaxFile strFileTitle nMaxFileTitleym strInitialDir/(strTitle nFileOffsetInFileExtenK[sion9 strDefExtHA lCustData'5lpfnHooklpTemplateNamet(adh_apiGetOpenFileNameHofn) comdlg32.dll?(adh_apiGetSaveFileName(CommDlgExtendedErrors(adhOFN_READONLY(adhOFN_OVERWRITEPROMPT(adhOFN_SHOWHELPی(adhOFN_NOVALIDATE(adhOFN_ALLOWMULTISELECTJ(adhOFN_EXTENSIONDIFFERENTf4(adhOFN_PATHMUSTEXISTV(adhOFN_FILEMUSTEXISTF(adhOFN_CREATEPROMPT(adhOFN_SHAREAWAREi(adhOFN_NOREADONLYRETURN2(adhOFN_NOTESTFILECREATE;(adhOFN_NONETWORKBUTTON(adhOFN_NOLONGNAMES.W(adhOFN_EXPLORERz(adhOFN_NODEREFERENCELINKSX(adhOFN_LONGNAMES InitialDir1 FilterIndex˟ DefaultExtyFileNamej strFilenameefResult IsMissing Application* hWndAccessAppstrDescriptiondvarItem vbNullCharYstrItemintPosr basAutoExecH(AutoExec AutoExecErru AutoExecDone1DoCmdƧ Hourglassb Form_splashg Form_Open-CanceltempRendsub: ExitAccessis RunCommand` acCmdExitCommand1_ClickVrst RecordsetrstCodesqryNew{)QueryDeftblNew[fldNewField3TextLinestrSQLF strCriteriaI ClinicCode[ClinicIDăTestCode%TestNameTypeTest< TestResultCollectionDate AmendedResult cnt_records?cnt_totrecords cnt_personsd cnt_filesSTempFileV cnt_tableswp cnt_amendedu strInputFilePatID^ LastName FirstName ResultComment3dobresponseDOSTempҍCreateTableDefj CreateFielddbText dbDate= OpenRecordset| FileSearchD NewSearchfLookInPSearchSubFoldersExecuteY FoundFilesConvertUnixFileEOFParseBOFy MoveFirstNraw_codeK=IsDate2AddNewa clinic_code- chart_numberS IsNumeric$*resultur service_date status_flag IsEmpty  last_name first_name?amendedwUpdatetxtCntRepaintKillRefreshCreateQueryDefzNvbLfT%RecordsAffectedP vbInformationninstringYsectionG component"cnt+position position2jUnixFilerDOSFileEndValue& StartValue9 OutPutTxtFormDetail2Label0,Command1Label2,Click _B_var_Chr\;ItemzbLfzyx  H@@x@ H)H 38 Access (*.mdb) ,,LL, $,0<Hadh_apiGetOpenFileName comdlg32.dll GetOpenFileNameA 0adh_apiGetSaveFileName GetSaveFileNameA PCommGKZMFUNAVWJFYDOVXGQMBQRDQOFJ:-OOZFLAAMHQJWYWDXBRTHPNUWONOBE:6VhSWUELJIGRNFAQDZFDCZIFAZODGIE:l6XHJBZEFTXIQHUDNYYYZFJJGHTKCC:(9(* hfxME,6 K[LLL <0<4<8<<< `o --`\ %`@@ 8@xX@l NDh@ystPWbe>v":<4m@X mo@xT xi@D LL@4 Pr@$ s\@` QT@ \P@ es8%on @ e\@ @  @ @ @ @ h`JiF $*\Rffff*0246a8cea7*\R0*#14*\R0*#1*\R0*#19*\R0*#1a*\R0*#13*\R1*#25*\R1*#98*\R1*#99*\R1*#16$*\Rffff*0346a8cea75  * ,8 ,h 2 B    *  ,P ,       < X ` $'h      $   (J}0  $ From Access 97 Developer's HandbookHandbo% by Litwin, Getz and Gilbert. (Sybex)(Syb% Copyright 1997. All Rights Reserved.)Use database order for string comparisons`  Purpose: Do all startup duties$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In: None Out: Return value: none History:5 Created 09/14/94 pel; Last Modified 12/20/95 pel]@ cdem_dta.mdbtblLab$>' varRet = adhInitAutoNum()'d8'k(  $v' B@z "S Error# "!6:  "!8 : < AutoExecA@4nxpih`Attribute VB_Name = "basAutoExec" ' From Access 97 Developer's HandbookLby Litwin, Getz 4 Gilbert. (Sybex)NCopyright 1997. All Rs Res@erved.' Option Compare Datae 'Use dorder for sng cA1isonsEExplicit FuncZ%t(L , ' Purpose: Do aRstartup dutie-F  DIn ^None Out Return value: nH HistoryJ Created 09/14/94 pel; Last @Modifi12/20/95ZA&On ErrgGoTo ]QDim r@# As Varia&nBjAva= adhVerifyLinks("cdem_dta.mdb", "tblLab"rIfThen@'IInitA$NumA)ĈTruOElsD FaFEnd If6D@UQBuNex9$SysCmd(acRemoveMeter5A Do.Hourgla@Y0CDx?2Txy7P)>Dx?2T h3oEmzB$MEL @SLS S L LX  R 6LLL `@" :<4`D(`F`H`J`L `NX`P`R,n ` X ##>ixiii  ``` j` ` aiii  ` ```H %  % %@x`h@@d @ ` @\ @X  @T @8P @L @PH @D @4 @$ @ @ @  `4    xTXJiF $*\Rffff*0146a8cea7*\R3*#2e*\R3*#24*\R3*#2f*\R3*#26*\R3*#29*\R0*#14*\R0*#1*\R1*#25*\R1*#98*\R1*#99*\R1*#20*\R0*#19*\R0*#1a*\R0*#13$*\Rffff*0246a8cea7v48x<p@tDrHK["   0 PX ` px    Bx  & 8" @ :H 0 4  P ,H Jx  6 P &X     B@ $H px% J%  8@H*P   %>.*@ *p R::8  *x < : ,(Xh$p  * $ @0 H $P $x   $ $ 00 0` * .     *( PX    4     ( 8 .P  B " ,(  *X    T TTX $ :T  p TN  HTXT*  @ LX R ' & @0 p  0    \x        (8@P  X hx   0H P` hX  (%'\'8  @P Xh  p  0 (        ( H$X$   4   &( @P L ,  8B  h     @,      &( BP ,   B(R  Z & pP@(  B   F B B( Bp  ( 2! 4H! ! ,!  K[!2!0!  (("P"X" `"p"2""  &""" "#Z#x# ##B  # L# B# 0$8$@$H$ P$`$ p$ $$$ $ $ $ $ % % (%@% H%P% X% h% x%%*xpruns link codendboOn Error GoTo ExitAccess a]`]x$' " KT  B@ ' quits accessSH Error# "!6:  "!8 : < ,A@4n jumps around quittng accesso4Program loaded into same directory as "cdem_dta.mdb")Works with QUEST data file in HL7 format.-QUEST files downloaded with Lightning programIPut downloaded files into subfolder under CDEMS eg.,"c:\cdems\lab_files\"&each file can contain multiple recordsDProgram counts of OBX records equals number of results in input file/Measurement set is labs being tracked by CDEMS:Ithey will each have an entry in the setup table and in LabCrosswalk table On Error GoTo Err_Command1_ClickWx]]]]0]P]p]Dim varItem As Variant]]]]#3the clinic_code field put into the CDEMS lab record]Dim LocationCode As String '?] ]8]P]h]]]]]];End-Of-Line Unix chr(10) to MS chr(13) & chr(10) conversion](]Xpatient identifiers]p]]]"if result is simply comment]]]S*$\'  .L'6'8':/counts PID records (duplicate persons possible)'< to move through the found tables'@to assign the new table name#===================================DOSTemp'R<temp file converted from UNIX to DOS format and later killedunk'&'clinic_code put on each appended recordSEA'('QUEST 1st three characters of all files#===================================5Creates an output table name (eg., "tblLabs050501_1")3these need to be manually erased or they accumulatetblLabs Z_ @$a @ '@xtblLabs Z_ @'D#=================================== Create a new TableDef object.: Create fields and append them to the new TableDef object. D L%T.  clinic_code X7V5 B@ chart_number X7V5 B@raw_code X7V5 B@result X7V5 B@ service_date Z7V5 B@ status_flag X7V5 B@ last_name X7V5 B@<optional first_name X7V5 B@<optionaldob Z7V5 B@<optionalamended X7V5 B@<optionalq  L!B@ D L%\.#===================================Jsearches for new downloaded labcorps lab files in CDEMS directory or below !^C@`*.hl79..FileName = ClinicID & "*.*" 'eg.rs112233.365$$9b9dC@f7f <5h!t(MsgBox " found cnt " & .FoundFiles.Count <7h R$j'P<************************************************************the file parsing routine: R# Open f K[ile.$lb" Loop until end of file. # Read line into variable. $PIDKT  $n $n $n  $'F  $n $n $n  $'H  $n $n $n  $'Jcnt_persons = cnt_persons + 13MsgBox "Name: " & PatID & " " & LastName & Chr$(10)  $n $n $n  $'Ndob in yyyymmdd formatOBRKT  $n $n $n  $'2 4 2$/ 2$/ 2$'2OBXKT  $n $n $n  $',  $n $n $n  $'0   $n $'4k--------------Eruns match program to return the CDEMS raw code from the lab raw code dlk-amended tlkpC* ,*',44dlk-amended -- optional for multiple Quest lab codes'" " L%\. !p !lA"is this lab raw_code in Crosswalk? B@r "t'.)MsgBox "good record " & rstCodes!raw_codedh na'.kP .na 2$v 4$0C B 'B2HMsgBox "result/amended result field " & TestResult & "/" & AmendedResultk B@x & )z =========== F F )|dP blank )|k0  =========== 0$~ 0 )d UTP )k . )t 2 )c ) =========== H$ Hmissing )dP H )k8  =========== J$ Jmissing )d J )k  =========== N$ N 1/11/1111 )Ndp $ N$/ N$/ N$X )Nk 4$ 4F )d 4 )k =========== B@ 6 '63lab results tracked reportedkH 8 '84total labs reportedSn 8' B@V Close file. RA@ <steps through filesdThere were no files found.A@4k`qX L!B@ 6)there were no labs being tracked returnedA@4|k===============================:data now in me.tblLabsXX/xx/xx_x - but has no clinic codesEthis section fills in clinic code and chart number using lastname&dob========[tblLabs Z_ @]'D  UPDATE tblDemo INNER JOIN D ON (tblDemo.dob =  D.dob) AND (tblDemo.last_name =  D.last_name) SET  D).chart_number = [tblDemo].[chart_number], D'.clinic_code = [tblDemo].[clinic_code]  WHERE ((( D.clinic_code)='unk'));'" " L%. B@f L!B@:matches on chart_number only those records still unmatched[tblLabs Z_ @]'D  UPDATE D INNER JOIN tblDemo ON  D'.[chart_number] = tblDemo.chart_number SET  D).[clinic_code] = [tblDemo].[clinic_code]  WHERE ((( D.[clinic_code]) = 'unk'));'" " L%. B@f===============================<data now in me.tblLab - need to append to tblLab of dta file[tblLabs Z_ @ K[];'D 9INSERT INTO tblLab (clinic_code, chart_number, raw_code, 7result, service_date, status_flag) SELECT clinic_code, @chart_number, raw_code, result, service_date, status_flag FROM  D'" " L%. B@f<************************************************************+1Files opened: !^!h!t $^ $^&Total patient records in input file:  : $ ^)Number of lab results reported:  8 $^ $^"Labs reported in measurement set:  6 (Records appended to CDEMS lab table  ! A@4 B ko@Steps through a string input looking for character "|" (Chr$124);when the count of Chr$(124) characters found equals section;Start looking from that point on for character "^" Chr$(94);When the count of Chr$94) characters found equals componentreturn the positionInput! instring = the string to parse+ section = the number of Chr(124) to find- component = the number of Chr$(94) to find&Returns the column position as variant]]#holds col for desired nth Chr$(124)]"holds col for desired nth Chr$(94)"find the column of the desired "|"''  a  '  $|$^G  'jxfind the col of the desired "^" ''  a  '  $^$^  $|$ ^G  'j 'ni Floops thru the unix file and finds EOL prints this section to new line<in file DOSfile- results in file with chr(13) & chr(10) EOLs]]]]  $la   $^'' a    $'   '  $'   $^'kVVok'ji] dlk-amended]$ dlk-amended'B dlk-amended!=========== dlk-amended sectionTthis section prints if any amended records returned to clinic - dlk-amended section0SELECT tlkpCrosswalk.raw_code FROM tlkpCrosswalk' WHERE (((tlkpCrosswalk.lab_code) like ' ,'));'" strSQL = "SELECT tlkpCrosswalk.raw_code FROM tlkpCrosswalk" ' & " WHERE (((tlkpCrosswalk.lab_code)=" & "'" & TestName & "'" & "));"& 4$0C B 'B4HMsgBox "result/amended result field " & TestResult & "/" & AmendedResult*$  $(,0An exception has occurred. Raw data file contained  B updated results. These are in the temp tblLabs Z_ @ temp table. 5Amended labs must be added manually to CDEMS tblLabs. 3Open the indicated temp lab table and search for an @amended result not equal to 'F'. Note chart #, lab code & result 'to make the change manually in tblLabs. ,Call the CDEMS Technical Support Specialist  +if you have questions about how to do this. +@ 1-800-478-3563 (WA only) or 360-387-2928.A@4(vAttribute VB_Name = "Form_splash" Bas0{BC95C07C-179E-11D5-88B3-00AA002AB2F7} |@GlobalSpacFalse dCreataDblTru Predecla Id"Expose_Tem܀teDerivCustomizD$Option Comp@ D3T  !Eq$mp(Gw]-Of-%Unix chr(10) VK3)euconv  07}Da -IQJ S'p#KidPifi1Pat'La$st# FiDaIABoole@O 'if/s0ZSsiyPYmT dobw7g`YpO&@&D 0` Then  BF?cnt_G= 1 To .Found5s.Ct 'MsgBox "[ 5& B ponse@*ConvertUnix ((f), D@OSTemp'*6Cthe? parsing routinez: CfQ a"Q As #1X ' A$.Do Wh@J Not EOF(1)C' 8p u ntil AofWL #1, B' RPead EeUto variAkSelX Ca@+ Left(, ~3Ee"8PIDUPatU= Midh P)e2, T+ (m3b- s-LDf[5X`2) OcUFe, 6ct'`p z`e@e 3fq}:p6(& Chr$(10[-b -7-8c-n(q'lZymmdd!]maG+OBRUVCol1x1q + w4 :, /9+{ $/"a`0,ai >, 2_" Xq Test?/0.<>xt#>g60%@1) R3F/7c O3_(1AmYedY,~K1@N%1 '-  runs ,ch program p]return 1j3raw cod krok~ U A8"} &`dp#1'dlk- --& 5 miple Qup !sqSQL"SELECT tlkpCrosswalk. B_ FROM" _ WHERE ((()=13"'Q"));.1   ! { 1  }k~ebZO O sS?  Cp DB.@+p.BOF AJbis*@ߐ )A%? Mov qpType%%!E$pgood @0Œq3xElsųG"na%@Ifo @<> BIsa\({_)rH=U!`(N)1;C"[#cPUC=_ f/஠bU:nesult End If Trst.AddNew>![clinic_code] = CfC 3'=!If Len(PatID) > 0 Then+hart_nupmberCElse&"bla8nk"'vIsNumeric(TestR)!z~rwQ<"8UTP:grawƇTypeA+ service_datollectionD@tatus_fldagE"cT1deEmpty(LastName) OVr=l@_n%missingXj#SEY~ qIs Fi9 ( @fa t[ ?!# ?!(!dob&Ab#`?1/1A11/@I Ca(Mid(` , 5, 2) & "/"7_s# &\ft 4))* 3, dlk-`bnded s{/UCase0(Ame= "C"ؤcnt_ = + 1'MsgB K[ox "#/e field a)+J`JLL$?O"t 'F_'"6 mz_8q . 0 ThenA DAn excepA ha`Eccurred.c- aw ; contai2 @: uptd8 ws4 `se are3the tempądᐴ A$(@4s mus(t b d*manually8+T Oh in^d!h0A?a@si < 8s(e$\0t eq@'F'. Notec #,Kcq# mak'@(pnge &{C!b!Tech{SupAp Speciali(@if you@Hv@e quesJs about hSdo@ i@@ 1-800-478-3563 (WA only) or 360-387-292D8.` E-IfY aSub!PrivFuncZParse(ining As StlgɃ#@IntegacomponႧ)Variant3'Steps rough a|Olook 1 !ga?r "|" (O124$'w8P2WO(s$Y3"Bt romat popD(H^"R$(96W?hr$}R*sP?44SIr posiQ2QF=!p1wDL 6ちa fP8g:5;8RU1lumn# PvI#DimaU!!D#w 'holqcoldesiU nth %29/+'q@! p%o(o01 = 4Do Until=%jns+ hMid7,, 1?1qiT1 FLo|opS !j ^rA V2   &$ 2 //on284Or 3hPBs2{ rN2cQuP QConvertUnix(!'QDOS' K'`FSOu%urndn`.EOL5z;n{@Ӡ'hPq-'%!wi1ch`&HsA^2TextL' q`Valueq:StROutPutTdxt F`hMA#`.`0%EOF(1$_ S#1, E 3' = In(,Bq &=57nd= 0,8۠.1w=) ,, (-;d`wP#+6A 4a,2OeM s # 4cClo *ConvertUnixFile = "ok" End Function leDef object. D L%T.  clinic_code X7V5 B@ chart_number X7V5 B@raw_code X7V5 B@result X7V5 B@ service_date Z7V5 B@ status_flag X7V5 B@ last_name X7V5 B@<optional first_name X7V5 B@<optionaldob Z7V5 B@<optionalamended  zV /(h`|LnK[GetOpenFileNameA<GetSaveFileNameAz adbe(. CommDlgExtendedErrorrokxRRLLMEP(@6 < < h0ere hH is h`hXx hxht dihNhser h singh$$h ((e 'h8,,t behP00 hlh44 theh88"h::n yoh<<h@@hDD!hHHthis+`p8  )X scrA%+(p ( )'A%+PpP ʘbBʘXBʘBʘ8BʘB ʘ` B ʘB ʘHCʘCʘC%+fx`  ^^7il 0i Pij pi i i in ih  (%``` +`` iXii +r` Xi`hʘBʘBʘd0BʘBʘBʘ@B ʘ C ʘpCʘ C(` p0X`x8H` ( JiF $*\Rffff*0446a8cea7(*\Rffff*0446a8cea7\0  * ,8 ,h   (08@HPX H`HpH            ( 8 HXhx BL*  <K[ 8( $`  * , ,   ( F8 : : 0 >0 <p F , >( ,h :  < (08@ (Hp  68"p >     (  0 @  H X ` h p 8x       8 :8 x      : : .P  6 : 4 :8 x       B . B( :p 8  * ,  ,P   , 4   *0 `,  B   <  * ,8 ,h   :  > @ H Xh   $ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)inks% Copyright 1997. All Rights Reserved.XP^^0^H^`^x^^^^^^^ ^8^P^h^^^^^p`]$ ]$]$]$]$0]$X]$]$]$8]$]$ ]$@`]$]$]$ ]$H]$]$p]$   !'-6 This is the entry point you'll use to call the common1 file open/save dialog. The parameters are listed below, and all are optional.$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In:@ Flags: one or more of the adhOFN_* constants, OR'd together.4 InitialDir: the directory in which to first look4 Filter: a set of file filters, set up by calling) AddFilterItem. See examples.8 FilterIndex: 1-based integer indicating which filter5 set to use, by default (1 if unspecified)? DefaultExt: Extension to use if the user doesn't enter one.& Only useful on file saves.7 FileName: Default value for the file name text box.& DialogTitle: Title for the dialog.3 OpenFile: Boolean(True=Open File/False=Save As) Out:6 Return Value: Either Null or the selected filename]]0]H]`! Give the dialog a caption title. $G'j j$G'jj $G'j l$G'lj $G'j $G'j n$G'nj h$G'hj0 Allocate string space for the returned strings. $\$'$\'7 Set up the data structure before you call the function  K[9 !9 j9X 9 9 9 9 9 n9 l9l 9 L91 Didn't think most people would want to deal with these options.9$\999q1 This will pass the desired data structure to the3 Windows API, which will in turn it uses to display the Open/Save As Dialog. h $'dH $'k04 The function call filled in the strFileTitle member4 of the structure. You'll have to write special code' to retrieve that if you're interested. 0 You might care to check the Flags member of the4 structure to get information about the chosen file.. In this example, if you bothered to pass in a4 value for Flags, we'll fill it in with the outgoing Flags value. l$G !l'lj !$r'fd0'fk ix' Tack a new chunk onto the file filter.< That is, take the old value, stick onto it the description,3 (like "Databases"), a null character, the skeleton1 (like "*.mdb;*.mda") and a final null character.$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In:& strFilter: existing file filter- strDescription: new filter description varItem: new filter Out:$ Return value: new file filter $G*.*'j X    '`iH5 Trims the Null from a string returned by an API call$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In:4 strItem: string that contains null terminator Out:8 Return value: same string without null terminator]x  '    $'rdx 'rkhi`XAttribute VB_Name = "basCommonFi@le" ' From Access 97 Developer's HandbookLby Litwin, Getz 4 Gilbert. (@Sybex)NCopyright 1997. All Rs Reserved.' Option pare PDataeExplicit Type tagOPENFILENAME  lStructSize A@s LonghWndOwner Instancэstrt*i$ CustomnMaxCN IndexD8C7'PeTitl InitialDiBCM7Flags,OffsetAIntegerD\Extensvc!Def lOAH.`lpfnH@TemplateEEnd AADeclFuncšadh_apbiOpe+Lib "comdlg32.dll" _@4Alias "L A" (Xofn$ )Boolean Savew#I C6lmDlgb3dedErrory (0 Pu.b@p@tf 'OFN_READONDLY&H1sOVERWRITE@PROMPTB2SHIDEJ 4NOCHANGE(DIR 8SH@OWHELPb10u VALIDA TEALLOWMULTISE(LEC0EXTENSIONDIFF`N4PATHMUSTEXISC8UAK10uC) /VSHAW TNO>RET8URNTE|ST!NETWORKBUhTTO 2LONGAS" TEXPL`DFY P6CELINK# bT k  ݡnoy("Cal ByRef Variant,V@ 9@_nBSViç0[aultt[JYhogVgZUt2Jq^a' This  the entry point you'0uso ca!^k' f PHn/sY d .90e Љs dlistedurbw,oralP "' d$In: ': one 0aDmoof !adh_* cots, OR'd toger% q):directo`in w0hich`prst l2Q'A(: a Q@A,BupAVG1Add-tem. Se@ xa0esY D: 1-d P"Apdicat #q to 0%,q defa2 (1 if unspecifie !>spa-r2( &50e#= LefLt(B & "(256, 0), 4.tS%=7 S@NQ9datPJtQuXbe ealkfͳWp2/a.lSStructSize = Len(ofn) .hWndOwnerxApplication\Access*^strFilt^ 8N"Inde>xAKenamenMax9$ TitlJK(Dialog&Flagsk (DefExtÀ ault Init*DiHCur ' Didn't think most peopmwould wano deal withth@ese ops. .hInsthancAH0@,CustomCh-ing(255, 0IEAc F HlpfnHookEnd W( ' This,ll pass8e1sired `data @#u`re toA Windows API, whichCin turn it useEisplayED Open/Save As@WgtFCIf4e@'enCfReso3adh_a`piGetA NElsA3@HIfGe funco caaIfill@G:heGAmember,' ofSFP. You'@h>Swrit pecO codD'a-retrie $that if y0in{`ested)&%T h &'! mig ht`c8checkCfcg-'+?ge`nformA" aboube chosen "e$ ' ICAaKexam@e,D bo@K BN)avalu`.or Ke&.JAl"`go@cJNot IsMissi)L J. MCommon'D,dTs, tak` co 0,@Ii` A dg,c ' (li@"Dba`p"), @,a8rac nke0letoD&*.mdb;a")T a yan@nFrom A 97 Dnloper's H b@Eby Litwin, "z Gil~t. (Sybexd@' Copyrbo1997. A@Rs erveAx3'In:4v: exist+1r~:`1]5!; #OutRe]R66$66"*.*" 2- &-0-& vbA4CharXcx /6] =ByV@#u26o2pNA`nP) f$bs@\pbp#anro2dV'e''r 'd ''l~ ' @['1:` hc8 0 r'LeftD- 1^#+ &]Q'S 0t eq@'F'. Notec #,Kcq# mak'@(pnge &{C!b!Tech{SupAp Speciali(@if you@Hv@e quesJs about hSdo@ i@@ 1-800-478-3563 (WA only) or 360-387-292D8.` E-IfY aSub!PrivFuncZParse(ining As StlgɃ#@IntegacomponႧ)Variant3'Steps rough a|Olook 1 !ga?r "|" (O124$'w8P2WO(s$Y3"Bt romat popD(H^"R$(96W?hr$}R*sP?44SIr posiQ2QF=!p1wDL 6ちa fP8 +hbxMEL@(LX R> LLLLLLL `oHzzXi@ hiB`Fh `Hd`J` L\%`NL  QH %`TF`VD`,@`X<`Z8Xx%hpX(@H@`>z$~K[^:<4`@( @0 @h @H @` @x @ @ @ @ @ @  bdfprxv@8t @Pd @hT @D @@ @> @8 V@4O 0V "~@0 (Xh@, @s@( @$ @  @ h@``xh`z h1hh1" @d @` @0P @L @HH @8 h@4 h1@0 @ Ȝ@ 0JiF $*\Rffff*0346a8cea7*\R3*#24*\R3*#26*\R3*#2a*\R3*#28*\R3*#25*\R0*#19*\R0*#1a*\R3*#27*\R1*#16*\R3*#1f*\R1*#98*\R1*#99*\R0*#13$*\Rffff*0446a8cea7*\R0*#14*\R0*#1:*\G{000204EF-0000-0000-C000-000000000046}#4.0#9#..\..\..\..\..\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL#Visual Basic For Applications*#f*\R0*#11   * ,8 ,h 2  B    0 (( P *X , ,   $ ( <8 x <   8 : kP $p  B    > 8 8 *@ ,p ,     > H <X         ( 8@H PX`Bh  B  8 @  >`  * , , 8 @ :P <  >  <0 p x            ,   ( 0 8 @  @H  ' 0   6 F8 g b Op  B-  6-H   ) @ ,  2'( ` (V: K[   L )X p x   6 !.)  0 :P 4      20 (h   $ $  *  ( 08$@PX `hpBxx $ From Access 97 Developer's Handbook000% by Litwin, Getz and Gilbert. (Sybex)1\% Copyright 1997. All Rights Reserved.)Use database order for string comparisons  Purpose:) Checks the Link for the named table.! Based on code from Ken Getz.$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In: strTable - table to check Out:6 Return Value - True if successful; False otherwise History:6 Created 09/13/94 pel; Last Modified 07/10/96 pel]`(2 Check for failure. If can't determine the name of4 the first field in the table, the link must be bad.  %% !' "'dp'k`iXx Purpose:7 Gets the directory of the currently open database.2 Based on code originally from Mike Gunderloy.$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In: None Out:8 Return Value - The name of the directory as a string History:6 Created 09/13/94 pel; Last Modified 12/20/95 pel&`]]]GetDBDir', .( (!'* *$ .\b * * $ '* *$ 0'$2z& "S Error# "!6:  "!8 : < ,A@42Hn@i8 Purpose:1 Check status of Links and relinks if broken.9 If broken, first try the current database directory.7 If that fails, present user with file open dialog.$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In:4 strDataDatabase - Name of backend data database6 strSampleTable - Name of a linked table to check Out:7 Return Value - True if successful; False otherwise History:6 Created 09/13/94 pel; Last Modified 12/20/95 pelD]]]]]]](]@]X]p]adhVerifyLinks',% Verify Links using one sample table. B$'F F'>\k9 Get name of folder where application database is located$$'H H @$ ~* Data database found in current directory. H @'Nd0 Let user find data database using common dialog The required file ' @' could not be found.'J J! You can use the next dialog box "to locate the file on your system. $^ $^ $^'J J! If you cannot find this file or #are unsure what to do choose CANCEL'J J! at the next screen and call the 4local database administrator, or program developer:  $^ $^'K[J J( Washington State Department of Health $^'J J Diabetes Control Program $^'J J (360) 236-3738'J J : < ,A@49 Display Open File dialog using the adhCommonFileOpenSave% function in the basCommonfile module XAccess (*.mdb)*.mdb$`'X b b d'Z   h Xj ZlLocate Data database filen$f'N N$p  User pressed Cancel. -You can't run database until you can locate ' @'.'J J : < ,A@4'>\dx N$r'Nk`kX0Rebuild Links. Check for number of tables first. .L L!!t'V xRelinking tables V$v'F Loop through all tables.4 Reattach those with nonzero-length Connect strings.'T P L!- If connect is blank, its not an Linked table P!z T 'T ;DATABASE= N P(z + The RefreshLink might fail if the new path ! isn't OK. So trap errors inline.h PB@| If one link bad, return False "'>\kk ~ T $v'F P'>\  $v'F z D "S  Error# "!6:  "!8 : < ,A@4n8 \0 i( |Attribute VB_Name = "basLinkedTables" ' From Access 97 Developer's Han dbookLby Litwin,@ Getz 4 Gilbert. (Sybex)NCopyright 1997.@ All Rs Reserved.' Option Compare Datae 'Use dorder for sng c1isons GExp licitPub Func1heck}(!~ As S')Boolean > ' Purpose: C$s the,nkKnd Y`len' @Based sc ode fKen/FÃ, c E"In 0 Theı !_.E/#g5dnd@)E eikDBDir(bijcSiidirec?($c ly n&ko inal@blMike Gun loy?m0#' ?mc?mE=C+mNonfajN"&G(as a/jj12/2j5jfGoT~o"?OCnd~bdXAo DbҦProc  O@AcSe tiF= di#Do While$ao!#, 1)l"\= LeftLen)1`Loop%&s@tUC( DCd00Exit ttSel6 QOsAMsgBox "or#" &.Num~": 5Descri|, _ vbOKOn9+Critical,)XG3 Hk~adhVerifyO2S''(I @Samples Integer%L13bstatusKbreA^s pobrokeNnKZS, bt-`9)TATVy/c>m DBQwFQmp tdfintI5A1EsPF_ ?4  ln gFlagLonge9d]s ' Ds6iPX sC5G g@_HF\q@0abw;qa RI @U folwhe4apais locp~{pY(P  (3kb&&1^##3s")'"߶<{ OAP'=߂?Q k'yTRfi AusmdbSCa`q2" requu0dsV'pqK&)p"'@unot @fo.`&&uYouwa]an0\ nbyx w"pٳ t׵he file on your system." & Chr(10)$3) strMsg = & " If cannotnd thisrB& _ "are unsuwhat to do choose CANpCEL"r4next screen avcalJl{erlo @databa2a dminiaator, or program developer>:"c WashingtState Department of Health(Diabetes Control PU!(36236`-3738VrBoxs, vbOKOnly +Criti@M,cName +' Display Op`Fdialog us@BbadhCo0mmon Sav@œ' functi@Kin g ©modul c"@terAddI(g, "Access (*.mdXb)"@B"HlngFlagsOFN_HIDEREADONLYx Or K[NOCHANGEDIRKMvar@%eRCOG1@JM :=True, "C:= 0g+ 1G ";DATABAxSE=(Ik'+f 9h! m(igh0|a06ife new pathisn9OK. So trap errors in e 1On Esume N{yq Re@3 " bad, r%7 <o;o;;s;A 7O 00Up e0.! P%w^ o` :Oxt/ & Remo>v# f1Exit F{_DSelq6CaPOX"0or#+.F!J& "1De ipA?l%c Re32) Ye,D bo@K BN)avalu`.or Ke&.JAl"`go@cJNot IsMissi)L J. MCommon'\k9 Ge application database is located$$'ͬ|*Detaild Label0h Command1d Label2mtxtCnt0 Let user dhmdhdmile ' @' could not be found.'J J!splashdialog box "to locate the file on yo 0CB0$^ $^ $^'J ou cannot find this file or #are unsure what BlobDeltaBDirDataK[PropDataCmdbarspvApvAModules)#pvApvA0"pvApvAPropData 1!%$pvApvAPropData 2'&pvApvAPropData DirDatad D "S  Error# "!"!8 : < ,A@4n8 \0 basAutoExecbasCommonFile"basLinkedTablesr's Han dbookLby Litwin,@ ijbex)NCopyright 1997.@ All Rs ReserveMSysDbe Datae 'Use dorder for sng c1isons GExp licitPub Func1heck}(!~ As S')Boolean > ' Purpose: C$s the,nkKnd Y`len' @BaReportspvApvAScripts(+pvApvAPropDataDatabases*/,pvApvA0.-pvApvABlob DirDataCustomGroups0pvApvADataAccessPages pvApvARoot Entry l3VBApvAlVBAProjectpvAlVBA pvAlLVAL+hDH*~ H* ?%~ H*~ ~ @&~  d~ ~ ~ 0~ H~ `~ h~ p~ ~ ~ ~ ~ ~ ~ ~ ~ (~ 0~ H~ X~ p~ ~ ~ ~ ~ d~ ~ ~ 0~ H~ `~ h~ p~ ~ ~ ~ ~ ~ ~ ~ ~ (~ 0~ H~ X~ p~ ~ ~ ~ ~ d~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ d~ ~ ~ 0~ H~ `~ h~ p~ ~ ~ ~ ~ ~ ~ ~ ~ (~ 0~ H~ X~ p~ ~ ~ ~ ~   d  d  d  d     d  d   d   d   d            d  d      d  d  ȅ Patient_ID tblDemoclinic_codechart_numberlast_namefirst_namedobsexethnicityprimary_languageaddress1address2city statezip phone1 phone2pcpinsurance _datestart_dateend_datelast_update_date migranthomeless other ~ ~  ~ P ~  ~ $@~ ~ :g_@K@H ~ S_ ` ~ S_ x ~ S_  ~ S_  ~ S_  ~ S_  ~ S_  ~ S_  ~ S_  ~ S_ 0 ~ S_ H ~ S_ X ~ S_ h ~ S_ p ~ S_  ~ S_  ~ S_  ~ S_  ~ S_  ~ S_  ~ S_  ~ S_  ~ S_ ( ~ S_ @ ~ S_Patient_IDclinic_codechart_numberlast_namefirst_namedobsexethnicityprimary_languageaddress1address2city statezip phone1 phone2pcpinsurance _datestart_dateend_datelast_update_date migranthomeless otherC:\Documents and Settings\JACKIE\_CDEMS\CDEMS DB Files\Test Area\cdem_dta_2k.mdb tblDemo tblDemo 0~ H~  P~ h~  p~ ~  ~ ~  ~ ~  ~ ~  ~ ~  ~ ~  ~ @~  H~ `~  h~ ~  ~ ~  ~ ~  ~ ~  ~ ~  ~ ~  ~ ~  ~ ~  (~ 8~  @~ X~  `~ x~  ~ ~  ~ ~  ~ ~  ~ ~ Patient_ID0~ clinic_codeP~ chart_numberp~ last_name~ first_name~ dob~ sex~ ethnicity~ primary_language~ address1H~ address2h~ city~ state~ zip~ phone1~ phone2~ pcp~ insurance~ _date(~ start_date@~ end_date`~ last_update_date~ migrant~ homeless~ other~  ~ X'~  ~  ~ 8~ ~ ~ p~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ h~ X*~ "~ #~ @~ `H~ @~  H~ @~  H~ @~  H~ @~  ~ @~  H~ @~  H~ @~  H~ @LVAL~  H~ @~  H~ @~  H~ @~  H~ @~  H~ @~  H~ @~  H~ @~  H~ @~  H~ @~  ~ @~  ~ @~  ~ @~  ~ @~  H~ @~  H~ @~  H~ @~  ~ z  H$~ $~ )~ %~ S_~ ~ ~ X~ 8~ h~ p~ x~ ~ ~ ~ ~ ~ ~ P~ ~ ~ ~ ~ ~ ~ ~ 0~ ~ h~  ~ ~  ~ ~ ( ~ ~ 8 ~ H~ H ~ ~ X ~ ~ h ~ ~ x ~ (~ ~ `~ ~ ~ ~ ~ ~ ~ ~ ~  d~  d8~  dp~  d~ ~  ~  dP~  d~  d~  d~  d0~  h~  ~  ~  ~  dH~  d~ ~ ~ (~ `~  d~  d~  ȃ~ dx#~ #~ #~ #~ #~ #~ #~ #~ #~ #~ #~ #~ #~ #~ #~ #~ #~ $~ $~ $~ $~ $~ ($~ 0$~ 8$~ ~ ~ 8~ p~ ~ ~ ~ P~ ~ ~ ~ 0~ h~ ~ ~ ~ H~ ~ ~ ~ (~ `~ ~ ~ ~ @~ C:\Documents and Settings\JACKIE\_CDEMS\CDEMS DB Files\Test Area\cdem_dta_2k.mdb tblDemo dP%~ h%~  d%~  d%~ PrimaryKeyPatient_IDclinic_codechart_number%~ ~ v )~ (~ X)~ h)~ ~ X'~ X'~q X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ X'~ )~ ~ )~ )~ @*~ @&~ C:\Documents and Settings\JACKIE\_CDEMS\CDEMS DB Files\Test 'Area\cdem_dta_2k.mdb tblDemoPrimaryKey~ @&~ )~ ~ )~ ~ X'~ )~ )~ )~ (*~ @~ LVALƐhD` ` P ? `  X  H p      H p      ` ` ` ` ` ` ` H p       d  d  d  d   d  d clinic_code tblLabchart_numberraw_code resultservice_datestatus_flagtype_code     $h  Pi_@N@ H \J` \ \ \ \ \  \clinic_codechart_numberraw_code resultservice_datestatus_flagtype_codeC:\Documents and Settings\JACKIE\_CDEMS\CDEMS DB Files\Test Area\cdem_dta_2k.mdb tblLab tblLab 0 H  P p  x              clinic_code0 chart_numberP raw_codex result service_date status_flag type_code   p    8 X x                                                               ( p  H h  H h  H h  H h   h  H h  H h   z      \    P        0   d  d  dP  d   d  d0 D         P    0 h C:\Documents and Settings\JACKIE\_CDEMS\CDEMS DB Files\Test Area\cdem_dta_2k.mdb tblLab d  d  d  d   d  d  d0  d type_codePrimaryKeylab_typelab_referallab_dateclinic_codechart_numberK{62A57795-CF9B-11D6-8967-00055DDA17C2}K{62A5778E-CF9B-11D6-8967-00055DDA17C2}  v   p   p pq p p p p p p p p p p p p p p p p p p p p p p p p p p p p      X X C:\Documents and Settings\JACKIE\_CDEMS\CDEMS DB Files\Test 'Area\cdem_dta_2k.mdb tblLabPrimaryKey X     p    @ h eLVALuhDG    ? @888 d  d  d  d raw_codetlkpCrosswalktype_codeworking_codelab_code p$ Pj_@xN@`^ x^ ^ ^raw_codetype_codeworking_codelab_codeC:\Documents and Settings\JACKIE\_CDEMS\CDEMS DB Files\Test Area\cdem_dta_2k.mdbtlkpCrosswalktlkpCrosswalk    raw_codetype_codeworking_codelab_code   P8HXhx` H  H  H  H  z  hX^P   @  x   d  d  d@  dx 8      @ x  C:\Documents and Settings\JACKIE\_CDEMS\CDEMS DB Files\Test Area\cdem_dta_2k.mdbtlkpCrosswalk d d dsecondaryPrimaryKeylab_codev qH X0C:\Documents and Settings\JACKIE\_CDEMS\CDEMS DB Files\Test 'Area\cdem_dta_2k.mdbtlkpCrosswalkPrimaryKey X X K[PROJECTPROJECTwmAcessVBADataForms pvAlH00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000 [Workspace] basLinkedTables=0, 0, 0, 0, C basCommonFile=0, 0, 0, 0, C basAutoExec=0, 0, 0, 0, C Form_splash=22, 22, 929, 513, Z {SupAp Speciali(@if you@Hv@e quesJs about hSdbasLinkedTablesbasLinkedTablesbasCommonFilebasCommonFilebasAutoExecbasAutoExecForm_splashForm_splashugh a|Olook 1 !ga?r 124$'w8P2WO(s$Y3"Bt romat poDataAccessPages pvApvAPropDataCopyBlobDelta1BDirDataPropDataCmdbarspvApvA0pvApvABlob PropDataTypeInfoK[r9a00(`y nID="{7E32B1EB-8F32-4D8C-9F4C-90947CF38EFD}" Module=basLinkedTables Module=basCommonFile Module=basAutoExec DocClass=Form_splash/&H00000000 Name="paml1" HelpContextID="0" VersionCompatible32="393222000" CMG="1012333137313731373137" DPB="333110773278327832" GC="56547554BB54DF55DF5520" [Host Extender Info] & D "S  Error# "!"!8 : < ,A@4n8 \0 basAutoExecbasCommonFile"basLinkedTablesr's Han dbookLby Litwin,@ ijbex)NCopyright 1997.@ All Rs ReserveMSysDbe Datae 'Use dorder for sng cPub Func1heck}(!~ As S')Boolean > ' Purpose: C$s the,nkKnd Y`len' @BaGKZMFUNAVWJFYDOVXGQMBQRDQOFJ: XOZFLAAMHQJWYWDXBRTHPNUWONOBE:fSWUELJIGRNFAQDZFDCZIFAZODGIE:5XHJBZEFTXIQHUDNYYYZFJJGHTKCC:1q6__SRP_7__SRP_8 __SRP_9_VBA_PROJECT dir__SRP_1Pm__SRP_2 Z.__SRP_3o__SRP_4 tt__SRP_5~g__SRP_6x  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNQRSTUVWXY[\]^_`abcdefghijklmnpqrsuvwxyz{|} 0* pHd paml1 @8= Vh @רF J< rstdole>stdole f%\*\G{00020430-C 0046}#2.0#0#C:\WINNT\Sys@tem32\c2.tlb#OLE Automation^!DAO>IDAO@ @5E01@5@Program Files\CommonMicrosoft S@hared\;\dao360.dll# 3.6 Object Library HVBIDE> VB@IDE\   @ @ @ @ @      !"#$%&'()./;<=>? @!A"B#C$D%E&F'G(H)I*J+K3  z87  U  X@2 ' tblDemotblLabs8/28/2002_2d@2OC  tblDemotblLabs8/28/2002_2L@2OC  tblLabs8/28/2002_2.clinic_code[tblDemo].[clinic_code]rM w tblLabs8/28/2002_2.chart_number[tblDemo].[chart_number]uO w tblLabs8/28/2002_2555  tblDemo   G    GLVALP((([tblLabs8/28/2002_2].clinic_code)="unk"))tblDemo.last_name = [tblLabs8/28/2002_2].last_nametblDemo.dob = [tblLabs8/28/2002_2].dob LVAL` C:\Documents and Settings\JACKIE\_CDEMS\CDEMS DB Files\Test Area\cdem_dta_2k.mdbC:\Documents and Settings\JACKIE\_CDEMS\CDEMS DB Files\Test Area\cdem_dta_2k.mdbC:\Documents and Settings\JACKIE\_CDEMS\CDEMS DB Files\Test Area\cdem_dta_2k.mdbAMvcP=*z @ -  } j C 0  m Z G p]I6#"! p]I6#u t wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p u t wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p u  t  wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p  u t wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p u t wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p u @w_zy+D`c,IdS 5ۓ4 ;k+ םu+j,1\%N~/6V:>M)m埆6p t TwA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p u Tw_zy+D`c,IdS 5ۓ4 ;k+ םu+j,1\%N~/6V:>M)m埆6p TwA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p u w_zy+D`c,IdS 5ۓ4 ;k+ םu+j,1\%N~/6V:>M)m埆6p t wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p u  u  wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p  t  u  wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p  t  u  wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p  t  u  wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p  t t t wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p t u t wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p u t t u wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p t t u wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p t t u wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p t t wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p u t t u wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p t t u wA Oc,I}l ʁhv=[<4 ;k+ םu+f2d*6]O%N~/6V:>M)m埆6p t u t u w_zy+D`c,IdS 5ۓ4 ;k+ םu+j,1\%N~/6V:>M)m埆6p t LVALs6ʾ Create table in Design viewMSysAccessObjectsH& gw`wYwV:0sx90$١0S0$$N90S,$d 0<4ws90ͫx90ًwww& HMSysACEssObjectsH& gw`wYwV:0sx90$١0S0$$N90S,$d 0<4ws90ͫx90ًwww& H<MSysObjectsjectsH& gw`wYwV:0sx90$١0S0$$N90S,$d 0<4ws90ͫx90ًwww& H<MSysQueriesjectsH& gw`wYwV:0sx90$١0S0$$N90S,$d 0<4ws90ͫx90ًwww& HPMSysRelationshipsH& gw`wYwV:0sx90$١0S0$$N90S,$d 0<4ws90ͫx90ًwww& HPtblDemotionshipsH& gw`wYwV:0sx90$١0S0$$N90S,$d 0<4ws90ͫx90ًwww& HtblLabtionshipsH& gw`wYwV:0sx90$١0S0$$N90S,$d 0<4ws90ͫx90ًwww& HtlkpCrosswalkipsH& gw`wYwV:0sx90$١0S0$$N90S,$d 0<4ws90ͫx90ًwww& HCreate table by entering dataYwV:0sx90$١0S0$$N90S,$d 0<4ws90ͫx90ًwww& HCreate table by using wizardYwV:0sx90$١0S0$$N90S,$d 0<4ws90ͫx90ًwww& H(Create table in Design viewYwV:0sx90$١0S0$$N90S,$d 0<4ws90ͫx90ًwww& H(Query1Query1rqrM)m埆6p K[\E157 \3CN).VBA\6E6EXT.OLB/Visual Basic for Applic]s Extensibility 5.3+š h@basLinkedTDabTGasLink@dT@bBsXHJBZEFTXIQHUDNYYYZFJJGHTKCC28APHJNZ@NFU@X@QQURNDYBZFJGTKC@A1B8)%@΁,Q0b!B+Bf3G*2Cmm@ni21SWUELJIGRNFAQDZFDCZIFAZODGIE1SWU0L*I*RNXAQ1/D,ZE6FZO@GM@EI1'` hExe0cGAuxo@x`2c0GKZMFUNAVWJFYDOVXGQMBQRDPQOFJG*ZMU@AVUJY@OXUQB@R`Q׀209"20fForm_@splashF /r/_Jp/KhOZFLAAMHQJWYWDXBRTHPNU WONOB$0OU,L+AHJE@Y`DXLRQKHPU`OMO10J/0d"(Ib(3 hfxME<(<,<<< <<am  *\G{000204EF-0000-0000-C000-000000000046}#4.0#9#C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\VBE6.DLL#Visual Basic For Applications*\G{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}#9.0#0#C:\Program Files\Microsoft Office\Office\MSACC9.OLB#Microsoft Access 9.0 Object Library*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\stdole2.tlb#OLE Automation*\G{00025E01-0000-0000-C000-000000000046}#5.0#0#C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll#Microsoft DAO 3.6 Object LibraryZ*\G{0002E157-0000-0000-C000-000000000046}#5.3#0#C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB#Microsoft Visual Basic for Applications Extensibility 5.3 רF h8XHJBZEFTXIQHUDNYYYZFJJGHTKCC0546a8d7efbasLinkedTablesb)8SWUELJIGRNFAQDZFDCZIFAZODGIE0746a8d7efbasCommonFile`'8GKZMFUNAVWJFYDOVXGQMBQRDQOFJ0846a8d7efbasAutoExecf09 8OZFLAAMHQJWYWDXBRTHPNUWONOBE0946a8d7efForm_splashHJh0H(!d@s :N\]#jıHjwBdνWBBbGAccessVBAWin16~Win32MacVBA6#paml1stdK[ole`DAOVBIDEAbasLinkedTablesd _Evaluate CheckLinkZstrTablervarRet CurrentDbS TableDefs%iFields7ErroGetDBDir GetDBDirErr dbCurrent= strDbName strProcNameƣRight UCase5  GetDBDirDoneMsgBoxRNumber- Description vbOKOnly vbCritical+}adhVerifyLinksstrDataDatabase6strSampleTableadhVerifyLinksErrd varReturn`DstrDBDir#strMsgG&DB\ varFileNametdfTableDefmintI\ intNumTablesIX strFilterӥlngFlags adhVerifyLinksDonemChrK~adhAddFilterItemadhOFN_HIDEREADONLYXOadhOFN_NOCHANGEDIRadhCommonFileOpenSaveOpenFileFilter;Flagso DialogTitle߄IsNull adhTrimNullCount0vSysCmdGacSysCmdInitMeterm!Connect\ RefreshLinkntacSysCmdUpdateMeter acSysCmdRemoveMeter basCommonFiletagOPENFILENAMEy lStructSize/r hWndOwner hInstance strCustomFilterژnMaxCustFilter` NFilterIndexcstrFile XnMaxFile strFileTitle nMaxFileTitleym strInitialDir/(strTitle nFileOffsetInFileExtension9 strDefExtHA lCustData'5lpfnHooklpTemplateNametadh_apiGetOpenFileNameHofn) comdlg32.dll?adh_apiGetSaveFileNameCommDlgExtendedErrorsadhOFN_READONLYadhOFN_OVERWRITEPROMPTadhOFN_SHOWHELPیadhOFN_NOVALIDATEadhOFN_ALLOWMULTISELECTJadhOFN_EXTENSIONDIFFERENTf4adhOFN_PATHMUSTEXISTVadhOFN_FILEMUSTEXISTFadhOFN_CREATEPROMPTadhOFN_SHAREAWAREiadhOFN_NOREADONLYRETURN2adhOFN_NOTESTFILECREATE;adhOFN_NONETWORKBUTTONadhOFN_NOLONGNAMES.WadhOFN_EXPLORERzadhOFN_NODEREFERENCELINKSXadhOFN_LONGNAMES InitialDir1 FilterIndex˟ DefaultExtyFileNamej strFilenameefResult IsMissing Application* hWndAccessAppstrDescriptiondvarItem vbNullCharYstrItemintPosr basAutoExecHAutoExec AutoExecErru AutoExecDone1DoCmdƧ Hourglassb Form_splashg Form_Open-CanceltempRendsub: ExitAccessis RunCommand` acCmdExitCommand1_ClickVrst RecordsetrstCodesqryNew{)QueryDeftblNew[fldNewField3TextLinestrSQLF strCriteriaI ClinicCode[ClinicIDăTestCode%TestNameTypeTest< TestResultCollectionDate AmendedResult cnt_records?cnt_totrecords cnt_personsd cnt_filesSTempFileV cnt_tableswp cnt_amendedu strInputFilePatID^ LastName FirstName ResultComment3dobresponseDOSTempҍCreateTableDefj CreateFielddbText dbDate= OpenRecordset| FileSearchD NewSearchfLookInPSearchSubFoldersExecuteY FoundFilesConvertUnixFileEOFParseBOFy MoveFirstNraw_codeK=IsDate2AddNewa clinic_code- chart_numberS IsNumeric$*resultur service_date status_flag IsEmpty  last_name first_name?amendedwUpdatetxtCntRepaintKillRefreshCreateQueryDefzNvbLfT%RecordsAffectedP vbInformationninstringYsectionG component"cnt+position position2jUnixFilerDOSFileEndValue& StartValue9 OutPutTxtFormDetail2Label0,Command1Label2,Click _B_var_Chr\;ItemzbLfzyx  H~~~~~~? I-y;rzLz  a q 9 Y K[y a q iyYAya q Q A 1  )  !I      !"#$%&'()*+,-./023456789:;<=>?@ABCDEFGHIJKL (1 Jh h3oEmzB$|*y7P)>Dx?2TxME @SLS S<`@X :<4`D(`F`H`J`L `NX`P`R,n `X ##@ixiii  ``` j`` ciii  ` ```H %  % %x`@pd ` @\ @X  T @P @L (H @D @4 @$  @ (  `4K[    xT"   0 PX ` px    Bx  & 8" @ :H 0 4  P ,H Jx  6 P &X     B@ $H px% J%  8@H*P   %>.*@ *p R::8  *x < : ,(Xh$p  * $ @0 H $P $x   $ $ 00 0` * .     *( PX    4     ( 8 .P  B " ,(  *X    T TTX $ :T  p TN  HTXT*  @ LX R ' & @0 p  0    \x        (8@P  X hx   0H P` hX  (%'\'8  @P Xh  p  0 (        ( H$X$   4   &( @P L ,  8B  h     @,      &( BP ,   B(R K[ Z & pP@(  B   F B B( Bp  ( 2! 4H! ! ,! !2!0!  (("P"X" `"p"2""  &""" "#Z#x# ##B  # L# B# 0$8$@$H$ P$`$ p$ $$$ $ $ $ $ % % (%@% H%P% X% h% x%%*xpruns link codendboOn Error GoTo ExitAccess a]`]x$' " KT  B@ ' quits accessSH Error# "!6:  "!8 : < ,A@4n jumps around quittng accesso4Program loaded into same directory as "cdem_dta.mdb")Works with QUEST data file in HL7 format.-QUEST files downloaded with Lightning programIPut downloaded files into subfolder under CDEMS eg.,"c:\cdems\lab_files\"&each file can contain multiple recordsDProgram counts of OBX records equals number of results in input file/Measurement set is labs being tracked by CDEMS:Ithey will each have an entry in the setup table and in LabCrosswalk table On Error GoTo Err_Command1_ClickWx]]]]0]P]p]Dim varItem As Variant]]]]#3the clinic_code field put into the CDEMS lab record]Dim LocationCode As String '?] ]8]P]h]]]]]];End-Of-Line Unix chr(10) to MS chr(13) & chr(10) conversion](]Xpatient identifiers]p]]]"if result is simply comment]]]S*$\'  .L'6'8':/counts PID records (duplicate persons possible)'< to move through the found tables'@to assign the new table name#===================================DOSTemp'R<temp file converted from UNIX to DOS format and later killedunk'&'clinic_code put on each appended recordSEA'('QUEST 1st three characters of all files#===================================5Creates an output table name (eg., "tblLabs050501_1")3these need to be manually erased or they accumulatetblLabs Z_ @$a @ '@xtblLabs Z_ @'D#=================================== Create a new TableDef object.: Create fields and append them to the new TableDef object. D L%T.  clinic_code X7V5 B@ chart_number X7V5 B@raw_code X7V5 B@result X7V5 B@ service_date Z7V5 B@ status_flag X7V5 B@ last_name X7V5 B@<optional first_name X7V5 B@<optionaldob Z7V5 B@<optionalamended X7V5 B@<optionalq  L!B@ D L%\.#===================================Jsearches for new downloaded labcorps lab files in CDEMS directory or below !^C@`*.hl79..FileName = ClinicID & "*.*" 'eg.rs112233.365$$9b9dC@f7fK[ <5h!t(MsgBox " found cnt " & .FoundFiles.Count <7h R$j'P<************************************************************the file parsing routine: R# Open file.$lb" Loop until end of file. # Read line into variable. $PIDKT  $n $n $n  $'F  $n $n $n  $'H  $n $n $n  $'Jcnt_persons = cnt_persons + 13MsgBox "Name: " & PatID & " " & LastName & Chr$(10)  $n $n $n  $'Ndob in yyyymmdd formatOBRKT  $n $n $n  $'2 4 2$/ 2$/ 2$'2OBXKT  $n $n $n  $',  $n $n $n  $'0   $n $'4k--------------Eruns match program to return the CDEMS raw code from the lab raw code dlk-amended tlkpC* ,*',44dlk-amended -- optional for multiple Quest lab codes'" " L%\. !p !lA"is this lab raw_code in Crosswalk? B@r "t'.)MsgBox "good record " & rstCodes!raw_codedh na'.kP .na 2$v 4$0C B 'B2HMsgBox "result/amended result field " & TestResult & "/" & AmendedResultk B@x & )z =========== F F )|dP blank )|k0  =========== 0$~ 0 )d UTP )k . )t 2 )c ) =========== H$ Hmissing )dP H )k8  =========== J$ Jmissing )d J )k  =========== N$ N 1/11/1111 )Ndp $ N$/ N$/ N$X )Nk 4$ 4F )d 4 )k =========== B@ 6 '63lab results tracked reportedkH 8 '84total labs reportedSn 8' B@V Close file. RA@ <steps through filesdThere were no files found.A@4k`qX L!B@ 6)there were no labs being tracked returnedA@4|k===============================:data now in me.tblLabsXX/xx/xx_x - but has no clinic codesEthis section fills in clinic code and chart number using lastname&dob========[tblLabs Z_ @]'D  UPDATE tblDemo INNER JOIN D ON (tblDemo.dob =  D.dob) AND (tblDemo.last_name =  D.last_name) SET  D).chart_number = [tblDemo].[chart_number], D'.clinic_code = [tblDemo].[clinic_code]  WHERE ((( D.clinic_code)='unk'));'" " L%. B@f L!B@:matches on chart_number only those records still unmatched[tblLabs Z_ @]'D  UPDATE D INNER JOIN tblDemo ON  D'.[chart_number] = tblDemo.chart_number SET  D).[clinic_code] = [tblDemo].[clinic_code]  K[WHERE ((( D.[clinic_code]) = 'unk'));'" " L%. B@f===============================<data now in me.tblLab - need to append to tblLab of dta file[tblLabs Z_ @];'D 9INSERT INTO tblLab (clinic_code, chart_number, raw_code, 7result, service_date, status_flag) SELECT clinic_code, @chart_number, raw_code, result, service_date, status_flag FROM  D'" " L%. B@f<************************************************************+1Files opened: !^!h!t $^ $^&Total patient records in input file:  : $ ^)Number of lab results reported:  8 $^ $^"Labs reported in measurement set:  6 (Records appended to CDEMS lab table  ! A@4 B ko@Steps through a string input looking for character "|" (Chr$124);when the count of Chr$(124) characters found equals section;Start looking from that point on for character "^" Chr$(94);When the count of Chr$94) characters found equals componentreturn the positionInput! instring = the string to parse+ section = the number of Chr(124) to find- component = the number of Chr$(94) to find&Returns the column position as variant]]#holds col for desired nth Chr$(124)]"holds col for desired nth Chr$(94)"find the column of the desired "|"''  a  '  $|$^G  'jxfind the col of the desired "^" ''  a  '  $^$^  $|$ ^G  'j 'ni Floops thru the unix file and finds EOL prints this section to new line<in file DOSfile- results in file with chr(13) & chr(10) EOLs]]]]  $la   $^'' a    $'   '  $'   $^'kVVok'ji] dlk-amended]$ dlk-amended'B dlk-amended!=========== dlk-amended sectionTthis section prints if any amended records returned to clinic - dlk-amended section0SELECT tlkpCrosswalk.raw_code FROM tlkpCrosswalk' WHERE (((tlkpCrosswalk.lab_code) like ' ,'));'" strSQL = "SELECT tlkpCrosswalk.raw_code FROM tlkpCrosswalk" ' & " WHERE (((tlkpCrosswalk.lab_code)=" & "'" & TestName & "'" & "));"& 4$0C B 'B4HMsgBox "result/amended result field " & TestResult & "/" & AmendedResult*$  $(,0An exception has occurred. Raw data file contained  B updated results. These are in the temp tblLabs Z_ @ temp table. 5Amended labs must be added manually to CDEMS tblLabs. 3Open the indicated temp lab table and search for an @amended result not equal to 'F'. Note chart #, lab code & result 'to make the change manually in tblLabs. ,Call the CDEMS Technical Support Specialist  +if you have questions about how to do this. +@ 1-800-478-3563 (WA only) or 360-387-2928.A@4(vAttribute VB_Name = "Form_splash" Bas0{BC95C07C-179E-11D5-88B3-00AA002AB2F7} |@GlobalSpacFalse dCreataDblTru P!K[redecla Id"Expose_Tem܀teDerivCustomizD$Option Comp@ D3T  !Eq$mp(Gw]-Of-%Unix chr(10) VK3)euconv  07}Da -IQJ S'p#KidPifi1Pat'La$st# FiDaIABoole@O 'if/s0ZSsiyPYmT dobw7g`YpO&@&D 0` Then  BF?cnt_G= 1 To .Found5s.Ct 'MsgBox "[ 5& B ponse@*ConvertUnix ((f), D@OSTemp'*6Cthe? parsing routinez: CfQ a"Q As #1X ' A$.Do Wh@J Not EOF(1)C' 8p u ntil AofWL #1, B' RPead EeUto variAkSelX Ca@+ Left(, ~3Ee"8PIDUPatU= Midh P)e2, T+ (m3b- s-LDf[5X`2) OcUFe, 6ct'`p z`e@e 3fq}:p6(& Chr$(10[-b -7-8c-n(q'lZymmdd!]maG+OBRUVCol1x1q + w4 :, /9+{ $/"a`0,ai >, 2_" Xq Test?/0.<>xt#>g60%@1) R3F/7c O3_(1AmYedY,~K1@N%1 '-  runs ,ch program p]return 1j3raw cod krok~ U A8"} &`dp#1'dlk- --& 5 miple Qup !sqSQL"SELECT tlkpCrosswalk. B_ FROM" _ WHERE ((()=13"'Q"));.1   ! { 1  }k~ebZO O sS?  Cp DB.@+p.BOF AJbis*@ߐ )A%? Mov qpType%%!E$pgood @0Œq3xElsųG"na%@Ifo @<> BIsa\({_)rH=U!`(N)1;C"[#cPUC=_ f/஠bU:nesult End If Trst.AddNew>![clinic_code] = CfC 3'=!If Len(PatID) > 0 Then+hart_nupmberCElse&"bla8nk"'vIsNumeric(TestR)!z~rwQ<"8UTP:grawƇTypeA+ service_datollectionD@tatus_fldagE"cT1deEmpty(LastName) OVr"K[=l@_n%missingXj#SEY~ qIs Fi9 ( @fa t[ ?!# ?!(!dob&Ab#`?1/1A11/@I Ca(Mid(` , 5, 2) & "/"7_s# &\ft 4))* 3, dlk-`bnded s{/UCase0(Ame= "C"ؤcnt_ = + 1'MsgBox "#/e field a)+J`JLL$?O"t 'F_'"6 mz_8q . 0 ThenA DAn excepA ha`Eccurred.c- aw ; contai2 @: uptd8 ws4 `se are3the tempądᐴ A$(@4s mus(t b d*manually8+T Oh in^d!h0A?a@si < 8s(e$\0t eq@'F'. Notec #,Kcq# mak'@(pnge &{C!b!Tech{SupAp Speciali(@if you@Hv@e quesJs about hSdo@ i@@ 1-800-478-3563 (WA only) or 360-387-292D8.` E-IfY aSub!PrivFuncZParse(ining As StlgɃ#@IntegacomponႧ)Variant3'Steps rough a|Olook 1 !ga?r "|" (O124$'w8P2WO(s$Y3"Bt romat popD(H^"R$(96W?hr$}R*sP?44SIr posiQ2QF=!p1wDL 6ちa fP8g:5;8RU1lumn# PvI#DimaU!!D#w 'holqcoldesiU nth %29/+'q@! p%o(o01 = 4Do Until=%jns+ hMid7,, 1?1qiT1 FLo|opS !j ^rA V2   &$ 2 //on284Or 3hPBs2{ rN2cQuP QConvertUnix(!'QDOS' K'`FSOu%urndn`.EOL5z;n{@Ӡ'hPq-'%!wi1ch`&HsA^2TextL' q`Valueq:StROutPutTdxt F`hMA#`.`0%EOF(1$_ S#1, E 3' = In(,Bq &=57nd= 0,8۠.1w=) ,, (-;d`wP#+6A 4a,2OeM s # 4cClo *ConvertUnixFile = "ok" End Function leDef object. D L%T.  clinic_code X7V5 B@ chart_number X7V5 B@raw_code X7V5 B@result X7V5 B@ service_date Z7V5 B@ status_flag X7V5 B@ last_name X7V5 B@<optional firs<<< <$<0<4<8<<<` `D --`\ %``@@@xXl #K[NDhystPWbe`v":<4m`X mo@T xi@D LL@4 Pr`($ s\` QT@ \P@ es%on  e\( @  @ @ @  h5  * ,8 ,h 2 B    *  ,P ,       < X ` $'h      $   (J}0  $ From Access 97 Developer's HandbookHandbo% by Litwin, Getz and Gilbert. (Sybex)(Syb% Copyright 1997. All Rights Reserved.)Use database order for string comparisons`  Purpose: Do all startup duties$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In: None Out: Return value: none History:5 Created 09/14/94 pel; Last Modified 12/20/95 pel]@ cdem_dta.mdbtblLab$>' varRet = adhInitAutoNum()'d8'k(  $v' B@z "S Error# "!6:  "!8 : < AutoExecA@4nxpih`Attribute VB_Name = "basAutoExec" ' From Access 97 Developer's HandbookLby Litwin, Getz 4 Gilbert. (Sybex)NCopyright 1997. All Rs Res@erved.' Option Compare Datae 'Use dorder for sng cA1isonsEExplicit FuncZ%t(L , ' Purpose: Do aRstartup dutie-F  DIn ^None Out Return value: nH HistoryJ Created 09/14/94 pel; Last @Modifi12/20/95ZA&On ErrgGoTo ]QDim r@# As Varia&nBjAva= adhVerifyLinks("cdem_dta.mdb", "tblLab"rIfThen@'IInitA$NumA)ĈTruOElsD FaFEnd If6D@UQBuNex9$SysCmd(acRemoveMeter5A Do.Hourgla@Y0C0 <p F , >( ,h :  < (08@ (Hp  68"p >     (  0 @  H X ` h p 8x       8 :8 x      : %K[ : .P  6 : 4 :8 x       B . B( :p 8  * ,  ,P   , 4   *0 `,  B   <  * ,8 ,h   :  > @ H Xh   $ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)inks% Copyright 1997. All Rights Reserved.XP^^0^H^`^x^^^^^^^ ^8^P^h^^^^^p`]$ ]$]$]$]$0]$X]$]$]$8]$]$ ]$@`]$]$]$ ]$H]$]$p]$   !'-6 This is the entry point you'll use to call the common1 file open/save dialog. The parameters are listed below, and all are optional.$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In:@ Flags: one or more of the adhOFN_* constants, OR'd together.4 InitialDir: the directory in which to first look4 Filter: a set of file filters, set up by calling) AddFilterItem. See examples.8 FilterIndex: 1-based integer indicating which filter5 set to use, by default (1 if unspecified)? DefaultExt: Extension to use if the user doesn't enter one.& Only useful on file saves.7 FileName: Default value for the file name text box.& DialogTitle: Title for the dialog.3 OpenFile: Boolean(True=Open File/False=Save As) Out:6 Return Value: Either Null or the selected filename]]0]H]`! Give the dialog a caption title. $G'j j$G'jj $G'j l$G'lj $G'j $G'j n$G'nj h$G'hj0 Allocate string space for the returned strings. $\$'$\'7 Set up the data structure before you call the function  9 !9 j9X 9 9 9 9 9 n9 l9l 9 L91 Didn't think most people would want to deal with these options.9$\999q1 This will pass the desired data structure to the3 Windows API, which will in turn it uses to display the Open/Save As Dialog. h $'dH $'k04 The function call filled in the strFileTitle member4 of the structure. You'll have to write special code' to retrieve that if you're interested. 0 You might care to check the Flags member of the4 structure to get information about the chosen file.. In this example, if you bothered to pass in a4 value for Flags, we'll fill it in with the outgoing Flags&K[ value. l$G !l'lj !$r'fd0'fk ix' Tack a new chunk onto the file filter.< That is, take the old value, stick onto it the description,3 (like "Databases"), a null character, the skeleton1 (like "*.mdb;*.mda") and a final null character.$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In:& strFilter: existing file filter- strDescription: new filter description varItem: new filter Out:$ Return value: new file filter $G*.*'j X    '`iH5 Trims the Null from a string returned by an API call$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In:4 strItem: string that contains null terminator Out:8 Return value: same string without null terminator]x  '    $'rdx 'rkhi`XAttribute VB_Name = "basCommonFi@le" ' From Access 97 Developer's HandbookLby Litwin, Getz 4 Gilbert. (@Sybex)NCopyright 1997. All Rs Reserved.' Option pare PDataeExplicit Type tagOPENFILENAME  lStructSize A@s LonghWndOwner Instancэstrt*i$ CustomnMaxCN IndexD8C7'PeTitl InitialDiBCM7Flags,OffsetAIntegerD\Extensvc!Def lOAH.`lpfnH@TemplateEEnd AADeclFuncšadh_apbiOpe+Lib "comdlg32.dll" _@4Alias "L A" (Xofn$ )Boolean Savew#I C6lmDlgb3dedErrory (0 Pu.b@p@tf 'OFN_READONDLY&H1sOVERWRITE@PROMPTB2SHIDEJ 4NOCHANGE(DIR 8SH@OWHELPb10u VALIDA TEALLOWMULTISE(LEC0EXTENSIONDIFF`N4PATHMUSTEXISC8UAK10uC) /VSHAW TNO>RET8URNTE|ST!NETWORKBUhTTO 2LONGAS" TEXPL`DFY P6CELINK# bT k  ݡnoy("Cal ByRef Variant,V@ 9@_nBSViç0[aultt[JYhogVgZUt2Jq^a' This  the entry point you'0uso ca!^k' f PHn/sY d .90e Љs dlistedurbw,oralP "' d$In: ': one 0aDmoof !adh_* cots, OR'd toger% q):directo`in w0hich`prst l2Q'A(: a Q@A,BupAVG1Add-tem. Se@ xa0esY D: 1-d P"Apdicat #q to 0%,q defa2 (1 if unspecifie !>spa-r2( &50e#= LefLt(B & "(256, 0), 4.tS%=7 S@NQ9datPJtQuXbe ealkfͳWp2/a.lSStructSize = Len(ofn) .hWndOwnerxApplication\Access*^strFilt^ 8N"Inde>xAKenamenMax9$ TitlJK(Dialog&Flagsk (DefExtÀ ault Init*DiHCur ' Didn't think most peopmwould wano deal withth@ese ops. .hInsthancAH0@,CustomCh-ing(255, 0IEAc F HlpfnHookEnd W( ' This,ll pass8e1sired `data @#u`re toA Windows API, whichCin turn it useEisplayED Open/Save As@WgtFCIf4e@'enCfReso3adh_a`piGetA NElsA3@HIfGe funco caaIfill@G:heGAmember,' ofSFP. You'@h>Swrit pecO codD'a-retrie $that if y0in{`ested)&%T h &'! mig ht`c8checkCfcg-'+?ge`nformA" a'K[boube chosen "e$ ' ICAaKexam@e,D bo@K BN)avalu`.or Ke&.JAl"`go@cJNot IsMissi)L J. MCommon'D,dTs, tak` co 0,@Ii` A dg,c ' (li@"Dba`p"), @,a8rac nke0letoD&*.mdb;a")T a yan@nFrom A 97 Dnloper's H b@Eby Litwin, "z Gil~t. (Sybexd@' Copyrbo1997. A@Rs erveAx3'In:4v: exist+1r~:`1]5!; #OutRe]R66$66"*.*" 2- &-0-& vbA4CharXcx /6] =ByV@#u26o2pNA`nP) f$bs@\pbp#anro2dV'e''r 'd ''l~ ' @['1:` hc8 0 r'LeftD- 1^#+ &]Q'S   < X `   )hbxME@`DHzzXi@ hiB`Fh `Hd`J` L\%`NL  QH %`TF`VD`,@`X<`Z8Xx%pX(@Hz~^:<4`(   @ @ @ @ @ @ @ @ @ fprxvt @d @T @D h@ @> @8 V4O 0V @(@0 (Xhh, s8( @$   @ h@`h8z h1h1 d @` @P H(L @H @8 h@4 h10 @ Ȝ@ 0(K[   * ,8 ,h 2  B    0 (( P *X , ,   $ ( <8 x <   8 : kP $p  B    > 8 8 *@ ,p ,     > H <X         ( 8@H PX`Bh  B  8 @  >`  * , , 8 @ :P <  >  <0 p x            ,   ( 0 8 @  @H  ' 0   6 F8 g b Op  B-  6-H   ) @ ,  2'( ` (V:    L )X p x   6 !.)  0 :P 4      20 (h   $ $  *  ( 08$@PX `hpBxx $ From Access 97 Developer's Handbook000% by Litwin, Getz and Gilbert. (Sybex)1\% Copyright 1997. All Rights Reserved.)Use database order for string comparisons  Purpose:) Checks the Link for the named table.! Based on code from Ken Getz.$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In: strTable - table to check Out:6 Return Value - True if successful; False otherwise History:6 Created 09/13/94 pel; Last Modified 07/10/96 pel]`(2 Check for failure. If can't determine the name of4 the first field in the table, the link must be bad.  %% !' "'dp'k`iXx Purpose:7 Gets the directory of the currently open database.2 Based on code originally from Mike Gunderloy.$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In: None Out:8 Return Value - The na)K[me of the directory as a string History:6 Created 09/13/94 pel; Last Modified 12/20/95 pel&`]]]GetDBDir', .( (!'* *$ .\b * * $ '* *$ 0'$2z& "S Error# "!6:  "!8 : < ,A@42Hn@i8 Purpose:1 Check status of Links and relinks if broken.9 If broken, first try the current database directory.7 If that fails, present user with file open dialog.$ From Access 97 Developer's Handbook% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. In:4 strDataDatabase - Name of backend data database6 strSampleTable - Name of a linked table to check Out:7 Return Value - True if successful; False otherwise History:6 Created 09/13/94 pel; Last Modified 12/20/95 pelD]]]]]]](]@]X]p]adhVerifyLinks',% Verify Links using one sample table. B$'F F'>\k9 Get name of folder where application database is located$$'H H @$ ~* Data database found in current directory. H @'Nd0 Let user find data database using common dialog The required file ' @' could not be found.'J J! You can use the next dialog box "to locate the file on your system. $^ $^ $^'J J! If you cannot find this file or #are unsure what to do choose CANCEL'J J! at the next screen and call the 4local database administrator, or program developer:  $^ $^'J J( Washington State Department of Health $^'J J Diabetes Control Program $^'J J (360) 236-3738'J J : < ,A@49 Display Open File dialog using the adhCommonFileOpenSave% function in the basCommonfile module XAccess (*.mdb)*.mdb$`'X b b d'Z   h Xj ZlLocate Data database filen$f'N N$p  User pressed Cancel. -You can't run database until you can locate ' @'.'J J : < ,A@4'>\dx N$r'Nk`kX0Rebuild Links. Check for number of tables first. .L L!!t'V xRelinking tables V$v'F Loop through all tables.4 Reattach those with nonzero-length Connect strings.'T P L!- If connect is blank, its not an Linked table P!z T 'T ;DATABASE= N P(z + The RefreshLink might fail if the new path ! isn't OK. So trap errors inline.h PB@| If one link bad, return False "'>\kk ~ T $v'F P'>\  $v'F z D "S  Error# "!6:  "!8 : < ,A@4n8 \0 i( |Attribute VB_Name = "basLinkedTables" ' From Access 97 Developer's Han dbookLby Litwin,@ Getz 4 Gilbert. (Sybex)NCopyright 1997.@ All Rs Reserved.' Option Compare Datae 'Use dorder for sng c1isons GExp licitPub Func1heck}(!~ As S')Boolean > ' Purpose: C$s the,nkKnd Y`len' @Based sc ode fKen/FÃ, c E"In 0 Theı !_.E/#g5dnd@)E eikDBDir(bijcSiidirec?($c ly n&ko inal@blMike Gun loy?m0#' ?mc?mE=C+mNonfajN"&G(as a/jj12/2j5jfGoT~o"?OCnd~bdXAo DbҦProc  O@AcSe tiF= di#Do While$ao!#, 1)l"\= LeftLen)1`Loop%&s@tUC( DCd00Exit ttSel6 QOsAMsgBox "or#" &.Num~": 5Descri|, _ vbOKOn9+Critical,)XG3 Hk~adhVerifyO2S''(I @Samples Integer%L13bstatusKbreA^s pobrokeNnKZS, bt-`9)TATVy/c>m DBQwFQmp tdfintI5A1EsPF_ ?4  ln gFlagLonge9d]s ' Ds6iPX sC5G g@_HF\q@0abw;qa RI @U folwhe4apais locp~{pY(P  (3kb&&1^##3s")'"߶<{ OAP'=߂?Q k'yTRfi AusmdbSCa`q2" requu0dsV'pqK&)p"'@unot @fo.`&&uYouwa]an0\ nbyx w"pٳ t׵he file on your system." & Chr(10)$3) strMsg = & " If cannotnd thisrB& _ "are unsuwhat to do choose CANpCEL"r4next screen avcalJl{erlo @databa2a dminiaator, or program developer>:"c WashingtState Department of Health(Diabetes Control PU!(36236`-3738VrBoxs, vbOKOnly +Criti@M,cName +' Display Op`Fdialog us@BbadhCo0mmon Sav@œ' functi@Kin g ©modul c"@terAddI(g, "Access (*.mdXb)"@B"HlngFlagsOFN_HIDEREADONLYx Or NOCHANGEDIRKMvar@%eRCOG1@JM :=True, "C:= 0g+ 1G ";DATABAxSE=(Ik'+f 9h! m(igh0|a06ife new pathisn9OK. So trap errors in e 1On Esume N{yq Re@3 " bad, r%7 <o;o;;s;A 7O 00Up e0.! P%w^ o` :Oxt/ & Remo>v# f1Exit F{_DSelq6CaPOX"0or#+.F!J& "1De ipA?l%c Re32) YDim owৡ(!VI fQVGivEGɠ,car@ tѺdIf IsMis*s &(3)qFn `m"ف * 1]_|= = 0&#z,(VPg('%(?35(_("'!op>e !>spa-r2( &50e#= LefLt(B & "(256, 0), 4.tS%=7 S@NQ9datPJtQuXbe ealkfͳWp2/a.lSStructSize = Len(ofn) .hWndOwnerxApplication\Access*^strFilt^ 8N"Inde>xAKenamenMax9$ TitlJK(Dialog&Flagsk (DefExtÀ ault Init*DiHCur ' Didn't think most peopmwould wano deal withth@ese ops. .hInsthancAH0@,CustomCh-ing(255, 0IEAc F HlpfnHookEnd W( ' This,ll pass8e1sired `data @#u`re toA Windows API, whichCin turn it useEisplayED Open/Save As@WgtFCIf4e@'enCfReso3adh_a`piGetA NElsA3@HIfGe funco caaIfill@G:heGAmember,' ofSFP. You'@h>Swrit pecO codD'a-retrie $that if y0in{`ested)&%T h &'! mig ht`c8checkCfcg-'+?ge`nformA" a+