Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

OpenAPI

Michael J Feher edited this page Sep 12, 2019 · 3 revisions

Proposals:

OpenAPI: HospitalRun/hospitalrun#15
Isomorphic: HospitalRun/hospitalrun#12
Server: HospitalRun/hospitalrun#13
Frontend: HospitalRun/hospitalrun#14

Reasoning

Adding a single source of truth(SSOT) for all projects in the HospitalRun Ecosystem. Code generated SOLID Isomorphic interface.

S/I All objects in the database should be represented as some form of base interface
O Any modifications to a required interfaces is considered a breaking change. Must implement the core interface they are interacting with.
L All objects are documents, they should contain the metadata required to coerce types.
D Document and Device are the core abstraction. A document is a record and a device contains them. Example substitution: A device can be an API, Frontend, or CouchDB Instance

OpenAPI Roles

OpenAPI Spec: ./spec

  • Defines routes, models and services.

Core/Isomorphic: ./packages/core Template: ./templates/inversify

  • Generated cross platform model/service library with additional pouchdb plugins and helpers.
    Helpful Plugins: crypto-pouch & pouch-box.

Frontend: ./packages/frontend Template:

  • Application Shell Generation. Use core routes and services to inject a Store from a CoreService into a generated Page|Tab state.

Additional Research:

CouchDB Design Documents

https://docs.couchdb.org/en/2.1.2/ddocs/ddocs.html https://docs.couchdb.org/en/stable/api/ddoc/rewrites.html

OpenAPI Extensions

https://swagger.io/docs/specification/openapi-extensions/

HL7 OpenAPI

HL7 Field Mappings