Skip to content

Commit dc1f453

Browse files
authored
adds api layer for patient service (#669)
* feat: add patientCreated command * feat: add bedAssigned command * feat: add bedUnassigned command * feat: add patientDischarged command * feat: add updatePatient command * feat: add readmitPatient command * feat: add tests * feat: add assignUnassign tests * cleanup * fix: updatedAt * fix: remove unnecessary args * feat: getPatientById * feat: add proto * feat: getPatientById * feat: create and updatePatient endpoint * feat: assign and unassignBed * feat: discharge and readmitPatient * make protos * fix: imports * feat: getPatientById * remove tables * feat: getRecentPatients and tracking * add tests * cleanup * fix: linting * update ci step * apply review changes * maybe fix * Merge branch 'main' into issue/635-patient-api * protos and ci * fix: remove duplicate version * apply review changes
1 parent 0928fb7 commit dc1f453

File tree

107 files changed

+16063
-329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+16063
-329
lines changed

.github/workflows/migrations.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,18 @@ jobs:
156156
id: collect-version
157157
run: |
158158
echo -n "VERSION=" > $GITHUB_OUTPUT
159+
159160
# for some reason, beyond my comprehension,
160161
# the output of migrate is sent to stderr in the CI, but stdout on local
161-
./migrate.sh $svc version 2>&1 | tail -n1 >> $GITHUB_OUTPUT
162+
version_output=$(./migrate.sh $svc version 2>&1 | tail -n1)
163+
164+
# Check if the version_output is a number
165+
if [[ $version_output =~ ^[0-9]+$ ]]; then
166+
echo $version_output >> $GITHUB_OUTPUT
167+
else
168+
echo "Error: Version is not a number: $version_output" >&2
169+
echo "0" >> $GITHUB_OUTPUT
170+
fi
162171
- name: Check version
163172
run: |
164173
./migrate.sh $svc desired

dev/init.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ CREATE DATABASE "emergency-room-svc";
22
CREATE DATABASE "task-svc";
33
CREATE DATABASE "user-svc";
44
CREATE DATABASE "impulse-svc";
5+
CREATE DATABASE "tasks-svc";

gen/dart/lib/proto/services/task_svc/v1/task_svc.pb.dart

Lines changed: 31 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)