Skip to content
Merged
Show file tree
Hide file tree
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
471 changes: 392 additions & 79 deletions bandhu_app/bandhu_app/custom/patient.json

Large diffs are not rendered by default.

116 changes: 58 additions & 58 deletions bandhu_app/bandhu_app/custom/patient_encounter.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "CS-.YY.-.MM.-.DD.-.SITE.-.###",
"autoname": "CS-.YY.-.MM.-.DD.-.site.-.###",
"creation": "2026-04-13 08:14:19.128869",
"doctype": "DocType",
"engine": "InnoDB",
Expand All @@ -23,7 +23,7 @@
"additional_details_section",
"departure_time",
"arrival_time",
"distance_travelled",
"distance_travelled_km",
"column_break_ltxj",
"notes"
],
Expand Down Expand Up @@ -109,23 +109,18 @@
},
{
"fieldname": "departure_time",
"fieldtype": "Datetime",
"fieldtype": "Time",
"label": "Departure Time"
},
{
"fieldname": "arrival_time",
"fieldtype": "Datetime",
"fieldtype": "Time",
"label": "Arrival Time"
},
{
"fieldname": "column_break_ltxj",
"fieldtype": "Column Break"
},
{
"fieldname": "distance_travelled",
"fieldtype": "Data",
"label": "Distance Travelled"
},
{
"fieldname": "notes",
"fieldtype": "Small Text",
Expand All @@ -145,6 +140,11 @@
"hidden": 1,
"label": "Vehicle",
"options": "Vehicle"
},
{
"fieldname": "distance_travelled_km",
"fieldtype": "Data",
"label": "Distance Travelled (km)"
}
],
"grid_page_length": 50,
Expand All @@ -155,7 +155,7 @@
"link_fieldname": "custom_clinic_session"
}
],
"modified": "2026-05-06 21:16:47.235741",
"modified": "2026-06-12 10:17:45.877560",
"modified_by": "Administrator",
"module": "Bandhu App",
"name": "Bandhu Clinic Session",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ class BandhuClinicSession(Document):
if TYPE_CHECKING:
from frappe.types import DF

arrival_time: DF.Datetime | None
arrival_time: DF.Time | None
assigned_doctor: DF.Link | None
assigned_driver: DF.Link | None
assigned_nurse: DF.Link | None
clinic: DF.Link
date: DF.Date
departure_time: DF.Datetime | None
distance_travelled: DF.Data | None
departure_time: DF.Time | None
distance_travelled_km: DF.Data | None
end_time: DF.Datetime | None
notes: DF.SmallText | None
project: DF.Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"field_order": [
"location_name",
"lsg",
"lsg_code",
"column_break_prbi",
"phcchc",
"district",
"state"
],
Expand All @@ -30,12 +33,26 @@
"fieldname": "state",
"fieldtype": "Data",
"label": "State"
},
{
"fieldname": "phcchc",
"fieldtype": "Data",
"label": "PHC/CHC"
},
{
"fieldname": "column_break_prbi",
"fieldtype": "Column Break"
},
{
"fieldname": "lsg_code",
"fieldtype": "Data",
"label": "LSG Code"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2026-04-20 17:05:45.151777",
"modified": "2026-06-08 11:36:39.403821",
"modified_by": "Administrator",
"module": "Bandhu App",
"name": "Bandhu Location",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class BandhuLocation(Document):
district: DF.Data | None
location_name: DF.Data | None
lsg: DF.Data | None
lsg_code: DF.Data | None
phcchc: DF.Data | None
state: DF.Data | None
# end: auto-generated types

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"fieldname": "status",
"fieldtype": "Select",
"label": "Status",
"options": "Active\nCompleted\nIn-Active"
"options": "Active\nCompleted"
},
{
"fieldname": "description",
Expand All @@ -60,8 +60,13 @@
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2026-05-07 08:14:28.793489",
"links": [
{
"link_doctype": "Clinic",
"link_fieldname": "project"
}
],
"modified": "2026-06-01 20:46:06.252574",
"modified_by": "Administrator",
"module": "Bandhu App",
"name": "Bandhu Projects",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class BandhuProjects(Document):
funding_source: DF.Data | None
project: DF.Data
start_date: DF.Date
status: DF.Literal["Active", "Completed", "In-Active"]
status: DF.Literal["Active", "Completed"]
# end: auto-generated types

pass
14 changes: 12 additions & 2 deletions bandhu_app/bandhu_app/doctype/clinic/clinic.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:clinic_name",
"creation": "2026-04-17 20:15:01.877060",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"project",
"clinic_name",
"vehicle",
"column_break_ndvc",
Expand All @@ -16,7 +18,8 @@
"fieldtype": "Data",
"in_list_view": 1,
"label": "Clinic Name",
"reqd": 1
"reqd": 1,
"unique": 1
},
{
"fieldname": "vehicle",
Expand All @@ -32,6 +35,12 @@
"fieldname": "notes",
"fieldtype": "Small Text",
"label": "Notes"
},
{
"fieldname": "project",
"fieldtype": "Link",
"label": "Project",
"options": "Bandhu Projects"
}
],
"grid_page_length": 50,
Expand All @@ -42,10 +51,11 @@
"link_fieldname": "clinic"
}
],
"modified": "2026-04-24 16:37:50.389237",
"modified": "2026-06-12 09:14:33.650566",
"modified_by": "Administrator",
"module": "Bandhu App",
"name": "Clinic",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
Expand Down
1 change: 1 addition & 0 deletions bandhu_app/bandhu_app/doctype/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Clinic(Document):

clinic_name: DF.Data
notes: DF.SmallText | None
project: DF.Link | None
vehicle: DF.Link | None
# end: auto-generated types

Expand Down
Empty file.
8 changes: 8 additions & 0 deletions bandhu_app/bandhu_app/doctype/district/district.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2026, CMID and contributors
// For license information, please see license.txt

// frappe.ui.form.on("District", {
// refresh(frm) {

// },
// });
51 changes: 51 additions & 0 deletions bandhu_app/bandhu_app/doctype/district/district.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2026-06-08 09:53:32.102502",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"district_name",
"state"
],
"fields": [
{
"fieldname": "district_name",
"fieldtype": "Data",
"label": "District Name"
},
{
"fieldname": "state",
"fieldtype": "Link",
"label": "State",
"options": "State"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2026-06-08 09:54:05.141513",
"modified_by": "Administrator",
"module": "Bandhu App",
"name": "District",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"rows_threshold_for_grid_search": 20,
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}
21 changes: 21 additions & 0 deletions bandhu_app/bandhu_app/doctype/district/district.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) 2026, CMID and contributors
# For license information, please see license.txt

# import frappe
from frappe.model.document import Document


class District(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from frappe.types import DF

district_name: DF.Data | None
state: DF.Link | None
# end: auto-generated types

pass
20 changes: 20 additions & 0 deletions bandhu_app/bandhu_app/doctype/district/test_district.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2026, CMID and Contributors
# See license.txt

# import frappe
from frappe.tests import IntegrationTestCase

# On IntegrationTestCase, the doctype test records and all
# link-field test record dependencies are recursively loaded
# Use these module variables to add/remove to/from that list
EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]


class IntegrationTestDistrict(IntegrationTestCase):
"""
Integration tests for District.
Use this class for testing interactions between multiple components.
"""

pass
9 changes: 8 additions & 1 deletion bandhu_app/bandhu_app/doctype/referral/referral.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"patient_encounter",
"clinic_session",
"patient",
"age",
"referral_by_source",
"status",
"helpline_flag",
Expand Down Expand Up @@ -154,6 +155,12 @@
"in_list_view": 1,
"label": "Required Action From",
"options": "None\nProgramme\nClinic"
},
{
"fetch_from": "patient_encounter.patient_age",
"fieldname": "age",
"fieldtype": "Data",
"label": "Age"
}
],
"grid_page_length": 50,
Expand All @@ -164,7 +171,7 @@
"link_fieldname": "patient"
}
],
"modified": "2026-05-07 08:22:57.596769",
"modified": "2026-06-02 10:05:11.262681",
"modified_by": "Administrator",
"module": "Bandhu App",
"name": "Referral",
Expand Down
1 change: 1 addition & 0 deletions bandhu_app/bandhu_app/doctype/referral/referral.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Referral(Document):

from bandhu_app.bandhu_app.doctype.referral_followup.referral_followup import ReferralFollowup

age: DF.Data | None
clinic_session: DF.Data | None
created_by: DF.Data | None
created_on: DF.Datetime | None
Expand Down
Empty file.
8 changes: 8 additions & 0 deletions bandhu_app/bandhu_app/doctype/sectors/sectors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2026, CMID and contributors
// For license information, please see license.txt

// frappe.ui.form.on("Sectors", {
// refresh(frm) {

// },
// });
Loading
Loading