Other CPSC Service API

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: High
    • None
    • Affects Version/s: None
    • None
    • HWC Mobile App
    • UAT

      This ticket is to create the required APIs for CPHC (Comprehensive Primary Healthcare) module workflows in the HWC application to enable complete feature implementation and data synchronization.

        1. Scope of APIs:
          1. 1. Sync API Requirements:

      All modules must support:

      • *Up Sync API* (local → server data sync)
      • *Down Sync API* (server → local data sync)

          1. 2. Other CPHC APIs

      Create APIs for:

      • Ophthalmic Visit
      • Ear Diagnosis Assessment
      • Pain & Symptom Assessment
      • Psychosocial Caregiver Support
      • Oral Health
      • Nose Diagnosis Assessment
      • Mental Health Screening
      • Throat Diagnosis Assessment
      • Elderly Health Assessment
          1. 2. Table Schema used in Local DB
            1. OPHTHALMIC_VISIT
      Column Type Nullable Key
      -------- ------ ----------
      visitId TEXT (UUID) No PK
      patientID TEXT No FK → Patient
      benVisitNo INTEGER No  
      isDiabetic INTEGER (Boolean) Yes  
      screeningPerformed INTEGER (Boolean) Yes  
      visualAcuityChartUsed TEXT Yes  
      distVARight TEXT Yes  
      distVALeft TEXT Yes  
      nearVA TEXT Yes  
      caseIdConditions TEXT (JSON) Yes  
      cataractSymptoms INTEGER (Boolean) Yes  
      glaucomaSymptoms INTEGER (Boolean) Yes  
      diabeticRetinopathySymptoms INTEGER (Boolean) Yes  
      presbyopiaSymptoms INTEGER (Boolean) Yes  
      trachomaStatus TEXT Yes  
      cornealDiseaseType TEXT Yes  
      vitaminADeficiency INTEGER (Boolean) Yes  
      injuryType TEXT (JSON) Yes  
      foreignBodyRemoval TEXT Yes  
      chemicalExposure INTEGER (Boolean) Yes  
      createdBy TEXT No  
      createdDate INTEGER (epoch ms) No  
      updatedBy TEXT No  
      updatedDate INTEGER (epoch ms) No  
      syncState INTEGER No Internal only

      *Index:* `patientID`

            1. EAR_DIAGNOSIS_ASSESSMENT
      Column Type Nullable Key
      -------- ------ ----------
      assessment_id INTEGER No PK (autoGenerate)
      patient_id TEXT No  
      ben_visit_no INTEGER Yes  
      difficulty_hearing INTEGER (Boolean) Yes  
      whisper_test_response TEXT Yes  
      hearing_test_outcome TEXT Yes  
      ear_pain INTEGER (Boolean) Yes  
      ear_discharge_present INTEGER (Boolean) Yes  
      foreign_body_in_ear TEXT Yes  
      ear_condition_type TEXT Yes  
      congenital_ear_malformation INTEGER (Boolean) Yes  

            1. PAIN_SYMPTOM_ASSESSMENT
      Column Type Nullable Key
      -------- ------ ----------
      assessment_id INTEGER No PK (autoGenerate)
      patient_id TEXT No  
      ben_visit_no INTEGER Yes  
      pain_severity TEXT Yes  
      pain_duration TEXT Yes  
      symptoms_present INTEGER (Boolean) Yes  
      other_symptoms_severity TEXT Yes  
      immediate_relief_provided INTEGER (Boolean) Yes  
      persistent_pain_present INTEGER (Boolean) Yes  
      pain_assessment_enabled INTEGER (Boolean) Yes  
      distressing_symptoms_present TEXT Yes  
      bedridden_or_severely_dependent INTEGER (Boolean) Yes  
      life_limiting_illness_known INTEGER (Boolean) Yes  
      caregiver_support_required INTEGER (Boolean) Yes  
      palliative_care_eligible INTEGER (Boolean) Yes  
      referral_required INTEGER (Boolean) Yes  
      referral_level TEXT Yes  
      reason_for_referral TEXT Yes  
      follow_up_required INTEGER (Boolean) Yes  
      follow_up_date TEXT Yes  
      case_status TEXT Yes  
      date_of_death TEXT Yes  
      remarks TEXT Yes  

            1. PSYCHOSOCIAL_CAREGIVER_SUPPORT
      Column Type Nullable Key
      -------- ------ ----------
      assessment_id INTEGER No PK (autoGenerate)
      patient_id TEXT No  
      ben_visit_no INTEGER Yes  
      psychosocial_counselling_provided INTEGER (Boolean) Yes  
      caregiver_counselling_provided INTEGER (Boolean) Yes  
      caregiver_distress_identified INTEGER (Boolean) Yes  
      counselling_remarks TEXT Yes  
      referral_required INTEGER (Boolean) Yes  
      referral_level TEXT Yes  
      reason_for_referral TEXT Yes  
      follow_up_required INTEGER (Boolean) Yes  
      follow_up_date TEXT Yes  
      case_status TEXT Yes  
      date_of_death TEXT Yes  
      remarks TEXT Yes  

            1. ORAL_HEALTH
      Column Type Nullable Key
      -------- ------ ----------
      oral_health_id INTEGER No PK (autoGenerate)
      patient_id TEXT No  
      ben_visit_no INTEGER Yes  
      tooth_decay_present INTEGER (Boolean) Yes  
      tooth_decay_symptoms TEXT Yes  
      gum_disease_present INTEGER (Boolean) Yes  
      gum_disease_symptoms TEXT Yes  
      irregular_teeth_jaws INTEGER (Boolean) Yes  
      abnormal_growth_ulcer INTEGER (Boolean) Yes  
      cleft_lip_palate INTEGER (Boolean) Yes  
      dental_fluorosis INTEGER (Boolean) Yes  
      dental_emergency TEXT Yes  
      created_date INTEGER (epoch ms) Yes  
      created_by TEXT Yes  

      *Unique Index:* `(patient_id, ben_visit_no)`

            1. NOSE_DIAGNOSIS_ASSESSMENT
      Column Type Nullable Key
      -------- ------ ----------
      assessment_id INTEGER No PK (autoGenerate)
      patient_id TEXT No  
      ben_visit_no INTEGER Yes  
      difficulty_breathing INTEGER (Boolean) Yes  
      open_mouth_breathing INTEGER (Boolean) Yes  
      nose_bleed INTEGER (Boolean) Yes  
      systolic_bp INTEGER Yes  
      diastolic_bp INTEGER Yes  
      foreign_body_nose TEXT Yes  
      sinusitis INTEGER (Boolean) Yes  

            1. MENTAL_HEALTH_SCREENING
      Column Type Nullable Key
      -------- ------ ----------
      screening_id INTEGER No PK (autoGenerate)
      patient_id TEXT No  
      ben_visit_no INTEGER Yes  
      emotional_behavioural_concerns INTEGER (Boolean) Yes  
      substance_use_concerns INTEGER (Boolean) Yes  
      self_harm_suicide_thoughts INTEGER (Boolean) Yes  
      memory_loss_confusion INTEGER (Boolean) Yes  
      seizures_fits_loc INTEGER (Boolean) Yes  
      is_postpartum INTEGER (Boolean) Yes  
      phq9_little_interest INTEGER Yes  
      phq9_feeling_down INTEGER Yes  
      phq9_sleep_trouble INTEGER Yes  
      phq9_feeling_tired INTEGER Yes  
      phq9_appetite INTEGER Yes  
      phq9_feeling_bad INTEGER Yes  
      phq9_concentration INTEGER Yes  
      phq9_moving_slowly INTEGER Yes  
      phq9_self_harm_thoughts INTEGER Yes  
      phq9_total_score INTEGER Yes  
      phq9_depression_severity TEXT Yes  
      phq9_system_action TEXT Yes  
      substance_current_tobacco_use INTEGER (Boolean) Yes  
      substance_tobacco_type TEXT Yes  
      substance_tobacco_frequency TEXT Yes  
      substance_tobacco_outcome TEXT Yes  
      substance_system_action TEXT Yes  
      substance_alcohol_use INTEGER (Boolean) Yes  
      substance_tobacco_use INTEGER (Boolean) Yes  
      substance_other_use INTEGER (Boolean) Yes  
      substance_other_specify TEXT Yes  
      substance_frequency TEXT Yes  
      brief_intervention_given INTEGER (Boolean) Yes  
      substance_alcohol_impact INTEGER (Boolean) Yes  
      substance_alcohol_withdrawal INTEGER (Boolean) Yes  
      substance_alcohol_problematic INTEGER (Boolean) Yes  
      substance_alcohol_classification TEXT Yes  
      substance_alcohol_system_action TEXT Yes  
      substance_alcohol_frequency TEXT Yes  
      substance_alcohol_loss INTEGER (Boolean) Yes  
      suicide_current_thoughts INTEGER (Boolean) Yes  
      suicide_plan INTEGER (Boolean) Yes  
      suicide_previous_attempt INTEGER (Boolean) Yes  
      suicide_hopelessness INTEGER (Boolean) Yes  
      suicide_immediate_assess INTEGER (Boolean) Yes  
      suicide_risk_level TEXT Yes  
      dementia_progressive_memory_loss INTEGER (Boolean) Yes  
      dementia_forgetting_recent INTEGER (Boolean) Yes  
      dementia_disorientation INTEGER (Boolean) Yes  
      dementia_daily_activities INTEGER (Boolean) Yes  
      dementia_behavioural_changes INTEGER (Boolean) Yes  
      epilepsy_recurrent_seizures INTEGER (Boolean) Yes  
      epilepsy_jerky_movements INTEGER (Boolean) Yes  
      epilepsy_tongue_bite INTEGER (Boolean) Yes  
      epilepsy_confusion_after INTEGER (Boolean) Yes  
      epilepsy_loc_duration TEXT Yes  
      edRecurrentEpisodeloss INTEGER (Boolean) Yes  
      ed_recurrent_jerky_movements INTEGER (Boolean) Yes  
      ed_progressive_memory_loss INTEGER (Boolean) Yes  
      ed_confusion_disorientation INTEGER (Boolean) Yes  
      ed_functional_decline INTEGER (Boolean) Yes  
      ed_screening_outcome TEXT Yes  
      ed_psychosocial_intervention_provided INTEGER (Boolean) Yes  
      ed_intervention_type TEXT Yes  
      ed_session_date TEXT Yes  
      ed_duration_minutes INTEGER Yes  
      ed_remarks TEXT Yes  
      ed_referral_required TEXT Yes  
      referral_required INTEGER (Boolean) Yes  
      referral_level TEXT Yes  
      reason_for_referral TEXT Yes  
      referral_date TEXT Yes  
      follow_up_required INTEGER (Boolean) Yes  
      follow_up_date TEXT Yes  
      improvement_noted TEXT Yes  
      referral_escalation_required INTEGER (Boolean) Yes  
      case_closure_reason TEXT Yes  

      *Index:* `(patient_id)`, `(patient_id, ben_visit_no)`

            1. THROAT_DIAGNOSIS_ASSESSMENT
      Column Type Nullable Key
      -------- ------ ----------
      assessment_id INTEGER No PK (autoGenerate)
      patient_id TEXT No  
      ben_visit_no INTEGER Yes  
      symptoms TEXT (JSON array) Yes  
      neck_swelling INTEGER (Boolean) Yes  
      difficulty_swallowing INTEGER (Boolean) Yes  
      tonsillitis INTEGER (Boolean) Yes  
      pharyngitis INTEGER (Boolean) Yes  
      laryngitis INTEGER (Boolean) Yes  
      sinusitis INTEGER (Boolean) Yes  
      cleft_lip INTEGER (Boolean) Yes  
      cleft_palate INTEGER (Boolean) Yes  

            1. ELDERLY_HEALTH_ASSESSMENT
      Column Type Nullable Key
      -------- ------ ----------
      assessment_id INTEGER No PK (autoGenerate)
      patient_id TEXT No  
      ben_visit_no INTEGER No  
      geriatric_complaints INTEGER (Boolean) Yes  
      multiple_chronic_conditions INTEGER (Boolean) Yes  
      recent_falls INTEGER (Boolean) Yes  
      difficulty_walking_balance INTEGER (Boolean) Yes  
      visual_hearing_difficulty INTEGER (Boolean) Yes  
      functional_decline INTEGER (Boolean) Yes  
      memory_loss INTEGER (Boolean) Yes  
      dementia_memory_loss INTEGER (Boolean) Yes  
      dementia_disorientation INTEGER (Boolean) Yes  
      dementia_behavioural_changes INTEGER (Boolean) Yes  
      dementia_self_care_decline INTEGER (Boolean) Yes  
      dementia_screening_outcome TEXT Yes  
      dementia_referral_required INTEGER (Boolean) Yes  
      referral_required INTEGER (Boolean) Yes  
      referral_level TEXT Yes  
      reason_for_referral TEXT Yes  
      follow_up_required INTEGER (Boolean) Yes  
      follow_up_date TEXT Yes  
      case_status TEXT Yes  
      date_of_death TEXT Yes  
      remarks TEXT Yes  

      *Unique Index:* `(patient_id, ben_visit_no)`
       

              Assignee:
              Saurav Mishra
              Reporter:
              Deepak Kumar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: