docker run --name epd-db -p 27017:27017 -d mongo
docker run --name data-api -d -e conUri="mongodb:27017" -e db_name="EPD" -p 5000:5000 teamconnected/data-api
Flag | Description | Example |
---|---|---|
conUri | URI to the MongoDB Cluster Set or Host | Example: "'mongodb://host1,host2,host3', replicaSet='rs0'" or "mongodb:27017" |
db_name | Name of the Database to use | Example: EPD |
Implemented will be marked with ✔️
Implemented | HTTP Method | URL | Action |
---|---|---|---|
✔️ | GET | http://[hostname]/api/v1/patient/ | Retrieve list of patients |
✔️ | GET | http://[hostname]/api/v1/patient/[searchField]=[searchTerm] | Retrieve a patient |
✔️ | POST | http://[hostname]/api/v1/patient/ | Create a patient |
✔️ | PUT | http://[hostname]/api/v1/patient/id=[id] | Update a patient |
✔️ | DELETE | http://[hostname]/api/v1/patient/id=[id] | Delete a patient |
Implemented | HTTP Method | URL | Action |
---|---|---|---|
✔️ | GET | http://[hostname]/api/v1/metric/patient=[id] | Retrieve list of metrics of a patient |
✔️ | GET | http://[hostname]/api/v1/metric/[searchField]=[searchTerm] | Retrieve a metric |
✔️ | POST | http://[hostname]/api/v1/metric/patient=[id] | Create a metric |
✔️ | PUT | http://[hostname]/api/v1/metric/id=[id] | Update a metric |
✔️ | DELETE | http://[hostname]/api/v1/metric/patient=[id]/id=[id] | Delete a metric |
Implemented | HTTP Method | URL | Action |
---|---|---|---|
✔️ | GET | http://[hostname]/api/v1/nurse/ | Retrieve list of nurses |
✔️ | GET | http://[hostname]/api/v1/nurse/[searchField]=[searchTerm] | Retrieve a nurse |
✔️ | POST | http://[hostname]/api/v1/nurse/ | Create a nurse |
✔️ | PUT | http://[hostname]/api/v1/nurse/id=[id] | Update a nurse |
✔️ | DELETE | http://[hostname]/api/v1/nurse/id=[id] | Delete a nurse |
Implemented | HTTP Method | URL | Action |
---|---|---|---|
✔️ | GET | http://[hostname]/api/v1/device/ | Retrieve list of devices |
✔️ | GET | http://[hostname]/api/v1/device/[searchField]=[searchTerm] | Retrieve a device |
✔️ | POST | http://[hostname]/api/v1/device/ | Create a device |
✔️ | PUT | http://[hostname]/api/v1/device/sn=[serialNumber] | Update a device |
✔️ | DELETE | http://[hostname]/api/v1/device/sn=[serialNumber] | Delete a device |
- _id: Unique number (Generated automaticly)
- firstname: Firstname
- lastname: Lastname
- email: E-Mail address
- street: Street name & house number
- city: City
- location: Room/Bed number
- metrics: List of all metrics
- _id: Unique number (Generated automaticly)
- bloeddruk: Value of the Blood
- gewicht: Value of the Weight
- temperatuur: Value of the Temperature
- pijnscore: Value of the Pain Score
- device_bloeddruk: Device used to measure Blood
- device_gewicht: Device used to measure Weight
- device_temperatuur: Device used to measure Temperature
- timestamp: Timestamp (Required) (Generated by Voice-APP)
- nurse_id: Nurse that measured (Required)
- comment: Optional comment
- _id: Unique number (Generated automaticly)
- firstname: Firstname
- lastname: Lastname
- email: E-Mail address
- department: Department
- _id: Unique number (Generated automaticly)
- name: Name of the device
- type: Device type
- sn: Serialnumber
- status: Working/Maintenance/Unscaled
curl -i -H "Content-Type: application/json" -X POST -d '{"firstname":"Jaap", "lastname":"Bakkers", "email":"jbakkers@outlook.com",
"street":"Tolseweg 22", "city":"Berghem", "location":"3.120-3"}' http://data-api-url:5000/api/v1/patient/
curl -i -H "Content-Type: application/json" -X POST -d '{"name":"Microlife Watch BP O 3", "type":"bloeddrukdrukmeters",
"sn":"1234567890123", "status":"Working"}' http://data-api-url:5000/api/v1/device/
curl -i -H "Content-Type: application/json" -X POST -d '{"firstname":"Hans", "lastname":"Janssen",
"email":"hjanssen@umc.nl", "department":"IC"}' http://data-api-url:5000/api/v1/nurse/
curl -i -H "Content-Type: application/json" -X POST -d '{"bloeddruk":"120/80", "timestamp":"2019-06-04T09:46:59+00:00", "device_bloeddruk":"59ce02a3e87d42f3b467c161502c824e", "nurse_id":"98b415b75d8849d38be80521efa25d20", "comment":"This is a comment"}' http://data-api-url:5000/api/v1/metric/patient=697b76fa3c6b42a1ab4aa281c88e4227