The backend and apis for configuring the default observation charts.
The objective of this spike is to have a local docker instance of MSSQL 2017 database working with the spring boot app, So each local dev environment can independently run unit tests (also do TDD) and do dev testing.
- Spring boot
- Spring WebServices API
- Spring Data (JPA)
- MSSQL 2017 developer edition (docker image)
- Docker & gradle
- Install Docker. (https://docs.docker.com/install/)
- Pull MSSQL 2017 developer edition docker image and start the server.
- Install any MSSQL client (eg SQLPro) and connect it to the localhost:1401.
- Create an empty database with name "observations"
- Hibernate property "spring.jpa.hibernate.ddl-auto " will set up the local database schema.
- extract/clone the project in a directory.
- Run gradle build (if gradle is installed) or ./gradlew build
The spring boot server can be started by using -gradle bootRun or
- java -jar build/libs/observations-backend.jar
There is integration test which sets up an observation chart in the database using the service
Using postman an observation chart can be loaded
Example : endpoint : localhost:8080/observationChart Request JSON :
{
"location":{
"name":"ED1"
},
"observationSets":[
{
"name":"heartRate",
"description":"test",
"observationItems":[
{
"callingCriterias":[
{
"name":"RED",
"observationRanges":[
{
"name":"UPPER_BOUND_MAX",
"value":"120"
}
]
}
]
}
]
}
]
}