Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production Release Nov Week 4 #6739

Merged
merged 36 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4827e50
Fixed Non-uniform height of Asset List Tiles. (#6578)
shyamprakash123 Nov 21, 2023
8262237
fix styling issues (#6639)
AshrafMd-1 Nov 21, 2023
4602398
Add Frontend validation in the add multiple bed function (#6643)
sriharsh05 Nov 21, 2023
92208a1
Move the cancel button to the right in facility inventory add page! (…
AshrafMd-1 Nov 21, 2023
835cab3
Fixed Facility Cover Image upload pop-up (#6616)
konavivekramakrishna Nov 21, 2023
3a77798
No close button once you open the discontinued prescriptions (#6614)
AshrafMd-1 Nov 21, 2023
45b74d0
Fixed reloading issue while Opening Investigations or Treatment Summa…
shyamprakash123 Nov 21, 2023
21f5375
Improved look of vitals monitor in mobile view. (#6574)
shyamprakash123 Nov 21, 2023
735fb5f
Improve rounding of the preset buttons. Fixes #6555 (#6567)
Omkar76 Nov 21, 2023
11da461
Aligned buttons to right (#6573)
konavivekramakrishna Nov 21, 2023
3eade87
Disable out of constraint dates in DateInputV2 (#6379)
suprabathk Nov 21, 2023
0787ed7
fixed image upload modal (#6666)
kshitijv256 Nov 22, 2023
d81b698
show delete user button only for stateAdmin (#6663)
Nov 22, 2023
0ec5cfb
Removed mandatory for Rhythm field (#6662)
shyamprakash123 Nov 22, 2023
34fa97b
Made Covid Detail section by default collapsed in patient advance fil…
vayudarji Nov 22, 2023
f4f7917
add padding (#6647)
AshrafMd-1 Nov 22, 2023
91af0d6
Replace useDispatch w. useQuery/request: Consultations #6372 (#6484)
AshrafMd-1 Nov 22, 2023
db03a61
Implemented Insurance Details Page (#6595)
konavivekramakrishna Nov 22, 2023
b8d8070
Removed unnecessary multiple cancel buttons and added a Back button. …
KshitijTodkar48 Nov 22, 2023
bc5c331
Add auto-scroll function to error in add triage form (#6645)
sriharsh05 Nov 22, 2023
f4275e5
add concurrency to deploy workflow cancel-in-progress runs (#6683)
sainak Nov 22, 2023
c1c4e56
Patient Consultation: Route to Facility 🏥, Admission Date & Time 🕚 (#…
rithviknishad Nov 22, 2023
39cd0fa
Improve how time is shown in Administrations Timeline (#6685)
rithviknishad Nov 23, 2023
f804e6d
Redesign Doctor Notes (Review, QA, Testing) (#6224)
Bhavik-ag Nov 23, 2023
6716d2c
fixes #6697; add missing wrarranty validity filters (#6698)
rithviknishad Nov 24, 2023
b9c7021
Fix cypress for doctor notes (#6703)
Ashesh3 Nov 24, 2023
3fe417f
Revert buggy replacement of useDispatch with useQuery in Live Feed (#…
rithviknishad Nov 24, 2023
392fbd5
Fix layout issue in DailyRoundsList component (#6709)
Ashesh3 Nov 24, 2023
83b6d1f
sandbox iframe in fileupload (#6691)
khavinshankar Nov 24, 2023
ba2c91d
Filter out push notif and Fix empty daily rounds design (#6710)
Ashesh3 Nov 24, 2023
c37b554
Add icu_admission_date field to ConsultationForm (#6711)
Ashesh3 Nov 24, 2023
9b05821
Default Doctor Notes popup as opened when initially clicked (#6702)
konavivekramakrishna Nov 27, 2023
a6828e3
fix doctor notes test (#6728)
rithviknishad Nov 27, 2023
a6fd9f6
facility csv download test (#6730)
nihal467 Nov 27, 2023
13fd680
Show "ICU Admission Date" only for Internal Transfer (#6729)
rithviknishad Nov 27, 2023
466d4ed
test for search facility (#6733)
nihal467 Nov 27, 2023
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
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
- master
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
IMAGE_NAME: care_fe
AWS_DEFAULT_REGION: ap-south-1
Expand Down
66 changes: 66 additions & 0 deletions cypress/e2e/facility_spec/facility_homepage.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// FacilityCreation
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import FacilityHome from "../../pageobject/Facility/FacilityHome";
import ManageUserPage from "../../pageobject/Users/ManageUserPage";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";

describe("Facility Creation", () => {
const loginPage = new LoginPage();
const facilityHome = new FacilityHome();
const facilityPage = new FacilityPage();
const manageUserPage = new ManageUserPage();
const facilitiesAlias = "downloadFacilitiesCSV";
const capacitiesAlias = "downloadCapacitiesCSV";
const doctorsAlias = "downloadDoctorsCSV";
const triagesAlias = "downloadTriagesCSV";
const facilityname = "Dummy Facility 1";

before(() => {
loginPage.loginAsDisctrictAdmin();
cy.saveLocalStorage();
});

beforeEach(() => {
cy.restoreLocalStorage();
cy.awaitUrl("/facility");
});

it("Search a facility in homepage", () => {
manageUserPage.typeFacilitySearch(facilityname);
facilityPage.verifyFacilityBadgeContent(facilityname);
manageUserPage.assertFacilityInCard(facilityname);
facilityHome.verifyURLContains(facilityname);
});

it("Verify Facility Export Functionality", () => {
// Download the Facilities CSV
facilityHome.csvDownloadIntercept(facilitiesAlias, "");
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Facilities");
facilityHome.verifyDownload(facilitiesAlias);
facilityHome.clickSearchButton(); // to avoid flaky test, as sometimes, the test is unable to focus on the object
// Download the Capacities CSV
facilityHome.csvDownloadIntercept(capacitiesAlias, "&capacity");
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Capacities");
facilityHome.verifyDownload(capacitiesAlias);
facilityHome.clickSearchButton();
// Download the Doctors CSV
facilityHome.csvDownloadIntercept(doctorsAlias, "&doctors");
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Doctors");
facilityHome.verifyDownload(doctorsAlias);
facilityHome.clickSearchButton();
// Download the Triages CSV
facilityHome.csvDownloadIntercept(triagesAlias, "&triage");
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Triages");
facilityHome.verifyDownload(triagesAlias);
facilityHome.clickSearchButton();
});

afterEach(() => {
cy.saveLocalStorage();
});
});
7 changes: 3 additions & 4 deletions cypress/e2e/patient_spec/patient_crud.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ describe("Patient Creation with consultation", () => {
updatePatientPage.visitConsultationPage();
patientPage.verifyStatusCode();
patientConsultationPage.fillIllnessHistory("history");
patientConsultationPage.selectConsultationStatus("Out-patient (walk in)");
patientConsultationPage.selectConsultationStatus(
"Outpatient/Emergency Room"
);
patientConsultationPage.selectSymptoms("ASYMPTOMATIC");

patientConsultationPage.enterConsultationDetails(
Expand Down Expand Up @@ -140,9 +142,6 @@ describe("Patient Creation with consultation", () => {
updatePatientPage.visitUpdatedPatient();
patientConsultationPage.visitEditConsultationPage();
patientConsultationPage.fillIllnessHistory("editted");
patientConsultationPage.selectConsultationStatus(
"Referred from other hospital"
);
patientConsultationPage.updateSymptoms("FEVER");
patientConsultationPage.setSymptomsDate("01082023");
patientConsultationPage.updateConsultation();
Expand Down
40 changes: 40 additions & 0 deletions cypress/pageobject/Facility/FacilityHome.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// cypress/support/pageObjects/FacilityHome.ts

class FacilityHome {
// Selectors
exportButton = "#export-button";
searchButton = "#search";
menuItem = "[role='menuitem']";

// Operations
clickExportButton() {
cy.get(this.exportButton).click();
}

clickSearchButton() {
cy.get(this.searchButton).click();
}

clickMenuItem(itemName: string) {
cy.get(this.menuItem).contains(itemName).click();
}

csvDownloadIntercept(alias: string, queryParam: string) {
cy.intercept("GET", `**/api/v1/facility/?csv${queryParam}`).as(alias);
}

verifyDownload(alias: string) {
cy.wait(`@${alias}`).its("response.statusCode").should("eq", 200);
}

getURL() {
return cy.url();
}

verifyURLContains(searchText) {
const encodedText = encodeURIComponent(searchText).replace(/%20/g, "+");
this.getURL().should("include", `search=${encodedText}`);
}
}

export default FacilityHome;
10 changes: 5 additions & 5 deletions cypress/pageobject/Patient/PatientConsultation.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export class PatientConsultationPage {
selectConsultationStatus(status: string) {
cy.get("#consultation_status").scrollIntoView();
cy.get("#consultation_status").should("be.visible");
cy.get("#consultation_status")
cy.get("#route_to_facility").scrollIntoView();
cy.get("#route_to_facility").should("be.visible");
cy.get("#route_to_facility")
.click()
.then(() => {
cy.get("[role='option']").contains(status).click();
Expand Down Expand Up @@ -60,7 +60,7 @@ export class PatientConsultationPage {
cy.get("#principal-diagnosis-select [role='option']").first().click();

cy.get("#consultation_notes").click().type(consulationNotes);
cy.get("#verified_by")
cy.get("#treating_physician")
.click()
.type(verificationBy)
.then(() => {
Expand Down Expand Up @@ -208,7 +208,7 @@ export class PatientConsultationPage {

postDoctorNotes() {
cy.intercept("POST", "**/api/v1/patient/*/notes").as("postDoctorNotes");
cy.get("#submit").contains("Post Your Note").click();
cy.get("#add_doctor_note_button").click();
cy.wait("@postDoctorNotes").its("response.statusCode").should("eq", 201);
}

Expand Down
20 changes: 20 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"react-dom": "18.2.0",
"react-google-recaptcha": "^3.1.0",
"react-i18next": "^13.0.1",
"react-infinite-scroll-component": "^6.1.0",
"react-markdown": "^8.0.7",
"react-player": "^2.13.0",
"react-qr-reader": "^2.2.1",
Expand Down
12 changes: 3 additions & 9 deletions src/CAREUI/icons/UniconPaths.json
Original file line number Diff line number Diff line change
Expand Up @@ -3107,10 +3107,7 @@
24,
"M19,2H5A3,3,0,0,0,2,5V19a3,3,0,0,0,3,3H19a3,3,0,0,0,3-3V5A3,3,0,0,0,19,2Zm1,17a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1V5A1,1,0,0,1,5,4H19a1,1,0,0,1,1,1Zm-4-8H8a1,1,0,0,0,0,2h8a1,1,0,0,0,0-2Z"
],
"l-minus": [
24,
"M19,11H5a1,1,0,0,0,0,2H19a1,1,0,0,0,0-2Z"
],
"l-minus": [24, "M19,11H5a1,1,0,0,0,0,2H19a1,1,0,0,0,0-2Z"],
"l-missed-call": [
24,
"M6,7.49a1,1,0,0,0,1-1V5.9L9.88,8.78a3,3,0,0,0,4.24,0l4.59-4.59a1,1,0,0,0,0-1.41,1,1,0,0,0-1.42,0L12.71,7.36a1,1,0,0,1-1.42,0L8.41,4.49H9a1,1,0,0,0,0-2H6a1,1,0,0,0-.92.61A1.09,1.09,0,0,0,5,3.49v3A1,1,0,0,0,6,7.49Zm15.94,7.36a16.27,16.27,0,0,0-19.88,0,2.69,2.69,0,0,0-1,2,2.66,2.66,0,0,0,.78,2.07L3.6,20.72A2.68,2.68,0,0,0,7.06,21l.47-.32a8.13,8.13,0,0,1,1-.55,1.85,1.85,0,0,0,1-2.3l-.09-.24a10.49,10.49,0,0,1,5.22,0l-.09.24a1.85,1.85,0,0,0,1,2.3,8.13,8.13,0,0,1,1,.55l.47.32a2.58,2.58,0,0,0,1.54.5,2.72,2.72,0,0,0,1.92-.79l1.81-1.82A2.66,2.66,0,0,0,23,16.83,2.69,2.69,0,0,0,21.94,14.85ZM20.8,17.49,19,19.3a.68.68,0,0,1-.86.1c-.19-.14-.38-.27-.59-.4a11.65,11.65,0,0,0-1.09-.61l.4-1.09a1,1,0,0,0-.6-1.28,12.42,12.42,0,0,0-8.5,0,1,1,0,0,0-.6,1.28l.4,1.1a9.8,9.8,0,0,0-1.1.6l-.58.4A.66.66,0,0,1,5,19.3L3.2,17.49A.67.67,0,0,1,3,17a.76.76,0,0,1,.28-.53,14.29,14.29,0,0,1,17.44,0A.76.76,0,0,1,21,17,.67.67,0,0,1,20.8,17.49Z"
Expand Down Expand Up @@ -4295,10 +4292,7 @@
24,
"M15,13H9a1,1,0,0,0,0,2h2v2a1,1,0,0,0,2,0V15h2a1,1,0,0,0,0-2Zm2-7H7A1,1,0,0,0,7,8h4v2a1,1,0,0,0,2,0V8h4a1,1,0,0,0,0-2Z"
],
"l-text": [
24,
"M17,6H7A1,1,0,0,0,7,8h4v9a1,1,0,0,0,2,0V8h4a1,1,0,0,0,0-2Z"
],
"l-text": [24, "M17,6H7A1,1,0,0,0,7,8h4v9a1,1,0,0,0,2,0V8h4a1,1,0,0,0,0-2Z"],
"l-th-large": [
24,
"M20,3H4A1,1,0,0,0,3,4V20a1,1,0,0,0,1,1H20a1,1,0,0,0,1-1V4A1,1,0,0,0,20,3ZM11,19H5V13h6Zm0-8H5V5h6Zm8,8H13V13h6Zm0-8H13V5h6Z"
Expand Down Expand Up @@ -4841,4 +4835,4 @@
256,
"M204.73 51.85A108.07 108.07 0 0 0 20 128v56a28 28 0 0 0 28 28h16a28 28 0 0 0 28-28v-40a28 28 0 0 0-28-28H44.84A84.05 84.05 0 0 1 128 44h.64a83.7 83.7 0 0 1 82.52 72H192a28 28 0 0 0-28 28v40a28 28 0 0 0 28 28h19.6a20 20 0 0 1-19.6 16h-56a12 12 0 0 0 0 24h56a44.05 44.05 0 0 0 44-44v-80a107.34 107.34 0 0 0-31.27-76.15ZM64 140a4 4 0 0 1 4 4v40a4 4 0 0 1-4 4H48a4 4 0 0 1-4-4v-44Zm124 44v-40a4 4 0 0 1 4-4h20v48h-20a4 4 0 0 1-4-4Z"
]
}
}
6 changes: 3 additions & 3 deletions src/CAREUI/misc/PaginatedList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ PaginatedList.Refresh = Refresh;

interface ItemsProps<TItem> {
className?: string;
children: (item: TItem) => JSX.Element | JSX.Element[];
children: (item: TItem, items: TItem[]) => JSX.Element | JSX.Element[];
shimmer?: JSX.Element;
shimmerCount?: number;
}
Expand All @@ -137,9 +137,9 @@ const Items = <TItem extends object>(props: ItemsProps<TItem>) => {
{props.shimmer}
</li>
))
: items.map((item, index) => (
: items.map((item, index, items) => (
<li key={index} className="w-full">
{props.children(item)}
{props.children(item, items)}
</li>
))}
</ul>
Expand Down
30 changes: 22 additions & 8 deletions src/Common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,6 @@ export const CONSULTATION_SUGGESTION = [
{ id: "DD", text: "Declare Death" },
];

export const CONSULTATION_STATUS = [
{ id: "1", text: "Brought Dead" },
{ id: "2", text: "Transferred from ward" },
{ id: "3", text: "Transferred from ICU" },
{ id: "4", text: "Referred from other hospital" },
{ id: "5", text: "Out-patient (walk in)" },
];

export const ADMITTED_TO = [
{ id: "1", text: "Isolation" },
{ id: "2", text: "ICU" },
Expand Down Expand Up @@ -610,6 +602,11 @@ export const NOTIFICATION_EVENTS = [
text: "Shifting Updated",
icon: "fa-solid fa-truck-medical",
},
{
id: "PATIENT_NOTE_ADDED",
text: "Patient Note Added",
icon: "fa-solid fa-message",
},
];

export const BREATHLESSNESS_LEVEL = [
Expand Down Expand Up @@ -1023,6 +1020,23 @@ export const XLSXAssetImportSchema = {
},
};

export const USER_TYPES_MAP = {
Pharmacist: "Pharmacist",
Volunteer: "Volunteer",
StaffReadOnly: "Staff",
Staff: "Staff",
Doctor: "Doctor",
WardAdmin: "Ward Admin",
LocalBodyAdmin: "Local Body Admin",
DistrictLabAdmin: "District Lab Admin",
DistrictReadOnlyAdmin: "District Admin",
DistrictAdmin: "District Admin",
StateLabAdmin: "State Lab Admin",
StateReadOnlyAdmin: "State Admin",
StateAdmin: "State Admin",
RemoteSpecialist: "Remote Specialist",
};

export const AREACODES: Record<string, string[]> = {
CA: [
"403",
Expand Down
3 changes: 1 addition & 2 deletions src/Components/ABDM/ConfigureHealthFacility.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { lazy, useReducer, useState } from "react";
import * as Notification from "../../Utils/Notifications.js";
import { navigate } from "raviger";
import { Cancel, Submit } from "../Common/components/ButtonV2";
import { Submit } from "../Common/components/ButtonV2";
import TextFormField from "../Form/FormFields/TextFormField";
import { classNames } from "../../Utils/utils";
import useQuery from "../../Utils/request/useQuery";
Expand Down Expand Up @@ -218,7 +218,6 @@ export const ConfigureHealthFacility = (props: any) => {
</div>
</div>
<div className="flex flex-col gap-3 sm:flex-row sm:justify-end">
<Cancel onClick={() => navigate(`/facility/${facilityId}`)} />
<Submit
onClick={handleSubmit}
disabled={
Expand Down
1 change: 1 addition & 0 deletions src/Components/Assets/AssetServiceEditModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ export const AssetServiceEditModal = (props: {
className="mt-2"
position="LEFT"
value={new Date(form.serviced_on)}
max={new Date(props.service_record.created_date)}
onChange={(date) => {
if (
dayjs(date.value).format("YYYY-MM-DD") >
Expand Down
8 changes: 6 additions & 2 deletions src/Components/Assets/AssetsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ const AssetsList = () => {
asset_class: qParams.asset_class || "",
location: qParams.facility ? qParams.location || "" : "",
status: qParams.status || "",
warranty_amc_end_of_validity_before:
qParams.warranty_amc_end_of_validity_before || "",
warranty_amc_end_of_validity_after:
qParams.warranty_amc_end_of_validity_after || "",
};

const { loading } = useQuery(routes.listAssets, {
Expand Down Expand Up @@ -189,12 +193,12 @@ const AssetsList = () => {
<Link
key={asset.id}
href={`/facility/${asset?.location_object.facility.id}/assets/${asset.id}`}
className="text-inherit"
className="h-full text-inherit"
data-testid="created-asset-list"
>
<div
key={asset.id}
className="border-1 w-full cursor-pointer items-center justify-center rounded-lg border border-transparent bg-white p-5 shadow hover:border-primary-500"
className="border-1 h-full w-full cursor-pointer items-center justify-center rounded-lg border border-transparent bg-white p-5 shadow hover:border-primary-500"
>
<div className="md:flex">
<p className="flex break-words text-xl font-medium capitalize">
Expand Down
Loading
Loading