diff --git a/package.json b/package.json index 3325601..86005ee 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "devDependencies": { "@ohri/openmrs-esm-ohri-commons-lib": "next", "@openmrs/esm-framework": "next", - "@openmrs/openmrs-form-engine-lib": "next", "@swc/cli": "^0.1.57", "@swc/core": "^1.3.6", "@swc/jest": "^0.2.23", diff --git a/src/helpers/ptracker-form-helpers.ts b/src/helpers/ptracker-form-helpers.ts deleted file mode 100644 index 96ba5e6..0000000 --- a/src/helpers/ptracker-form-helpers.ts +++ /dev/null @@ -1,11 +0,0 @@ -export const generateInfantPTrackerId = ( - fieldId: string, - motherPtrackerId: string -): string | undefined => { - if (!fieldId || !motherPtrackerId) return; - return fieldId === "infantPtrackerid" - ? motherPtrackerId + "1" - : fieldId.includes("_") - ? motherPtrackerId.concat(fieldId.split("_")[1]) - : undefined; -}; diff --git a/src/index.ts b/src/index.ts index 70ceedd..ca67838 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,5 @@ import { getAsyncLifecycle, defineConfigSchema } from "@openmrs/esm-framework"; import { configSchema } from "./config-schema"; -import { registerExpressionHelper } from "@openmrs/openmrs-form-engine-lib"; -import { generateInfantPTrackerId } from "./helpers/ptracker-form-helpers"; require("./root.scss"); @@ -20,10 +18,6 @@ const options = { export function startupApp() { defineConfigSchema(moduleName, configSchema); - registerExpressionHelper( - "customGenerateInfantPTrackerId", - generateInfantPTrackerId - ); } export const mnchClinicalDashboard = getAsyncLifecycle( diff --git a/yarn.lock b/yarn.lock index cfa561c..d8d3a46 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2653,7 +2653,6 @@ __metadata: "@carbon/react": ^1.15.0 "@ohri/openmrs-esm-ohri-commons-lib": next "@openmrs/esm-framework": next - "@openmrs/openmrs-form-engine-lib": next "@swc/cli": ^0.1.57 "@swc/core": ^1.3.6 "@swc/jest": ^0.2.23