Content from Data.xlsx file PatientID First Name Last Name PATO01 Emily Harris PATO02 Emily Lee PAT003 Clark PATO04 Jane Brown PATO05 Emily Smith PATO06 Michael Smith Michael Gender DOB Female Female Male Male Male Male 1/9/82 1/10/67 1/8/59 1/7/80 1/3/63 1/9/65 Admission Date 11/15/22 7/12/23 6/30/23 3/22/23 5/4/23 7/7/23 Length OfStay 20 45 3 9 22 7 BaseCharge 521.98 544.13 430.21 445.09 910.19 695.5 DiscountRate 0.27 0.03 0.46 0.13 0.18 0.35

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Content from Data.xlsx file
PatientID First Name LastName Gender DOB
PATO01 Emily
Harris
Female
PATO02 Emily
Lee
Female
PATO03
Michael
Clark
Male
PATO04
Jane
Male
PATO05 Emily
Male
PAT006
Male
Brown
Smith
Michael Smith
1/9/82
1/10/67
1/8/59
1/7/80
1/3/63
1/9/65
Admission Date
11/15/22
7/12/23
6/30/23
3/22/23
5/4/23
7/7/23
Length OfStay
20
45
3
9
22
7
BaseCharge
521.98
544.13
430.21
445.09
910.19
695.5
DiscountRate
0.27
0.03
0.46
0.13
0.18
0.35
Transcribed Image Text:Content from Data.xlsx file PatientID First Name LastName Gender DOB PATO01 Emily Harris Female PATO02 Emily Lee Female PATO03 Michael Clark Male PATO04 Jane Male PATO05 Emily Male PAT006 Male Brown Smith Michael Smith 1/9/82 1/10/67 1/8/59 1/7/80 1/3/63 1/9/65 Admission Date 11/15/22 7/12/23 6/30/23 3/22/23 5/4/23 7/7/23 Length OfStay 20 45 3 9 22 7 BaseCharge 521.98 544.13 430.21 445.09 910.19 695.5 DiscountRate 0.27 0.03 0.46 0.13 0.18 0.35
Write SAS code for the following task:
1) Read in the excel file "Data.xlsx" to create a temporary SAS dataset
2) Based on the DOB column, create a new column called Age
3) Based on Admission Date and LengthOfStay, create a new column called DischargeDate
4) Based on BaseCharge and DiscountRate, create a new column called DiscountAmount
5) Based on DiscountAmount and BaseCharge, create a new column called TotalCharge
6) Remove the LengthOfStay and DiscountRate columns and ensure all columns, including
the original and new, are in the correct format to represent the data, i.e., date, money
7) Checking the data type and displaying the final data table with PROC CONTENTS and
PROC PRINT
8) The final dataset should be exported as a csv file named "Output Data.csv"
Transcribed Image Text:Write SAS code for the following task: 1) Read in the excel file "Data.xlsx" to create a temporary SAS dataset 2) Based on the DOB column, create a new column called Age 3) Based on Admission Date and LengthOfStay, create a new column called DischargeDate 4) Based on BaseCharge and DiscountRate, create a new column called DiscountAmount 5) Based on DiscountAmount and BaseCharge, create a new column called TotalCharge 6) Remove the LengthOfStay and DiscountRate columns and ensure all columns, including the original and new, are in the correct format to represent the data, i.e., date, money 7) Checking the data type and displaying the final data table with PROC CONTENTS and PROC PRINT 8) The final dataset should be exported as a csv file named "Output Data.csv"
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Types of trees
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education