Skip to content

Commit cfcb769

Browse files
committed
Added wetness wiping and removing unecessary parentId in def files
1 parent 5f5c44a commit cfcb769

10 files changed

Lines changed: 126 additions & 48 deletions

File tree

definitions/items/body.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ body-vulva-mucus-inspect:
1818
body-vulva-mucus-stretch:
1919
version: v1
2020
label: Cervical Fluid Stretch
21-
description: Manual strech test of cervical fluid
21+
description: Manual strech test of cervical fluid. Short can be streched less than 2 cm, long greater than 2cm.
2222
streamId: body-vulva-mucus-stretch
2323
eventType: ratio/generic
2424
type: select
@@ -33,7 +33,7 @@ body-vulva-mucus-stretch:
3333
body-vulva-wetness-feeling:
3434
version: v1
3535
label: Vulva Wetness feeling
36-
description: Vulava wetness feeling
36+
description: Vulva wetness feeling
3737
streamId: body-vulva-wetness-feeling
3838
eventType: ratio/generic
3939
type: select
@@ -45,6 +45,21 @@ body-vulva-wetness-feeling:
4545
- value: 2
4646
label: Very wet
4747
repeatable: any
48+
body-vulva-wetness-wiping:
49+
version: v1
50+
label: Vulva Wetness when wiping
51+
description: Vulva wetness when wiping
52+
streamId: body-vulva-wetness-wiping
53+
eventType: ratio/generic
54+
type: select
55+
options:
56+
- value: 0
57+
label: Dry
58+
- value: 1
59+
label: Wet
60+
- value: 2
61+
label: Very wet
62+
repeatable: any
4863
body-weight:
4964
version: temporary
5065
label:

definitions/streams/body.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,22 @@ parentId: null
44
children:
55
- id: body-height
66
name: Body Height
7-
parentId: body
87
- id: body-weight
98
name: Body Weight
10-
parentId: body
119
- id: body-vulva
1210
name: Vulva
13-
parentId: body
1411
children:
1512
- id: body-vulva-wetness
1613
name: Vulva Wetness
17-
parentId: body-vulva
1814
children:
15+
- id: body-vulva-wetness-wiping
16+
name: Vulva Wetness when wiping
1917
- id: body-vulva-wetness-feeling
2018
name: Vulva Wetness Feeling
21-
parentId: body-vulva-wetness
2219
- id: body-vulva-mucus
2320
name: Vulva Mucus
24-
parentId: body-vulva
2521
children:
2622
- id: body-vulva-mucus-inspect
2723
name: Vulva Mucus Inspect
28-
parentId: body-vulva-mucus
2924
- id: body-vulva-mucus-stretch
3025
name: Vulva Mucus Stretch
31-
parentId: body-vulva-mucus

definitions/streams/family.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ name: Family
33
parentId: null
44
children:
55
- id: family-children
6-
name: Children
7-
parentId: family
6+
name: Children

definitions/streams/fertility.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,16 @@ parentId: null
44
children:
55
- id: fertility-cycles
66
name: Cycles
7-
parentId: fertility
87
children:
98
- id: fertility-cycles-start
109
name: New Cycle
11-
parentId: fertility-cycles
1210
- id: fertility-cycles-ovulation
1311
name: Ovulation Day
14-
parentId: fertility-cycles
1512
- id: fertility-cycles-charted-estimation
1613
name: Cycles charted estimation
17-
parentId: fertility-cycles
1814
- id: fertility-miscarriages
1915
name: Miscarriages
20-
parentId: fertility
2116
- id: fertility-trainings
2217
name: Trainings
23-
parentId: fertility
2418
- id: fertility-ttc-tta
2519
name: Trying to conceive / Avoiding pregnancy
26-
parentId: fertility

definitions/streams/profile.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,11 @@ parentId: null
44
children:
55
- id: profile-address
66
name: Adress
7-
parentId: profile
87
- id: profile-date-of-birth
98
name: Date of Birth
10-
parentId: profile
119
- id: profile-location
1210
name: Location
13-
parentId: profile
1411
- id: profile-name
1512
name: Name
16-
parentId: profile
1713
- id: profile-sex
1814
name: Sex
19-
parentId: profile

docs/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ <h3>Items</h3>
4949
</thead>
5050
<tbody>
5151
<tr><td>Id: body-vulva-mucus-inspect<br>Type: select</td><td>Cervical Fluid Inspect<br>Visual aspect of cervical fluid inspection</td><td>streamId: body-vulva-mucus-inspect<br>eventType(s): - variations -</td><td><pre></pre></td></tr>
52-
<tr><td>Id: body-vulva-mucus-stretch<br>Type: select</td><td>Cervical Fluid Stretch<br>Manual strech test of cervical fluid</td><td>streamId: body-vulva-mucus-stretch<br>eventType(s): - variations -</td><td><pre></pre></td></tr>
53-
<tr><td>Id: body-vulva-wetness-feeling<br>Type: select</td><td>Vulva Wetness feeling<br>Vulava wetness feeling</td><td>streamId: body-vulva-wetness-feeling<br>eventType(s): - variations -</td><td><pre></pre></td></tr>
52+
<tr><td>Id: body-vulva-mucus-stretch<br>Type: select</td><td>Cervical Fluid Stretch<br>Manual strech test of cervical fluid. Short can be streched less than 2 cm, long greater than 2cm.</td><td>streamId: body-vulva-mucus-stretch<br>eventType(s): - variations -</td><td><pre></pre></td></tr>
53+
<tr><td>Id: body-vulva-wetness-feeling<br>Type: select</td><td>Vulva Wetness feeling<br>Vulva wetness feeling</td><td>streamId: body-vulva-wetness-feeling<br>eventType(s): - variations -</td><td><pre></pre></td></tr>
54+
<tr><td>Id: body-vulva-wetness-wiping<br>Type: select</td><td>Vulva Wetness when wiping<br>Vulva wetness when wiping</td><td>streamId: body-vulva-wetness-wiping<br>eventType(s): - variations -</td><td><pre></pre></td></tr>
5455
<tr><td>Id: body-weight<br>Type: number</td><td>Body weight<br>Measured body weight</td><td>streamId: body-weight<br>eventType(s): - variations -</td><td><pre>eventType:
5556
mass/kg:
5657
label:

docs/items.json

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"en": "Cervical Fluid Stretch"
4545
},
4646
"description": {
47-
"en": "Manual strech test of cervical fluid"
47+
"en": "Manual strech test of cervical fluid. Short can be streched less than 2 cm, long greater than 2cm."
4848
},
4949
"streamId": "body-vulva-mucus-stretch",
5050
"eventType": "ratio/generic",
@@ -77,7 +77,7 @@
7777
"en": "Vulva Wetness feeling"
7878
},
7979
"description": {
80-
"en": "Vulava wetness feeling"
80+
"en": "Vulva wetness feeling"
8181
},
8282
"streamId": "body-vulva-wetness-feeling",
8383
"eventType": "ratio/generic",
@@ -104,6 +104,39 @@
104104
],
105105
"repeatable": "any"
106106
},
107+
"body-vulva-wetness-wiping": {
108+
"version": "v1",
109+
"label": {
110+
"en": "Vulva Wetness when wiping"
111+
},
112+
"description": {
113+
"en": "Vulva wetness when wiping"
114+
},
115+
"streamId": "body-vulva-wetness-wiping",
116+
"eventType": "ratio/generic",
117+
"type": "select",
118+
"options": [
119+
{
120+
"value": 0,
121+
"label": {
122+
"en": "Dry"
123+
}
124+
},
125+
{
126+
"value": 1,
127+
"label": {
128+
"en": "Wet"
129+
}
130+
},
131+
{
132+
"value": 2,
133+
"label": {
134+
"en": "Very wet"
135+
}
136+
}
137+
],
138+
"repeatable": "any"
139+
},
107140
"body-weight": {
108141
"version": "temporary",
109142
"label": {

docs/pack.json

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"publicationDate": "2025-07-17T08:54:13.045Z",
2+
"publicationDate": "2025-09-11T12:39:27.351Z",
33
"streams": [
44
{
55
"id": "body",
@@ -19,24 +19,27 @@
1919
{
2020
"id": "body-vulva",
2121
"name": "Vulva",
22-
"parentId": "body",
2322
"children": [
2423
{
2524
"id": "body-vulva-wetness",
2625
"name": "Vulva Wetness",
27-
"parentId": "body-vulva",
2826
"children": [
27+
{
28+
"id": "body-vulva-wetness-wiping",
29+
"name": "Vulva Wetness when wiping",
30+
"parentId": "body-vulva-wetness"
31+
},
2932
{
3033
"id": "body-vulva-wetness-feeling",
3134
"name": "Vulva Wetness Feeling",
3235
"parentId": "body-vulva-wetness"
3336
}
34-
]
37+
],
38+
"parentId": "body-vulva"
3539
},
3640
{
3741
"id": "body-vulva-mucus",
3842
"name": "Vulva Mucus",
39-
"parentId": "body-vulva",
4043
"children": [
4144
{
4245
"id": "body-vulva-mucus-inspect",
@@ -48,9 +51,11 @@
4851
"name": "Vulva Mucus Stretch",
4952
"parentId": "body-vulva-mucus"
5053
}
51-
]
54+
],
55+
"parentId": "body-vulva"
5256
}
53-
]
57+
],
58+
"parentId": "body"
5459
}
5560
]
5661
},
@@ -74,7 +79,6 @@
7479
{
7580
"id": "fertility-cycles",
7681
"name": "Cycles",
77-
"parentId": "fertility",
7882
"children": [
7983
{
8084
"id": "fertility-cycles-start",
@@ -91,7 +95,8 @@
9195
"name": "Cycles charted estimation",
9296
"parentId": "fertility-cycles"
9397
}
94-
]
98+
],
99+
"parentId": "fertility"
95100
},
96101
{
97102
"id": "fertility-miscarriages",
@@ -189,7 +194,7 @@
189194
"en": "Cervical Fluid Stretch"
190195
},
191196
"description": {
192-
"en": "Manual strech test of cervical fluid"
197+
"en": "Manual strech test of cervical fluid. Short can be streched less than 2 cm, long greater than 2cm."
193198
},
194199
"streamId": "body-vulva-mucus-stretch",
195200
"eventType": "ratio/generic",
@@ -222,7 +227,7 @@
222227
"en": "Vulva Wetness feeling"
223228
},
224229
"description": {
225-
"en": "Vulava wetness feeling"
230+
"en": "Vulva wetness feeling"
226231
},
227232
"streamId": "body-vulva-wetness-feeling",
228233
"eventType": "ratio/generic",
@@ -249,6 +254,39 @@
249254
],
250255
"repeatable": "any"
251256
},
257+
"body-vulva-wetness-wiping": {
258+
"version": "v1",
259+
"label": {
260+
"en": "Vulva Wetness when wiping"
261+
},
262+
"description": {
263+
"en": "Vulva wetness when wiping"
264+
},
265+
"streamId": "body-vulva-wetness-wiping",
266+
"eventType": "ratio/generic",
267+
"type": "select",
268+
"options": [
269+
{
270+
"value": 0,
271+
"label": {
272+
"en": "Dry"
273+
}
274+
},
275+
{
276+
"value": 1,
277+
"label": {
278+
"en": "Wet"
279+
}
280+
},
281+
{
282+
"value": 2,
283+
"label": {
284+
"en": "Very wet"
285+
}
286+
}
287+
],
288+
"repeatable": "any"
289+
},
252290
"body-weight": {
253291
"version": "temporary",
254292
"label": {

docs/streamsTree.json

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,27 @@
1717
{
1818
"id": "body-vulva",
1919
"name": "Vulva",
20-
"parentId": "body",
2120
"children": [
2221
{
2322
"id": "body-vulva-wetness",
2423
"name": "Vulva Wetness",
25-
"parentId": "body-vulva",
2624
"children": [
25+
{
26+
"id": "body-vulva-wetness-wiping",
27+
"name": "Vulva Wetness when wiping",
28+
"parentId": "body-vulva-wetness"
29+
},
2730
{
2831
"id": "body-vulva-wetness-feeling",
2932
"name": "Vulva Wetness Feeling",
3033
"parentId": "body-vulva-wetness"
3134
}
32-
]
35+
],
36+
"parentId": "body-vulva"
3337
},
3438
{
3539
"id": "body-vulva-mucus",
3640
"name": "Vulva Mucus",
37-
"parentId": "body-vulva",
3841
"children": [
3942
{
4043
"id": "body-vulva-mucus-inspect",
@@ -46,9 +49,11 @@
4649
"name": "Vulva Mucus Stretch",
4750
"parentId": "body-vulva-mucus"
4851
}
49-
]
52+
],
53+
"parentId": "body-vulva"
5054
}
51-
]
55+
],
56+
"parentId": "body"
5257
}
5358
]
5459
},
@@ -72,7 +77,6 @@
7277
{
7378
"id": "fertility-cycles",
7479
"name": "Cycles",
75-
"parentId": "fertility",
7680
"children": [
7781
{
7882
"id": "fertility-cycles-start",
@@ -89,7 +93,8 @@
8993
"name": "Cycles charted estimation",
9094
"parentId": "fertility-cycles"
9195
}
92-
]
96+
],
97+
"parentId": "fertility"
9398
},
9499
{
95100
"id": "fertility-miscarriages",

src/streams.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,15 @@ for (const file of fs.readdirSync(streamsFilePath)) {
3737
}
3838

3939
function indexStreams (stream, parentId) {
40+
if (stream.id == null) throw new Error('missing id for stream: ' + JSON.stringify(stream));
41+
if (stream.name == null) throw new Error('missing name for stream: ' + JSON.stringify(stream));
4042
if (streamsById[stream.id] !== undefined) {
4143
throw new Error(`Stream with id ${stream.id} already exists, cannot add: ${JSON.stringify(stream)}`);
4244
}
43-
stream.parentId = parentId || null;
45+
if (stream.parentId && parentId !== null) {
46+
console.log(`${stream.id} does not need parentId : ${stream.parentId}`);
47+
}
48+
stream.parentId = parentId;
4449
streamsById[stream.id] = stream;
4550
if (stream.children) {
4651
for (const child of stream.children) {

0 commit comments

Comments
 (0)