DENTV EXCEL EXTRACT

TITLEVALUE
NAMEDENTV EXCEL EXTRACT
DESCRIPTIONThis rpc will extract data from the history file (228.1) and format it
so that the data can be imported into a spreadsheet. The data will be in
delimited format, with the '^' as the delimiter.
TAGEXCEL
ROUTINEDENTVRP9
INPUT PARAMETERSSEQUENCE NUMBER1
INPUT PARAMETERSDT
DESCRIPTIONThis is the start date/time for the extract. The date/time must be in
Fileman internal format.
PARAMETER TYPELITERAL
REQUIREDYES
MAXIMUM DATA LENGTH14

INPUT PARAMETERSSEQUENCE NUMBER2
INPUT PARAMETEREDT
DESCRIPTIONThis is the end date for the extract. It must be in internal Fileman
format.
PARAMETER TYPELITERAL
REQUIREDYES
MAXIMUM DATA LENGTH14

INPUT PARAMETERSSEQUENCE NUMBER3
INPUT PARAMETERPROV
DESCRIPTIONOptional - if you want to extract only those records for a particular
provider, then pass that provider's ien from file 200.
PARAMETER TYPELITERAL
REQUIREDNO
MAXIMUM DATA LENGTH20

INPUT PARAMETERSSEQUENCE NUMBER4
INPUT PARAMETERDFN
DESCRIPTIONOptional - if you wish to extract records for a particular patient, then
pass the ien of that patient.
PARAMETER TYPELITERAL
REQUIREDNO
MAXIMUM DATA LENGTH20

INPUT PARAMETERSSEQUENCE NUMBER5
INPUT PARAMETERFLG
DESCRIPTIONContains the string CFPO or any combination of that.
C=complete txns (defaulted for old extract option)
P=planned txns
F=Findings
O=Observed
PARAMETER TYPELITERAL
REQUIREDNO
MAXIMUM DATA LENGTH4

INPUT PARAMETERSSEQUENCE NUMBER6
INPUT PARAMETERSTN
DESCRIPTIONContains the external facility ID (500, 500BZ, etc) for which the user
wants extracted data. If this field is null (not sent), then all
facilities will be returned.
PARAMETER TYPELITERAL
REQUIREDNO
MAXIMUM DATA LENGTH10

RETURN VALUE TYPEGLOBAL ARRAY
RETURN PARAMETER DESCRIPTION RET is returned as the global reference ^TMP("DENT",$J)
SD = start date for extract (required)
ED = end date for extract (required)
PROV = provider ien (optional) - if present only return prov's recs
DFN = patient ien (optional) - if present only return pat's recs
FLG = E or R (optional) - default is "E" if not passed
E = use encounter date/time R = use record created date
STN = facility to extract
Format of global array returned. Each record found in file 228.1
will consist of the following format:
# indicates start of individual record
$ indicates end of individual record
Line 1 of a record: # (starter block)
Line 2 of a record: p1^p2^p3^p4^p5^p6^p7^p8^p9^p10^p11^ where
p1 = ien to file 228.1
p2 = name of patient p3 = SSN of patient
p4 = group flag (y) p5 = date record created
p6 = name of person who entered record
p7 = name of provider p8 = ien to visit file
p9 = date of encounter p10 = time of encounter
p11 = date/time of DAS entry
Line 3 of record: p1^p2^p3^p4^p5^p6^p7^p8^p9^p10^p11 where
p1 = location p7 = primary pce diagnosis
p2 = agent orange related (y) p8 = DAS patient category
p3 = environmental contaminant related (y)
p4 = ionizing rad related (y) p9 = DAS bed section
p5 = service connected related (y)
p6 = military sexual trauma (y) p10 = DAS division
p11 = DAS disposition
Lines 4,5,6,etc of a record consist of the individual tooth data
p1^p2^p3^p4^p5^p6^p7^p8^p9^p10^p11^p12^p13^p14^p15 where
p1 = tooth # (0-32)
p2 = surfaces
p3 = cpt code
p4 = cpt short desc
p5 = quadrants
p6 = # canals
p7 = primary flag (y)
p8 = icd9 code (primary)
p9 = ctv value
p10 = flag indicating data filed to DAS (y)
p11 = flag indicating data filed to PCE (y)
p12,p13,p14,p15 = icd9 code (secondary codes)
Last line of a record = $

The program receiving this data needs a loop looking for start block #
1. Gets line starting with '#'
2. Save all characters after the # to be used to create an excel row
3. Get next continuation line
4. Then loop to retrieve all tooth related data
a. Then output as string the data from step 2 + 3 + 4 as one line
for one row in the spreadsheet. If multiple teeth per record,
then you should have multiple rows in your spreadsheet.
5. $ indicates termination of individual record, go back and look for
next start block #
6. User should now have a .TXT file for importing into Excel to be
parsed using the ^ as a delimiter.
AVAILABILITYAGREEMENT
INACTIVE
CLIENT MANAGER
WORD WRAP ONTRUE
VERSION
SUPPRESS RDV USER SETUP
APP PROXY ALLOWED