Question

In: Computer Science

Problem 2: The Injury Severity Score (ISS) is a medical score to assess trauma severity and...

Problem 2: The Injury Severity Score (ISS) is a medical score to assess trauma severity and is calculated as follows. Each injury is assigned an Abbreviated Injury Scale (AIS) score in the range [0-5] which is allocated to one of six body regions (head, face, chest, abdomen, extremities, and external). Only the highest AIS score in each body region is used. The three most severely injured body regions (i.e. with the highest scores) have their AIS scores squared and added together to produce the ISS. Therefore, the value of the ISS is always between 0 and 75. Create a function called compute_iss that takes an array of 6 AIS values as its only input argument and produces the ISS value as its output. In your homework m-file, define the AIS array [3 0 4 5 3 0] and call to your function using this array as an argument. Find the ISS value for the defined AIS array. Make sure to add %comments.

Solutions

Expert Solution

  1. #include <stdio.h>
  2. int compute_iss(int ais[]);
  3. int main()
  4. {
  5. int ais[6]=[3 0 4 5 3 0];
  6. // ais array is passed to comput_iss()
  7. iss = calculateSum(ais);
  8. printf("ISS = %d", iss);
  9. return 0;
  10. }
  11. int compute_iss(int ais[])
  12. {
  13. int a=0,b=0,c=0,i;
  14. //a,b,c are for three highest numbers in an array
  15. for (i = 0; i < 6; ++i)
  16. {
  17. // checks with the third largest number
  18. if(ais[i]>a){
  19. // checks with the second largest number
  20. if(ais[i]>b){
  21. // checks with the first largest number
  22. if(ais[i]>c){
  23.    /*if it is third largest number and third largest value is replaced with second largest
  24. value and third largest value is replaced with second largest value and new value is
  25. inserted into the first largest number*/
  26. a=b;
  27. b=c;
  28. c=ais[i];  
  29. }
  30. else{
  31. /*if it is second largest number and third largest value is replaced with second largest
  32. value and new value is inserted into the second largest number*/
  33. a=b;
  34. b=ais[i];
  35. }
  36. }
  37. else{
  38.    //if it is third largest number and new value is inserted into the third largest number//
  39. a=ais[i];
  40. }
  41. }
  42. }
  43.   // returns the iss value
  44. return a*2+b*2+c*2;
  45. }

Related Solutions

Matlab The following matrix describes Injury Severity Score (ISS, unitless) and hospital stay (days). Row 1...
Matlab The following matrix describes Injury Severity Score (ISS, unitless) and hospital stay (days). Row 1 is the ISS and row 2 is the hospital stay. [64,35,50,46,59,41,27,39,66; 8,2,5,5,4,3,1,4,6].     Create a script that plots stay in hospital vs ISS. Label the plot and all axis. Display to the command window a message with the mean ISS score, and the mean days in hospital. (i.e. “The mean ISS score is 30”, not just x = 30). Use the sort(x) to arrange...
implications for clinical practice with one recommendation for people with age 60-80 with trauma severity
implications for clinical practice with one recommendation for people with age 60-80 with trauma severity
Based on the unemployment rate in the United States, assess the severity of the COVID-19 recession....
Based on the unemployment rate in the United States, assess the severity of the COVID-19 recession. And discuss the federal government's response.
PSI 17 Birth Trauma Rate – Injury to Neonate why this patient safety indicator require more...
PSI 17 Birth Trauma Rate – Injury to Neonate why this patient safety indicator require more attention? What are ways of prevention?  
following data safety injury severity Fatal non-fatal no injuries total yes 669 155,071 467,362 623,102 no...
following data safety injury severity Fatal non-fatal no injuries total yes 669 155,071 467,362 623,102 no 487 4294 3824 8605 total 1,156 159,365 471,186 631,707 using this data, we wish to determine if there is any association between using safety restraints and injury severity. as such we will use a chi-square test for independence Q10: state the null and alternative hypotheses Q11:fill in the table below with the expected counts assuming the null hypothesis is true safety restraint/injury severity fatal...
The Silverman score is a system that is used to assess the level of respiratory distress...
The Silverman score is a system that is used to assess the level of respiratory distress of a newborn. The signs of distress are: 1. Nasal flaring 2. Expiratory grunting 3. Tachypnea 4. Retractions.   Please discuss the following for each distress. 1.    Sign 2.    Intervention used to correct it.
< Back to Assignment Attempts: Score: / 2 2. Problem 18-07 eBook Problem 18-07 Refunding Analysis...
< Back to Assignment Attempts: Score: / 2 2. Problem 18-07 eBook Problem 18-07 Refunding Analysis Mullet Technologies is considering whether or not to refund a $175 million, 14% coupon, 30-year bond issue that was sold 5 years ago. It is amortizing $6 million of flotation costs on the 14% bonds over the issue's 30-year life. Mullet's investment banks have indicated that the company could sell a new 25-year issue at an interest rate of 10% in today's market. Neither...
A credit score is used by credit agencies​ (such as mortgage companies and​ banks) to assess...
A credit score is used by credit agencies​ (such as mortgage companies and​ banks) to assess the creditworthiness of individuals. Values range from 300 to​ 850, with a credit score over 700 considered to be a quality credit risk. According to a​ survey, the mean credit score is 700.9. A credit analyst wondered whether​ high-income individuals​ (incomes in excess of​ $100,000 per​ year) had higher credit scores. He obtained a random sample of 41 ​high-income individuals and found the sample...
A credit score is used by credit agencies​ (such as mortgage companies and​ banks) to assess...
A credit score is used by credit agencies​ (such as mortgage companies and​ banks) to assess the creditworthiness of individuals. Values range from 300 to​ 850, with a credit score over 700 considered to be a quality credit risk. According to a​ survey, the mean credit score is 706.2. A credit analyst wondered whether​ high-income individuals​ (incomes in excess of​ $100,000 per​ year) had higher credit scores. He obtained a random sample of 42 ​high-income individuals and found the sample...
A credit score is used by credit agencies​ (such as mortgage companies and​ banks) to assess...
A credit score is used by credit agencies​ (such as mortgage companies and​ banks) to assess the creditworthiness of individuals. Values range from 300 to​ 850, with a credit score over 700 considered to be a quality credit risk. According to a​ survey, the mean credit score is 705.9. A credit analyst wondered whether​ high-income individuals​ (incomes in excess of​ $100,000 per​ year) had higher credit scores. He obtained a random sample of 39 ​high-income individuals and found the sample...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT