Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ltht-react/utils

Package Overview
Dependencies
Maintainers
5
Versions
329
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ltht-react/utils - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.1.8](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/utils@0.1.7...@ltht-react/utils@0.1.8) (2020-08-05)
**Note:** Version bump only for package @ltht-react/utils
## [0.1.6](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/utils@0.1.5...@ltht-react/utils@0.1.6) (2020-08-04)

@@ -8,0 +16,0 @@

10

lib/atoms/patient.d.ts
import { Patient, NhsNumberStatus } from '@ltht-react/types';
declare const formatPatientAddress: (patient: Patient) => string;
declare const formatPatientAge: (patient: Patient) => string;
declare const formatPatientName: (patient: Patient) => string;
declare const formatNHSNumber: (patient: Patient) => string;
declare const nhsNumberStatus: (patient: Patient) => NhsNumberStatus;
declare const formatPatientAddress: (patient: Patient | undefined) => string;
declare const formatPatientAge: (patient: Patient | undefined) => string;
declare const formatPatientName: (patient: Patient | undefined) => string;
declare const formatNHSNumber: (patient: Patient | undefined) => string;
declare const nhsNumberStatus: (patient: Patient | undefined) => NhsNumberStatus;
export { formatPatientAddress, formatPatientAge, formatPatientName, formatNHSNumber, nhsNumberStatus };

@@ -9,17 +9,17 @@ "use strict";

var formatPatientAddress = function (patient) {
var _a, _b;
var _a, _b, _c;
var address;
if (patient.address && patient.address.length > 0) {
if (((_a = patient) === null || _a === void 0 ? void 0 : _a.address) && patient.address.length > 0) {
address = patient.address.find(function (x) { var _a, _b, _c; return ((_a = x) === null || _a === void 0 ? void 0 : _a.use) === types_1.AddressUseCode.Home && (!((_b = x) === null || _b === void 0 ? void 0 : _b.period) || !((_c = x.period) === null || _c === void 0 ? void 0 : _c.end)); });
}
return _b = (_a = address) === null || _a === void 0 ? void 0 : _a.text, (_b !== null && _b !== void 0 ? _b : '');
return _c = (_b = address) === null || _b === void 0 ? void 0 : _b.text, (_c !== null && _c !== void 0 ? _c : '');
};
exports.formatPatientAddress = formatPatientAddress;
var formatPatientAge = function (patient) {
var _a, _b, _c;
var start = ((_a = patient.birthDate) === null || _a === void 0 ? void 0 : _a.value) ? new Date(patient.birthDate.value) : null;
var _a, _b, _c, _d, _e;
var start = ((_b = (_a = patient) === null || _a === void 0 ? void 0 : _a.birthDate) === null || _b === void 0 ? void 0 : _b.value) ? new Date(patient.birthDate.value) : null;
var end = null;
// ToDO birth/death date Partial date time check
if ((_b = patient.deceased) === null || _b === void 0 ? void 0 : _b.deceasedBoolean) {
end = ((_c = patient.deceased.deceasedDateTime) === null || _c === void 0 ? void 0 : _c.value) ? new Date(patient.deceased.deceasedDateTime.value) : null;
if ((_d = (_c = patient) === null || _c === void 0 ? void 0 : _c.deceased) === null || _d === void 0 ? void 0 : _d.deceasedBoolean) {
end = ((_e = patient.deceased.deceasedDateTime) === null || _e === void 0 ? void 0 : _e.value) ? new Date(patient.deceased.deceasedDateTime.value) : null;
}

@@ -26,0 +26,0 @@ else {

{
"name": "@ltht-react/utils",
"version": "0.1.7",
"version": "0.1.8",
"description": "> TODO: description",

@@ -25,5 +25,5 @@ "author": "Jonny Smith <jonny.asmith@gmail.com>",

"dependencies": {
"@ltht-react/types": "^0.0.14"
"@ltht-react/types": "^0.0.15"
},
"gitHead": "7f60ce3e26f4472b2390cf0ce6a2d020fea61ee5"
"gitHead": "166d9a2e7c12a6864341b708f1eb67f7fd60f4af"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc