nexus-patients
v0.1.0
Published
Canonical Patient contract: TypeScript types + JSON Schema + SQL reference
Readme
nexus-patients
Canonical Patient contract for all services (TypeScript types, JSON Schema, Postgres DDL).
Contents
src/TypeScript types and schema export.schema/patient.schema.jsonJSON Schema for API validation (AJV/yup/etc).sql/patients.sqlreference Postgres table.
Install
npm install nexus-patientsUsage (TypeScript)
import { Patient, patientSchema } from "nexus-patients";
const patient: Patient = {
id: "d0b7d3c4-0f36-4b9c-9ad8-11eaa2c0b111",
active: true,
firstName: "Ada",
lastName: "Lovelace",
dob: "1815-12-10",
address: {
line1: "123 Innovation Way",
city: "Boston",
state: "MA",
postalCode: "02118"
}
};Build
npm run buildPublish
npm publish --access public