Skip to content

Commit

Permalink
Merge branch 'develop' into patientQuestionnaire
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacobjeevan committed Mar 5, 2025
2 parents 2d56a6c + 2cc959e commit 51a76ef
Show file tree
Hide file tree
Showing 33 changed files with 945 additions and 277 deletions.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,22 @@ If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.

---

### 🚨 DO NOT EDIT BELOW THIS LINE 🚨

### Instructions for Requesting Assignment:

To request assignment, please clearly outline your solution and timeline by commenting on the issue using the format below:

**Describe your solution clearly:**
Provide a detailed explanation of your proposed solution, including your approach, key implementation steps, and relevant examples or references. Mention any dependencies, assumptions, or risks you foresee that might affect your timeline or implementation.

**Expected Timeline:**
- End date: [Expected submission date of a completed Pull Request]

**Additional Context:**
Include any other relevant context, links, screenshots, or resources that support your proposed solution.

> 🚨 Your assignment may be unassigned if there is no activity or progress within the stated timeline unless communicated clearly and agreed upon.
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,21 @@ A clear and concise description of any alternative solutions or features you've

**Additional context**
Add any other context or screenshots about the feature request here.

---
### 🚨 DO NOT EDIT BELOW THIS LINE 🚨

### Instructions for Requesting Assignment:

To request assignment, please clearly outline your solution and timeline by commenting on the issue using the format below:

**Describe your solution clearly:**
Provide a detailed explanation of your proposed solution, including your approach, key implementation steps, and relevant examples or references. Mention any dependencies, assumptions, or risks you foresee that might affect your timeline or implementation.

**Expected Timeline:**
- End date: [Expected submission date of a completed Pull Request]

**Additional Context:**
Include any other relevant context, links, screenshots, or resources that support your proposed solution.

> 🚨 Your assignment may be unassigned if there is no activity or progress within the stated timeline unless communicated clearly and agreed upon.
18 changes: 13 additions & 5 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,10 @@
"associate": "Associate",
"associate_location": "Associate Location",
"associate_location_description": "Select a location to associate with this device",
"associated_by": "Associated by",
"associating": "Associating...",
"association_end_date": "Association end date",
"association_start_date": "Association start date",
"at_least_one_department_is_required": "At least one department is required",
"at_time": "at <strong>{{time}}</strong>",
"atypical_presentation_details": "Atypical presentation details",
Expand Down Expand Up @@ -710,6 +713,7 @@
"create_template": "Create Template",
"create_user": "Create User",
"create_user_and_add_to_org": "Create a new user and add them to the organization.",
"create_valueset": "Create ValueSet",
"created": "Created",
"created_by": "Created By",
"created_date": "Created Date",
Expand All @@ -719,7 +723,7 @@
"critical": "Critical",
"criticality": "Criticality",
"csv_file_in_the_specified_format": "Select a CSV file in the specified format",
"current_address": "Current Address",
"current_address": "Current Address and Route to Home",
"current_location_description": "The current location of this device",
"current_organizations": "Current Organizations",
"current_password": "Current Password",
Expand Down Expand Up @@ -783,6 +787,7 @@
"device_availability_status_lost": "Lost",
"device_contact_description": "Contact points associated with this device",
"device_information": "Device Information",
"device_location_history": "Device Location History",
"device_not_found": "Device not found",
"device_status_active": "Active",
"device_status_entered_in_error": "Entered in Error",
Expand Down Expand Up @@ -1176,6 +1181,7 @@
"from_date_must_be_before_to_date": "From date must be before to date",
"from_user": "from User",
"fulfilled": "Fulfilled",
"full_day_unavailable": "Full Day Unavailable",
"full_name": "Full Name",
"full_screen": "Full Screen",
"gender": "Gender",
Expand Down Expand Up @@ -1412,7 +1418,8 @@
"make_facility_public": "Make this facility public",
"make_facility_public_description": "When enabled, this facility will be visible to the public and can be discovered by anyone using the platform",
"make_multiple_beds_label": "Do you want to make multiple beds?",
"manage_and_view_questionnaires": "Manage and view questionnaires",
"manage_and_view_questionnaires": "Manage and View Questionnaires",
"manage_and_view_valuesets": "Manage and View ValueSets",
"manage_bed_presets": "Manage Presets of Bed",
"manage_facility_users": "Manage encounters",
"manage_my_schedule": "Manage my schedule",
Expand Down Expand Up @@ -1885,17 +1892,17 @@
"quantity_approved": "Quantity Approved",
"quantity_requested": "Quantity Requested",
"quantity_required": "Quantity Required",
"questionnaire": "Questionnaire",
"questionnaire_diagnosis_no_encounter": "Diagnosis cannot be recorded without an active encounter",
"questionnaire_error_loading": "Error loading questionnaire",
"questionnaire_medication_request_no_encounter": "Medication requests cannot be recorded without an active encounter",
"questionnaire_medication_statement_no_encounter": "Medication statements cannot be recorded without an active encounter",
"questionnaire_no_encounter": "Create an encounter first in order to update it",
"questionnaire_not_exist": "The questionnaire you tried to access does not exist.",
"questionnaire_one": "Questionnaire",
"questionnaire_other": "Questionnaires",
"questionnaire_submission_failed": "Failed to submit questionnaire",
"questionnaire_submitted_successfully": "Questionnaire submitted successfully",
"questionnaire_symptom_no_encounter": "Symptoms cannot be recorded without an active encounter",
"questionnaires": "Questionnaires",
"quick_access": "Quick Access",
"quick_actions": "Quick Actions",
"quick_actions_description": "Schedule an appointment or create a new encounter",
Expand Down Expand Up @@ -2112,6 +2119,7 @@
"search_user": "Search User",
"search_user_description": "Search for a user and assign a role to add them to the patient.",
"search_users": "Search users...",
"search_valuesets": "Search ValueSets",
"searching": "Searching...",
"see_attachments": "See Attachments",
"see_details": "See Details",
Expand Down Expand Up @@ -2507,7 +2515,7 @@
"valid_year_of_birth": "Please enter a valid year of birth (YYYY)",
"value": "Value",
"value_set": "Value Set",
"valuesets": "Valuesets",
"valuesets": "ValueSets",
"vehicle_preference": "Vehicle preference",
"vendor_name": "Vendor Name",
"ventilator_interface": "Respiratory Support Type",
Expand Down
2 changes: 1 addition & 1 deletion public/locale/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -801,4 +801,4 @@
"you_need_at_least_a_location_to_create_an_assest": "संपत्ति बनाने के लिए आपको कम से कम एक स्थान की आवश्यकता होगी।",
"zoom_in": "ज़ूम इन",
"zoom_out": "ज़ूम आउट"
}
}
1 change: 0 additions & 1 deletion public/locale/ml.json
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,6 @@
"quantity_approved": "അളവ് അംഗീകരിച്ചു",
"quantity_requested": "അഭ്യർത്ഥിച്ച അളവ്",
"quantity_required": "ആവശ്യമായ അളവ്",
"questionnaire": "ചോദ്യാവലി",
"questionnaire_error_loading": "ചോദ്യാവലി ലോഡുചെയ്യുന്നതിൽ പിശക്",
"questionnaire_not_exist": "നിങ്ങൾ ആക്സസ് ചെയ്യാൻ ശ്രമിച്ച ചോദ്യാവലി നിലവിലില്ല.",
"raise_consent_request": "ABDM വഴി രോഗിയുടെ രേഖകൾ ലഭ്യമാക്കാൻ സമ്മത അഭ്യർത്ഥന ഉന്നയിക്കുക",
Expand Down
5 changes: 2 additions & 3 deletions src/Routers/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,17 @@ import { usePluginRoutes } from "@/hooks/useCareApps";

import ConsultationRoutes from "@/Routers/routes/ConsultationRoutes";
import FacilityRoutes from "@/Routers/routes/FacilityRoutes";
import OrganizationRoutes from "@/Routers/routes/OrganizationRoutes";
import PatientRoutes from "@/Routers/routes/PatientRoutes";
import ResourceRoutes from "@/Routers/routes/ResourceRoutes";
import ScheduleRoutes from "@/Routers/routes/ScheduleRoutes";
import UserRoutes from "@/Routers/routes/UserRoutes";
import AdminRoutes from "@/Routers/routes/adminRoutes";
import { PermissionProvider } from "@/context/PermissionContext";
import { PlugConfigEdit } from "@/pages/Apps/PlugConfigEdit";
import { PlugConfigList } from "@/pages/Apps/PlugConfigList";
import UserDashboard from "@/pages/UserDashboard";

import OrganizationRoutes from "./routes/OrganizationRoutes";
import AdminRoutes from "./routes/adminRoutes";

// List of paths where the sidebar should be hidden
const PATHS_WITHOUT_SIDEBAR = ["/", "/session-expired"];

Expand Down
16 changes: 16 additions & 0 deletions src/components/Facility/FacilityForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import validators from "@/Utils/validators";
import GovtOrganizationSelector from "@/pages/Organization/components/GovtOrganizationSelector";
import { BaseFacility } from "@/types/facility/facility";
import { Organization } from "@/types/organization/organization";
import organizationApi from "@/types/organization/organizationApi";

interface FacilityProps {
organizationId?: string;
Expand All @@ -50,6 +51,7 @@ interface FacilityProps {
}

export default function FacilityForm({
organizationId,
facilityId,
onSubmitSuccess,
}: FacilityProps) {
Expand Down Expand Up @@ -91,6 +93,20 @@ export default function FacilityForm({
},
});

const { data: org } = useQuery({
queryKey: ["organization", organizationId],
queryFn: query(organizationApi.get, {
pathParams: { id: organizationId },
}),
enabled: !!organizationId,
});

useEffect(() => {
const levels: Organization[] = [];
if (org && org.org_type === "govt") levels.push(org);
setSelectedLevels(levels);
}, [org, organizationId]);

const { mutate: createFacility, isPending } = useMutation({
mutationFn: mutate(routes.facility.create),
onSuccess: (_data: BaseFacility) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Medicine/MedicationRequestTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default function MedicationRequestTable({
) : searchQuery && !displayedMedications.length ? (
<EmptyState searching searchQuery={searchQuery} />
) : (
<ScrollArea className="h-[calc(100vh-16rem)]">
<ScrollArea className="h-fit">
<div className="min-w-[800px]">
<div className="p-2">
<MedicationsTable medications={displayedMedications} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/Patient/EncounterQuestionnaire.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function EncounterQuestionnaire({
enabled: !!encounterId,
});
return (
<Page title={t("questionnaire")}>
<Page title={t("questionnaire_one")}>
<div className="flex flex-col space-y-4 mt-4">
{encounter && (
<div className="size-full rounded-lg border bg-white text-black shadow">
Expand Down
Loading

0 comments on commit 51a76ef

Please sign in to comment.