Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

# AMPL Middleware API
By default, the application uses SSL and is accessed at:
https://localhost:9443/



## Description
This Spring Boot application is the middleware API for AMPL.

## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

You're going to need

```
Java 10
```

## Deployment

### In the /ampl/api/ampl/ directory, maven build using
- For development environments:

```
mvn spring-boot:run
```

- To run a specific environment:

```
mvn spring-boot:run -Pint
mvn spring-boot:run -Pdev
mvn spring-boot:run -Psqa
```

- For release candidates, the API is a fat jar file, meaning it has a self-contained Tomcat server.

```
mvn clean package
java -jar ampl-<version>.jar
```

## Available API
The following APIs are currently available

### GET method
- **Internal mock data.** Root path is */int/v1*

```
/patients/{patientId}/
/patients/{patientId}/allergies
/patients/{patientId}/appointments
/patients/{patientId}/consults
/patients/{patientId}/immunizations
/patients/{patientId}/last-measurements
/patients/{patientId}/measurements
/patients/{patientId}/problem-list
/patients/{patientId}/progress-notes
```

- **FHIR DSTU2.** Root path is */dstu2/v1*

```
/patients/{patientId}/
/patients/{patientId}/allergies
/patients/{patientId}/appointments
/patients/{patientId}/consults
/patients/{patientId}/immunizations
/patients/{patientId}/last-measurements
/patients/{patientId}/measurements
/patients/{patientId}/problem-list
/patients/{patientId}/progress-notes
```

- **FHIR STU3.** Root path is */stu3/v1*

```
STU3 not implemented
```

- **FHIR R4.** Root path is */r4/v1*

```
R4 not implemented
```

- **Application Information.** Root path is */info*

```
/build/details
```

## Searching and Sorting parameters
The search and sort parameters follow a similar pattern and allow for multiples.

### Searching
- Using the ``?search=`` parameter instructs the controller to apply a filter to the given field(s).
- There are restricted operands allowed for the search criteria.
- Format is a comma-delimited list of field + search operator + value to filter results, where search operator is one of:

```
':' - equal to,
'!' - not equal to,
'>' - greater than,
'>:' - greater than or equal to,
'<' - less than,
'<:' - less than or equal to,
'~' - contains
```

- The *AND* operator uses the comma to separate out field filters
- Example:
``?search=field:"value",field2~"value2"``
- The *OR* operator requires a 'plus' symbol
- Example:
``?search=field:"value"+"value2"``
- The operators can be combined
- Example:
``?search=field:"value",field2:"value2",field3~"value"+"value2"``

### Sorting
Searching is a single format and can be sent in a comma-delimited list of field[ASC|DESC] strings to sort results
- Example:
``?sort=field[DESC]``
- Example:
``?sort=field[DESC],field2[ASC]``

## Built With

* [Swagger](https://swagger.io) - The OpenAPI contract
* [Maven](https://maven.apache.org/) - Dependency Management
* [oAuth](https://oauth.net) - Access delegation

## Authors

* **Jason Dittrich** - *Initial work*
* **Asli Goncer** - *Initial work*
* **AJ Magdub** - *Initial work*
* **Ian Meinert** - *Initial work*
* **Pavani Mukthipudi** - *Initial work*
* **David Overstreet** - *Initial work*