Standard Jet DBnb` Ugr@?~1y0̝cßFNa7ޜ(I,`{6߱-nC53ny[/|*|Cp8uf_Љ$g'DeFx -bT4.0dv Y S  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        OY^"SY Y Y  Y 2MACMFInheritableObjectIdSID YObjectId Y SY  Y Y Y  Y  Y Y  Y AttributeExpressionFlagLvExtra Name1 Name2ObjectId Ordernzf edY"ObjectIdAttribute -Y SY Y Y  Y  Y  Y  Y  Y ccolumn grbiticolumnszColumnszObject$szReferencedColumn$szReferencedObjectszRelationship @   YYYszObject$szReferencedObjectszRelationshipYv1b N  : k & W  C t/ @@Y   @ @@@ @kf^JkWLJkJomdQuQMLJkMd``dbSY^QLJk^Yb\QOmJL^QkOJmJJMMQkkfJUQkOJmJLJkQkSdi`k `dOo^Qk iQ^JmYdbkWYfkiQfdimk kMiYfmk kvkiQ^ mJL^Qk`kvkJMMQkkdL[QMmk`kvkJMMQkku`^`kvkJMQk`kvkbJqfJbQUidofMJmQUdiYQk`kvkbJqfJbQUidofk`kvkbJqfJbQUidofmddL[QMmk`kvkbJqfJbQdL[QMmYOk`kvkdL[QMmk`kvkhoQiYQk`kvkiQ^JmYdbkWYfkmL^OQ`dmL^^JLm^\fMidkksJ^\JMMQkk^Jvdom`kvkOLko``JivYbSdokQiOQSYbQO  @ @ @ @          ).27<  @ @ @ @ @ @ @ @ @ @ @ @????????? ? ? ? ?????????????$?% ?& ?' ?( ?) ?* ?+ ?, ?- ?. ?/ ?0 ?1 B  B  B B BBBBBBBB?:?;BBBBBB ?2?3?4?5)?6)?7)?8)?9.?<.?=.?>.??2?@2?A2?B2?C7?D7?E7?F7?G<?H<?I<?J<B???? ?? ????!?"?#    =d _ Z g  ~  } $ fy!)XETK@XETK@ tlkpCrosswalkapC:\CDEMS\cdem_dta.mdbtlkpCrosswalk@Ayyyy__<: EETK@ETK@ tblLabapC:\CDEMS\cdem_dta.mdbtblLab]]]]]]]QQ.,  yETK@yETK@ tblDemoapC:\CDEMS\cdem_dta.mdbtblDemoaaaaaaaSS0. <67J@67J@ MSysNavPaneObjectIDsap4MR2KeepLocal  TJJJJJJJH @7)J@)J@ MSysNavPaneGroupToObjectsap4MR2KeepLocal  TTTTTTTTR @2)J@)J@ MSysNavPaneGroupsap4MR2KeepLocal  TDDDDDDDB @.)J@)J@ MSysNavPaneGroupCategoriesap4MR2KeepLocal  TVVVVVVVT @)v(XJ@v(XJ@MSysAccessXMLap4MR2KeepLocal  T|||<<<<<<<: @FTK@oFTK@MSysAccessObjectsapDDDDDDDDDDB  lR@`]@basLinkedTablesap@@@@@@@@@@>  lR@`]@basCommonFileap<<<<<<<<<<:  lR@`]@basAutoExecap88888888886  ilR@`]@splashap..........,  {DlR@ilR@UserDefinedapA@ADDD88888886 @ {DlR@uJ@SummaryInfoap(@ADDD88888886 @ _ ?lR@HTK@AccessLayoutap4MR2KeepLocal T@@zz:::::::8 @lR@lR@SysRelap.........., lR@lR@Scriptsap0000000000. lR@lR@Reportsap0000000000. lR@lR@Modulesap0000000000. lR@lR@Formsap,,,,,,,,,,* lR@lR@DataAccessPagesap@@@@@@@@@@>  lR@ lR@MSysRelationships`rDDDDDDDDDDB  lR@ %tR@MSysQueries`r88888888886  lR@ %tR@MSysACEs`r22222222220  lR@ lR@MSysObjects`r88888888886  lR@r+0J@MSysDbapP@A:::......., @ lR@ lR@Relationships`r<<<<<<<<<<:  lR@ lR@Databases`r44444444442  lR@ lR@Tables`r..........,  Y$NY Y DataID(YAOIndexv1?K[.(3DTwblestlkpCrosswalkL2&2&&d2&e @o L  UWS@ `WWXWWW@UWZW[WPYWZWPȇMSysAccounts  K[ࡱ> {F|  !"#$%&'()*+-./0123456789:;<=>?@ABCDEHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz}~Root Entry0󴨀&VBA0󴨀0󴨀VBAProject 0󴨀0󴨀VBA0󴨀0󴨀dir_VBA_PROJECTFBCNVSNGVPXMXDEFOYYJFQUATVQG:c/JXRHWKNFYFTNVDMMWDBJKYSPTSTD:,3  !"#$%&'()*+,-./0123456789:;<=>?@ACDEFGHIJLMPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwx{}~ 0* pHd paml1 @8= Vh @LI J< rstdole>stdole h%^*\G{00020430-C 0046}#2.0#0#C:\Windows\system32\e2.tlb#OLE Autom`ation`mVBIDE> VBIDED!DE157D5.3Dc:\Program Files\CommonMicrosoft Shar@ed\VBA6E6EXT.OLB#Visual Basic for Applicbs Extensibilpity ?WDAO>DAOh h5E01]4Vi4\dao360.dll2 3.6 Object LibrXary$Bh@basLink edTabRGasL@inkdT@bsFBCNVSNGVPXMXDEFOYYJFQUATVQG2 8AzCN(VS@GPXXMFLYYJFQUPT@QGBH@1q¸"%,Q07!B+B Form_splashGrm_-3p/5h0UAWWSSKJREHLHEIEKZLSGNAUPMVL0%WW/SK*R@HEHIKZ@S,N/UP7NV@G 0JI`(`C`2hExecbQ1Auxox`2cXHFOABFTVSCBCEKSTFBDNCFBIOBBX`)-A1F 91Cb3ES FZD`4C`1sOB090 CrsGCC1m1oKFKIJXRHWKNFYFTNVDMMWDBJKY@SPTSTDJUGR@WNYU`TVM /WUB4KJS`1TM6T`1%:b2t{h9xMEK[`  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:\Windows\system32\stdole2.tlb#OLE AutomationZ*\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*\G{00025E01-0000-0000-C000-000000000046}#5.0#0#C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll#Microsoft DAO 3.6 Object Library LIh8FBCNVSNGVPXMXDEFOYYJFQUATVQG014950ffbabasLinkedTables7"8UAWWSSKJREHLHEIEKZLSGNAUPMVL024950ffbaForm_splashJI8XHFOABFTVSCBCEKSTFBDNCFBIOBB034950ffbabasAutoExec908JXRHWKNFYFTNVDMMWDBJKYSPTSTD044950ffba*basCommonFile:H%h0H zӞ,Ah{#i N`95Aq#dtODK)_7LR+eJ$DAccessVBAWin16~Win32MacVBA6#paml1stdole`VBIDEADAObasLinkedTablesd _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 Form_splashgCommand1_ClickVrstCodes RecordsetrstqryNew{)QueryDeftblNew[fldNewField3filenameK[jTextLinestrSQLF ClinicCode[ClinicIDă LocationCode:TestCode%TestNameTypeTest< TestResultCollectionDate AmendedResult ResultComment3LastName FirstNamedob cnt_records?cnt_totrecords cnt_personsd cnt_filesS cnt_tableswp cnt_amendedu strInputFile cnt_errors;9cnt_eGFRPatID^ CreateTableDefj CreateFielddbText dbDate= dbIntegerb OpenRecordset|EOFParseBOFy MoveFirstNraw_codeK=AddNewa clinic_code- chart_numberSresultur service_date status_flag IsEmpty amendedw First_name? Last_nameIsDate2UpdateagegsDateDiffNow%txtCntRepaintRefreshCreateQueryDefzNExecuteYvbLfT%RecordsAffectedP vbInformationnExit_Command1_ClickiErr_Command1_ClickinstringYsectionG component"cnt+position position2j basAutoExecHAutoExec AutoExecErru AutoExecDone1DoCmdƧ Hourglassb 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˟ DefaultExty strFilenameefResult IsMissing Application* hWndAccessAppstrDescriptiondvarItem vbNullCharYstrItemintPosrx  +H"h7xME(<<< <XRe+x@ i` +$/ (ison%`* P`,+>Hzi@hiB`F `H`J L%`N  P o ch%`T6 `Ve if`,ther`Xry:`Z09/1XK[   * ,8 ,h 2  B    0 (( P *X , ,   $ ( <8 x <   8 : P p  B   > 8 8 *@ ,p ,     > H <X         ( 8@H PX`Bh  B  8 @  >`  * , , 8 @ :P <  >  <0 p x            ,  ( 0 8 @  @H   0   6 F8  b p  B  6H    @ ,  2(` (V    L X p x   6 .  0 :P 4    20 (h   $     ( 08@PX `hpBx $ From Access 97 Developer's Handbookogr% by Litwin, Getz and Gilbert. (Sybex)Mi% 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 aK[ 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"?OCndbdXAoDAO.CADb"&Proc څOcSetφHjF= fi#Do WhileC$o#, 1r)m"\= LeftLejn) 1L8oop&tUC`( D@D +10Exit iutSel}6 QPsZAMsgBox "@or#" &.Num ": 5Descri|, _ vbPOKOn@9+Critical,)TXG3 H~adhVerifyAOrS''(I SampleOs Integer%_L1sbstatusKbI‘re^s obrokenK [S, btryO=that fAis, prnt u withP+SialogC' OPOPOP韑OP#'4&- r@ofrc`d !6a rx?/+ ???' V ??V +>-`9)TӃTڎVz/c>mx DBQ[QFQm tdfU'intI6QFs_`P ЙlngFlagLong9ekP^s ' sE5rs6iX sDD6gQAA`Fb]q@ۛaי"x;a RIT U efolqwheapa҆is lo~cp~pUZ(P  (`k&&^< 0g+ 1G ";DATABASE=(ISV'f 9h! Pmigh0|a06ife new pathisn9OK. So trap err@ors in e 1On Esume N{q Re@3 " bad, r%7 <o;o;;s;A 7 00Up e0.! P%w^ ` :Oxt/ & Rem|ov# f1Exit F{_DSelq6CaP/OX"0or6#+.F!J& &"1De ipAl%c Rfe2) Ystdole`VBIDEADAObasLinkedTablesd _Evaluate CheckLinkZstrTablervarRet CurrentDbS TableDefs%iFields7lP P,X %h:|VGetOpenFileNameAV<GetSaveFileNameAVd(CommDlgExtendedErrorxMEP(<,<< <,`.`0walk`2ross`XkpCr`4x`6`8 `:!`<"is`>`@`Bly r`D`lK[`F----`H`JB@`L8`N`P+R`8  )TX%+X ( )T%+ZP H\L H^LHbLX HdLB@H`L====HbLHdLlculHfLratiHhLineHjLlab HlL'HnLTE tHpLHrLt_naHtLast_HvL.[doHxLob) HzLrt_nH|Lhart+fx ^il 0Demoi~ Po].[ij pe(i (186i 54i ,0.7in ethnih  T(.#')%`.c`>ND (` ode)+`iXiNNERi .dob+rXirt_n`harth  * ,8 ,h   (08@HPX H`HpH            ( 8 HXhx BL* < 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   : K[ > @ H Xh   $ From Access 97 Developer's HandbookPID% by Litwin, Getz and Gilbert. (Sybex)% Copyright 1997. All Rights Reserved. filXP^^0^H^`^x^^^^^^^ ^8^P^h^^^^^pbe`]$7. A]$ serv]$8]$P]$hone]$]$]$]$]$]$  ]$@ ]$(====]$@]$X]$p]$ ]$"]$ $  !'-dd$6 This is the entry point you'll use to call the commona eG1 file open/save dialog. The parameters are listed below, and all are optional.ked $ From Access 97 Developer's Handbookorted% by Litwin, Getz and Gilbert. (Sybex)x% 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 T T9. !90 j9X 98 9: 9< >9> >9@ n9D l9l 9J L9B1 Didn't think most people would want to deal with these options.92$\94969Nq1 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 T$R'dH T$X'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 T!l'lj T!:$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- K[ 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[fpnYhogVgZUt2Jq^a' This the entry point you'0uso c>a!^k' E Pn/sY d .0e Љ s dlistedubw,ˁoralP O"' d?$In: ': on$e 0amoof" !adh_* cots, OR'd toge]r%q):d@irecto`in which`prst l2Q'A(: a Q/@A,Bup?AV1Add-tem. $Se@ xa0esY D: 1-d P"Apdicat #q (to 0%,q defa2 (1 if unspecified! W4: rx2Sar doesn|'tA,p Onlyfulo++:P value f e :textP boxDG::> :1e:: (True=a @e/False=1Pe !>spa-r2( &50e#= Left(F & "(256, 0), 4.tS%=7 SԻ@NQ9d PuXbe 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$ K[66"*.*" 2- &-0-& vbA4CharXcx /6] =ByV@#u26o2pNA`nP) f$bs@\pbp#anro2dV'e''r 'd ''l~ ' @['1:` hc8 0 r'LeftD- 1^#+ &]Q'S Siidirec?($c ly n&ko inal@blMike Gun loy?m0#' ?mc?mE=C+mNonfajN"&G(as a/jj12/2j5jfGUAWWSSKJREHLHEIEKZLSGNAUPMVL: GafXHFOABFTVSCBCEKSTFBDNCFBIOBB: PROJECT BPROJECTwmKPDIhxMEPS<S<S<<<< << (XRN0{30BE3D6E-CADF-11D6-9A87-00AA002AB2F7} p] X % x % L fil% S eg% %% %`1912`&ea`mult`DPr`reco` res``to c`dire`w la``` `````````````, &iiiFi  with`sed `(Pr`me fx%Pxpx  " 2 .P T L ,( JX L L H &h     (08@ HPX`hpx,   < 0 H X  p  * * <8 :x ,$ (  K[  $@h 8p  $$ ($H$p ""( HP h * N  j Xx     " "@ ,h  *   T T@ T T NH  T N $ P T` T *@\X 2 0 HX ` p    H @` *      8"H p       (@`p x      (  " H( <p H P H hx "     8 H Xh x      (X8 -   "0((0 X  ` h p  "  $  (    &8 @` L L @,P  T R >@ J   N V0h( @  P@n`   f 8Bh ! !!   ! ^! @P","  2"  "X>#H% `% (p% & &  0&& & ' ''  &' B ( ,h( (x) ) )()** ** *** *B * F+ BH+ B+ B+  , @, (P, 2x, 4, , ,,  -2(-0`-  (--- --2- .  &(.P.X. `.p.Z.. .. /xp+Works with labcorp internet-based hypersendGetz a(Program loaded into same folder as cdemsrMPut downloaded files into subfolder under CDEMS eg.,"c:\cdems\labcorp_files\"%FFiles named sequentially "{17 numbers}.res" eg. 200111191200026000.dat&each file can contain K[multiple recordsDProgram counts of OBX records equals number of results in input fileHEprogram links to cdem_dta.mdb in same directory and appends new labs.Ealso create a cdems style copy of every tracked lab in the input filewith name tblLabs_mmddyy_x On Error GoTo Err_Command1_ClickWh]@]`]]]]]]]0]H]`]x]]]]]]] ]8]P]h]]]]]]]](!new dlk 9/4/01]@!new dlk 3/2/08 eGFR subroutine]X--------------5change line below to match extension of lab raw filesClinicID = "dat"txt'---------------unk'S*$\' .L'''''''to assign the new table name#===================================5Creates an output table name (eg., "tblLabs012505_1")3these need to be manually erased or they accumulatetblLabs Z_ $a  'tblLabs Z_ '  L%. Create a new TableDef object. 2 Create fields and append them to the new TableDef object. clinic_code 75 B@ chart_number 75 B@raw_code 75 B@result 75 B@ service_date 75 B@ status_flag 75 B@amended 75 B@ Last_name 75 B@ First_name 75 B@DOB 75 B@age 75 B@q  L!B@  L%.#===================================Hsearches for new downloaded HL7 lab files in same directory as interfacedfilename = Dir$("C:\USERS\PUBLIC\DOCUMENTS\CDEMS\TRINITY\" & "*." & ClinicID) 'this line to path dir$$*. $ ~'/3use this line if raw files in same dir as interface  a$$ 'MsgBox filename+++++++++++++++++++++++++++ ! Open file.$b" Loop until end of file. " Read line into variable. $PIDKT  $ $ $  $'  $ $ $  $'  $ $ $  $'  $ $ $  $' $/ $/ $'OBRKT  $ $ $  $' $/ $/ $'OBXKT  $ $ $  $'  $ $ $  $'   $ $' $0C  '2HMsgBox "result/amended result field " & TestResult & "/" & AmendedResultk@ Comment9to capture hdl comments'd'k  TRIG. >400<to report uncalc ldlUTP'k UTD'kx ------------get cdems labcodes0SELECT tlkpCrosswalk.raw_code FROM tlkpCrosswalk# WHERE (((tlkpCrosswalk.lab_code)= ' '));'  L%. ! !A"is this lab raw_code in Crosswalk? B@ "'2only returns one record K[dna'k--------------------- na  B@  )8cliniccode='unk' ===========   )dPblank )k0 ===========  )  )  )c ) =========== $ F )d  )kp  ===========  )  ) $ X )k B@============================AeGFR module calculates Glomerular Filtration Rate from creatinine5creates a new lab 'eGFR whenever a 'crea' is receivedAthen there is a special update query added below that updates theI value of the crea and returns a correct eGFR value before writing to thelab temp table, dlk 3/2/08 crea  ' B@  )=cliniccode='unk' ===========   )d blank )k  ===========  )eGFR )  )c ) =========== $ F )d8  )k  ===========  )  ) $ X )"yyyy X$$$mmdd$ Xmmdd$  )kh B@ddon't write a eGFRk0 ============================  '3lab results tracked reportedk  '4total labs reportedSn ' B@xV+++++++++++++++++++++++++++ ~'0all done' B@dThere were no files found.A@4k L!B@===============================:data now in me.tblLabsXX/xx/xx_x - but has no clinic codesEthis section fills in clinic code and chart number using lastname&dobFdlk 3/3/08 added creation of eGFR variable whenever a crea is reported========[tblLabs Z_ ]'  Mneed to update eGFR result from the reported crea value with the MDRD formulaKeGFR=186 * TestResult ^ -1.154 * intAge ^ -0.203 * sngGender * sngEthnicity8if gender is stored in tblDemo as 'F' (.742 vs 1) and/orDethnicity as 'black' (1.210 vs. 1) the creatinine result is adjustedegfrHrequires the dob being present in the input lab file or eGFR not writtenOthis returns a 'UTD' if sex is unknown in cdems ('U') or ethnicity not recorded0  !')-1UPDATE tblDemo INNER JOIN  ON (tblDemo.last_name =  #.last_name) AND ([tblDemo].[dob] =   .dob) SET  *.chart_number = [tblDemo].[chart_number],  (.clinic_code = [tblDemo].[clinic_code],  A.result = IIf([tblDemo].[sex]<>'u' And Len([tblDemo].[ethnicity]) And Isdate( .dob), Format(186* .[result]^-1.154!*IIf([tblDemo].[sex]='F',0.742,1),*IIf([tblDemo].[ethnicity]='black',1.21,1)*  %.[age]^-0.203,'#.#'),'UTD') WHERE ((( .clinic_code)='unk') AND (( .raw_code)='eGFR'));'  L%. B@non egfr  UPDATE tblDemo INNER JOIN  ON (tblDemo.dob =  .dob) AND (tblDemo.last_name =  .last_name) SET  ).chart_number = [tblDemo].[chart_number], '.clinic_code = [tblDemo].[clinic_code]  WHERE ((( .clinic_code)='unk') AND (( .raw_code)<>'eGFR'));'  L%. B@d_process all records there are no gfr's to update -this is old code before eGFR added dlk 3/3/08  K[ UPDATE tblDemo INNER JOIN  ON (tblDemo.dob =  .dob) AND (tblDemo.last_name =  .last_name) SET  ).chart_number = [tblDemo].[chart_number], '.clinic_code = [tblDemo].[clinic_code]  WHERE ((( .clinic_code)='unk'));'  L%. B@k  L!B@Wthis is routine to update the templab table values if clinic is matching on chartnumber:matches on chart_number only those records still unmatched[tblLabs Z_ ]'+updated code to handle eGFR labs dlk 3/3/08  (  !%)UPDATE tblDemo INNER JOIN  ON (tblDemo.chart_number =  .chart_number) SET  (.clinic_code = [tblDemo].[clinic_code],  A.result = IIf([tblDemo].[sex]<>'u' And Len([tblDemo].[ethnicity]) And Isdate( .dob), Format(186* .[result]^-1.154!*IIf([tblDemo].[sex]='F',0.742,1)+*IIf([tblDemo].[ethnicity]='black',1.21,1)* %.[age]^-0.203,'#.#'),'UTD') WHERE ((( .clinic_code)='unk') AND (( .raw_code)='eGFR'));'  L%. B@ UPDATE  INNER JOIN tblDemo ON  '.[chart_number] = tblDemo.chart_number SET  ).[clinic_code] = [tblDemo].[clinic_code] WHERE  .[clinic_code] = 'unk' AND  .raw_code<>'eGFR';'  L%. B@)this is old code before eGFR added 3/3/08d   UPDATE  INNER JOIN tblDemo ON  '.[chart_number] = tblDemo.chart_number SET  ).[clinic_code] = [tblDemo].[clinic_code] WHERE  .[clinic_code] = 'unk';'  L%. B@k===============================<data now in me.tblLab - need to append to tblLab of dta file[tblLabs Z_ ];' 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  '  L%. B@==== All done. $ ^Total patients in input file:   $ ^!Total lab records in input file:    Lab Records in measurement set:   $ ^Records appended:  !  A@4.L.L8|0( "!8A@4op@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]0]H#holds col for desired nth Chr$(124)]`"holds col for desired nth Chr$(94)"find the column of the desired "|"''  a  '  $|$^G  'jfind the col of the desired "^" ''  a  '  $^$^  $|$ ^G  'j 'iAttribute VB_Name = "Form_splash" Bas0{30BE3D6E