ShiftSync/api/services/operations/medications.js
Matt DiMeglio 2a87dd5954
Add Full Medication Information Call - Fix Vulns (#29)
* Add Full Medication Information Call - Fix Vulns

* Update .gitignore

* Delete api/package-lock.json

* Delete web/package-lock.json

* Push package-locks

* Update

* Update

* Update api-deploy-nonprod.yml

* Missed a '

* Update pipelines
2026-01-23 00:33:18 -05:00

38 lines
No EOL
953 B
JavaScript

import { paramyxRunQuery } from '../paramyxConnection.js';
import { medicationHelpers } from './helpers/medications.js'
const getMedications = async () => {
try {
const dataResp = await paramyxRunQuery('SELECT * FROM medications');
return dataResp;
} catch (err) {
console.log('GET MEDICATIONS ERROR: ', err);
throw err;
}
};
const getBaseMedications = async () => {
try {
const dataResp = medicationHelpers.getBaseMedications();
return dataResp;
} catch (err) {
console.log('GET BASE MEDICATIONS ERROR: ', err);
throw err;
}
}
const getFullMedicationInformation = async (drugId) => {
try {
const dataResp = medicationHelpers.getFullMedicationInformation(drugId);
return dataResp;
} catch (err) {
console.log('GET FULL MEDICATION INFORMATION ERROR: ', err);
throw err;
}
}
export const medicationOperations = {
getMedications,
getBaseMedications,
getFullMedicationInformation
}