Revision [459]

Last edited on 2011-07-08 14:45:59 by SethKrieger
Additions:
The query itself is a main query that lists diagnoses that appear in any of a bunch of fields in OM and CM and a subquery used in the WHERE clause. The subquery contains a simple query for the dxnum in each possible location, and all the simple queries are UNIONed together to get a single list.
SELECT
dxcode, dxtype, dxdesc
FROM
dx
WHERE
dxnum IN
Deletions:
The query itself is a main query that lists diagnoses that appear in any of a bunch of fields in OM and CM. The subquery contains a simple query for the dxnum in each possible location, and all the simple queries are UNIONed together to get a single list.
SELECT dxcode, dxtype, dxdesc FROM dx WHERE dxnum IN


Revision [457]

Edited on 2011-07-08 14:43:57 by SethKrieger
Additions:
======Diagosis Codes In Use======
This query returns a list of diagnoses that are currently in use in Claim Setups in OM and in DSM Profiles in CM. These are the ones that you will have to replace by the new ICD-10 diagnosis codes on or before October of 2013.
The query itself is a main query that lists diagnoses that appear in any of a bunch of fields in OM and CM. The subquery contains a simple query for the dxnum in each possible location, and all the simple queries are UNIONed together to get a single list.
SELECT dxcode, dxtype, dxdesc FROM dx WHERE dxnum IN
(
SELECT dx1 FROM ptcsu
UNION
SELECT dx2 FROM ptcsu
UNION
SELECT dx3 FROM ptcsu
UNION
SELECT dx4 FROM ptcsu
UNION
SELECT box67 FROM ptubsu
UNION
SELECT box67 FROM ptubsu
UNION
SELECT box67 FROM ptubsu
UNION
SELECT box67 FROM ptubsu
UNION
SELECT box67 FROM ptubsu
UNION
SELECT box67 FROM ptubsu
UNION
SELECT box67 FROM ptubsu
UNION
SELECT box67 FROM ptubsu
UNION
SELECT box67 FROM ptubsu
UNION
SELECT box67 FROM ptubsu
UNION
SELECT fl67i FROM ptubsu
UNION
SELECT fl67i FROM ptubsu
UNION
SELECT fl67i FROM ptubsu
UNION
SELECT fl67i FROM ptubsu
UNION
SELECT fl67i FROM ptubsu
UNION
SELECT fl67i FROM ptubsu
UNION
SELECT fl67i FROM ptubsu
UNION
SELECT fl67i FROM ptubsu
UNION
SELECT fl67i FROM ptubsu
UNION
SELECT dxnum FROM v_ptdsmlist WHERE dxnum <> 0
)
ORDER BY dxcode
Deletions:
======Query Title ======
comments here appear in italics
paste your tested query here


Revision [456]

The oldest known version of this page was created on 2011-07-08 14:27:13 by SethKrieger [Cloned from NewQuery]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki