@uxland/primary-shell 7.46.8 → 7.46.9
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.
- package/dist/{component-vNXq8jnN.js → component-B4MBATTL.js} +2 -2
- package/dist/{component-vNXq8jnN.js.map → component-B4MBATTL.js.map} +1 -1
- package/dist/{index-BbmoKAoM.js → index-BgG_JnBV.js} +14 -5
- package/dist/index-BgG_JnBV.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/{plugin-CFVqtzA4.js → plugin-Ki8G_OEU.js} +2 -2
- package/dist/{plugin-CFVqtzA4.js.map → plugin-Ki8G_OEU.js.map} +1 -1
- package/dist/primary/shell/src/features/get-visi-id/action.d.ts +2 -0
- package/package.json +1 -1
- package/src/UI/internal-views/doctor-nav-menu.ts +9 -2
- package/src/features/get-visi-id/action.ts +7 -0
- package/dist/index-BbmoKAoM.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { shellApi } from "../../api/api";
|
|
2
2
|
import { getPatientCip } from "../../features/get-patient-cip/action";
|
|
3
|
+
import { getVisiId } from "../../features/get-visi-id/action";
|
|
3
4
|
import { navigateToEcap } from "../../features/navigate-to-ecap/navigate-to-ecap";
|
|
4
5
|
import { ClinicalPathwaysActionMenu } from "../components/clinical-pathways-action-menu/clinical-pathways-action-menu";
|
|
5
6
|
import { PetitionerActionMenu } from "../components/petitioner-action-menu/petitioner-action-menu";
|
|
@@ -69,7 +70,10 @@ const doctorNavMenuItems: MenuItemConfig[] = [
|
|
|
69
70
|
{
|
|
70
71
|
icon: "open_in_new",
|
|
71
72
|
label: "Prescripció",
|
|
72
|
-
callbackFn: () =>
|
|
73
|
+
callbackFn: async () => {
|
|
74
|
+
const visiId = await getVisiId(shellApi);
|
|
75
|
+
navigateToEcap("PRESCRIPCIO_ACTIVA", "NO_TANCAR", { VisiId: visiId });
|
|
76
|
+
},
|
|
73
77
|
},
|
|
74
78
|
{
|
|
75
79
|
icon: "open_in_new",
|
|
@@ -102,7 +106,10 @@ const doctorNavMenuItems: MenuItemConfig[] = [
|
|
|
102
106
|
label: "Incapacitat temporal",
|
|
103
107
|
type: "item",
|
|
104
108
|
sortHint: "0100",
|
|
105
|
-
callbackFn: () =>
|
|
109
|
+
callbackFn: async () => {
|
|
110
|
+
const visiId = await getVisiId(shellApi);
|
|
111
|
+
navigateToEcap("REV_IT", "NO_TANCAR", { VisiId: visiId });
|
|
112
|
+
},
|
|
106
113
|
},
|
|
107
114
|
{
|
|
108
115
|
id: "visits",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PrimariaApi } from "../../api/api";
|
|
2
|
+
|
|
3
|
+
export const getVisiId = async (api: PrimariaApi): Promise<string> => {
|
|
4
|
+
const context = api.contextManager.getContext();
|
|
5
|
+
if (context.visi_id) return context.visi_id as string;
|
|
6
|
+
return (await api.broker.send("get_visi_id")) as string;
|
|
7
|
+
};
|