Follow via:
RSS
Email Alert
Question
0 Votes
+ -

how to write the full statement?

Find the patient identification number and the rounded average of RBC, WBC, PLT (by 1 decimal) which have been entered in the first half of 2005 and with WBC greater than 9. Show only the Patient's identification number, RBC, WBC, PLT and the Date of the laboratory result.
29th Sep

Answers (2)

0 Votes
+ -
Homework? Nt
~
29th Sep

Replies

NT
Art222 30th Sep
more detail...software you're using...OS...what you're trying to do? because to me the whole question sounds like it's taken directly out of a textbook.
PurpleSkys 1st Oct
That looks like exactly what the question-asker has done here.

Looks like they're looking for a select statement that will return a bunch of ePHI from a database containing medical records, and they only want integer and date-format responses. I bet it is a pretty easy query to write, if you know SQL and make some assumptions about the fields based on the names supplied in the example.
dcolbert@... 1st Oct
1 Vote
+ -
Here is one possible way...
This seems like it would do the trick:

select patient_identification_number
, CONVERT(decimal(18,1), SUM(RBC) / COUNT(RBC)) as AVG_RBC
, CONVERT(decimal(18,1), SUM(WBC) / COUNT(WBC)) as AVG_WBC
, CONVERT(decimal(18,1), SUM(PLT) / COUNT(PLT)) as AVG_PLT
, Lab_Result_Date
from patient_info_table
where Lab_Result_Date >= '01/01/2005' and Lab_Result_Date 9
group by patient_identification_number

But if you don't understand why - you probably shouldn't submit it as your answer - because there are already enough people like that in the industry as it is, anyhow.

Props to an app/SQL developer I know for throwing this together for me.

And really - here is my point... I'm not even *remotely* a coder or developer. If the logic required to make this statement in SQL, Java, C++, Visual Basic or any other development or scripting language escapes you - you might be barking up the wrong tree in your career development. Don't chase after coding because you think it'll be good money if you don't have the mindset for it. But if you can read the code above and the light goes on for you and you can at least understand in an abstract sense what is going on there... then by all means keep on.
Updated - 1st Oct
Answer the question
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.