Friday, March 30, 2012

Mapping table problem

HI guys
I need to put multiple coniditions on my table based on some combinations.

Here is my main table-

PractitionerDHBNamePHONamePracticenamePractitionerNameLocumYCountNCount4Canterbury DHBPartnership Health (Canterbury)-596721Linwood Avenue Medical CentreChristine AbbasiNo0132Canterbury DHBPartnership Health (Canterbury)-596721Felicia House Clinic (Pearson)Nicci PaveyNo01197Canterbury DHBPartnership Health (Canterbury)-596721Woodham Road Health CarePeggy Shelton-AgarNo01394Hawkes Bay DHBHawkes Bay PHO Limited-587862The Doctors NapierJohn LairdYES10549Canterbury DHBPartnership Health (Canterbury)-596721Linwood Avenue Medical CentreDenise ArmstrongNo011286Canterbury DHBPartnership Health (Canterbury)-596721Darfield Medical Centre LimitedKatherine Muscroft-TaylorNo011501Counties-Manukau DHBProcare Network Manukau Limited-573183Manukau City Health CentreCaroline ShephardYES101932Hawkes Bay DHBHawkes Bay PHO Limited-587862Clive Medical Centre LtdKaren IrwinYES102226Canterbury DHBPartnership Health (Canterbury)-596721Sumner Health CentreAnne ScottNo013243Waitemata DHBHarbour PHO Ltd-610733Byron MedicalRex Livingstone SinclairNo013263Canterbury DHBPartnership Health (Canterbury)-596721Sumner Health CentrePeter Wynn NicholsonNo013381Otago DHBOtago Southern Region Primary Health Organisation-597004Dr Visagie's PracticeFay YoungNO01

Here is my mapping table-

Locum FlagNo countYes countPercentageNo101No110.75Yes110.25No200.5No300.3333No400.25Yes210.125No210.75Yes010.75Yes020.375Yes030.25Yes040.1875

I have to add an additional column called 'percentage' in my main table by refering the mapping table.

For ex for a particular practitioner, Locum flag is 'Yes', nocount is 1 and yes count is 1, then percentage should be '0.25'

How should I do this?

So, when you are adding data to your main table, why not just add a chunk of code that would calculate what the percentage would be and keep the mapping table 'on paper' ? (And then store the result)
|||

hi Tas_CRO

How do I add that chunk of code to my main table?

That is probably I need to know

Thanks

No comments:

Post a Comment