From 4960d96f5b2d5f7f2d7e293dd53a8cebdf43c71c Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Wed, 2 Dec 2026 14:15:14 -0500 Subject: [PATCH] Apply Prettier formatting --- src/components/RequestBox/RequestBox.jsx | 6 ++-- .../RequestDashboard/SettingsSection.jsx | 29 +++++++++---------- src/util/data.js | 5 ++-- src/util/fhir.js | 2 +- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/components/RequestBox/RequestBox.jsx b/src/components/RequestBox/RequestBox.jsx index 7fbd0b59..587c8333 100644 --- a/src/components/RequestBox/RequestBox.jsx +++ b/src/components/RequestBox/RequestBox.jsx @@ -221,10 +221,10 @@ const RequestBox = props => { */ const sendRx = async () => { // Use intermediary or direct based on toggle - const ncpdpEndpoint = globalState.usePharmacyIntermediary - ? globalState.pharmacyIntermediaryUrl + const ncpdpEndpoint = globalState.usePharmacyIntermediary + ? globalState.pharmacyIntermediaryUrl : pimsUrl; - + console.log('Sending NewRx to: ' + ncpdpEndpoint); console.log('Getting case number'); const medication = createMedicationFromMedicationRequest(request); diff --git a/src/components/RequestDashboard/SettingsSection.jsx b/src/components/RequestDashboard/SettingsSection.jsx index 51f34e97..5a9b2c73 100644 --- a/src/components/RequestDashboard/SettingsSection.jsx +++ b/src/components/RequestDashboard/SettingsSection.jsx @@ -132,12 +132,10 @@ const SettingsSection = props => { } }; - const clearResource = - (_settings, type) => - async () => { - // Delete all resources of type type - return await clearResourceWithParams(type, ''); - }; + const clearResource = (_settings, type) => async () => { + // Delete all resources of type type + return await clearResourceWithParams(type, ''); + }; const clearPatient = ({ patientOfInterest }) => @@ -229,12 +227,10 @@ const SettingsSection = props => { // add a communication notifying the practitioner that the resources were created const communication = createCommunication(patientId, userId, message); - client - .create(communication) - .catch(e => { - console.log('Failed to add Communication to EHR'); - console.log(e); - }); + client.create(communication).catch(e => { + console.log('Failed to add Communication to EHR'); + console.log(e); + }); }; const parsePacioToc = async pacioToc => { @@ -349,7 +345,9 @@ const SettingsSection = props => { try { const medicationRequestResult = await client.create(medicationRequest); - console.log(` Added new MedicationRequest for ${medName} (ID: ${medicationRequestResult.id})`); + console.log( + ` Added new MedicationRequest for ${medName} (ID: ${medicationRequestResult.id})` + ); addCommunication( patientId, `Added new MedicationRequest for ${medName} from transfer of care` @@ -387,7 +385,7 @@ const SettingsSection = props => { const searchBundle = await pacioFhirClient.request(query); // ignore the first message, don't save old bundles - if (lastPacioTimestamp.current) { + if (lastPacioTimestamp.current) { if (searchBundle?.entry && searchBundle.entry.length > 0) { console.log(` Found ${searchBundle.entry.length} discharge notification(s)`); @@ -439,7 +437,6 @@ const SettingsSection = props => { console.log(` Server timestamp: ${serverTimestamp}`); lastPacioTimestamp.current = serverTimestamp; } - } catch (e) { console.log('Failed to poll PACIO notifications:', e); } @@ -762,4 +759,4 @@ const SettingsSection = props => { ); }; -export default memo(SettingsSection); \ No newline at end of file +export default memo(SettingsSection); diff --git a/src/util/data.js b/src/util/data.js index 9961ef46..43c86208 100644 --- a/src/util/data.js +++ b/src/util/data.js @@ -24,7 +24,8 @@ const headerDefinitions = { pharmacyIntermediaryUrl: { type: 'input', display: 'Pharmacy Intermediary URL (NCPDP Endpoint)', - default: env.get('VITE_PHARMACY_INTERMEDIARY').asString() || 'http://localhost:3003/ncpdp/script' + default: + env.get('VITE_PHARMACY_INTERMEDIARY').asString() || 'http://localhost:3003/ncpdp/script' }, alternativeTherapy: { display: 'Alternative Therapy Cards Allowed', @@ -380,4 +381,4 @@ export { REMS_ETASU, CDS_SERVICE, serviceEndpoints -}; \ No newline at end of file +}; diff --git a/src/util/fhir.js b/src/util/fhir.js index 7af5cc06..88de0a2d 100644 --- a/src/util/fhir.js +++ b/src/util/fhir.js @@ -59,7 +59,7 @@ function createMedicationDispenseFromMedicationRequest(medicationRequest) { medicationDispense.authorizingPrescription = [ { reference: 'MedicationRequest/' + medicationRequest.id } ]; - medicationDispense.note = [ { text: 'Medication sent to pharmacy' } ]; + medicationDispense.note = [{ text: 'Medication sent to pharmacy' }]; return medicationDispense; }