@hhgtech/hhg-components
Version:
Hello Health Group common components
158 lines (157 loc) • 4.11 kB
TypeScript
export type QuestionType = {
id: number;
question: string;
questionHint: string;
};
export type AnswerType = {
id: number;
answer: string;
};
export type QuestionResponseType = {
id: number;
value: string;
};
export type AdditionalQuestionType = {
question: QuestionType;
answers: AnswerType[];
};
export type AdditionalQuestionResponseType = {
question: QuestionResponseType;
answers: QuestionResponseType[];
};
export interface BabyVaccinationDetailApi {
profile: BabyVaccinationProfileApi;
vaccine_schedules: BabyVaccinationScheduleApi[];
notifications: any[];
welcome: boolean;
additional_questions: AdditionalQuestionResponseType[];
}
export interface BabyVaccinationProfileApi {
id: number;
gender: boolean;
name: string;
dob: string;
new: boolean;
parent_id: number;
}
export interface BabyVaccinationScheduleApi {
id: number;
title: string;
description?: string;
read_more_url?: string;
icon_boy?: string;
icon_girl?: string;
timelines: BabyVaccinationTimelineApi[];
}
export interface BabyVaccinationTimelineApi {
id: number;
name: string;
number_age: string;
unit_age?: 'year' | 'month' | 'week';
short_name: string;
from_day: number;
to_day: number;
records: BabyVaccinationRecordApi[];
}
export interface BabyVaccinationRecordApi {
id: any;
vaccine_id: number;
vaccine_name: string;
vaccine_antigen: string;
vaccine_optional?: boolean;
given_on?: string;
dose_number: number;
total_doses: number;
vaccine_status: BabyVaccinationStatus;
status: BabyVaccinationStatus;
}
export interface BabyVaccineDetailApi {
id: number;
name: string;
antigen?: string;
brand_img?: string;
benefits?: string;
link?: string;
contraindications?: string;
optional: boolean;
detail?: string;
records: BabyVaccinationRecordApi[];
}
export type BabyVaccinationStatus = 'vaccinated' | 'missed' | 'next' | 'upcoming' | 'all';
export interface BabyVaccinationDetail {
profile: BabyVaccinationProfile;
vaccineSchedules: BabyVaccinationSchedule[];
notifications: any[];
welcome: boolean;
additionalQuestions: AdditionalQuestionResponseType[];
}
export interface BabyVaccinationProfile {
id: number;
gender: string;
name: string;
dob: string;
isNew?: boolean;
parentId?: number;
}
export interface BabyVaccinationSchedule {
id: number;
title: string;
description?: string;
readMoreUrl?: string;
iconBoy: string;
iconGirl: string;
timelines: BabyVaccinationTimeline[];
}
export interface BabyVaccinationTimeline {
id: number;
name: string;
age?: number;
recurrence?: 'year' | 'month' | 'week';
shortName?: string;
fromDay: number;
toDay: number;
records: BabyVaccinationRecord[];
}
export interface BabyVaccinationRecord {
id: any;
vaccineId: number;
vaccineName: string;
vaccineAntigen: string;
vaccineOptional: boolean;
givenOn: string;
doseNumber: number;
totalDoses: number;
status: BabyVaccinationStatus;
vaccineStatus: BabyVaccinationStatus;
}
export interface BabyVaccineDetail {
id: number;
name: string;
antigen?: string;
brandImg?: string;
benefits?: string;
link?: string;
contraindications?: string;
optional: boolean;
content?: string;
detail?: string;
records: BabyVaccinationRecord[];
}
export interface BabyVaccineImmunizationApi {
ID: number;
Name: string;
Records: BabyVaccineImmunizationRecordApi[];
}
export interface BabyVaccineImmunizationRecordApi {
DoseNumber: number;
GivenOn: string;
}
export interface BabyVaccineImmunization {
id: number;
name: string;
records: BabyVaccineImmunizationRecord[];
}
export interface BabyVaccineImmunizationRecord {
doseNumber: number;
givenOn: string;
}