Skip to content

Commit 76e098c

Browse files
committed
Addind fertility items
1 parent 6da3c8b commit 76e098c

7 files changed

Lines changed: 142 additions & 8 deletions

File tree

definitions/items/fertility.yaml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,41 @@ fertility-cycles-ovulation:
1717
fertility-cycles-start:
1818
version: temporary
1919
label: New Cycle
20-
description: Flag this day as a new cycle start
20+
duration:
21+
mandatory: false
22+
canBeNull: true
23+
maxSeconds: 7776000 # thershold for amenorrhea 90 days
24+
description: Flag this day as a new cycle start. First day of full menstrual bleeding (Period)
2125
streamId: fertility-cycles-start
2226
eventType: activity/plain
2327
type: checkbox
2428
repeatable: daily
29+
devNotes: |-
30+
Cycle duration is determined by next fertility cycle date unless duration property is given.
31+
fertility-cycles-period-end:
32+
version: temporary
33+
label: End of period.
34+
description: Last day of periods. First day of period is given by a new cycle indication.
35+
streamId: fertility-cycles-period
36+
eventType: activity/plain
37+
type: checkbox
38+
repeatable: daily
39+
devNotes: |-
40+
To track start / end of period, use fertility-cycles-start & fertility-cycles-period-end.
41+
fertility-cycles-fertile-window:
42+
version: temporary
43+
label: Fertile Window
44+
description: When a women is considered a fertile
45+
streamId: fertility-cycles-fertile-window
46+
eventType: activity/plain
47+
duration:
48+
mandatory: true
49+
canBeNull: false
50+
maxSeconds: 518400 # maximum known fertile window 6 days
51+
type: checkbox
52+
repeatable: daily
53+
devNotes: |-
54+
Use duration property to indicate end of fertile window.
2555
fertility-cycles-peak-day:
2656
version: temporary
2757
label: Peak day of fertility

definitions/streams/fertility.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ children:
77
children:
88
- id: fertility-cycles-start
99
name: New Cycle
10+
- id: fertility-cycles-period
11+
name: Period
12+
- id: fertility-cycles-fertile-window
13+
name: Fertile Window
1014
- id: fertility-cycles-ovulation
1115
name: Ovulation Day
1216
- id: fertility-cycles-peak-day

docs/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ <h3>Items</h3>
5656
<tr><td><span style="font-weight: bold;" id="body-weight">body-weight</span><br><u>Type:</u> number<br><u>When:</u> any</td><td>Body weight<br>Measured body weight</td><td><u>streamId:</u> body-weight<br><u>eventType(s):</u> (Unit): mass/kg, mass/lb<br><u>version:</u> temporary</td></tr>
5757
<tr><td><span style="font-weight: bold;" id="family-children-count">family-children-count</span><br><u>Type:</u> number<br><u>When:</u> none</td><td>Nb of children<br>Number of children at this date</td><td><u>streamId:</u> family-children<br><u>eventType(s):</u> count/generic<br><u>version:</u> temporary</td></tr>
5858
<tr><td><span style="font-weight: bold;" id="fertility-cycles-charted-count">fertility-cycles-charted-count</span><br><u>Type:</u> number<br><u>When:</u> none</td><td>Nb of charted cycles<br>Number of total charted cycles at this date</td><td><u>streamId:</u> fertility-cycles-charted-estimation<br><u>eventType(s):</u> count/generic<br><u>version:</u> temporary</td></tr>
59+
<tr><td><span style="font-weight: bold;" id="fertility-cycles-fertile-window">fertility-cycles-fertile-window</span><br><u>Type:</u> checkbox<br><u>When:</u> daily</td><td>Fertile Window<br>When a women is considered a fertile<BR><span style="font-style: italic; font-size: small">Use duration property to indicate end of fertile window.</span></td><td><u>streamId:</u> fertility-cycles-fertile-window<br><u>eventType(s):</u> activity/plain<br><u>version:</u> temporary</td></tr>
5960
<tr><td><span style="font-weight: bold;" id="fertility-cycles-ovulation">fertility-cycles-ovulation</span><br><u>Type:</u> checkbox<br><u>When:</u> daily</td><td>Ovulation Day<br>Flag this day as an ovulation day</td><td><u>streamId:</u> fertility-cycles-ovulation<br><u>eventType(s):</u> activity/plain<br><u>version:</u> temporary</td></tr>
6061
<tr><td><span style="font-weight: bold;" id="fertility-cycles-peak-day">fertility-cycles-peak-day</span><br><u>Type:</u> checkbox<br><u>When:</u> daily</td><td>Peak day of fertility<br>When fertility is at its highest point</td><td><u>streamId:</u> fertility-cycles-peak-day<br><u>eventType(s):</u> activity/plain<br><u>version:</u> temporary</td></tr>
61-
<tr><td><span style="font-weight: bold;" id="fertility-cycles-start">fertility-cycles-start</span><br><u>Type:</u> checkbox<br><u>When:</u> daily</td><td>New Cycle<br>Flag this day as a new cycle start</td><td><u>streamId:</u> fertility-cycles-start<br><u>eventType(s):</u> activity/plain<br><u>version:</u> temporary</td></tr>
62+
<tr><td><span style="font-weight: bold;" id="fertility-cycles-period-end">fertility-cycles-period-end</span><br><u>Type:</u> checkbox<br><u>When:</u> daily</td><td>End of period.<br>Last day of periods. First day of period is given by a new cycle indication.<BR><span style="font-style: italic; font-size: small">To track start / end of period, use fertility-cycles-start & fertility-cycles-period-end.</span></td><td><u>streamId:</u> fertility-cycles-period<br><u>eventType(s):</u> activity/plain<br><u>version:</u> temporary</td></tr>
63+
<tr><td><span style="font-weight: bold;" id="fertility-cycles-start">fertility-cycles-start</span><br><u>Type:</u> checkbox<br><u>When:</u> daily</td><td>New Cycle<br>Flag this day as a new cycle start. First day of full menstrual bleeding (Period)<BR><span style="font-style: italic; font-size: small">Cycle duration is determined by next fertility cycle date unless duration property is given.</span></td><td><u>streamId:</u> fertility-cycles-start<br><u>eventType(s):</u> activity/plain<br><u>version:</u> temporary</td></tr>
6264
<tr><td><span style="font-weight: bold;" id="fertility-miscarriages-count">fertility-miscarriages-count</span><br><u>Type:</u> number<br><u>When:</u> none</td><td>Nb of miscarriages<br>Number of total miscarriages at this date</td><td><u>streamId:</u> fertility-miscarriages<br><u>eventType(s):</u> count/generic<br><u>version:</u> temporary</td></tr>
6365
<tr><td><span style="font-weight: bold;" id="fertility-pregnancy">fertility-pregnancy</span><br><u>Type:</u> select<br><u>When:</u> any</td><td>Pregnancy<br>Pregnancy<BR><SELECT style="width: 20em"><OPTION>ongoing: Ongoing pregnangcy</OPTION><OPTION>miscarriage: Miscarriage</OPTION><OPTION>ectopic: Ectopic</OPTION><OPTION>stillbirth: Stillbirth</OPTION><OPTION>livebirth: Live birth</OPTION><OPTION>abortion: Abortion</OPTION></SELECT><BR><span style="font-style: italic; font-size: small">One per fetus. (can be multiple with same start date)<br>The value of `event.time` should indicate the start of pregnancy.<br>When content value is 'ongoing' `event.duration` must be set to `null`.<br>For any other value `event.duration` should be set to indicate when the pregnancy state terminated.</span></td><td><u>streamId:</u> fertility-preganancies<br><u>eventType(s):</u> pregnancy/detailed<br><u>version:</u> v1</td></tr>
6466
<tr><td><span style="font-weight: bold;" id="fertility-sexual-activity">fertility-sexual-activity</span><br><u>Type:</u> select<br><u>When:</u> any</td><td>Sexual activity<br>Potentially reproductive sexual activity<BR><SELECT style="width: 20em"><OPTION>fertile: Fertile intercourse</OPTION><OPTION>incomplete: No ejaculation (incomplete)</OPTION><OPTION>withdrawal: Withdrawal before ejaculation</OPTION><OPTION>condom: Usage of a condom</OPTION><OPTION>cervical-barrier: Usage of a cervical barrier</OPTION></SELECT></td><td><u>streamId:</u> fertility-sexual-activity<br><u>eventType(s):</u> reproductive-sexuality/detailed<br><u>version:</u> v1</td></tr>

docs/items.json

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,52 @@
309309
"label": {
310310
"en": "New Cycle"
311311
},
312+
"duration": {
313+
"mandatory": false,
314+
"canBeNull": true,
315+
"maxSeconds": 7776000
316+
},
312317
"description": {
313-
"en": "Flag this day as a new cycle start"
318+
"en": "Flag this day as a new cycle start. First day of full menstrual bleeding (Period)"
314319
},
315320
"streamId": "fertility-cycles-start",
316321
"eventType": "activity/plain",
317322
"type": "checkbox",
318-
"repeatable": "daily"
323+
"repeatable": "daily",
324+
"devNotes": "Cycle duration is determined by next fertility cycle date unless duration property is given."
325+
},
326+
"fertility-cycles-period-end": {
327+
"version": "temporary",
328+
"label": {
329+
"en": "End of period."
330+
},
331+
"description": {
332+
"en": "Last day of periods. First day of period is given by a new cycle indication."
333+
},
334+
"streamId": "fertility-cycles-period",
335+
"eventType": "activity/plain",
336+
"type": "checkbox",
337+
"repeatable": "daily",
338+
"devNotes": "To track start / end of period, use fertility-cycles-start & fertility-cycles-period-end."
339+
},
340+
"fertility-cycles-fertile-window": {
341+
"version": "temporary",
342+
"label": {
343+
"en": "Fertile Window"
344+
},
345+
"description": {
346+
"en": "When a women is considered a fertile"
347+
},
348+
"streamId": "fertility-cycles-fertile-window",
349+
"eventType": "activity/plain",
350+
"duration": {
351+
"mandatory": true,
352+
"canBeNull": false,
353+
"maxSeconds": 518400
354+
},
355+
"type": "checkbox",
356+
"repeatable": "daily",
357+
"devNotes": "Use duration property to indicate end of fertile window."
319358
},
320359
"fertility-cycles-peak-day": {
321360
"version": "temporary",

docs/pack.json

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"publicationDate": "2025-10-10T15:25:21.792Z",
2+
"publicationDate": "2026-01-20T16:35:01.868Z",
33
"streams": [
44
{
55
"id": "body",
@@ -97,6 +97,16 @@
9797
"name": "New Cycle",
9898
"parentId": "fertility-cycles"
9999
},
100+
{
101+
"id": "fertility-cycles-period",
102+
"name": "Period",
103+
"parentId": "fertility-cycles"
104+
},
105+
{
106+
"id": "fertility-cycles-fertile-window",
107+
"name": "Fertile Window",
108+
"parentId": "fertility-cycles"
109+
},
100110
{
101111
"id": "fertility-cycles-ovulation",
102112
"name": "Ovulation Day",
@@ -505,13 +515,52 @@
505515
"label": {
506516
"en": "New Cycle"
507517
},
518+
"duration": {
519+
"mandatory": false,
520+
"canBeNull": true,
521+
"maxSeconds": 7776000
522+
},
508523
"description": {
509-
"en": "Flag this day as a new cycle start"
524+
"en": "Flag this day as a new cycle start. First day of full menstrual bleeding (Period)"
510525
},
511526
"streamId": "fertility-cycles-start",
512527
"eventType": "activity/plain",
513528
"type": "checkbox",
514-
"repeatable": "daily"
529+
"repeatable": "daily",
530+
"devNotes": "Cycle duration is determined by next fertility cycle date unless duration property is given."
531+
},
532+
"fertility-cycles-period-end": {
533+
"version": "temporary",
534+
"label": {
535+
"en": "End of period."
536+
},
537+
"description": {
538+
"en": "Last day of periods. First day of period is given by a new cycle indication."
539+
},
540+
"streamId": "fertility-cycles-period",
541+
"eventType": "activity/plain",
542+
"type": "checkbox",
543+
"repeatable": "daily",
544+
"devNotes": "To track start / end of period, use fertility-cycles-start & fertility-cycles-period-end."
545+
},
546+
"fertility-cycles-fertile-window": {
547+
"version": "temporary",
548+
"label": {
549+
"en": "Fertile Window"
550+
},
551+
"description": {
552+
"en": "When a women is considered a fertile"
553+
},
554+
"streamId": "fertility-cycles-fertile-window",
555+
"eventType": "activity/plain",
556+
"duration": {
557+
"mandatory": true,
558+
"canBeNull": false,
559+
"maxSeconds": 518400
560+
},
561+
"type": "checkbox",
562+
"repeatable": "daily",
563+
"devNotes": "Use duration property to indicate end of fertile window."
515564
},
516565
"fertility-cycles-peak-day": {
517566
"version": "temporary",

0 commit comments

Comments
 (0)