ohif-viewer/Packages/ohif-viewerbase/client/lib/helpers/formatPN.js

23 lines
467 B
JavaScript
Raw Normal View History

import { Blaze } from 'meteor/blaze';
/**
* Formats a patient name for display purposes
*/
const formatPN = context => {
if (!context) {
return;
}
2018-01-30 19:46:31 +01:00
return context.replace('^', ', ');
};
/**
* A global Blaze UI helper to format a patient name for display purposes
*/
// Check if global helper already exists to not override it
if (!Blaze._getGlobalHelper('formatPN')) {
Blaze.registerHelper('formatPN', formatPN);
}
export { formatPN };