@@ -15,23 +15,33 @@ const patientBaseStreams = [
1515 { id : 'fertility-miscarriages' , name : 'Miscarriages' , parentId : 'fertility' } ,
1616 { id : 'fertility-traings' , name : 'Trainings' , parentId : 'fertility' } ,
1717 { id : 'fertility-cycles' , name : 'Cycles' , parentId : 'fertility' } ,
18- { id : 'fertility-cycles-charted-extimation' , name : 'Cycles charted estimation' , parentId : 'fertility' } ,
18+ { id : 'fertility-cycles-charted-extimation' , name : 'Cycles charted estimation' , parentId : 'fertility-cycles ' } ,
1919 { id : 'fertility-ttc-tta' , name : 'Trying to conceive / Avoiding pregnancy' , parentId : 'fertility' } ,
2020 // body
2121 { id : 'body' , name : 'Body' } ,
2222 { id : 'body-height' , name : 'Body Height' , parentId : 'body' } ,
2323 { id : 'body-weight' , name : 'Body Weight' , parentId : 'body' } ,
24+ // vulva
25+ { id : 'body-vulva' , name : 'Vulva' , parentId : 'body' } ,
26+ { id : 'body-vulva-wetness' , name : 'Vulva Wetness' , parentId : 'body-vulva' } ,
27+ { id : 'body-vulva-wetness-feeling' , name : 'Vulva Wetness Feeling' , parentId : 'body-vulva-wetness' }
2428] ;
2529
26- const patientBasePermissions = [
30+ const patientBasePermissionsX = [
2731 { id : 'profile' , name : 'Profile' } ,
2832 { id : 'family' , name : 'Family' } ,
2933 { id : 'fertility' , name : 'Fertility' } ,
3034 { id : 'body-height' , name : 'Body height' } ,
3135 { id : 'body-weight' , name : 'Body weight' } ,
36+ ] ;
37+
38+ const patientBasePermissionsB = [
39+ { id : 'profile' , name : 'Profile' } ,
40+ { id : 'fertility-cycles' , name : 'Fertility Cycles' } ,
41+ { id : 'body-vulva' , name : 'Vulva' }
3242]
3343
34- const formProfileContent = [
44+ const formProfileContentBase = [
3545 {
3646 streamId : 'profile-name' ,
3747 eventType : 'contact/name' ,
@@ -44,6 +54,15 @@ const formProfileContent = [
4454 type : 'text' ,
4555 label : 'Surname' ,
4656 } ,
57+ {
58+ streamId : 'profile-date-of-birth' ,
59+ eventType : 'date/iso-8601' ,
60+ type : 'date' ,
61+ label : 'Date of Birth' ,
62+ } ] ;
63+
64+ const formProfileContentX = [
65+ ...formProfileContentBase ,
4766 {
4867 streamId : 'profile-nationality' ,
4968 eventType : 'contact/nationality' ,
@@ -57,12 +76,6 @@ const formProfileContent = [
5776 options : [ { value : 'male' , label : 'Male' } , { value : 'female' , label : 'Female' } ] ,
5877 label : 'Sex' ,
5978 } ,
60- {
61- streamId : 'profile-date-of-birth' ,
62- eventType : 'date/iso-8601' ,
63- type : 'date' ,
64- label : 'Date of Birth' ,
65- } ,
6679 {
6780 streamId : 'family-children' ,
6881 eventType : 'count/generic' ,
@@ -83,8 +96,7 @@ const formProfileContent = [
8396 }
8497] ;
8598
86- // -- fields lists -- //
87- const formHistoricalContent = [
99+ const formHistoricalContentX = [
88100 {
89101 streamId : 'ttc-tta' ,
90102 eventType : 'fertility-intention/ttc-tta' ,
@@ -141,10 +153,16 @@ const formHistoricalContent = [
141153 }
142154]
143155
156+ const formHistoricalContentB = [
157+ ]
158+
159+ //
160+
161+
144162const questionnaires = {
145- 'demo-dr-forms- questionary-x' : {
163+ 'questionary-x' : {
146164 title : 'Demo with Profile and TTC-TTA' ,
147- permissions : patientBasePermissions . map ( perm => ( {
165+ permissions : patientBasePermissionsX . map ( perm => ( {
148166 streamId : perm . id ,
149167 level : 'read' ,
150168 name : perm . name ,
@@ -155,18 +173,42 @@ const questionnaires = {
155173 type : 'permanent' ,
156174 key : 'profile-x' ,
157175 name : 'Profile' ,
158- content : formProfileContent
176+ content : formProfileContentX
159177 } ,
160178 history : {
161179 type : 'recurring' ,
162180 key : 'recurring-x' ,
163181 name : 'History' ,
164- content : formHistoricalContent
182+ content : formHistoricalContentX
183+ }
184+ }
185+ } ,
186+ 'questionnary-basic' : {
187+ title : 'Basic Profile and Cycle Information' ,
188+ permissions : patientBasePermissionsB . map ( perm => ( {
189+ streamId : perm . id ,
190+ level : 'read' ,
191+ name : perm . name ,
192+ } ) ) ,
193+ patientBaseStreams,
194+ forms : {
195+ profile : {
196+ type : 'permanent' ,
197+ key : 'profile-b' ,
198+ name : 'Profile' ,
199+ content : formProfileContentBase
200+ } ,
201+ history : {
202+ type : 'recurring' ,
203+ key : 'recurring-b' ,
204+ name : 'History' ,
205+ content : formHistoricalContentB
165206 }
166207 }
167208 }
168209}
169210
170211export const dataDefs = {
171- questionnaires
212+ appId : 'demo-dr-forms' ,
213+ questionnaires,
172214} ;
0 commit comments