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

Abdm V3 Plug Support #8340

Merged
merged 135 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
399e33c
added create consent functionality
khavinshankar Aug 30, 2023
d4fd2d6
renamed patient_health_id to patient_abha
khavinshankar Aug 30, 2023
33666c6
added abdm tab in consultation dashboard
khavinshankar Aug 31, 2023
2e020bd
Merge branch 'develop' into abdm-m3
khavinshankar Sep 29, 2023
6cb1bfe
fix abdm consultation tab
khavinshankar Sep 29, 2023
11cb15e
show health information
khavinshankar Oct 2, 2023
ce2432f
ui improvements
khavinshankar Oct 2, 2023
e631138
added patient id verification in fetch abdm records form
khavinshankar Oct 16, 2023
08edcac
fixed phone number parsing issue while linking abha number
khavinshankar Oct 18, 2023
deea512
change proxy url
khavinshankar Oct 25, 2023
9aba833
show deny status in the consent request
khavinshankar Dec 4, 2023
b253950
upgraded hi-profiles package
khavinshankar Dec 6, 2023
9f171d6
added consent requests table for facilities in abdm
khavinshankar Dec 19, 2023
3d83d6d
consolidated multiple view artefact buttons into one
khavinshankar Dec 19, 2023
c7d3048
added consent granted on time in abdm facility records
khavinshankar Dec 20, 2023
fda359d
temp: use artefact 1's data
khavinshankar Dec 20, 2023
a874b9b
temp: update index
khavinshankar Jan 5, 2024
b888268
fixed consent status
khavinshankar Jan 8, 2024
b3d0f5a
Trigger Build.
khavinshankar Jan 17, 2024
971d819
Merge branch 'develop' of github.com:coronasafe/care_fe into abdm-m3
khavinshankar Jan 20, 2024
b040ea0
recreated package-lock.json (#7069)
khavinshankar Jan 20, 2024
f6e0923
show notification when health id registration fails
khavinshankar Jan 29, 2024
1fe1674
Merge branch 'develop' into abdm-m3
khavinshankar Jan 29, 2024
cfe5488
Merge branch 'develop' into abdm-m3
nihal467 Jan 29, 2024
5dccc81
Merge branch 'develop' into abdm-m3
khavinshankar Feb 1, 2024
76b436f
Merge branch 'develop' into abdm-m3
nihal467 Feb 6, 2024
cd94fa7
Update netlify.toml
khavinshankar Feb 7, 2024
ed138bd
Trigger Build
khavinshankar Feb 7, 2024
bfcc535
Merge branch 'abdm-m3' of github.com:coronasafe/care_fe into abdm-m3
khavinshankar Feb 7, 2024
fe3aadc
merge develop with abdm-m3
khavinshankar Feb 8, 2024
c85eb20
revert auto formatted styles
khavinshankar Feb 8, 2024
bbf35b4
fixed a typo in styles
khavinshankar Feb 8, 2024
e4efed7
updated the proxy
khavinshankar Feb 8, 2024
5c3c156
Merge branch 'abdm-m3' of github.com:coronasafe/care_fe into abdm-m3
khavinshankar Feb 8, 2024
278a7e2
fixed cypress fails
khavinshankar Feb 8, 2024
b63b7e4
uncommented tests that were commented by mistake
khavinshankar Feb 8, 2024
c5c3c2c
Merge branch 'show-notification-hf' of github.com:coronasafe/care_fe …
khavinshankar Feb 8, 2024
02e77d4
fix cypress test for facility_manage
rithviknishad Feb 8, 2024
25acb6c
fix external results improper check
rithviknishad Feb 8, 2024
a662788
Merge branch 'develop' into abdm-m3
khavinshankar Feb 18, 2024
f7c1a2a
Merge branch 'abdm-m3' of github.com:coronasafe/care_fe into abdm-m3
khavinshankar Feb 18, 2024
87b41e3
Merge branch 'develop' of github.com:coronasafe/care_fe into abdm-m3
khavinshankar Feb 26, 2024
f78dddf
fixed build
khavinshankar Feb 26, 2024
d9a1ba6
update package lock from linux
khavinshankar Mar 1, 2024
858a33f
update package lock with right node and npm versions
khavinshankar Mar 1, 2024
8787aa0
Merge branch 'develop' of github.com:coronasafe/care_fe into abdm-m3
khavinshankar Mar 1, 2024
eacb0df
update package-lock from linux
rithviknishad Mar 4, 2024
e6ebaf9
update proxy for testing
khavinshankar Mar 8, 2024
6d21d4c
Merge branch 'develop' into abdm-m3
rithviknishad Mar 8, 2024
f40e521
update proxy
khavinshankar Mar 8, 2024
7050583
update lockfile from linux
rithviknishad Mar 8, 2024
82df22e
Merge branch 'abdm-m3' of github.com:coronasafe/care_fe into abdm-m3
rithviknishad Mar 8, 2024
d1ab635
revert proxies
khavinshankar Mar 8, 2024
211c66b
update proxy for netlify deploy previews
khavinshankar Mar 8, 2024
6386016
rewrire fetch records over abdm
khavinshankar Mar 8, 2024
e49951f
removed extra button and rewrired fetch records
khavinshankar Mar 8, 2024
2c68734
fix push message based event trigger
khavinshankar Mar 9, 2024
287c9b9
Merge branch 'develop' into abdm-m3
khavinshankar Apr 8, 2024
0f9dd99
create package lock from linux
khavinshankar Apr 8, 2024
a09c2c4
fixed type errors during build
khavinshankar Apr 8, 2024
7a9c8db
update backend link for netlify deploys
khavinshankar Apr 8, 2024
7d7cd06
fix the failing cypress test
khavinshankar Apr 8, 2024
8d78902
reverted unwanted changes and fixed linting errors
khavinshankar Apr 8, 2024
47253ed
fixed a typo
khavinshankar Apr 8, 2024
d2d9609
Merge branch 'develop' into abdm-m3
khavinshankar Apr 12, 2024
a82d0fe
added select all option for hi types
khavinshankar Apr 12, 2024
84493b6
minor ui fix
khavinshankar Apr 12, 2024
e496a1b
set default expiry date to 30 days from today
khavinshankar Apr 12, 2024
39c7345
ui enhancement: show date selector on top in abdm fetch records modal
khavinshankar Apr 12, 2024
bbd8fa4
refactored abdm wrt backend abdm plug separation
khavinshankar Apr 28, 2024
720d3d4
Merge branch 'develop' into abdm-m3
khavinshankar May 14, 2024
24aca42
change proxy
khavinshankar May 14, 2024
4a07154
remove actions and use apis directly
khavinshankar May 14, 2024
5715e54
fix date input
khavinshankar May 14, 2024
857fe8d
Merge branch 'abdm-m3' into pre-abdm-plug
khavinshankar May 14, 2024
8168812
remove unwanted console logs
khavinshankar May 14, 2024
e05183e
fix linting issues
khavinshankar May 14, 2024
95c92bb
fix linting issue in cypress files
khavinshankar May 14, 2024
18b2043
Merge branch 'develop' into pre-abdm-plug
khavinshankar May 14, 2024
ca1cc39
revert unwanted changes
khavinshankar May 14, 2024
196007b
Merge branch 'develop' into pre-abdm-plug
khavinshankar May 20, 2024
c31e63e
fix a type error
May 20, 2024
7cedfee
Merge branch 'pre-abdm-plug' of github.com:coronasafe/care_fe into pr…
May 20, 2024
6a89ff4
fix abdm records consultation tab check
May 20, 2024
cbe1714
Merge branch 'develop' into pre-abdm-plug
khavinshankar May 23, 2024
b85e2a8
disable error while fetching abha number
khavinshankar May 28, 2024
c1976e5
Merge branch 'develop' into pre-abdm-plug
khavinshankar May 28, 2024
5b71244
removed unnecessary error toast while adding care context
khavinshankar May 29, 2024
bc584c0
temp: update backend api url
khavinshankar Jun 5, 2024
35069fb
added state_name to abha qr code
khavinshankar Jul 5, 2024
9c2a352
Merge branch 'develop' into pre-abdm-plug
khavinshankar Jul 8, 2024
927f9b3
fixed cypress tests
khavinshankar Jul 8, 2024
8c4ebd9
reverted backend proxy in netlify config
khavinshankar Jul 8, 2024
7a27ed4
added new abha link component and create with aadhaar flow
khavinshankar Aug 18, 2024
539405e
added link with otp flow
khavinshankar Aug 18, 2024
dfd75ba
fixed abdm abha number get route
khavinshankar Aug 18, 2024
53061eb
fixed abha linking flow in patient register form
khavinshankar Aug 18, 2024
dcef3a6
removed link care context option
khavinshankar Aug 18, 2024
324acc5
updated health facility api routes
khavinshankar Aug 18, 2024
ec708c3
updated consent and health information api routes
khavinshankar Aug 19, 2024
b6840ee
Merge branch 'develop' into abdm-v3-plug
khavinshankar Aug 19, 2024
4dc260b
temp: updated netlify backend proxy for testing
khavinshankar Aug 19, 2024
71007c6
Merge branch 'develop' into abdm-v3-plug
nihal467 Aug 20, 2024
6f561f1
show option to switch b/w create and link in abha profile linking
khavinshankar Aug 21, 2024
d55b044
removed old link abha number modal component
khavinshankar Aug 22, 2024
ad80b69
Merge branch 'develop' into abdm-v3-plug
khavinshankar Aug 23, 2024
5586daa
open disclaimers in new tab
khavinshankar Sep 1, 2024
b64de56
moved abdm translations to a separate file
khavinshankar Sep 1, 2024
a3d92b7
removed unnecessary error notifications when api response failed
khavinshankar Sep 1, 2024
3e84c65
auto populate address from the abha profile while registering
khavinshankar Sep 1, 2024
d974107
added i18n for abdm components
khavinshankar Sep 1, 2024
48aafed
use checkbox form field instead of basic input
khavinshankar Sep 1, 2024
8bcd420
use label prop for displaying phone number component labels
khavinshankar Sep 1, 2024
cd8e822
limit aadhaar input to a max length of 16
khavinshankar Sep 1, 2024
5ddf6e8
Merge branch 'develop' into abdm-v3-plug
khavinshankar Sep 1, 2024
8ef6e39
minor styling adjustments, removed text-center for text form fields
khavinshankar Sep 1, 2024
d2447cd
added abha card download and print functionality
khavinshankar Sep 1, 2024
07ebbb3
minor cleanup, removed unwanted console logs, and added i18n
khavinshankar Sep 1, 2024
d168043
Merge branch 'develop' into abdm-v3-plug
khavinshankar Sep 3, 2024
f19cd62
remove 16-digit virtual aadhaar id mentions
khavinshankar Sep 3, 2024
046c3bd
update auth methods i18n
khavinshankar Sep 3, 2024
3b6ddda
minor typo fix
khavinshankar Sep 3, 2024
6633c86
added patient data incomplete indicator
khavinshankar Sep 7, 2024
0b90c6b
added scan and pull feature
khavinshankar Sep 8, 2024
a513d32
added resend otp functionality
khavinshankar Sep 19, 2024
1eeb69d
added a step to handle existing abha numbers while creating
khavinshankar Sep 19, 2024
96ce08a
mask aadhaar input in create and login in abdm
khavinshankar Sep 19, 2024
b2f8d58
fixed a typo in translation key
khavinshankar Sep 23, 2024
a00f587
upgraded hi-profiles
khavinshankar Sep 23, 2024
8ce1246
added updated time for all statuses in abdm facility records
khavinshankar Sep 23, 2024
f01fe31
updated abha creation and linking disclaimers as per abdm standards
khavinshankar Sep 27, 2024
bae84e2
fixed incorrect expired at time in abdm facility records
khavinshankar Oct 4, 2024
b19cdd5
bumped hi-profiles
khavinshankar Oct 13, 2024
b425081
Merge branch 'develop' into abdm-v3-plug
khavinshankar Oct 13, 2024
af50fe7
Merge branch 'develop' into abdm-v3-plug
khavinshankar Oct 18, 2024
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
2 changes: 0 additions & 2 deletions cypress/e2e/users_spec/UsersManage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ describe("Manage User", () => {

beforeEach(() => {
cy.restoreLocalStorage();
console.log(localStorage);
cy.clearLocalStorage(/filters--.+/);
console.log(localStorage);
cy.awaitUrl("/users");
});

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/users_spec/UsersProfile.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ describe("Manage User Profile", () => {

beforeEach(() => {
cy.restoreLocalStorage();
console.log(localStorage);
cy.clearLocalStorage(/filters--.+/);
console.log(localStorage);
cy.awaitUrl("/user/profile");
});

Expand Down
12 changes: 6 additions & 6 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ to = "/index.html"
status = 200

[[headers]]
for = "/*"
[headers.values]
cache-control = "max-age=0, no-store"
X-Frame-Options = "DENY"
X-Content-Type-Options = "nosniff"
Content-Security-Policy-Report-Only = '''
for = "/*"
[headers.values]
cache-control = "max-age=0, no-store"
X-Frame-Options = "DENY"
X-Content-Type-Options = "nosniff"
Content-Security-Policy-Report-Only = '''
default-src 'self';
script-src 'self' 'nonce-f51b9742' https://plausible.10bedicu.in;
style-src 'self' 'unsafe-inline';
Expand Down
15 changes: 11 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"echarts": "^5.5.1",
"echarts-for-react": "^3.0.2",
"events": "^3.3.0",
"hi-profiles": "^1.0.6",
"hi-profiles": "^1.1.0",
"i18next": "^23.11.4",
"i18next-browser-languagedetector": "^7.2.1",
"lodash-es": "^4.17.21",
Expand Down
30 changes: 15 additions & 15 deletions src/Common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1144,23 +1144,23 @@ export const AssetImportSchema: SchemaType = {

// ABDM
export const ABDM_CONSENT_PURPOSE = [
{ value: "CAREMGT", label: "Care Management" },
{ value: "BTG", label: "Break The Glass" },
{ value: "PUBHLTH", label: "Public Health" },
{ value: "HPAYMT", label: "Healthcare Payment" },
{ value: "DSRCH", label: "Disease Specific Healthcare Research" },
{ value: "PATRQT", label: "Self Requested" },
] as { value: ConsentPurpose; label: string }[];
"CAREMGT",
"BTG",
"PUBHLTH",
"HPAYMT",
"DSRCH",
"PATRQT",
] as ConsentPurpose[];

export const ABDM_HI_TYPE = [
{ value: "Prescription", label: "Prescription" },
{ value: "DiagnosticReport", label: "Diagnostic Report" },
{ value: "OPConsultation", label: "Op Consultation" },
{ value: "DischargeSummary", label: "Discharge Summary" },
{ value: "ImmunizationRecord", label: "Immunization Record" },
{ value: "HealthDocumentRecord", label: "Record Artifact" },
{ value: "WellnessRecord", label: "Wellness Record" },
] as { value: ConsentHIType; label: string }[];
"Prescription",
"DiagnosticReport",
"OPConsultation",
"DischargeSummary",
"ImmunizationRecord",
"HealthDocumentRecord",
"WellnessRecord",
] as ConsentHIType[];

export const USER_TYPES_MAP = {
Pharmacist: "Pharmacist",
Expand Down
107 changes: 64 additions & 43 deletions src/Components/ABDM/ABDMFacilityRecords.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
import { Link } from "raviger";
import routes from "../../Redux/api";
import useQuery from "../../Utils/request/useQuery";
import { formatDateTime } from "../../Utils/utils";
import { classNames, formatDateTime } from "../../Utils/utils";
import Loading from "../Common/Loading";
import Page from "../Common/components/Page";
import CareIcon from "../../CAREUI/icons/CareIcon";
import ButtonV2 from "../Common/components/ButtonV2";
import { useTranslation } from "react-i18next";

interface IProps {
facilityId: string;
}

const TableHeads = [
"Patient",
"Status",
"Created On",
"Consent Granted On",
// "Requested By",
"Health Information Range",
"Expires On",
"HI Profiles",
"consent__patient",
"consent__status",
"created_on",
"updated_on",
"consent__hi_range",
"expires_on",
"consent__hi_types",
];

export default function ABDMFacilityRecords({ facilityId }: IProps) {
const { t } = useTranslation();

const {
data: consentsResult,
loading,
refetch,
} = useQuery(routes.abha.listConsents, {
} = useQuery(routes.abdm.consent.list, {
query: { facility: facilityId, ordering: "-created_date" },
});

Expand All @@ -36,7 +38,7 @@ export default function ABDMFacilityRecords({ facilityId }: IProps) {
}

return (
<Page title="Patient Consent List">
<Page title={t("facility_consent_requests_page_title")}>
<div className="px-4 sm:px-6 lg:px-8">
<div className="sm:flex sm:items-center"></div>
<div className="mt-8 flow-root">
Expand All @@ -51,7 +53,7 @@ export default function ABDMFacilityRecords({ facilityId }: IProps) {
scope="col"
className="px-3 py-3.5 text-center text-sm font-semibold text-secondary-900"
>
{head}
{t(head)}
</th>
))}
<th
Expand All @@ -63,9 +65,9 @@ export default function ABDMFacilityRecords({ facilityId }: IProps) {
ghost
className="max-w-2xl text-sm text-secondary-700 hover:text-secondary-900"
>
<CareIcon icon="l-refresh" /> Refresh
<CareIcon icon="l-refresh" /> {t("refresh")}
</ButtonV2>
<span className="sr-only">View</span>
<span className="sr-only">{t("view")}</span>
</th>
</tr>
</thead>
Expand All @@ -84,21 +86,44 @@ export default function ABDMFacilityRecords({ facilityId }: IProps) {
consent.consent_artefacts?.[0]?.expiry ??
consent.expiry,
) < new Date()
? "EXPIRED"
: (consent.consent_artefacts?.[0]?.status ??
consent.status)}
? t("consent__status__EXPIRED")
: t(
`consent__status__${
consent.consent_artefacts?.[0]?.status ??
consent.status
}`,
)}
</td>

<td className="px-3 py-4 text-center text-sm">
{formatDateTime(consent.created_date)}
</td>

<td className="px-3 py-4 text-center text-sm">
{consent.consent_artefacts.length
? formatDateTime(
consent.consent_artefacts[0].created_date,
)
: "-"}
{consent.status === "EXPIRED" ||
new Date(
consent.consent_artefacts?.[0]?.expiry ??
consent.expiry,
) < new Date() ? (
<p className="flex flex-col items-center gap-1">
{formatDateTime(
consent.consent_artefacts?.[0]?.expiry ??
consent.expiry,
)}
<span className="text-sm text-secondary-600">
{t("expired_on")}
</span>
</p>
) : consent.status === "REQUESTED" ? (
"-"
) : (
<p className="flex flex-col items-center gap-1">
{formatDateTime(consent.modified_date)}
<span className="text-sm text-secondary-600">
{t(`${consent.status.toLowerCase()}_on`)}
</span>
</p>
)}
</td>

<td className="px-3 py-4 text-center text-sm">
Expand Down Expand Up @@ -127,34 +152,30 @@ export default function ABDMFacilityRecords({ facilityId }: IProps) {
consent.hi_types
)?.map((hiType) => (
<span className="mb-2 mr-2 rounded-full bg-secondary-100 px-2 py-1 text-xs font-medium text-secondary-600">
{hiType}
{t(`consent__hi_type__${hiType}`)}
</span>
))}
</div>
</td>

<td className="sticky right-0 whitespace-nowrap bg-white py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
<div className="flex flex-col items-center justify-center gap-2">
{(consent.consent_artefacts?.[0]?.status ??
consent.status) === "GRANTED" &&
new Date(
consent.consent_artefacts?.[0]?.expiry ??
consent.expiry,
) > new Date() ? (
<Link
key={consent.id}
href={`/abdm/health-information/${consent.id}`}
className={
"cursor-pointer text-primary-600 hover:text-primary-900"
}
>
View
</Link>
) : (
<p className="cursor-not-allowed text-secondary-600 opacity-70">
View
</p>
)}
<Link
key={consent.id}
href={`/abdm/health-information/${consent.id}`}
className={classNames(
(consent.consent_artefacts?.[0]?.status ??
consent.status) === "GRANTED" &&
new Date(
consent.consent_artefacts?.[0]?.expiry ??
consent.expiry,
) > new Date()
? "cursor-pointer text-primary-600 hover:text-primary-900"
: "pointer-events-none cursor-not-allowed text-secondary-600 opacity-70",
)}
>
{t("view")}
</Link>
</div>
</td>
</tr>
Expand Down
Loading
Loading