UNPKG

@causalfoundry/js-sdk

Version:

Causal Foundry WEB SDK (JS/TS)

524 lines (478 loc) 13.9 kB
/** * This module was automatically generated by `ts-interface-builder` */ import * as t from "ts-interface-checker"; // tslint:disable:object-literal-key-quotes export const PatientMgmtEventType = t.enumtype({ "Patient": "patient", "Encounter": "encounter", "Appointment": "appointment", "Other": "other", }); export const PatientMgmtCatalogType = t.enumtype({ "UserHcw": "user_chw", "Patient": "patient", }); export const HcwSiteCategory = t.enumtype({ "Facility": "facility", "Community": "community", "PatientAddress": "patient_address", "Virtual": "virtual", "Other": "other", }); export const AppointmentFollowupType = t.enumtype({ "PhoneCall": "phone_call", "SMS": "sms", "WhatsApp": "whatsapp", "HouseVisit": "house_visit", "Other": "other", }); export const AppointmentStatus = t.enumtype({ "Upcoming": "upcoming", "Missed": "missed", "Attended": "attended", "Other": "other", }); export const CounselingType = t.enumtype({ "Lifestyle": "lifestyle", "Psychological": "psychological", "Other": "other", }); export const DiagnosisCategory = t.enumtype({ "Computed": "computed", "Given": "given", "Other": "other", }); export const DiagnosisQuestionnaireCategory = t.enumtype({ "MedicalReview": "medical_review", "Assessment": "assessment", "Diagnostic": "diagnostic", "Other": "other", }); export const DiagnosisQuestionnaireOutcomeType = t.enumtype({ "RiskStatus": "risk_status", "RiskScore": "risk_score", "Other": "other", }); export const DiagnosisStatusValueType = t.enumtype({ "Positive": "positive", "Negative": "negative", "Recovered": "recovered", "Unknown": "unknown", "NA": "n_a", "Other": "other", }); export const DiagnosisStatusRiskType = t.enumtype({ "Low": "low", "High": "high", "Unknown": "unknown", "NA": "n_a", "Other": "other", }); export const DiagnosisSubType = t.enumtype({ "Age": "age", "Gender": "gender", "Height": "height", "Weight": "weight", "Smoker": "smoker", "BloodPressure": "blood_pressure", "BloodPressureSystolic": "blood_pressure_systolic", "BloodPressureDiastolic": "blood_pressure_diastolic", "MUAC": "muac", "BloodGlucose": "blood_glucose", "HbA1c": "hbA1c", "Temperature": "temperature", "Bmi": "bmi", "Cvd": "cvd", "Phq4": "phq_4", "Phq9": "phq_9", "Gad7": "gad_7", "PregnancyStatus": "pregnancy_status", "PregnancyDangerSigns": "pregnancy_danger_signs", "SuicidalIdeation": "suicidal_ideation", "HighRiskPregnancy": "high_risk_pregnancy", "Other": "other", }); export const DiagnosisSymptomType = t.enumtype({ "Bio": "bio", "HIV": "hiv", "NCD": "ncd", "TB": "tb", "ECD": "ecd", "Diabetes": "diabetes", "Hypertension": "hypertension", "Pregnancy": "pregnancy", "MentalHealth": "mental_health", "SubstanceUseDisorder": "substance_use_disorder", "AdolescentHealth": "adolescent_health", "GeneralScreening": "general_screening", "Gynecologic": "gynecologic", "Antenatal": "antenatal", "Postnatal": "postnatal", "CervicalCancer": "cervical_cancer", "Lifestyle": "lifestyle", "Psychological": "psychological", "GenderBasedViolence": "gender_based_violence", "SexualBehaviour": "sexual_behaviour", "EconomicStrength": "economic_strengthening", "Other": "other", }); export const DiagnosisType = t.enumtype({ "Bio": "bio", "HIV": "hiv", "NCD": "ncd", "TB": "tb", "ECD": "ecd", "Diabetes": "diabetes", "Hypertension": "hypertension", "Pregnancy": "pregnancy", "MentalHealth": "mental_health", "SubstanceUseDisorder": "substance_use_disorder", "AdolescentHealth": "adolescent_health", "GeneralScreening": "general_screening", "Gynecologic": "gynecologic", "Antenatal": "antenatal", "Postnatal": "postnatal", "CervicalCancer": "cervical_cancer", "Lifestyle": "lifestyle", "Psychological": "psychological", "GenderBasedViolence": "gender_based_violence", "SexualBehaviour": "sexual_behaviour", "EconomicStrength": "economic_strengthening", "Other": "other", }); export const EncounterType = t.enumtype({ "Screening": "screening", "Assessment": "assessment", "Enrolment": "enrolment", "MedicalReview": "medical_review", "Counseling": "counseling", "Other": "other", }); export const FrequencyType = t.enumtype({ "Daily": "daily", "Days": "days", "Weeks": "weeks", "Months": "months", "Other": "other", }); export const HcwItemAction = t.enumtype({ "View": "view", "Add": "add", "Update": "update", "Remove": "remove", "Done": "done", "Other": "other", }); export const PatientType = t.enumtype({ "Triage": "triage", "Outpatient": "outpatient", "Inpatient": "inpatient", "Pharmacy": "pharmacy", "DoorToDoor": "door_to_door", "Camp": "camp", "Other": "other", }); export const PrescriptionItemFrequency = t.enumtype({ "AM": "AM", "PM": "PM", "OD": "OD", "BD": "BD", "TDS": "TDS", "QDS": "QDS", "OM": "OM", "ON": "ON", "CC": "CC", "PC": "PC", "AC": "AC", "PRN": "PRN", "Other": "other", }); export const PrescriptionItemFormulationType = t.enumtype({ "Tablet": "tablet", "Capsule": "capsule", "Syrup": "syrup", "Injection": "injection", "Insulin": "insulin", "Contraceptive": "contraceptive", "Other": "other", }); export const ScheduleItemType = t.enumtype({ "MedicalReview": "medical_review", "Assessment": "assessment", "Other": "other", }); export const AppointmentItem = t.iface([], { "id": "string", "hcw_id": "string", "category": "HcwSiteCategory", "status": "AppointmentStatus", "time": "number", "is_time_sensitive": "boolean", "type_list": t.array("ScheduleItemType"), "sub_type_list": t.array("DiagnosisType"), "update": t.opt("AppointmentUpdateItem"), "missed": t.opt("AppointmentMissedItem"), }); export const AppointmentUpdateItem = t.iface([], { "id": "string", "reason": "string", "prev_time": "number", }); export const AppointmentMissedItem = t.iface([], { "id": "string", "type": "AppointmentFollowupType", "time": "number", "response": "string", }); export const CounselingPlanItem = t.iface([], { "name": "string", "action": "HcwItemAction", "clinician_notes": t.opt("string"), "assessment_remarks": t.opt("string"), "counselor_notes": t.opt("string"), "referral_date": t.opt("number"), "assessment_date": t.opt("number"), "referred_by": t.opt("string"), "assessed_by": t.opt("string"), "remarks": t.opt("string"), }); export const ImmunizationItem = t.iface([], { "id": "string", "action": "HcwItemAction", "type": "string", "dose": "number", "status": "boolean", "date": t.opt("number"), "remarks": t.opt("string"), }); export const DiagnosisItem = t.iface([], { "type": "DiagnosisType", "sub_type": "DiagnosisSubType", "category": "DiagnosisCategory", "value": "any", "unit": "string", "observation_time": t.opt("number"), "remarks": t.opt("string"), }); export const DiagnosisOutcomeItem = t.iface([], { "type": "DiagnosisQuestionnaireOutcomeType", "sub_type": t.opt("string"), "value": "any", "remarks": t.opt("string"), }); export const DiagnosisQuestionnaireObject = t.iface([], { "type": "DiagnosisType", "sub_type": "DiagnosisSubType", "category": "DiagnosisQuestionnaireCategory", "question_list": t.array("DiagnosisQuestionItem"), "outcome_list": t.array("DiagnosisOutcomeItem"), "remarks": t.opt("string"), }); export const DiagnosisStatusItem = t.iface([], { "type": "DiagnosisType", "sub_type": t.opt("string"), "action": "HcwItemAction", "status": "DiagnosisStatusValueType", "risk": "DiagnosisStatusRiskType", "diagnosis_date": "number", "is_confirmed": t.opt("boolean"), "remarks": t.opt("string"), "stage": t.opt("string"), "treatment_status": t.opt("string"), }); export const DiagnosisSymptomItem = t.iface([], { "type": "DiagnosisSymptomType", "symptoms_list": t.array("string"), "remarks": t.opt("string"), }); export const DiagnosticElementItem = t.iface([], { "id": "string", "investigation_list": t.array("InvestigationItem"), "biometric_list": t.array("DiagnosisItem"), "sign_symptom_list": t.array("DiagnosisSymptomItem"), "treatment_adherence_list": t.array("TreatmentAdherenceItem"), "health_questionnaire_list": t.array("DiagnosisQuestionnaireObject"), }); export const EncounterSummaryObject = t.iface([], { "id": "string", "appointment_id": t.opt("string"), "encounter_time": "number", "hcw_id_list": t.array("string"), "prev_diagnosis_status_list": t.array("DiagnosisStatusItem"), "diagnosis_status_list": t.array("DiagnosisStatusItem"), "prev_treatment_plan": t.opt("TreatmentPlanItem"), "treatment_plan": t.opt("TreatmentPlanItem"), "main_complaints_list": t.array("string"), "diagnostic_elements": t.opt("DiagnosticElementItem"), "pregnancy_details": t.opt("PregnancyDetailObject"), "counseling_list": t.opt(t.array("CounselingPlanItem")), "immunization_list": t.opt(t.array("ImmunizationItem")), "remarks": t.opt("string"), "is_followup_id": t.opt("string"), "is_referral_id": t.opt("string"), "has_followup": t.opt("boolean"), "has_referral": t.opt("boolean"), }); export const InvestigationItem = t.iface([], { "name": "string", "test_value": "string", "test_unit": "string", "ordered_date": "number", "tested_date": "number", "action": "HcwItemAction", "remarks": "string", }); export const PregnancyDetailObject = t.iface([], { "pregnancy_status": "boolean", "last_menstrual_period": t.opt("number"), "high_risk": "boolean", "gravida": t.opt("number"), "parity": t.opt("number"), "n_fetus": t.opt("number"), "neonatal_outcome": t.opt("string"), "maternal_outcome": t.opt("string"), }); export const PrescriptionItem = t.iface([], { "id": "string", "name": "string", "dosage_value": t.opt("number"), "dosage_unit": "string", "formulation": "PrescriptionItemFormulationType", "type": "DiagnosisType", "frequency": "PrescriptionItemFrequency", "prescribed_days": t.opt("number"), "dispensed_days": t.opt("number"), "prescription_date": t.opt("number"), "action": "HcwItemAction", "remarks": t.opt("string"), }); export const ScheduleItem = t.iface([], { "type": "ScheduleItemType", "sub_type": "DiagnosisType", "value": "number", "frequency": "FrequencyType", "action": "HcwItemAction", "remarks": t.opt("string"), "start_date": t.opt("number"), "end_date": t.opt("number"), }); export const TreatmentAdherenceItem = t.iface([], { "type": "string", "medication_adherence": "string", "lack_adherence_reason": t.opt("string"), "remarks": t.opt("string"), }); export const TreatmentPlanItem = t.iface([], { "followup_list": t.array("ScheduleItem"), "prescription_list": t.array("PrescriptionItem"), "investigation_list": t.array("InvestigationItem"), }); export const PatientProperties = t.iface([], { "patient_id": "string", "site_id": "string", "action": "HcwItemAction", "is_from_gho": "boolean", "category": "HcwSiteCategory", "type": "PatientType", "sub_type": t.opt("string"), "biometric_list": t.opt(t.array("DiagnosisItem")), "pregnancy_details": t.opt("PregnancyDetailObject"), "registration_date": t.opt("number"), "meta": t.opt("any"), }); export const EncounterProperties = t.iface([], { "patient_id": "string", "site_id": "string", "action": "HcwItemAction", "category": "HcwSiteCategory", "type": "EncounterType", "sub_type": "DiagnosisType", "encounter_summary": "EncounterSummaryObject", "meta": t.opt("any"), }); export const AppointmentProperties = t.iface([], { "patient_id": "string", "site_id": "string", "action": "HcwItemAction", "appointment": "AppointmentItem", "meta": t.opt("any"), }); export const HcwCatalogModel = t.iface([], { "id": "string", "name": t.opt("string"), "role": t.opt("string"), "site_id_list": t.opt(t.array("string")), "supervisor_id_list": t.opt(t.array("string")), }); export const PatientCatalogModel = t.iface([], { "id": "string", "country": t.opt("Country"), "region_state": t.opt("string"), "city": t.opt("string"), "profession": t.opt("string"), "education_level": t.opt("string"), "site_id_list": t.opt(t.array("string")), "insurance_id": t.opt("string"), "insurance_type": t.opt("string"), "insurance_status": t.opt("boolean"), "landmark": t.opt("string"), "phone_number_category": t.opt("string"), "program_id": t.opt("string"), "family_id": t.opt("string"), "hw_id_list": t.opt(t.array("string")), "buddy_id_list": t.opt(t.array("string")), "transport_mode": t.opt("string"), "marital_status": t.opt("string"), "employment_status": t.opt("string"), "nationality": t.opt("string"), "has_whatsapp": t.opt("boolean"), "has_email": t.opt("boolean"), }); const exportedTypeSuite: t.ITypeSuite = { PatientMgmtEventType, PatientMgmtCatalogType, HcwSiteCategory, AppointmentFollowupType, AppointmentStatus, CounselingType, DiagnosisCategory, DiagnosisQuestionnaireCategory, DiagnosisQuestionnaireOutcomeType, DiagnosisStatusValueType, DiagnosisStatusRiskType, DiagnosisSubType, DiagnosisSymptomType, DiagnosisType, EncounterType, FrequencyType, HcwItemAction, PatientType, PrescriptionItemFrequency, PrescriptionItemFormulationType, ScheduleItemType, AppointmentItem, AppointmentUpdateItem, AppointmentMissedItem, CounselingPlanItem, ImmunizationItem, DiagnosisItem, DiagnosisOutcomeItem, DiagnosisQuestionnaireObject, DiagnosisStatusItem, DiagnosisSymptomItem, DiagnosticElementItem, EncounterSummaryObject, InvestigationItem, PregnancyDetailObject, PrescriptionItem, ScheduleItem, TreatmentAdherenceItem, TreatmentPlanItem, PatientProperties, EncounterProperties, AppointmentProperties, HcwCatalogModel, PatientCatalogModel, }; export default exportedTypeSuite;