@openmrs/esm-patient-notes-app 11.3.1-patch.9064 → 11.3.1-patch.9508

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/.turbo/turbo-build.log +20 -20
  2. package/dist/1917.js +1 -1
  3. package/dist/1917.js.map +1 -1
  4. package/dist/439.js +1 -0
  5. package/dist/5670.js +1 -1
  6. package/dist/5670.js.map +1 -1
  7. package/dist/6336.js +1 -0
  8. package/dist/6336.js.map +1 -0
  9. package/dist/6589.js +1 -0
  10. package/dist/8051.js +1 -1
  11. package/dist/8051.js.map +1 -1
  12. package/dist/8371.js +1 -0
  13. package/dist/8743.js +2 -0
  14. package/dist/8743.js.map +1 -0
  15. package/dist/9444.js +1 -0
  16. package/dist/9444.js.map +1 -0
  17. package/dist/main.js +1 -1
  18. package/dist/main.js.map +1 -1
  19. package/dist/openmrs-esm-patient-notes-app.js +1 -1
  20. package/dist/openmrs-esm-patient-notes-app.js.buildmanifest.json +178 -112
  21. package/dist/openmrs-esm-patient-notes-app.js.map +1 -1
  22. package/dist/routes.json +1 -1
  23. package/package.json +3 -3
  24. package/src/config-schema.ts +7 -1
  25. package/src/notes/notes-overview.extension.tsx +57 -3
  26. package/src/notes/visit-note-config-schema.ts +7 -1
  27. package/src/notes/visit-notes-form.test.tsx +94 -1
  28. package/src/notes/visit-notes-form.workspace.tsx +8 -5
  29. package/src/routes.json +1 -1
  30. package/src/visit-note-action-button.extension.tsx +6 -2
  31. package/src/visit-note-action-button.test.tsx +4 -5
  32. package/translations/cs.json +39 -0
  33. package/translations/sq.json +39 -0
  34. package/translations/zh_TW.json +39 -0
  35. package/dist/1433.js +0 -1
  36. package/dist/1433.js.map +0 -1
  37. package/dist/1559.js +0 -2
  38. package/dist/1559.js.map +0 -1
  39. package/dist/5639.js +0 -1
  40. package/dist/5639.js.map +0 -1
  41. package/src/notes/notes-main.component.tsx +0 -62
  42. package/src/notes/notes-main.test.tsx +0 -101
  43. /package/dist/{1559.js.LICENSE.txt → 8743.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-patient-notes-app",
3
- "version": "11.3.1-patch.9064",
3
+ "version": "11.3.1-patch.9508",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Patient notes microfrontend for the OpenMRS SPA",
6
6
  "browser": "dist/openmrs-esm-patient-notes-app.js",
@@ -44,13 +44,13 @@
44
44
  "@openmrs/esm-patient-common-lib": "11.x",
45
45
  "dayjs": "1.x",
46
46
  "react": "18.x",
47
- "react-i18next": "11.x",
47
+ "react-i18next": "16.x",
48
48
  "react-router-dom": "6.x",
49
49
  "rxjs": "6.x",
50
50
  "swr": "2.x"
51
51
  },
52
52
  "devDependencies": {
53
- "@openmrs/esm-patient-common-lib": "11.3.1-patch.9064",
53
+ "@openmrs/esm-patient-common-lib": "11.3.1-patch.9508",
54
54
  "webpack": "^5.99.9"
55
55
  },
56
56
  "stableVersion": "11.3.0"
@@ -5,12 +5,18 @@ export const configSchema = {
5
5
  diagnosisConceptClass: {
6
6
  _type: Type.UUID,
7
7
  _default: '8d4918b0-c2cc-11de-8d13-0010c6dffd0f',
8
- _description: 'The concept class to use for the diagnoses',
8
+ _description: 'The concept class UUID for diagnoses',
9
+ },
10
+ isPrimaryDiagnosisRequired: {
11
+ _type: Type.Boolean,
12
+ _default: true,
13
+ _description: 'Indicates whether a primary diagnosis is required when submitting a visit note',
9
14
  },
10
15
  visitNoteConfig: notesConfigSchema,
11
16
  };
12
17
 
13
18
  export interface ConfigObject {
14
19
  diagnosisConceptClass: string;
20
+ isPrimaryDiagnosisRequired: boolean;
15
21
  visitNoteConfig: VisitNoteConfigObject;
16
22
  }
@@ -1,6 +1,17 @@
1
- import React from 'react';
1
+ import React, { type ComponentProps } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
- import NotesMain from './notes-main.component';
3
+ import { Button, DataTableSkeleton, InlineLoading } from '@carbon/react';
4
+ import { AddIcon, launchWorkspace, useLayoutType } from '@openmrs/esm-framework';
5
+ import {
6
+ CardHeader,
7
+ EmptyState,
8
+ ErrorState,
9
+ launchStartVisitPrompt,
10
+ usePatientChartStore,
11
+ } from '@openmrs/esm-patient-common-lib';
12
+ import { useVisitNotes } from './visit-notes.resource';
13
+ import PaginatedNotes from './paginated-notes.component';
14
+ import styles from './notes-overview.scss';
4
15
 
5
16
  interface NotesOverviewProps {
6
17
  patientUuid: string;
@@ -8,13 +19,56 @@ interface NotesOverviewProps {
8
19
  basePath: string;
9
20
  }
10
21
 
22
+ /**
23
+ * This extension uses the patient chart store and MUST only be mounted within the patient chart
24
+ */
11
25
  const NotesOverview: React.FC<NotesOverviewProps> = ({ patientUuid, patient, basePath }) => {
12
26
  const pageSize = 5;
13
27
  const { t } = useTranslation();
14
28
  const pageUrl = `\${openmrsSpaBase}/patient/${patient.id}/chart/Forms & Notes`;
15
29
  const urlLabel = t('seeAll', 'See all');
16
30
 
17
- return <NotesMain patientUuid={patientUuid} pageSize={pageSize} urlLabel={urlLabel} pageUrl={pageUrl} />;
31
+ const { visitContext } = usePatientChartStore(patientUuid);
32
+ const displayText = t('visitNotes', 'Visit notes');
33
+ const headerTitle = t('visitNotes', 'Visit notes');
34
+ const { visitNotes, error, isLoading, isValidating } = useVisitNotes(patientUuid);
35
+ const layout = useLayoutType();
36
+ const isDesktop = layout === 'large-desktop' || layout === 'small-desktop';
37
+
38
+ const launchVisitNoteForm = React.useCallback(() => {
39
+ if (visitContext) {
40
+ launchWorkspace('visit-notes-form-workspace');
41
+ } else {
42
+ launchStartVisitPrompt();
43
+ }
44
+ }, [visitContext]);
45
+
46
+ if (isLoading) {
47
+ return <DataTableSkeleton role="progressbar" compact={isDesktop} zebra />;
48
+ }
49
+ if (error) {
50
+ return <ErrorState error={error} headerTitle={headerTitle} />;
51
+ }
52
+ if (!visitNotes?.length) {
53
+ return <EmptyState displayText={displayText} headerTitle={headerTitle} launchForm={launchVisitNoteForm} />;
54
+ }
55
+
56
+ return (
57
+ <div className={styles.widgetCard}>
58
+ <CardHeader title={headerTitle}>
59
+ <span>{isValidating ? <InlineLoading /> : null}</span>
60
+ <Button
61
+ kind="ghost"
62
+ renderIcon={(props: ComponentProps<typeof AddIcon>) => <AddIcon size={16} {...props} />}
63
+ iconDescription="Add visit note"
64
+ onClick={launchVisitNoteForm}
65
+ >
66
+ {t('add', 'Add')}
67
+ </Button>
68
+ </CardHeader>
69
+ <PaginatedNotes notes={visitNotes} pageSize={pageSize} urlLabel={urlLabel} pageUrl={pageUrl} />
70
+ </div>
71
+ );
18
72
  };
19
73
 
20
74
  export default NotesOverview;
@@ -4,22 +4,28 @@ export default {
4
4
  clinicianEncounterRole: {
5
5
  _type: Type.UUID,
6
6
  _default: '240b26f9-dd88-4172-823d-4a8bfeb7841f',
7
+ _description: 'Doctor or Nurse who is the primary provider for an encounter, and will sign the note',
7
8
  },
8
9
  visitDiagnosesConceptUuid: {
9
10
  _type: Type.ConceptUuid,
10
11
  _default: '159947AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
12
+ _description: 'The set of diagnoses that were either addressed or diagnosed during the current visit',
11
13
  },
12
14
  encounterNoteTextConceptUuid: {
13
15
  _type: Type.ConceptUuid,
14
16
  _default: '162169AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
17
+ _description: 'Free text note field intended to capture unstructured description of the patient encounter',
15
18
  },
16
19
  encounterTypeUuid: {
17
20
  _type: Type.UUID,
18
21
  _default: 'd7151f82-c1f3-4152-a605-2f9ea7414a79',
22
+ _description:
23
+ 'Encounter where a full or abbreviated examination is done, usually leading to a presumptive or confirmed diagnosis, recorded by the examining clinician.',
19
24
  },
20
25
  formConceptUuid: {
21
- _type: Type.ConceptUuid,
26
+ _type: Type.UUID,
22
27
  _default: 'c75f120a-04ec-11e3-8780-2b40bef9a44b',
28
+ _description: 'The UUID of the Visit Note form to be associated with visit note encounters',
23
29
  },
24
30
  };
25
31
 
@@ -22,6 +22,8 @@ const defaultProps = {
22
22
  patientUuid: mockPatient.id,
23
23
  promptBeforeClosing: jest.fn(),
24
24
  setTitle: jest.fn(),
25
+ visitContext: null,
26
+ mutateVisitContext: null,
25
27
  };
26
28
 
27
29
  function renderVisitNotesForm(props = {}) {
@@ -109,7 +111,7 @@ test('renders an error message when no matching diagnoses are found', async () =
109
111
  const searchBox = screen.getByPlaceholderText('Choose a primary diagnosis');
110
112
  await user.type(searchBox, 'COVID-21');
111
113
 
112
- const errorMessage = await screen.findByText(/No diagnoses found/i);
114
+ await screen.findByText(/No diagnoses found/i);
113
115
  expect(getByTextWithMarkup('No diagnoses found matching "COVID-21"')).toBeInTheDocument();
114
116
  });
115
117
 
@@ -376,3 +378,94 @@ test('handles existing diagnoses correctly when in edit mode', async () => {
376
378
  // Verify new diagnosis is displayed
377
379
  expect(screen.getByTitle('Diabetes Mellitus')).toBeInTheDocument();
378
380
  });
381
+
382
+ test('allows saving visit note without primary diagnosis when isPrimaryDiagnosisRequired is false', async () => {
383
+ const user = userEvent.setup();
384
+
385
+ mockUseConfig.mockReturnValue({
386
+ ...getDefaultsFromConfigSchema(configSchema),
387
+ ...ConfigMock,
388
+ isPrimaryDiagnosisRequired: false,
389
+ });
390
+
391
+ const successPayload = {
392
+ encounterProviders: expect.arrayContaining([
393
+ {
394
+ encounterRole: ConfigMock.visitNoteConfig.clinicianEncounterRole,
395
+ provider: mockSessionDataResponse.data.currentProvider.uuid,
396
+ },
397
+ ]),
398
+ encounterType: ConfigMock.visitNoteConfig.encounterTypeUuid,
399
+ form: ConfigMock.visitNoteConfig.formConceptUuid,
400
+ location: mockSessionDataResponse.data.sessionLocation.uuid,
401
+ obs: expect.arrayContaining([
402
+ {
403
+ concept: { display: '', uuid: '162169AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' },
404
+ value: 'Clinical note without diagnosis',
405
+ },
406
+ ]),
407
+ patient: mockPatient.id,
408
+ encounterDatetime: undefined,
409
+ };
410
+
411
+ mockSaveVisitNote.mockResolvedValueOnce({ status: 201, body: 'Visit note created' } as unknown as ReturnType<
412
+ typeof saveVisitNote
413
+ >);
414
+ mockFetchDiagnosisConceptsByName.mockResolvedValue(diagnosisSearchResponse.results);
415
+
416
+ renderVisitNotesForm();
417
+
418
+ const clinicalNote = screen.getByRole('textbox', { name: /Write your notes/i });
419
+ await user.clear(clinicalNote);
420
+ await user.type(clinicalNote, 'Clinical note without diagnosis');
421
+ expect(clinicalNote).toHaveValue('Clinical note without diagnosis');
422
+
423
+ const submitButton = screen.getByRole('button', { name: /Save and close/i });
424
+ await user.click(submitButton);
425
+
426
+ // Should not show validation error for missing primary diagnosis
427
+ expect(screen.queryByText(/choose at least one primary diagnosis/i)).not.toBeInTheDocument();
428
+
429
+ // Should successfully save the visit note
430
+ expect(mockSaveVisitNote).toHaveBeenCalledTimes(1);
431
+ expect(mockSaveVisitNote).toHaveBeenCalledWith(new AbortController(), expect.objectContaining(successPayload));
432
+
433
+ // Reset mock for other tests
434
+ mockUseConfig.mockReturnValue({
435
+ ...getDefaultsFromConfigSchema(configSchema),
436
+ ...ConfigMock,
437
+ });
438
+ });
439
+
440
+ test('requires primary diagnosis when isPrimaryDiagnosisRequired is true', async () => {
441
+ const user = userEvent.setup();
442
+
443
+ mockUseConfig.mockReturnValue({
444
+ ...getDefaultsFromConfigSchema(configSchema),
445
+ ...ConfigMock,
446
+ isPrimaryDiagnosisRequired: true,
447
+ });
448
+
449
+ mockFetchDiagnosisConceptsByName.mockResolvedValue(diagnosisSearchResponse.results);
450
+
451
+ renderVisitNotesForm();
452
+
453
+ const clinicalNote = screen.getByRole('textbox', { name: /Write your notes/i });
454
+ await user.clear(clinicalNote);
455
+ await user.type(clinicalNote, 'Clinical note without diagnosis');
456
+
457
+ const submitButton = screen.getByRole('button', { name: /save and close/i });
458
+ await user.click(submitButton);
459
+
460
+ // Should show validation error for missing primary diagnosis
461
+ expect(screen.getByText(/choose at least one primary diagnosis/i)).toBeInTheDocument();
462
+
463
+ // Should not attempt to save
464
+ expect(mockSaveVisitNote).not.toHaveBeenCalled();
465
+
466
+ // Reset mock for other tests
467
+ mockUseConfig.mockReturnValue({
468
+ ...getDefaultsFromConfigSchema(configSchema),
469
+ ...ConfigMock,
470
+ });
471
+ });
@@ -2,7 +2,8 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
2
2
  import classnames from 'classnames';
3
3
  import dayjs from 'dayjs';
4
4
  import { debounce } from 'lodash-es';
5
- import { useTranslation, type TFunction } from 'react-i18next';
5
+ import { useTranslation } from 'react-i18next';
6
+ import type { TFunction } from 'i18next';
6
7
  import { useSWRConfig } from 'swr';
7
8
  import { z } from 'zod';
8
9
  import { zodResolver } from '@hookform/resolvers/zod';
@@ -109,7 +110,7 @@ const VisitNotesForm: React.FC<VisitNotesFormProps> = ({
109
110
  const { t } = useTranslation();
110
111
  const isTablet = useLayoutType() === 'tablet';
111
112
  const session = useSession();
112
- const config = useConfig<ConfigObject>();
113
+ const { isPrimaryDiagnosisRequired, ...config } = useConfig<ConfigObject>();
113
114
  const memoizedState = useMemo(() => ({ patientUuid }), [patientUuid]);
114
115
  const { clinicianEncounterRole, encounterNoteTextConceptUuid, encounterTypeUuid, formConceptUuid } =
115
116
  config.visitNoteConfig;
@@ -130,7 +131,8 @@ const VisitNotesForm: React.FC<VisitNotesFormProps> = ({
130
131
  const customResolver = useCallback(
131
132
  async (data, context, options) => {
132
133
  const zodResult = await zodResolver(visitNoteFormSchema)(data, context, options);
133
- if (selectedPrimaryDiagnoses.length === 0) {
134
+
135
+ if (isPrimaryDiagnosisRequired && selectedPrimaryDiagnoses.length === 0) {
134
136
  return {
135
137
  ...zodResult,
136
138
  errors: {
@@ -145,7 +147,7 @@ const VisitNotesForm: React.FC<VisitNotesFormProps> = ({
145
147
 
146
148
  return zodResult;
147
149
  },
148
- [visitNoteFormSchema, selectedPrimaryDiagnoses, t],
150
+ [visitNoteFormSchema, isPrimaryDiagnosisRequired, selectedPrimaryDiagnoses, t],
149
151
  );
150
152
 
151
153
  const {
@@ -355,7 +357,7 @@ const VisitNotesForm: React.FC<VisitNotesFormProps> = ({
355
357
  (data: VisitNotesFormData) => {
356
358
  const { noteDate, clinicalNote, images } = data;
357
359
 
358
- if (!selectedPrimaryDiagnoses.length) {
360
+ if (isPrimaryDiagnosisRequired && !selectedPrimaryDiagnoses.length) {
359
361
  return;
360
362
  }
361
363
 
@@ -488,6 +490,7 @@ const VisitNotesForm: React.FC<VisitNotesFormProps> = ({
488
490
  formConceptUuid,
489
491
  globalMutate,
490
492
  isEditing,
493
+ isPrimaryDiagnosisRequired,
491
494
  locationUuid,
492
495
  mutateAttachments,
493
496
  mutateVisitNotes,
package/src/routes.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.openmrs.org/routes.schema.json",
3
3
  "backendDependencies": {
4
4
  "fhir2": ">=1.2",
5
- "webservices.rest": "^2.2.0"
5
+ "webservices.rest": ">=2.2.0"
6
6
  },
7
7
  "extensions": [
8
8
  {
@@ -3,10 +3,14 @@ import { useTranslation } from 'react-i18next';
3
3
  import { ActionMenuButton, PenIcon } from '@openmrs/esm-framework';
4
4
  import { useLaunchWorkspaceRequiringVisit } from '@openmrs/esm-patient-common-lib';
5
5
 
6
- const VisitNoteActionButton: React.FC = () => {
6
+ /**
7
+ * This button uses the patient chart store and MUST only be used
8
+ * within the patient chart
9
+ */
10
+ const VisitNoteActionButton: React.FC<{ patientUuid: string }> = ({ patientUuid }) => {
7
11
  const { t } = useTranslation();
8
12
 
9
- const launchVisitNotesWorkspace = useLaunchWorkspaceRequiringVisit('visit-notes-form-workspace');
13
+ const launchVisitNotesWorkspace = useLaunchWorkspaceRequiringVisit(patientUuid, 'visit-notes-form-workspace');
10
14
 
11
15
  return (
12
16
  <ActionMenuButton
@@ -26,7 +26,6 @@ jest.mock('@openmrs/esm-patient-common-lib', () => {
26
26
 
27
27
  return {
28
28
  ...originalModule,
29
- useVisitOrOfflineVisit: jest.fn().mockReturnValue({ currentVisit: null }),
30
29
  useLaunchWorkspaceRequiringVisit: jest.fn(),
31
30
  };
32
31
  });
@@ -37,14 +36,14 @@ describe('VisitNoteActionButton', () => {
37
36
 
38
37
  mockUseLayoutType.mockReturnValue('tablet');
39
38
 
40
- render(<VisitNoteActionButton />);
39
+ render(<VisitNoteActionButton patientUuid="patient-uuid" />);
41
40
 
42
41
  const visitNoteButton = screen.getByRole('button', { name: /Visit note/i });
43
42
  expect(visitNoteButton).toBeInTheDocument();
44
43
 
45
44
  await user.click(visitNoteButton);
46
45
 
47
- expect(mockUseLaunchWorkspaceRequiringVisit).toHaveBeenCalledWith('visit-notes-form-workspace');
46
+ expect(mockUseLaunchWorkspaceRequiringVisit).toHaveBeenCalledWith('patient-uuid', 'visit-notes-form-workspace');
48
47
  });
49
48
 
50
49
  it('should display desktop view', async () => {
@@ -52,13 +51,13 @@ describe('VisitNoteActionButton', () => {
52
51
 
53
52
  mockUseLayoutType.mockReturnValue('desktop' as LayoutType);
54
53
 
55
- render(<VisitNoteActionButton />);
54
+ render(<VisitNoteActionButton patientUuid="patient-uuid" />);
56
55
 
57
56
  const visitNoteButton = screen.getByRole('button', { name: /Note/i });
58
57
  expect(visitNoteButton).toBeInTheDocument();
59
58
 
60
59
  await user.click(visitNoteButton);
61
60
 
62
- expect(mockUseLaunchWorkspaceRequiringVisit).toHaveBeenCalledWith('visit-notes-form-workspace');
61
+ expect(mockUseLaunchWorkspaceRequiringVisit).toHaveBeenCalledWith('patient-uuid', 'visit-notes-form-workspace');
63
62
  });
64
63
  });
@@ -0,0 +1,39 @@
1
+ {
2
+ "add": "Add",
3
+ "addImage": "Add image",
4
+ "addVisitNote": "Add a visit note",
5
+ "clinicalNoteLabel": "Write your notes",
6
+ "clinicalNotePlaceholder": "Write any notes here",
7
+ "date": "Date",
8
+ "diagnoses": "Diagnoses",
9
+ "discard": "Discard",
10
+ "emptyDiagnosisText": "No diagnosis selected — Enter a diagnosis below",
11
+ "enterPrimaryDiagnoses": "Enter Primary diagnoses",
12
+ "enterSecondaryDiagnoses": "Enter Secondary diagnoses",
13
+ "error": "Error",
14
+ "errorFetchingConcepts": "There was a problem fetching concepts",
15
+ "errorTransformingDiagnoses": "Error transforming diagnoses",
16
+ "image": "Image",
17
+ "imageRemoved": "Image removed",
18
+ "imageUploadHelperText": "Upload an image or use this device's camera to capture an image",
19
+ "noMatchingDiagnoses": "No diagnoses found matching",
20
+ "note": "Note",
21
+ "noVisitNoteToDisplay": "No visit note to display",
22
+ "primaryDiagnosis": "Primary diagnosis",
23
+ "primaryDiagnosisInputPlaceholder": "Choose a primary diagnosis",
24
+ "primaryDiagnosisRequired": "Choose at least one primary diagnosis",
25
+ "saveAndClose": "Save and close",
26
+ "saving": "Saving",
27
+ "searchForPrimaryDiagnosis": "Search for a primary diagnosis",
28
+ "searchForSecondaryDiagnosis": "Search for a secondary diagnosis",
29
+ "secondaryDiagnosis": "Secondary diagnosis",
30
+ "secondaryDiagnosisInputPlaceholder": "Choose a secondary diagnosis",
31
+ "seeAll": "See all",
32
+ "visitDate": "Visit date",
33
+ "visitNote": "Visit note",
34
+ "visitNoteNowVisible": "It is now visible on the Encounters page",
35
+ "visitNotes": "Visit notes",
36
+ "visitNoteSaved": "Visit note saved",
37
+ "visitNoteSaveError": "Error saving visit note",
38
+ "visitNoteWorkspaceTitle": "Visit Note"
39
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "add": "Add",
3
+ "addImage": "Add image",
4
+ "addVisitNote": "Add a visit note",
5
+ "clinicalNoteLabel": "Write your notes",
6
+ "clinicalNotePlaceholder": "Write any notes here",
7
+ "date": "Date",
8
+ "diagnoses": "Diagnoses",
9
+ "discard": "Discard",
10
+ "emptyDiagnosisText": "No diagnosis selected — Enter a diagnosis below",
11
+ "enterPrimaryDiagnoses": "Enter Primary diagnoses",
12
+ "enterSecondaryDiagnoses": "Enter Secondary diagnoses",
13
+ "error": "Error",
14
+ "errorFetchingConcepts": "There was a problem fetching concepts",
15
+ "errorTransformingDiagnoses": "Error transforming diagnoses",
16
+ "image": "Image",
17
+ "imageRemoved": "Image removed",
18
+ "imageUploadHelperText": "Upload an image or use this device's camera to capture an image",
19
+ "noMatchingDiagnoses": "No diagnoses found matching",
20
+ "note": "Note",
21
+ "noVisitNoteToDisplay": "No visit note to display",
22
+ "primaryDiagnosis": "Primary diagnosis",
23
+ "primaryDiagnosisInputPlaceholder": "Choose a primary diagnosis",
24
+ "primaryDiagnosisRequired": "Choose at least one primary diagnosis",
25
+ "saveAndClose": "Save and close",
26
+ "saving": "Saving",
27
+ "searchForPrimaryDiagnosis": "Search for a primary diagnosis",
28
+ "searchForSecondaryDiagnosis": "Search for a secondary diagnosis",
29
+ "secondaryDiagnosis": "Secondary diagnosis",
30
+ "secondaryDiagnosisInputPlaceholder": "Choose a secondary diagnosis",
31
+ "seeAll": "See all",
32
+ "visitDate": "Visit date",
33
+ "visitNote": "Visit note",
34
+ "visitNoteNowVisible": "It is now visible on the Encounters page",
35
+ "visitNotes": "Visit notes",
36
+ "visitNoteSaved": "Visit note saved",
37
+ "visitNoteSaveError": "Error saving visit note",
38
+ "visitNoteWorkspaceTitle": "Visit Note"
39
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "add": "Add",
3
+ "addImage": "Add image",
4
+ "addVisitNote": "Add a visit note",
5
+ "clinicalNoteLabel": "Write your notes",
6
+ "clinicalNotePlaceholder": "Write any notes here",
7
+ "date": "Date",
8
+ "diagnoses": "Diagnoses",
9
+ "discard": "Discard",
10
+ "emptyDiagnosisText": "No diagnosis selected — Enter a diagnosis below",
11
+ "enterPrimaryDiagnoses": "Enter Primary diagnoses",
12
+ "enterSecondaryDiagnoses": "Enter Secondary diagnoses",
13
+ "error": "Error",
14
+ "errorFetchingConcepts": "There was a problem fetching concepts",
15
+ "errorTransformingDiagnoses": "Error transforming diagnoses",
16
+ "image": "Image",
17
+ "imageRemoved": "Image removed",
18
+ "imageUploadHelperText": "Upload an image or use this device's camera to capture an image",
19
+ "noMatchingDiagnoses": "No diagnoses found matching",
20
+ "note": "Note",
21
+ "noVisitNoteToDisplay": "No visit note to display",
22
+ "primaryDiagnosis": "Primary diagnosis",
23
+ "primaryDiagnosisInputPlaceholder": "Choose a primary diagnosis",
24
+ "primaryDiagnosisRequired": "Choose at least one primary diagnosis",
25
+ "saveAndClose": "Save and close",
26
+ "saving": "Saving",
27
+ "searchForPrimaryDiagnosis": "Search for a primary diagnosis",
28
+ "searchForSecondaryDiagnosis": "Search for a secondary diagnosis",
29
+ "secondaryDiagnosis": "Secondary diagnosis",
30
+ "secondaryDiagnosisInputPlaceholder": "Choose a secondary diagnosis",
31
+ "seeAll": "See all",
32
+ "visitDate": "Visit date",
33
+ "visitNote": "Visit note",
34
+ "visitNoteNowVisible": "It is now visible on the Encounters page",
35
+ "visitNotes": "Visit notes",
36
+ "visitNoteSaved": "Visit note saved",
37
+ "visitNoteSaveError": "Error saving visit note",
38
+ "visitNoteWorkspaceTitle": "Visit Note"
39
+ }
package/dist/1433.js DELETED
@@ -1 +0,0 @@
1
- (globalThis.webpackChunk_openmrs_esm_patient_notes_app=globalThis.webpackChunk_openmrs_esm_patient_notes_app||[]).push([[1433,4148],{71433:(e,n,t)=>{"use strict";t.r(n),t.d(n,{importTranslation:()=>J,notesOverview:()=>ee,startupApp:()=>Q,visitNotesActionButton:()=>ne,visitNotesFormWorkspace:()=>te});var a=t(54440);const i={clinicianEncounterRole:{_type:a.Type.UUID,_default:"240b26f9-dd88-4172-823d-4a8bfeb7841f"},visitDiagnosesConceptUuid:{_type:a.Type.ConceptUuid,_default:"159947AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},encounterNoteTextConceptUuid:{_type:a.Type.ConceptUuid,_default:"162169AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},encounterTypeUuid:{_type:a.Type.UUID,_default:"d7151f82-c1f3-4152-a605-2f9ea7414a79"},formConceptUuid:{_type:a.Type.ConceptUuid,_default:"c75f120a-04ec-11e3-8780-2b40bef9a44b"}};var o={diagnosisConceptClass:{_type:a.Type.UUID,_default:"8d4918b0-c2cc-11de-8d13-0010c6dffd0f",_description:"The concept class to use for the diagnoses"},visitNoteConfig:i},r=t(1343),s=t.n(r),l=t(93150),p=t(90363),c=t(36274),u=t(88313),d=t(53373),f=t.n(d),g=t(65133),h=t(55841),y=t(74148),b=t(56723),m=t(7817);var $=t(31475);const v=(A=function(e,n){return e&&(0,b.A)(e,n,m.A)},function(e,n){if(null==e)return e;if(!(0,$.A)(e))return A(e,n);for(var t=e.length,a=-1,i=Object(e);++a<t&&!1!==n(i[a],a,i););return e});var A;var w=t(58126),k=t(84089);const x=function(e,n){if(e!==n){var t=void 0!==e,a=null===e,i=e==e,o=(0,k.A)(e),r=void 0!==n,s=null===n,l=n==n,p=(0,k.A)(n);if(!s&&!p&&!o&&e>n||o&&r&&l&&!s&&!p||a&&r&&l||!t&&l||!i)return 1;if(!a&&!o&&!p&&e<n||p&&t&&i&&!a&&!o||s&&t&&i||!r&&i||!l)return-1}return 0};var _=t(14151),z=t(96956);const C=function(e,n,t){n=n.length?(0,g.A)(n,(function(e){return(0,z.A)(e)?function(n){return(0,h.A)(n,1===e.length?e[0]:e)}:e})):[_.A];var a=-1;n=(0,g.A)(n,(0,w.A)(y.A));var i=function(e,n){var t=-1,a=(0,$.A)(e)?Array(e.length):[];return v(e,(function(e,i,o){a[++t]=n(e,i,o)})),a}(e,(function(e,t,i){return{criteria:(0,g.A)(n,(function(n){return n(e)})),index:++a,value:e}}));return function(e,n){var t=e.length;for(e.sort(n);t--;)e[t]=e[t].value;return e}(i,(function(e,n){return function(e,n,t){for(var a=-1,i=e.criteria,o=n.criteria,r=i.length,s=t.length;++a<r;){var l=x(i[a],o[a]);if(l)return a>=s?l:l*("desc"==t[a]?-1:1)}return e.index-n.index}(e,n,t)}))},j=function(e,n,t,a){return null==e?[]:((0,z.A)(n)||(n=null==n?[]:[n]),t=a?void 0:t,(0,z.A)(t)||(t=null==t?[]:[t]),C(e,n,t))};var M=t(72591),E=t.n(M),T=t(1740),D=t.n(T),N=t(88128),O=t.n(N),P=t(30855),S=t.n(P),U=t(93051),I=t.n(U),R=t(73656),B=t.n(R),F=t(77919),L={};L.styleTagTransform=B(),L.setAttributes=S(),L.insert=O().bind(null,"head"),L.domAPI=D(),L.insertStyleElement=I(),E()(F.A,L);const q=F.A&&F.A.locals?F.A.locals:void 0;function V(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}function G(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function W(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},a=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),a.forEach((function(n){G(e,n,t[n])}))}return e}const H=function(e){var n,t,i=e.notes,o=e.pageSize,u=e.pageUrl,d=e.urlLabel,g=(0,l.useTranslation)().t,h="tablet"===(0,a.useLayoutType)(),y=(n=(0,r.useState)({key:"",order:"none"}),t=2,function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,i,o=[],r=!0,s=!1;try{for(t=t.call(e);!(r=(a=t.next()).done)&&(o.push(a.value),!n||o.length!==n);r=!0);}catch(e){s=!0,i=e}finally{try{r||null==t.return||t.return()}finally{if(s)throw i}}return o}}(n,t)||function(e,n){if(e){if("string"==typeof e)return V(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?V(e,n):void 0}}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),b=y[0],m=y[1],$=[{key:"encounterDate",header:g("date","Date")},{key:"diagnoses",header:g("diagnoses","Diagnoses")}],v=b.key,A=b.order,w="encounterDate"===v?function(e,n){return j(e,[function(e){return new Date(e.encounterDate).getTime()}],"ASC"===n?["desc"]:["asc"])}(i,A):j(i,[v],"DESC"===A?["desc"]:["asc"]),k=(0,a.usePagination)(w,o),x=k.results,_=k.goTo,z=k.currentPage,C=s().useMemo((function(){return null==x?void 0:x.map((function(e){return n=W({},e),t=null!=(t={id:"".concat(e.id),encounterDate:(0,a.formatDate)((0,a.parseDate)(e.encounterDate),{mode:"wide"}),diagnoses:e.diagnoses?e.diagnoses:"--"})?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))})),n;var n,t}))}),[x]);return s().createElement(s().Fragment,null,s().createElement(p.bQt,{rows:C,sortRow:function(e,n,t){var a=t.sortDirection,i=t.sortStates,o=Object.keys(i).find((function(e){return i[e]===a}));return m({key:null!=o?o:"",order:a}),0},headers:$,isSortable:!0,size:h?"lg":"sm",useZebraStyles:!0},(function(e){var n=e.getExpandedRowProps,t=e.getExpandHeaderProps,i=e.getHeaderProps,o=e.getRowProps,r=e.getTableContainerProps,l=e.getTableProps,c=e.headers,u=e.rows;return s().createElement(p.K3K,r(),s().createElement(p.XIK,l(),s().createElement(p.ndF,null,s().createElement(p.Hjg,null,s().createElement(p.Uwq,W({enableToggle:!0},t())),c.map((function(e,n){return s().createElement(p.A0N,W({key:n,className:f()(q.productiveHeading01,q.text02)},i({header:e})),e.header)})))),s().createElement(p.BFY,null,u.map((function(e,t){var i,r,l,u,d;return s().createElement(s().Fragment,{key:e.id},s().createElement(p.fZD,o({row:e}),e.cells.map((function(e){return s().createElement(p.nA6,{key:e.id},e.value)}))),e.isExpanded?s().createElement(p.cwJ,W({className:q.expandedRow,colSpan:c.length+1},n({row:e})),s().createElement("div",{className:q.container,key:t},(null==C||null===(i=C[t])||void 0===i?void 0:i.encounterNote)?s().createElement("div",{className:q.copy},s().createElement("span",{className:q.content},null==C||null===(r=C[t])||void 0===r?void 0:r.encounterNote),s().createElement("span",{className:q.metadata},(0,a.formatTime)(new Date(null==C||null===(l=C[t])||void 0===l?void 0:l.encounterNoteRecordedAt))," ·"," ",null==C||null===(u=C[t])||void 0===u?void 0:u.encounterProvider,", ",null==C||null===(d=C[t])||void 0===d?void 0:d.encounterProviderRole)):s().createElement("span",{className:q.copy},g("noVisitNoteToDisplay","No visit note to display")))):s().createElement(p.cwJ,{className:q.hiddenRow,colSpan:c.length+2}))})))))})),s().createElement(c.PatientChartPagination,{pageNumber:z,totalItems:i.length,currentItems:x.length,pageSize:o,onPageNumberChange:function(e){var n=e.page;return _(n)},dashboardLinkUrl:u,dashboardLinkLabel:d}))};function Y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const K=function(e){var n=e.patientUuid,t=e.pageSize,i=e.urlLabel,o=e.pageUrl,r=(0,l.useTranslation)().t,d=(0,a.useVisit)(n).currentVisit,f=r("visitNotes","Visit notes"),g=r("visitNotes","Visit notes"),h=(0,u.aw)(n),y=h.visitNotes,b=h.error,m=h.isLoading,$=h.isValidating,v=(0,a.useLayoutType)(),A="large-desktop"===v||"small-desktop"===v,w=s().useCallback((function(){d?(0,a.launchWorkspace)("visit-notes-form-workspace"):(0,c.launchStartVisitPrompt)()}),[d]);return m?s().createElement(p.OOb,{role:"progressbar",compact:A,zebra:!0}):b?s().createElement(c.ErrorState,{error:b,headerTitle:g}):(null==y?void 0:y.length)?s().createElement("div",{className:q.widgetCard},s().createElement(c.CardHeader,{title:g},s().createElement("span",null,$?s().createElement(p.OuH,null):null),s().createElement(p.$nd,{kind:"ghost",renderIcon:function(e){return s().createElement(a.AddIcon,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},a=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),a.forEach((function(n){Y(e,n,t[n])}))}return e}({size:16},e))},iconDescription:"Add visit note",onClick:w},r("add","Add"))),s().createElement(H,{notes:y,pageSize:t,urlLabel:i,pageUrl:o})):s().createElement(c.EmptyState,{displayText:f,headerTitle:g,launchForm:w})};var X="@openmrs/esm-patient-notes-app",Z={featureName:"patient-notes",moduleName:X},J=t(84767);function Q(){(0,a.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:".+".concat(a.restBaseUrl,"/encounter.+")}),(0,a.defineConfigSchema)(X,o)}var ee=(0,a.getSyncLifecycle)((function(e){var n=e.patientUuid,t=e.patient,a=(e.basePath,(0,l.useTranslation)().t),i="${openmrsSpaBase}/patient/".concat(t.id,"/chart/Forms & Notes"),o=a("seeAll","See all");return s().createElement(K,{patientUuid:n,pageSize:5,urlLabel:o,pageUrl:i})}),Z),ne=(0,a.getSyncLifecycle)((function(){var e=(0,l.useTranslation)().t,n=(0,c.useLaunchWorkspaceRequiringVisit)("visit-notes-form-workspace");return s().createElement(a.ActionMenuButton,{getIcon:function(e){return s().createElement(a.PenIcon,e)},label:e("visitNote","Visit note"),iconDescription:e("note","Note"),handler:n,type:"visit-note"})}),Z),te=(0,a.getAsyncLifecycle)((function(){return Promise.all([t.e(6233),t.e(6372),t.e(8051)]).then(t.bind(t,18051))}),Z)},74148:(e,n,t)=>{"use strict";t.d(n,{A:()=>k});var a=t(39791),i=t(43944);var o=t(97942);const r=function(e){return e==e&&!(0,o.A)(e)};var s=t(7817);const l=function(e,n){return function(t){return null!=t&&t[e]===n&&(void 0!==n||e in Object(t))}},p=function(e){var n=function(e){for(var n=(0,s.A)(e),t=n.length;t--;){var a=n[t],i=e[a];n[t]=[a,i,r(i)]}return n}(e);return 1==n.length&&n[0][2]?l(n[0][0],n[0][1]):function(t){return t===e||function(e,n,t,o){var r=t.length,s=r,l=!o;if(null==e)return!s;for(e=Object(e);r--;){var p=t[r];if(l&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++r<s;){var c=(p=t[r])[0],u=e[c],d=p[1];if(l&&p[2]){if(void 0===u&&!(c in e))return!1}else{var f=new a.A;if(o)var g=o(u,d,c,e,n,f);if(!(void 0===g?(0,i.A)(d,u,3,o,f):g))return!1}}return!0}(t,e,n)}};var c=t(55841);const u=function(e,n){return null!=e&&n in Object(e)};var d=t(85861),f=t(61697),g=t(96956),h=t(85378),y=t(47893),b=t(9322);const m=function(e,n){return null!=e&&function(e,n,t){for(var a=-1,i=(n=(0,d.A)(n,e)).length,o=!1;++a<i;){var r=(0,b.A)(n[a]);if(!(o=null!=e&&t(e,r)))break;e=e[r]}return o||++a!=i?o:!!(i=null==e?0:e.length)&&(0,y.A)(i)&&(0,h.A)(r,i)&&((0,g.A)(e)||(0,f.A)(e))}(e,n,u)};var $=t(1677);const v=function(e,n){return(0,$.A)(e)&&r(n)?l((0,b.A)(e),n):function(t){var a=function(e,n,t){var a=null==e?void 0:(0,c.A)(e,n);return void 0===a?t:a}(t,e);return void 0===a&&a===n?m(t,e):(0,i.A)(n,a,3)}};var A=t(14151);const w=function(e){return(0,$.A)(e)?(n=(0,b.A)(e),function(e){return null==e?void 0:e[n]}):function(e){return function(n){return(0,c.A)(n,e)}}(e);var n},k=function(e){return"function"==typeof e?e:null==e?A.A:"object"==typeof e?(0,g.A)(e)?v(e[0],e[1]):p(e):w(e)}},77919:(e,n,t)=>{"use strict";t.d(n,{A:()=>s});var a=t(30977),i=t.n(a),o=t(95924),r=t.n(o)()(i());r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-notes__notes-overview__widgetCard___E1gAb{border:1px solid #e0e0e0}.-esm-patient-notes__notes-overview__expandedRow___gIyPA>td{padding-left:2.5rem !important}.-esm-patient-notes__notes-overview__expandedRow___gIyPA>td>div{max-height:max-content !important}.-esm-patient-notes__notes-overview__expandedRow___gIyPA th[colspan] td[colspan]>div:first-child{padding:0 1rem}.-esm-patient-notes__notes-overview__copy___S2oaj{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px);display:flex;flex-direction:column}.-esm-patient-notes__notes-overview__container___xbT9k{margin:.5rem}.-esm-patient-notes__notes-overview__metadata___Xgbai{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:#525252;margin:.5rem 0}.-esm-patient-notes__notes-overview__hiddenRow___hY9l8{display:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/notes/notes-overview.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,wDACE,wBAAA,CAGF,4DACE,8BAAA,CAGF,gEACE,iCAAA,CAGF,iGACE,cAAA,CAGF,kDC80BI,gDAAA,CAAA,+CAAA,CAAA,mDAAA,CAAA,wDAAA,CD30BF,YAAA,CACA,qBAAA,CAGF,uDACE,YEPW,CFUb,sDCm0BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CDj0BF,aD1BQ,CC2BR,cAAA,CAGF,uDACE,YAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.widgetCard {\n border: 1px solid $ui-03;\n}\n\n.expandedRow > td {\n padding-left: layout.$spacing-08 !important;\n}\n\n.expandedRow > td > div {\n max-height: max-content !important;\n}\n\n.expandedRow th[colspan] td[colspan] > div:first-child {\n padding: 0 layout.$spacing-05;\n}\n\n.copy {\n @include type.type-style('body-01');\n\n display: flex;\n flex-direction: column;\n}\n\n.container {\n margin: layout.$spacing-03;\n}\n\n.metadata {\n @include type.type-style('label-01');\n color: $text-02;\n margin: layout.$spacing-03 0;\n}\n\n.hiddenRow {\n display: none;\n}\n","//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n// stylelint-disable number-max-precision\n\n@use 'sass:map';\n@use 'sass:math';\n@use '@carbon/grid/scss/config' as gridconfig;\n@use '@carbon/grid/scss/breakpoint' as grid;\n@use 'prefix' as *;\n@use 'font-family';\n@use 'scale';\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-01: (\n font-size: scale.type-scale(1),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-01: $body-short-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-01: $body-long-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-02: $body-short-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-02: $body-long-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-01: $productive-heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-02: $productive-heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-03: $productive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-04: $productive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-05: $productive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-06: $productive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: scale.type-scale(12),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-07: $productive-heading-07 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(5),\n line-height: 1.4,\n ),\n max: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-03: $expressive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n font-weight: font-family.font-weight('regular'),\n ),\n max: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-04: $expressive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n font-weight: font-family.font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-05: $expressive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-06: $expressive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: scale.type-scale(6),\n font-weight: font-family.font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-paragraph-01: $expressive-paragraph-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(5),\n ),\n lg: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-01: $quotation-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-02: $quotation-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-01: $display-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-02: $display-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(12),\n line-height: 1.18,\n ),\n lg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(16),\n line-height: 1.11,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-03: $display-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: scale.type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-04: $display-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n caption-02: $caption-02,\n label-01: $label-01,\n label-02: $label-02,\n helper-text-01: $helper-text-01,\n helper-text-02: $helper-text-02,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n // V11 Tokens\n legal-01: $legal-01,\n legal-02: $legal-02,\n body-compact-01: $body-compact-01,\n body-compact-02: $body-compact-02,\n heading-compact-01: $heading-compact-01,\n heading-compact-02: $heading-compact-02,\n body-01: $body-01,\n body-02: $body-02,\n heading-03: $heading-03,\n heading-04: $heading-04,\n heading-05: $heading-05,\n heading-06: $heading-06,\n heading-07: $heading-07,\n fluid-heading-03: $fluid-heading-03,\n fluid-heading-04: $fluid-heading-04,\n fluid-heading-05: $fluid-heading-05,\n fluid-heading-06: $fluid-heading-06,\n fluid-paragraph-01: $fluid-paragraph-01,\n fluid-quotation-01: $fluid-quotation-01,\n fluid-quotation-02: $fluid-quotation-02,\n fluid-display-01: $fluid-display-01,\n fluid-display-02: $fluid-display-02,\n fluid-display-03: $fluid-display-03,\n fluid-display-04: $fluid-display-04,\n) !default;\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return math.div($value, $value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map.remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map.get($type-styles, breakpoints) {\n @include grid.breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map.get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map.get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map.remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map.get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map.get($type-styles, font-size);\n $min-font-size: map.get($type-styles, font-size);\n @if map.has-key($fluid-breakpoint, font-size) {\n $min-font-size: map.get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map.get($breakpoint, width);\n $min-vw: map.get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map.has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: grid.breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map.get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map.get(\n map.get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map.get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin type-style(\n $name,\n $fluid: false,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n @if not map.has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map.get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map.has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @include custom-properties($name, $token);\n }\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),r.locals={widgetCard:"-esm-patient-notes__notes-overview__widgetCard___E1gAb",expandedRow:"-esm-patient-notes__notes-overview__expandedRow___gIyPA",copy:"-esm-patient-notes__notes-overview__copy___S2oaj",container:"-esm-patient-notes__notes-overview__container___xbT9k",metadata:"-esm-patient-notes__notes-overview__metadata___Xgbai",hiddenRow:"-esm-patient-notes__notes-overview__hiddenRow___hY9l8"};const s=r},84767:(e,n,t)=>{var a={"./am.json":[81197,1197],"./ar.json":[14132,4132],"./ar_SY.json":[37617,7617],"./bn.json":[77159,7159],"./de.json":[34944,4944],"./en.json":[34300,4300],"./en_US.json":[59569,9569],"./es.json":[93099,3099],"./es_MX.json":[88349,8349],"./fr.json":[94055,4055],"./he.json":[84652,4652],"./hi.json":[36840,6840],"./hi_IN.json":[55442,5442],"./id.json":[72690,2690],"./it.json":[9538,9538],"./ka.json":[70795,795],"./km.json":[54335,4335],"./ku.json":[9895,9895],"./ky.json":[88163,8163],"./lg.json":[64618,4618],"./ne.json":[12146,2146],"./pl.json":[41119,1119],"./pt.json":[96679,6679],"./pt_BR.json":[36468,6468],"./qu.json":[35173,5173],"./ro_RO.json":[46022,6022],"./ru_RU.json":[60986,986],"./si.json":[56859,6859],"./sw.json":[89913,9913],"./sw_KE.json":[88618,8618],"./tr.json":[55241,5241],"./tr_TR.json":[99900,9900],"./uk.json":[60723,723],"./uz.json":[43584,3584],"./uz@Latn.json":[27097,7097],"./uz_UZ.json":[70890,890],"./vi.json":[79214,9214],"./zh.json":[35661,5661],"./zh_CN.json":[99879,9879]};function i(e){if(!t.o(a,e))return Promise.resolve().then((()=>{var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=a[e],i=n[0];return t.e(n[1]).then((()=>t(i)))}i.keys=()=>Object.keys(a),i.id=84767,e.exports=i},88313:(e,n,t)=>{"use strict";t.d(n,{HE:()=>l,aw:()=>o,k7:()=>c,mN:()=>p,ph:()=>r,v_:()=>s});var a=t(71123),i=t(54440);function o(e){var n,t,o,r=(0,i.useConfig)().visitNoteConfig,s=r.encounterNoteTextConceptUuid,l=r.visitDiagnosesConceptUuid,p="".concat(i.restBaseUrl,"/encounter?patient=").concat(e,"&obs=").concat(l,"&v=").concat("custom:(uuid,display,encounterDatetime,patient,obs,encounterProviders:(uuid,display,encounterRole:(uuid,display),provider:(uuid,person:(uuid,display))),diagnoses"),c=(0,a.Ay)(p,i.openmrsFetch),u=c.data,d=c.error,f=c.isLoading,g=c.isValidating,h=c.mutate,y=null==u||null===(o=u.data)||void 0===o||null===(t=o.results)||void 0===t||null===(n=t.map((function(e,n){var t,a,i,o,r,l,p;return{id:"".concat(n),diagnoses:e.diagnoses.filter((function(e){return!e.voided})).map((function(e){return e.display})).filter((function(e){return e})).join(", "),encounterDate:e.encounterDatetime,encounterNote:null===(t=e.obs.find((function(e){return e.concept.uuid===s})))||void 0===t?void 0:t.value,encounterNoteRecordedAt:null===(a=e.obs.find((function(e){return e.concept.uuid===s})))||void 0===a?void 0:a.obsDatetime,encounterProvider:null==e||null===(r=e.encounterProviders[0])||void 0===r||null===(o=r.provider)||void 0===o||null===(i=o.person)||void 0===i?void 0:i.display,encounterProviderRole:null==e||null===(p=e.encounterProviders[0])||void 0===p||null===(l=p.encounterRole)||void 0===l?void 0:l.display}})))||void 0===n?void 0:n.sort((function(e,n){return new Date(n.encounterDate).getTime()-new Date(e.encounterDate).getTime()}));return{visitNotes:u?y:null,error:d,isLoading:f,isValidating:g,mutateVisitNotes:h}}function r(e,n){var t="".concat(i.restBaseUrl,"/concept?name=").concat(e,"&searchType=fuzzy&class=").concat(n,"&v=").concat("custom:(uuid,display)");return(0,i.openmrsFetch)(t).then((function(e){var n=e.data;return Promise.resolve(n.results)}))}function s(e,n){return(0,i.openmrsFetch)("".concat(i.restBaseUrl,"/encounter"),{headers:{"Content-Type":"application/json"},method:"POST",body:n,signal:e.signal})}function l(e,n,t){return(0,i.openmrsFetch)("".concat(i.restBaseUrl,"/encounter/").concat(n),{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function p(e,n){return(0,i.openmrsFetch)("".concat(i.restBaseUrl,"/patientdiagnoses"),{headers:{"Content-Type":"application/json"},method:"POST",body:n,signal:e.signal})}function c(e,n){return(0,i.openmrsFetch)("".concat(i.restBaseUrl,"/patientdiagnoses/").concat(n),{method:"DELETE",signal:e.signal})}}}]);