UNPKG

terra-clinical-result

Version:

The Terra Clinical Result package is a collection of standardized views for presenting clinical results documented to a Patient's Medical Chart, such as Vital Signs, Laboratory Results, and Discretely Documented Values

66 lines (65 loc) 2.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); var _IconModified = _interopRequireDefault(require("terra-icon/lib/icon/IconModified")); var _IconComment = _interopRequireDefault(require("terra-icon/lib/icon/IconComment")); var _IconDiamond = _interopRequireDefault(require("terra-icon/lib/icon/IconDiamond")); var _reactIntl = require("react-intl"); var _bind = _interopRequireDefault(require("classnames/bind")); var _ClinicalResultModule = _interopRequireDefault(require("./ClinicalResult.module.scss")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var cx = _bind.default.bind(_ClinicalResultModule.default); var propTypes = { /** * If the Result value has not been authenticated and committed to patient chart. */ isModified: _propTypes.default.bool, /** * If the Result value has been modified from it's original value for the same clinically documented event & datetime. */ hasComment: _propTypes.default.bool, /** * If Result has not been verified */ isUnverified: _propTypes.default.bool, /** * Internationalization object with translation APIs. Provided by `injectIntl`. */ intl: _propTypes.default.shape({ formatMessage: _propTypes.default.func }) }; var Icons = function Icons(_ref) { var isUnverified = _ref.isUnverified, isModified = _ref.isModified, hasComment = _ref.hasComment, intl = _ref.intl; return isUnverified ? /*#__PURE__*/_react.default.createElement(_IconDiamond.default, { className: cx('icon-unverified'), a11yLabel: intl.formatMessage({ id: 'Terra.clinicalResult.resultUnverified' }), role: "img", focusable: "true" }) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isModified ? /*#__PURE__*/_react.default.createElement(_IconModified.default, { className: cx('icon-modified'), a11yLabel: intl.formatMessage({ id: 'Terra.clinicalResult.resultModified' }), role: "img", focusable: "true" }) : null, hasComment ? /*#__PURE__*/_react.default.createElement(_IconComment.default, { className: cx('icon-comment'), a11yLabel: intl.formatMessage({ id: 'Terra.clinicalResult.resultComment' }), role: "img", focusable: "true" }) : null); }; Icons.propTypes = propTypes; var _default = exports.default = (0, _reactIntl.injectIntl)(Icons);