Checking for Fields that Should Be Included in Encounter Import

The following query generates an HTML report that indicates the field elements that should be considered for inclusion if you are planning to import encounter data from a third-party product for billing by SOS Office Manager. The previous year of charge entries are analyzed.

Select 'Total Charge Count',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365)
UNION
Select 'CSU = U',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and csutype = 'u'
UNION
Select 'CSU = N',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and csutype = 'n'
UNION
Select 'Date Range',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(startdate,trandate) <> trandate
UNION
Select 'Units <> 1',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and units <> 1
UNION
Select 'Cost',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(cost,0) <> 0
UNION
Select 'CPT Modifiers',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(cptmod1,'')+coalesce(cptmod2,'')+coalesce(cptmod3,'')+coalesce(cptmod4,'') <> ''
UNION
Select 'Non-default POS',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and poscodenum <> (select lastpos from sos.ptvars where ptnum = journal.ptnum)
UNION
Select 'FP',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(fp,'') <> ''
UNION
Select 'EMG',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(emergency,'') <> ''
UNION
Select 'COB',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(cob,'') <> ''
UNION
Select 'Box 24K',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(box24k,'') <> ''
UNION
Select 'Lab Charge',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(labchg,0) <> 0
UNION
Select 'SortCode',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(sortcode,0) <> 0
UNION
Select 'Comment1',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(comment1,'') <> ''
UNION
Select 'Comment2',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(comment2,'') <> ''
UNION
Select 'Remark',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(remark,'') <> ''
UNION
Select 'Memo',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(memo,'') <> ''
UNION
Select 'MemoHA0',count(*) from sos.journal join sos.jcharges where trandate > (today() - 365) and coalesce(memoisha0,0) <> 0
;
OUTPUT TO 'c:\sos\ChargeImportCheck.html' format html

 

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.