| 34 | |
| 35 | === Building Observation Facts === |
| 36 | The strategy in dealing with Onyx variables is to fall back on accommodating them as either discrete variables (true/false) or enumerated variables. |
| 37 | In effect, not variables that can be measured by a continuous measure. This is in contrast to pathology tests, where the background is to expect a continuous measure of some sort. |
| 38 | |
| 39 | The following is the main algorithm for forming observation facts. |
| 40 | |
| 41 | For each variable relating to a participant... |
| 42 | |
| 43 | '''__Firstly__''', all of the following are ''''ignored'''': |
| 44 | |
| 45 | 1. All variables from !QuestionnaireRun and !QuestionnaireMetric. |
| 46 | 2. All variables from Participant except for: |
| 47 | ethnicity, age, gender and recruitment type. |
| 48 | 3. Other primary diagnoses, other secondary diagnoses and other symptoms are textual note fields which should get folded into the associated |
| 49 | "other" observation_fact. But I don't think they are. What should I do? |
| 50 | 4. Symptoms onset are ignored here and used instead as start date for the associated observation_fact. |
| 51 | 5. Patient email 1 and email 2 from the !EndContactQuestionnaire. |
| 52 | 6. !TubeCode, barcode and prefixCode from !UrineSamplesCollection and !BloodSamplesCollection. |
| 53 | 7. The following Onyx types: DATA, LOCALE and BINARY[[BR]] |
| 54 | |
| 55 | '''__Secondly__''', we examine the remainder for BOOLEANS where the answer is TRUE.[[BR]] |
| 56 | Some of these are (already) enumerated types (ie: not generated ones, but ones |
| 57 | designed into the questionnaire itself), and are definite observation facts, |
| 58 | whilst others have an uncertain status. The only way to decide between the two |
| 59 | is to see whether we have ontological data within the refined metadata. If that exists, |
| 60 | then we are looking at an enumerated type and the value represents an observation fact. |
| 61 | These are processed as enumerations. The other BOOLEANS are reported upon.[[BR]][[BR]] |
| 62 | |
| 63 | '''__Thirdly__''', non BOOLEANS where ontological data can be found are examined. [[BR]] |
| 64 | It has to be said at the outset that each of these could be considered a discrete |
| 65 | observation fact, but as emphasized above, the overall strategy (at least as a point |
| 66 | of departure) has been to accommodate facts as either true/false statements or as |
| 67 | enumerations of values. |
| 68 | |
| 69 | This is what then happens:[[BR]] |
| 70 | |
| 71 | 1. All variables where we have specifically designed for an enumeration are processed. |
| 72 | Currently, these are of type: |
| 73 | |
| 74 | AGE, BEERNUMBER, BICEPS, CIGARETTENUMBER, CIGARNUMBER, DIASTOLICBP, ETHNICITY, |
| 75 | HEARTRATE, HEIGHT, HIPS, PIPENUMBER, RELATIVESNUMBER, SMALLNUMBER, SUBSCAPULAR, |
| 76 | SUPRAILIAC, SYSTOLICBP, TRICEPS, WAIST, WEIGHT, WINESPIRITNUMBER, YEAR, RECENTTIME. |
| 77 | |
| 78 | Note that these are types, and can therefore account for a considerable number of |
| 79 | facts (eg: YEAR covers every question where a year can be returned as an answer). |
| 80 | |
| 81 | 2. For type of DATETIME, if the variable concerns interventions this clinical episode, |
| 82 | then we build a non-generated enumeration using the datetime value as the |
| 83 | observation start date. |
| 84 | The other DATETIME variables are reported upon '''''but no facts built'''''. |
| 85 | |
| 86 | 3. For types DECIMAL, INTEGER and TEXT |
| 87 | variables are reported upon '''''but no facts built'''''. |
| 88 | |
| 89 | 4. For all others, variables are reported upon '''''but no facts built'''''. |
| 90 | |
| 91 | '''__Fourthly__''', non BOOLEANS where ontological data cannot be found are examined.[[BR]] |
| 92 | The following are special cases within this group where enumerations are built: |
| 93 | |
| 94 | 1. Admin.Participant.age of type INTEGER (generated enumeration) |
| 95 | 2. Admin.Participant.pat_ethnicity of type TEXT (generated enumeration) |
| 96 | 3. Admin.Participant.gender of type TEXT (built-in enumeration) |
| 97 | 4. Admin.Participant.recruitmentType of type TEXT (built-in enumeration) |
| 98 | 5. Admin.Participant.vital_status of type TEXT (generated enumeration) |
| 99 | |
| 100 | Other variables within this group are reported upon '''''but no facts built'''''.[[BR]] |
| 101 | |
| 102 | '''__Lastly__''', any other variables are reported upon '''''but no facts built'''''. |