Jump to content

SQL Queries Doubts


Recommended Posts

Posted

Hi mams,

Naku ninna oka proj icharu. Code develop cheyamanaru. Next week wednesday ki submit cheyali. Evaraina help cheyandi plssss..... Kontha requirement ikkada post chestha.... queries thelisthe pls help cheyandi.... ee Proj complete chesthe pakka september dhaka unchutharu.....


Criteria:
To select Diabetic Members:
Select Diabetic Members by using the Diabetes Data Set provided by Clinical Epidemiology and joining them to the Membership Span ID table to gather the member identifiers for the unique key.
1. Tables:
a. PWN401D1850_[ACC].dbo.P_CEB_CDC_MBRS_3q10
b. [CHCQES].[dbo].[t_membership_span_id]
2. Criteria:
a. Using dbo.P_CEB_CDC_MBRS, located in ACC, join to the [CHCQES].[dbo].[t_membership_span_id] table located under CHCQES by using MEMBERID.
b. Please create a Beacon_CDC_MBRS table with the following fields:
i. MEMBERID
ii. CONTRACT_NUM
iii. MEM_BIRTH_YR_DT
iv. MEM_FST_INIT_NAME
v. CHQ_SEX_CD
vi. diabetes_HbA1c_denominator
vii. Reporting_Period (should be updated in this table and passed to other tables)
Identifying Acute Care Hospitalizations for Diabetic Members:
To identify All Admissions to an Acute Care Hospital for the identified Diabetic Members within the prior 6 months.
1. Tables:
a. Beacon_CDC_MBRS
b. [CHCQES].[dbo].[v_Facility_Claims]
1. Criteria:
a. Using the Beacon_CDC_MBRS join to [CHCQES].[dbo].[v_Facility_Claims](if possible, based on run time performance) by using the following and create beacon CDC_MBRS_HOSP_CLMS
b. And pull all claims where:
i. where POS_CODE = '1' and
ii. SUBSTRING(CONVERT(VARCHAR(12),ADM_DATE, 112), 1, 8) BETWEEN 20090701 and 20100930 and
iii. DISC_DISP_CODE = '01' and
iv. SUBSTRING(CONVERT(VARCHAR(12),discharge_date, 112), 1, 8)<>'19010101' and
v. Where LINE_CODE not in (‘0450’,’0451’,’0452’,’0456’,0459’)

c. With the following Fields to create Beacon_CDC_MBRS_HOSP_CLMS
i. CONTRACT_NUM
ii. CHQ_BIRTH_CCYY
iii. CHQ_PAT_FINIT
iv. CHQ_BIRTH_CCYY
v. SEX_CODE
vi. ADM_DATE
vii. DISCHARGE_DATE
viii. CHQ_PAT_AGE as AGE_AT_DOS
ix. MEMBERID
x. diabetes_HbA1c_denominator
xi. Reporting Period

Identify 30 day Readmissions:
Using the Beacon_CDC_MBRS_HOSP_CLMS, if a member has several admissions, determine which admission occurred with 30 days of the most recent discharge date and admission date in admission date order, Ascending
1. Tables:
a. Beacon_CDC_MBRS_HOSP_CLMS
2. Criteria:
a. Using the Beacon_CDC_MBRS_HOSP_CLMS, create a table that holds all readmissions that occurred within 30 days, named Beacon_CDC_MBRS_READM_CLMS with the following fields:
i. MEMBERID
ii. Reporting Period (populate field with 3q10)
b. Readmission Criteria:
i. From the Beacon_CDC_MBRS_HOSP_CLMS determine which member have multiple admissions
ii. Sort the mulitple admissions by MemberID, in ascending order
iii. Calculate the days between admissions by using the discharge date of the first admission record in the sort and the admission record of the second admission in the sort.
iv. If the days between initial discharge date and admission date are between 0 and 30, move to the readmission table
1. if there are mutlple admission, all must be moved to the readmission table.

Example of Readmissions
All admissions and readmissions were counted. For example, here’s a member with 6 admissions, 2 readmissions
              MEM_NBR        MIN_ADM_DT  MAX_DIS_DT    READM_DT
1            1790288            5/6/2010            5/7/2010           
2            1790288            6/11/2010          6/17/2010         
3            1790288            8/10/2010          8/27/2010          9/26/2010
4            1790288            9/26/2010          10/8/2010         
5            1790288            11/22/2010        11/28/2010        12/20/2010

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

  • Bairagi From Bapatla

    13

  • manoghna

    10

  • nenuinthe

    6

  • katharnak

    5

Top Posters In This Topic

Posted

idhe req part-part ga vesi vunte janalu help sese valu....intha pedhaga vunte bayam vesthadhii...


ne first req lo......tables lo vunna columns list out seyyi........so tht joining wil be easy to say... S#d^ S#d^

Posted

NENU CODING LO KONCHEM WEAK... NAA POST KONCHEM PAIKI LEPUTHU UNDANDI.... NAKU OFFICE LO EVARAINA CHUSTHE PROB AYYIDI ANDHUKANI...

Posted

[quote author=INFATUATION link=topic=194499.msg2370836#msg2370836 date=1305828671]
idhe req part-part ga vesi vunte janalu help sese valu....intha pedhaga vunte bayam vesthadhii...


ne first req lo......tables lo vunna columns list out seyyi........so tht joining wil be easy to say... S#d^ S#d^
[/quote]

@gr33d @gr33d same peeling.. chooddamu ani anukunna... mottam chadavaleka... light teesukunna...

Posted

Ekkada babu Job, requirement anta neat ga icchinru... Naaku ippati varaku itlanti job dorikale  sFun_duh sFun_duh sFun_duh

Eppudu requirement telsukovali anna, oka 10 members ni pattali  (*" (*" (*"

Posted

&*B@ &*B@ &*B@ &*B@ asalu mee company prj details ila public forum ela baa.. idhi evaranna chuste nee job kee kashtam.. pm lo nadipinchali kaani

Posted

EDHO OKATI BAA NAA PARISTHITHI DARUNAM GA UNDI SO PLS HELP ME....

Posted

[quote author=Bairagi From Bapatla link=topic=194499.msg2371032#msg2371032 date=1305831095]
EDHO OKATI BAA NAA PARISTHITHI DARUNAM GA UNDI SO PLS HELP ME....
[/quote]

Pen paper teesko, oka bomma eyyi...

Table name paina raashi, column names raashi denni join cheyyalo match the following laaga match cheyyi... Conditions anni vaade icchinru... Aa bomma ni chooshi query raayi... Raaka pote, aa bomma ikkada iyyi, evaro okaru raashi pedtaru...

Inta matter iste, cheshe opike evariki undadu....

Posted

I hope this is somewhat better to understand the requirement....



Criteria:
To select Diabetic Members:
Select Diabetic Members by using the Diabetes Data Set provided by Clinical Epidemiology and joining them to the Membership Span ID table to gather the member identifiers for the unique key.


1.[glow=red,2,300][b] Tables:[/b][/glow]
                a. PWN401D1850_[ACC].dbo.P_CEB_CDC_MBRS_3q10
                b. [CHCQES].[dbo].[t_membership_span_id]

2. [glow=red,2,300][b]Criteria:[/b][/glow]
            a. [b]Using dbo.P_CEB_CDC_MBRS, located in ACC, join to the [CHCQES].[dbo].[t_membership_span_id] table located under CHCQES by using      MEMBERID. [/b]
            b. [b]Please create a Beacon_CDC_MBRS table with the following fields:[/b]
                                  i. MEMBERID
                                  ii. CONTRACT_NUM
                                  iii. MEM_BIRTH_YR_DT
                                  iv. MEM_FST_INIT_NAME
                                  v. CHQ_SEX_CD
                                  vi. diabetes_HbA1c_denominator
                                  vii. Reporting_Period (should be updated in this table and passed to other tables)

____________________________________________________________________________________________________

[glow=red,2,300][b]Identifying Acute Care Hospitalizations for Diabetic Members:[/b][/glow]
To identify All Admissions to an Acute Care Hospital for the identified Diabetic Members within the prior 6 months.

1. [glow=red,2,300][b]Tables: [/b][/glow]
              a. Beacon_CDC_MBRS
              b. [CHCQES].[dbo].[v_Facility_Claims]


1. [glow=red,2,300][b]Criteria:[/b][/glow]
     
          a. [b]Using the Beacon_CDC_MBRS join to [CHCQES].[dbo].[v_Facility_Claims](if possible, based on run time performance) by using the following and create beacon CDC_MBRS_HOSP_CLMS[/b]
         
          b. And [b]pull all claims where:[/b]
                            i. where POS_CODE = '1' and
                            ii. SUBSTRING(CONVERT(VARCHAR(12),ADM_DATE, 112), 1, 8) BETWEEN 20090701 and 20100930 and
                            iii. DISC_DISP_CODE = '01' and
                            iv. SUBSTRING(CONVERT(VARCHAR(12),discharge_date, 112), 1, 8)<>'19010101' and
                            v. Where LINE_CODE not in (‘0450’,’0451’,’0452’,’0456’,0459’)

        c. [b]With the following Fields to create Beacon_CDC_MBRS_HOSP_CLMS[/b]

                            i. CONTRACT_NUM
                            ii. CHQ_BIRTH_CCYY
                            iii. CHQ_PAT_FINIT
                            iv.CHQ_BIRTH_CCYY
                            v. SEX_CODE
                            vi.ADM_DATE
                            vii.DISCHARGE_DATE
                            viii. CHQ_PAT_AGE as AGE_AT_DOS
                            ix. MEMBERID
                            x. diabetes_HbA1c_denominator
                            xi. Reporting Period
_______________________________________________________________________________________________________

Identify 30 day Readmissions:
Using the Beacon_CDC_MBRS_HOSP_CLMS, if a member has several admissions, determine which admission occurred with 30 days of the most recent discharge date and admission date in admission date order, Ascending

1. [glow=red,2,300][b]Tables[/b][/glow]:
              a.Beacon_CDC_MBRS_HOSP_CLMS
2. [glow=red,2,300][b]Criteria:[/b][/glow]

              a.[b]Using the Beacon_CDC_MBRS_HOSP_CLMS, create a table that holds all readmissions that occurred within 30 days, named    Beacon_CDC_MBRS_READM_CLMS with the following fields:[/b]
                                  i. MEMBERID
                                  ii. Reporting Period (populate field with 3q10)

              b.Readmission Criteria:
                              i. From the Beacon_CDC_MBRS_HOSP_CLMS determine which member have multiple admissions
                              ii. Sort the mulitple admissions by MemberID, in ascending order
                              iii. Calculate the days between admissions by using the discharge date of the first admission record in the sort and the admission record of the second admission in the sort.
                            iv. If the days between initial discharge date and admission date are between 0 and 30, move to the readmission table

_________________________________________________________________________________________
1. if there are mutlple admission, all must be moved to the readmission table.

Example of Readmissions
All admissions and readmissions were counted. For example, here’s a member with 6 admissions, 2 readmissions
              MEM_NBR        MIN_ADM_DT  MAX_DIS_DT    READM_DT
1            1790288            5/6/2010            5/7/2010           
2            1790288            6/11/2010          6/17/2010         
3            1790288            8/10/2010          8/27/2010          9/26/2010
4            1790288            9/26/2010          10/8/2010         
5            1790288            11/22/2010        11/28/2010        12/20/2010

Posted

[quote author=meghana9 link=topic=194499.msg2371048#msg2371048 date=1305831260]
I
[/quote]

nuv kuda naalaane manchi manishivaa...  you rock you rock you rock manam PM aata adukundam  S#d^ S#d^

Posted

[quote author=katharnak link=topic=194499.msg2371056#msg2371056 date=1305831359]
nuv kuda naalaane manchi manishivaa...  you rock you rock you rock manam PM aata adukundam  S#d^ S#d^
[/quote]  F@!n F@!n
[quote author=Bairagi From Bapatla link=topic=194499.msg2371032#msg2371032 date=1305831095]
EDHO OKATI BAA NAA PARISTHITHI DARUNAM GA UNDI SO PLS HELP ME....
[/quote] join the below two tables

a.  PWN401D18 50_[ACC].dbo.P_CE B_CDC_MBR S_3q10
b.  [CHCQES].[dbo].[t_membership_span_id] 

using column name [b]MEMBERID[/b]  and name the result table as [b]Beacon_CD C_MBRS[/b]

by doing this you are done with your 1st part :)

Posted

[quote author=meghana9 link=topic=194499.msg2371184#msg2371184 date=1305832619]


by doing this you are done with your 1st part :)
[/quote] sHa_clap4 sHa_clap4 sHa_clap4 sHa_clap4 sHa_clap4

Posted

[quote author=katharnak link=topic=194499.msg2371201#msg2371201 date=1305832728]
sHa_clap4 sHa_clap4 sHa_clap4 sHa_clap4 sHa_clap4
[/quote]  thankyou its simple but requirement ye bayapetela vundhi ..chesthe easy anukunta  sSa_j@il i too dono much..

Posted

1st part and 2nd part half already done 3rd part ki help cheyandi.....
Posted

[quote author=meghana9 link=topic=194499.msg2371219#msg2371219 date=1305832873]
  thankyou its simple but requirement ye bayapetela vundhi ..chesthe easy anukunta  sSa_j@il i too dono much..
[/quote]

nuv asal naaku db lo eppudu kanipinchale.. 4k eppud vesesaav  sCo_^Y sCo_^Y

×
×
  • Create New...