Skip to content

Commit

Permalink
add patient app
Browse files Browse the repository at this point in the history
  • Loading branch information
pascualy committed Apr 14, 2024
1 parent 61495c4 commit e8b9fac
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/patient/common.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* When either of the following conditions is met, the system shall issue a warning notification to the user through an appropriate user interface:
* a) The recommended insulin dose exceeds the predefined upper or lower limits.
* b) The latest entered glucose reading is outdated according to the defined maximum allowable time interval.
*
* @itemId:spec-dose-reading-warning
* @itemHasParent:MR-97
* @itemTitle:"Check warning threshold"
*
*/
function checkWarningThreshold() {
return false;
}
10 changes: 10 additions & 0 deletions app/patient/page.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* @jest-environment jsdom
*/
import { render, screen } from "@testing-library/react";
import Page from "./page";

it("Test warning message @tests:KXITM09D4Q0FGST9BVA61D5HYS9TSP2", () => {
render(<Page />);
expect(screen.getByRole("heading")).toHaveTextContent("Patient App");
});
3 changes: 3 additions & 0 deletions app/patient/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Page() {
return <h1>Patient App</h1>;
}
20 changes: 20 additions & 0 deletions app/patient/test-warning-message.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
itemId: tc-3
itemType: Test Case
itemTests: spec-dose-reading-warning
---

# Test warning message

When the recommended insulin dose is based on the glucose readings that are outdated, warn the user.

## Steps

1. Open application
2. Disconnect glucose monitor (via Bluetooth) and wait 5 min
3. Add insulin dosage
4. Click submit

## Expected behavior

Warning message should appear letting user know that glucose reading is not updated.

0 comments on commit e8b9fac

Please sign in to comment.