Function Name: PSSR_ON_Common.GetStudentGenderReportValues
Function Parameters
-
Student.DCID,
-
OnSISDate (indicates Count date to be used to get Gender data from snapshot tables.)
Function Return Values
|
Field |
Values |
|---|---|
|
Gender |
F, M, N, S, ‘Invalid’, or NULL (blank) F: Female M: Male N: Prefer not to Disclose S: Prefer to Specify |
|
Gender_Desc |
Text (up to 50 characters, invalid characters removed) or NULL |
|
GenderCode |
Gender Original value - snapshot record/student record |
|
GDisplay |
Gender Display Value – Code Sets |
|
GReported_Value |
Gender Reported Value – Code Sets |
|
GenderIdentityCode |
[S_ON_STU_X]Gender_Identity_Code |
|
GDescription |
Description without stripping invalid characters or truncating |
|
GExclude |
Gender Exclude from Reporting flag is selected |
|
GDExclude |
Gender Description with Exclude from Reporting flag selected |
Function Logic
-
If OnSISDate is not NULL, then Gender and Gender_Desc values from snapshot record are used.
-
If SnapShot record does not exist OR OnSISDate is NULL, then Gender and Gender Desc from student record are used.
-
The values saved on the snapshot record/student record must be validated before being returned by the function, as follows:
-
If CodeSets.Gender.Exclude from reporting flag is selected, then return Gender as NULL
-
Otherwise, return Gender as CodeSets.Gender.ReportedValue or if not defined, return CodeSets.Gender.Code.
-
If Gender is not F, M, N or S, return Gender = Invalid
-
-
If Gender <> S then return Gender_Desc as NULL; otherwise,
-
If CodeSets.Gender.ReportedValue is S and CodeSets.Gender.code is not O or S, then Gender_Desc = CodeSets.Gender.LongDescription
-
If CodeSets.Gender.code = S then Gender_Desc = [S_ON_STU_X]Gender_Identity_Desc
If CodeSets.Gender.code = O then Gender_Desc = CodeSets.childtable [S_ON_STU_X]Gender_Identity_Code.LongDescription -
If Description on child table has Exclude from Reporting flag set, then return Gender_Desc as NULL.
-
-
Invalid characters are removed from Gender_Desc, and the description is truncated if exceeds 50 charatcers, before the value is returned.
-
The following characters are to be included: a-zA-ZÀàÄäÂâÁáÈèÉéÊêËëÎîÏïÌìÔôÖöÓóÜüÙùÛûÚúÇçÿŸÑñò _:.0-9'~
-
Accents are to be accepted.
-
Numbers are allowed.
-
The following characters must be removed from the text if found: < and >, Control Characters (ESC, CTRL, Alt, TAB, Page Up, Page Down, Insert)