-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chore) - add common typings for patient and user
- Loading branch information
Showing
28 changed files
with
1,165 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { type OpenmrsResource } from './openmrs-resource'; | ||
|
||
export interface Concept extends OpenmrsResource { | ||
// TODO: add more fields | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
export * from './attachments-types'; | ||
export * from './concept-resource'; | ||
export * from './fetch'; | ||
export * from './fhir-resource'; | ||
export * from './openmrs-resource'; | ||
export * from './user-resource'; | ||
export * from './patient-resource'; | ||
export * from './person-resource'; | ||
export * from './visit-resource'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { type OpenmrsResource } from './openmrs-resource'; | ||
import { type Person } from './person-resource'; | ||
|
||
export interface PatientIdentifierType extends OpenmrsResource {} | ||
|
||
export interface Patient { | ||
uuid: string; | ||
display: string; | ||
identifiers: PatientIdentifier[]; | ||
person: Person; | ||
} | ||
|
||
export interface PatientIdentifier { | ||
uuid: string; | ||
display: string; | ||
identifier: string; | ||
identifierType: PatientIdentifierType; | ||
location: Location; | ||
preferred: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { type Concept } from './concept-resource'; | ||
import { type OpenmrsResource } from './openmrs-resource'; | ||
|
||
export interface PersonAttribute { | ||
attributeType: OpenmrsResource; | ||
display: string; | ||
uuid: string; | ||
value: string | number; | ||
} | ||
|
||
export interface Person { | ||
uuid: string; | ||
display: string; | ||
gender: string; | ||
age: number; | ||
birthdate: string; | ||
birthdateEstimated: boolean; | ||
dead: boolean; | ||
deathDate: string; | ||
causeOfDeath: Concept; | ||
preferredName: PersonName; | ||
preferredAddress: PersonAddress; | ||
names: Array<PersonName>; | ||
addresses: Array<PersonAddress>; | ||
attributes: Array<PersonAttribute>; | ||
birthtime: string; | ||
deathdateEstimated: boolean; | ||
causeOfDeathNonCoded: string; | ||
links: Array<any>; | ||
} | ||
|
||
export interface PersonName { | ||
uuid: string; | ||
display: string; | ||
givenName: string; | ||
middleName: string; | ||
familyName: string; | ||
familyName2: string; | ||
} | ||
|
||
export interface PersonAddress { | ||
uuid: string; | ||
display: string; | ||
preferred: true; | ||
cityVillage: string; | ||
stateProvince: string; | ||
country: string; | ||
postalCode: string; | ||
countyDistrict: string; | ||
startDate: string; | ||
endDate: string; | ||
latitude: string; | ||
longitude: string; | ||
address1: string; | ||
address2: string; | ||
address3: string; | ||
address4: string; | ||
address5: string; | ||
address6: string; | ||
address7: string; | ||
address8: string; | ||
address9: string; | ||
address10: string; | ||
address11: string; | ||
address12: string; | ||
address13: string; | ||
address14: string; | ||
address15: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.