Skip to content

Commit

Permalink
Merge branch 'patient-form-rebuild-attempt-2' into rithviknishad/fix/…
Browse files Browse the repository at this point in the history
…remove-unused-references
  • Loading branch information
gigincg committed Oct 8, 2024
2 parents a6af629 + 96c9824 commit 7a649a9
Show file tree
Hide file tree
Showing 20 changed files with 1,459 additions and 2,661 deletions.
2,605 changes: 1,452 additions & 1,153 deletions package-lock.json

Large diffs are not rendered by default.

62 changes: 0 additions & 62 deletions src/Common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1156,68 +1156,6 @@ export const AssetImportSchema: SchemaType = {
},
};

export const ExternalResultImportSchema: SchemaType = {
District: { prop: "district", type: "any" },
"SRF ID": { prop: "srf_id", type: "string" },
Name: { prop: "name", type: "string" },
Age: { prop: "age", type: "number" },
"Age in": { prop: "age_in", type: "string" },
Gender: { prop: "gender", type: "string" },
"Mobile Number": { prop: "mobile_number", type: "any" },
Address: { prop: "address", type: "string" },
Ward: { prop: "ward", type: "number" },
"Local Body": { prop: "local_body", type: "string" },
"Local Body Type": { prop: "local_body_type", type: "string" },
Source: { prop: "source", type: "string" },
"Sample Collection Date": {
prop: "sample_collection_date",
type: "string",
parse: (date: string) => {
if (!date) return null;
if (isNaN(Date.parse(date))) {
const parsed = new Date(date);
if (String(parsed) === "Invalid Date") {
throw new Error("Invalid Date: " + date);
}
return dateQueryString(parsed);
} else {
const parsed = new Date(date);
if (String(parsed) === "Invalid Date") {
throw new Error("Invalid Date: " + date);
}
return dateQueryString(parsed);
}
},
},
"Result Date": {
prop: "result_date",
type: "string",
parse: (date: string) => {
if (!date) return null;
if (isNaN(Date.parse(date))) {
const parsed = new Date(date);
if (String(parsed) === "Invalid Date") {
throw new Error("Invalid Date: " + date);
}
return dateQueryString(parsed);
} else {
const parsed = new Date(date);
if (String(parsed) === "Invalid Date") {
throw new Error("Invalid Date: " + date);
}
return dateQueryString(parsed);
}
},
},
"Test Type": { prop: "test_type", type: "string" },
"Lab Name": { prop: "lab_name", type: "string" },
"Sample Type": { prop: "sample_type", type: "string" },
"Patient Status": { prop: "patient_status", type: "string" },
"Is Repeat": { prop: "is_repeat", type: "string" },
"Patient Category": { prop: "patient_category", type: "string" },
Result: { prop: "result", type: "string" },
};

// ABDM
export const ABDM_CONSENT_PURPOSE = [
{ value: "CAREMGT", label: "Care Management" },
Expand Down
1 change: 0 additions & 1 deletion src/Components/Common/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const MENU_TAGS: { [key: string]: string } = {
sample: "Sample Tests",
shifting: "Shiftings",
resource: "Resources",
external_results: "External Results",
users: "Users",
notice_board: "Notice Board",
};
Expand Down
14 changes: 0 additions & 14 deletions src/Components/Common/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import CareIcon, { IconName } from "../../../CAREUI/icons/CareIcon";
import SlideOver from "../../../CAREUI/interactive/SlideOver";
import { classNames } from "../../../Utils/utils";
import { Link } from "raviger";
import useAuthUser from "../../../Common/hooks/useAuthUser";
import careConfig from "@careConfig";

export const SIDEBAR_SHRINK_PREFERENCE_KEY = "sidebarShrinkPreference";
Expand All @@ -33,8 +32,6 @@ const StatelessSidebar = ({
setShrinked,
onItemClick,
}: StatelessSidebarProps) => {
const authUser = useAuthUser();

const NavItems: {
text: string;
to: string;
Expand All @@ -46,17 +43,6 @@ const StatelessSidebar = ({
{ text: "Sample Test", to: "/sample", icon: "l-medkit" },
{ text: "Shifting", to: "/shifting", icon: "l-ambulance" },
{ text: "Resource", to: "/resource", icon: "l-heart-medical" },
...(!["Nurse", "NurseReadOnly", "Staff", "StaffReadOnly"].includes(
authUser.user_type,
)
? ([
{
text: "External Results",
to: "/external_results",
icon: "l-clipboard-notes",
},
] as const)
: []),
{ text: "Users", to: "/users", icon: "l-users-alt" },
{ text: "Notice Board", to: "/notice_board", icon: "l-meeting-board" },
];
Expand Down
25 changes: 0 additions & 25 deletions src/Components/ExternalResult/Commons.tsx

This file was deleted.

112 changes: 0 additions & 112 deletions src/Components/ExternalResult/ExternalResultImportModal.tsx

This file was deleted.

Loading

0 comments on commit 7a649a9

Please sign in to comment.