myCSG © |Area: SDTM| Concept: VS : Vital Signs | Lesson: LCSG001 : Vital Signs Programming for study CSG001 |

Creating more than one observation from a single observation of input dataset


Lesson description will be added soon

VITALS : Vital Signs
Question Response
Date Performed
[VSDT_RAW]

Systolic Blood Pressure (mmHg)
[SYSBP_RAW]

Diastolic Blood Pressure (mmHg)
[DIABP_RAW]

Blood Pressure Position
[POS]


Supine
Standing
Sitting
Heart Rate (beats/min)
[HR_RAW]

Respiratory Rate (breaths/min)
[RESP_RAW]

Temperature
[TEMP_RAW]

Temperature Unit
[TEMPU]


Celsius
Fahrenheit
Temperature Location
[TEMPLOC]





PHYSMEAS : Physical Measurements
Question Response
Date Performed
[PMDT_RAW]

Height
[HEIGHT_RAW]

Height Unit
[HEIGHTU]


Inches
Centimeters
Weight
[WEIGHT_RAW]

Weight Unit
[WEIGHTU]


Kilogram
Pound



SUPPvariable_namevariable_labeltypegeneral_commentform_vitalsform_physmeas
_ General _isb Vital Signs information is collected in two different datasets, vitals and physmeas. So, these two datasets become the base input datasets for creating SDTM.VS dataset. The information related to the tests performed are collected as variables in the input datasets. As the expected structure for SDTM VS domain is one record per subject per test per timepoint, we need to transform the test results and other dependent variables from horizontal to vertical structure.
_ STUDYID Study Identifier Char For the recods coming form raw.physmeas: raw.physmeas.STUDY. For the records coming from raw.vitals: raw.vitals.STUDY
_ DOMAIN Domain Abbreviation Char Assign as "VS"
_ USUBJID Unique Subject Identifier Char Concatenate STUDY and PT variable values using hyphen as separator
_ VSSEQ Sequence Number Num Sort the final dataset by USUBJID, VSCAT, VSTESTCD, VSDTC and set to 1 on the first record of the subject and increment by 1 on subsequent records.
_ VSTESTCD Vital Signs Test Short Name Char Results for different tests are collected in separate varaibles in raw. To fit SDTM findings structure, rows are created to hold the results of different tests in a single result variable and VSTESTCD is created to identify each test with a short name.
Set to "SYSBP" for raw.vitals.SYSBP_RAW
set to "DIABP" for raw.vitals.DIABP_RAW
set to "HR" for raw.vitals.HR_RAW
set to "RESP" for raw.vitals.RESP_RAW, set to "TEMP" for raw.vitals.TEMP_RAW
Results for different tests are collected in separate varaibles in raw. To fit SDTM findings structure, rows are created to hold the results of different tests in a single result variable and VSTESTCD is created to identify each test with a short name.
Set to "HEIGHT" for raw.physmeas.HEIGHT_RAW
set to "WEIGHT" for raw.physmeas.WEIGHT_RAW
_ VSTEST Vital Signs Test Name Char Set to "Height" when VSTESTCD="HEIGHT", set to "Weight" when VSTESTCD="WEIGHT", set to "Systolic Blood Pressure" when VSTESTCD="SYSBP", set to "Diastolic Blood Pressure" when VSTESTCD="DIABP", set to "Heart Rate" when VSTESTCD="HR", set to "Respiratory Rate" when VSTESTCD="RESP", set to "Temperature" when VSTESTCD="TEMP".
_ VSCAT Category for Vital Signs Char Set to "VITAL SIGNS" Set to "PHYSICAL MEASUREMENTS"
_ VSPOS Vital Signs Position of Subject Char Set to raw.vitals.POS when VSTESTCD in ("SYSBP" "DIABP") after converting to standard controlled terminology
_ VSORRES Result or Finding in Original Units Char Set to raw.vitals.SYSBP_RAW when VSTESTCD="SYSBP", set to raw.vitals.DIABP_RAW when VSTESTCD="DIABP", set to raw.vitals.HR_RAW when VSTESTCD="HR", set to raw.vitals.RESP_RAW when VSTESTCD="RESP'", set to raw.vitals.TEMP_RAW when VSTESTCD="TEMP". Set to raw.physmeas.HEIGHT_RAW when VSTESTCD="HEIGHT", set to physmeas.WEIGHT_RAW when VSTESTCD="WEIGHT",
_ VSORRESU Original Units Char Set to "mmHg" when VSTESTCD in ("SYSBP", "DIABP"), set to "beats/min" when VSTESTCD="HR", set to "breaths/min" when VSTESTCD="RESP", set to "C" when VSTESTCD="TEMP" and raw.vitals.TEMPU="Celsius", set to "F" when VSTESTCD="TEMP" and raw.vitals.TEMPU="Fahrenheit". On the records where VSORRES is not null:
Set to "cm" when VSTESTCD="HEIGHT" and raw.physmeas.HEIGHTU="Centimeters". Set to "in" when VSTESTCD="HEIGHT" and raw.physmeas.HEIGHTU="Inches". set to "kg" when VSTESTCD="WEIGHT" and raw.physmeas.WEIGHTU="Kilogram". set to "lb" when VSTESTCD="WEIGHT" and raw.physmeas.WEIGHTU="Pound".
_ VSSTRESC Character Result/Finding in Std Format Char Convert VSSTRESN to character format.
_ VSSTRESN Numeric Result/Finding in Standard Units Num Part A) For the records of the tests (VSTESTCD in ("TEMP") ) where original unit collected is different than standard units:
If VSTESTCD="TEMP" and VSORRESU="Fahrenheit" then VSSTRESN=(VSORRES-32)*5/9 and rounded to two decimals

Part B) For the records of all tests where original unit is same same as collected unit:
Convert VSORRES to numeric format.
Part A) For the records of the tests (VSTESTCD in ("WEIGHT" "HEIGHT" ) ) where original unit collected is different than standard units:
If VSTESTCD="HEIGHT" and VSORRESU="Inches" then apply a multiplier of 2.54 to the numeric value of VSORRES.
If VSTESTCD="WEIGHT" and VSORRESU="Pound" then apply a multiplier of 2.2 to the numeric value of VSORRES. Part B) For the records of all tests where original unit is same same as collected unit:
Convert VSORRES to numeric format.
_ VSSTRESU Standard Units Char Set to "mmHg" when VSTESTCD in ("SYSBP", "DIABP")
Set to "beats/min" when VSTESTCD="HR"
Set to "breaths/min" when VSTESTCD="RESP"
Set to "C" where VSTESTCD="TEMP".
Set to "kg" when VSTESTCD in ("WEIGHT")
Set to "cm" when VSTESTCD="HEIGHT".
_ VSSTAT Completion Status Char Set to "NOT DONE" when VSORRES is null and VSSTRESC is null.
_ VSREASND Reason Not Performed Char Set to "Not collected" when VS.VSSTAT="NOT DONE" Set to "Not collected" when VS.VSSTAT="NOT DONE"
_ VSLOC Location of Vital Signs Measurement Char raw.vitals.TEMPLOC when VSTESTCD="TEMP" after converting to standard controlled terminology
_ VSBLFL Baseline Flag Char Set to "Y" on the latest record with non-missing result on or prior to SDTM.DM.RFSTDTC per VSTESTCD of each subject.
_ VISITNUM Visit Number Num Set to 1 when VISIT="SCREENING"
Else when VISIT contains "WEEK" then add 100 to the week number (that is, WEEK 1 will have a VISITNUM of 101)
Else when VISIT contains "FOLLOW-UP" then add 200 to the numeric portion of the VISIT

For Unscheduled visits, add the unscheduled visitnumber as a two digit decimal to the previous scheduled visit number. (For example, a third unscheduled visit after VISITNUM 102 will be formatted as 102.03)
_ VISIT Visit Name Char Set to "SCREENING" when FOLDER="SCR"
Else when FOLDER contains "Week" then convert FOLDER to uppercase
Else when FOLDER contains "FU" then replace "FU" with "FOLLOW-UP"
Unscheduled visits (FOLDER contains "UNS_") will be remapped based the previous scheduled VISIT when sorted by VSDTC
For each unscheduled visit present after a scheduled visit, concatenate the word 'UNSCHEDULED' to the previous scheduled visit followed by the number of the unscheduled padded with a leading zero. (For example, a third unscheduled visit after "WEEK 2" will be formatted as 'WEEK 2 UNSCHEDULED 03")
_ EPOCH Epoch Char Derive by comparing VSDTC with the sdtm.se.SESTDTC and sdtm.se.SEENDTC of each element of a subject and assign the epoch based on the sdtm.se.EPOCH of the element in which each event start date falls.
_ VSDTC Date/Time of Measurements Char Convert raw.physmeas.PMDT_RAW and raw.vitals.VSDT_RAW respectively for the respective parameters coming from raw.physmeas and raw.vitals and convert into ISO 8601 format.
_ VSDY Study Day of Vital Signs Num numeric(datepart(VSDTC))-numeric(datepart(DM.RSTDTC))+(numeric(datepart(VSDTC))>=numeric(datepart(DM.RFSTDTC)))
Complete SAS code to generate the output is available for registered users!

Already registered! Login
Not registered, you can signup here! Signup

Dont want to register?
You can directly purchase this lesson (code+input data) here


You can purchase this lesson (code+input data) here

If you are looking to purchase subscription for full access to data and programs for all lessons (TASKS+SDTM+ADaM+TFLs), you can send us a message on +91-7330--77--66--49-- on Whatsapp.
R data is available only for R subscribers.
You can contact us on +91-7330--77--66---49 for purchasing subscription to R programs and data
R codes are available only for R subscribers.
You can contact us on +91-7330--77--66---49 for purchasing subscription to R programs and data