|
| 1 | +First version |
| 2 | + |
| 3 | +## Dr Account |
| 4 | + |
| 5 | +Dr has an HDS account to |
| 6 | + |
| 7 | +1. Collect the authorization to access data by patients. |
| 8 | +2. Define forms (will be done in a second steps) |
| 9 | + - The forms content should be encoded in JSON providing the necessary information for the WebApplication for patient give information on the data collected and provide from to the patient. |
| 10 | + - In the First demo release, the form will be hard-coded in the App. |
| 11 | + |
| 12 | +``` |
| 13 | +Streams structure of a Dr Account |
| 14 | +- patients |
| 15 | + - patients-inbox: where new patients are posting |
| 16 | + their credentials to access the data. |
| 17 | + For the demo this may be sufficient |
| 18 | + - patients-validated: contains validated patient |
| 19 | + (credentials are moved from Inbox in this stream) |
| 20 | +- Forms |
| 21 | + - Questionnary A |
| 22 | + - Questionnary B |
| 23 | + - Questionnary ... |
| 24 | +
|
| 25 | +``` |
| 26 | + |
| 27 | +### Patient accounts |
| 28 | + |
| 29 | +They contains personal data with the following streams |
| 30 | + |
| 31 | +(emails are already used for registration) |
| 32 | + |
| 33 | +``` |
| 34 | +- profile |
| 35 | + - profile-name: Name / Surname |
| 36 | + - event of type "contact/name-surname" & "contact/maiden-name" or "contact/vcard" |
| 37 | + - profile-nationality: - event of type "contact/nationality" |
| 38 | + - profile-date-of-birth: - event of type "date/iso-8601" |
| 39 | + - profile-location: - event of type (to be discussed) "contact/vcard" or "location/city" |
| 40 | + - profile-sex: - event of type "attributes/biological-sex" |
| 41 | +- familly |
| 42 | + - familly-children: events of type "count/generic" |
| 43 | +- fertility |
| 44 | + - fertility-miscarriages: events of type "count/generic" |
| 45 | + - awarness-training: events of type "training/fabm-v1" |
| 46 | + Event or streams content to be defined (see bellow) |
| 47 | + - fertitity-cycles |
| 48 | + - fertitity-cycles-charted-estimation: "generic/count" |
| 49 | + - ttc-tta: "fertility-intention/ttc-tta" (see bellow) |
| 50 | +- body |
| 51 | + - body-height: -event of type "length/*" meters or ... |
| 52 | + - body-weigth: -event of type "mass/*" kg or ... |
| 53 | +- demo-dr-form: (stream to track states and usage of this app) |
| 54 | +``` |
| 55 | + |
| 56 | +##### Tracking fertility awareness contents |
| 57 | + |
| 58 | +Here we have the possibilty to create either 1 specific event type containing a string with the method or a stream per method and add more information afterwards. As this is a prototype, we'll have to discuss what's the easiest implementation considering Front-end perspective. |
| 59 | + |
| 60 | +##### Tracking fertility intention |
| 61 | + |
| 62 | +Create an event type of `fertility-intention/ttc-tta` based on https://fertilityawarenessmethodofbirthcontrol.com/fertility-intentions-scale/ |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | +### Technical flow |
| 67 | + |
| 68 | +#### **Requirements** |
| 69 | + |
| 70 | +For each form, an `apiEndpoint` is created upfront with the following credentials |
| 71 | +*For the demo, this will be hand made, in the future, this will be created from Dr's FrontEnd* |
| 72 | + |
| 73 | +``` |
| 74 | +[ |
| 75 | + {streamId: "patients-inbox", level: "create-only"}, |
| 76 | + {streamId: "questionnary-x", level: "read"} |
| 77 | +] |
| 78 | +``` |
| 79 | + |
| 80 | +This will allow the Patient's app to publish it's authorization to the Dr's Account |
| 81 | + |
| 82 | +##### Flow Patient Web App |
| 83 | + |
| 84 | +The link to the patient webApp contains in its query the Dr's apiEndpoint |
| 85 | + |
| 86 | +1- The WebApp query HDS to figure out which questionnary to display (hardcode 1st version) |
| 87 | + |
| 88 | +2- The WebApp present the description of HDS, the recipient of the form (the Dr) and propose to register or login in |
| 89 | + |
| 90 | +3- After Log-In the App recieves and API endpoint |
| 91 | + |
| 92 | +- The app check the state of this form with the latest event in `demo-dr-form` stream event-type `demo-dr-form-state/questionnary-x` |
| 93 | +- If this is the first time the use logs-in with this form the WebApp creates and `sharing` api-endpoint for the Dr and publish it in his `inbox` stream |
| 94 | + |
| 95 | +4- The form is presented to the patient with "pre-filled" data from eventual existing info. |
0 commit comments