1 / 18

VB Programming Example

VB Programming Example. Paul G. Catrou, MD APiii Breakout Session 10/10/2007. What do we want to do with the data? By drug Count total number of samples Percent and total out of range low Percent and total out of range high Sort by drug

Download Presentation

VB Programming Example

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VB Programming Example Paul G. Catrou, MD APiii Breakout Session 10/10/2007

  2. What do we want to do with the data? • By drug • Count total number of samples • Percent and total out of range low • Percent and total out of range high • Sort by drug • Output in tab delimited file with column headings • Look at the data • delimited or columnar • Our case is columnar • Does the file contain miscellaneous stuff we don't need? If yes, figure out how to identify valid lines (records) to process. • Assign computing variable names to data we need (the discreet data elements in the line).

  3. In our case, we will parse all the data elements. pn patient name hn medical record number doc ordering doctor loc patient location acno accession number coldt collect date coltm collect time test test code res result lo low limit of reference interval hi high limit of reference interval

  4. Identify other variables needed: tLo total number of low results tHi total number of high results pLo percentage of low results pHi percentage of high results total total number of results dName drug name dl delimiter (tab character) dat(5000) array for to hold output strings (records or lines) DN(8,2) array to hold drug test code and drug name Ary(18,3) array to hold drug counts, highs, and lows

  5. Read line and parse into distinct data elements which may be needed. Do counts as each line is processed Assemble the output line with sorting fields first and inserting tab delimiter. Store in temporary array (list) Sort the array (list) Calculate the percentages Create the output file Write out sorted list Write out summary data End

More Related