Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(refactor) Update PatientProgram interface to display program workflows and states #1820

Merged
merged 2 commits into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions packages/esm-patient-common-lib/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,38 @@ export interface DashboardConfig extends DashboardLinkConfig {

export interface PatientProgram {
uuid: string;
patient?: DisplayMetadata;
program: {
uuid: string;
name: string;
allWorkflows: Array<{
uuid: string;
concept: DisplayMetadata;
retired: boolean;
states: Array<Record<string, unknown>>;
links?: Links;
}>;
concept: DisplayMetadata;
links: Links;
};
display: string;
patient: OpenmrsResource;
program: OpenmrsResource;
dateEnrolled: string;
dateCompleted: string;
location: OpenmrsResource;
dateCompleted: string | null;
location?: DisplayMetadata;
voided?: boolean;
outcome?: null;
states?: [];
links: Links;
resourceVersion?: string;
}

export type Links = Array<{
rel: string;
uri: string;
}>;
denniskigen marked this conversation as resolved.
Show resolved Hide resolved

export interface DisplayMetadata {
display: string;
links: Links;
uuid: string;
}
Loading