Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor and improvements #6

Merged
merged 5 commits into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
docs: boundsPeriod
  • Loading branch information
jy95 committed Mar 31, 2024
commit a0720d918a15f15f5a7e4db4fdf028f62aff194b
7 changes: 7 additions & 0 deletions documentation/docs/specs/boundsPeriod/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "⏳ boundsPeriod",
"link": {
"type": "generated-index",
"title": "⏳ boundsPeriod showcases"
}
}
19 changes: 19 additions & 0 deletions documentation/docs/specs/boundsPeriod/end_only.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
description: end only
title: ⏳ boundsPeriod (end only)
---

import CodeBlock from "@theme/CodeBlock";
import Schema from "@site/static/dosages/specs/boundsPeriod/end_only.json";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import SingleDosageToText from "@site/src/components/single_dosage_to_text";

<Tabs>
<TabItem value="text" label="Human readable text" default>
<SingleDosageToText dosage={Schema} />
</TabItem>
<TabItem value="json" label="Dosage">
<CodeBlock language="json">{JSON.stringify(Schema, null, 2)}</CodeBlock>
</TabItem>
</Tabs>
19 changes: 19 additions & 0 deletions documentation/docs/specs/boundsPeriod/start_and_end.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
description: Start & end
title: ⏳ boundsPeriod (start & end)
---

import CodeBlock from "@theme/CodeBlock";
import Schema from "@site/static/dosages/specs/boundsPeriod/start_and_end.json";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import SingleDosageToText from "@site/src/components/single_dosage_to_text";

<Tabs>
<TabItem value="text" label="Human readable text" default>
<SingleDosageToText dosage={Schema} />
</TabItem>
<TabItem value="json" label="Dosage">
<CodeBlock language="json">{JSON.stringify(Schema, null, 2)}</CodeBlock>
</TabItem>
</Tabs>
19 changes: 19 additions & 0 deletions documentation/docs/specs/boundsPeriod/start_only.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
description: start only
title: ⏳ boundsPeriod (start only)
---

import CodeBlock from "@theme/CodeBlock";
import Schema from "@site/static/dosages/specs/boundsPeriod/start_only.json";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import SingleDosageToText from "@site/src/components/single_dosage_to_text";

<Tabs>
<TabItem value="text" label="Human readable text" default>
<SingleDosageToText dosage={Schema} />
</TabItem>
<TabItem value="json" label="Dosage">
<CodeBlock language="json">{JSON.stringify(Schema, null, 2)}</CodeBlock>
</TabItem>
</Tabs>
16 changes: 15 additions & 1 deletion documentation/src/pages/examples/timing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,21 @@ const scenarios: {
},
},
},
// TODO add test case "BID, start on 7/1/2015 at 1:00 PM"
{
title: "BID, start on 7/1/2015 at 1:00 PM",
dosage: {
timing: {
repeat: {
frequency: 2,
period: 1,
periodUnit: "d",
boundsPeriod: {
start: "2015-07-01T13:00:00",
},
},
},
},
},
{
title: "Mon, Wed, Fri Morning",
dosage: {
Expand Down
9 changes: 9 additions & 0 deletions documentation/static/dosages/specs/boundsPeriod/end_only.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"timing": {
"repeat": {
"boundsPeriod": {
"end": "2011-05-27"
}
}
}
}
10 changes: 10 additions & 0 deletions documentation/static/dosages/specs/boundsPeriod/start_and_end.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"timing": {
"repeat": {
"boundsPeriod": {
"start": "2011-05-23",
"end": "2011-05-27"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"timing": {
"repeat": {
"boundsPeriod": {
"start": "2015-02-07T13:28:17"
}
}
}
}