Column Explanation
Data source labels: ncd_pt_registers = NCD registered Data, ncd_followups = NCD followup Data, followup_generals = Reception's Disease Category Data.
How 7 columns are counted:
1. NCD Register (Reg_Date): Count from ncd_pt_registers where Reg_Date is between From and To.
2. NCD Follow-up New Visit: From selected IDs, first (earliest) Visit_date per ID in range from ncd_followups.
3. NCD Follow-up Old Visit: Other follow-up visits for same ID in range (visit count > 1) from ncd_followups.
4. General NCD New: Count from followup_generals where decoded NCD status is New in range.
5. General NCD Old: Count from followup_generals where decoded NCD status is Old in range.
6. New Difference: NCD Follow-up New Visit - General NCD New.
7. Old Difference: NCD Follow-up Old Visit - General NCD Old.