Showing 380 of 1,390 total issues
Function _checkEntryOrder
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static _checkEntryOrder(pregnancyEntry, data) {
let pregnancyId = pregnancyEntry.pregnancyId;
const currentVisit = data.visits.find(el => parseInt(el.id) === parseInt(pregnancyEntry.recordedDuringVisit));
const allPregnancyEntries = data.pregnancyEntries.filter((el) => parseInt(el.pregnancyId) === parseInt(pregnancyId));
Function render
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<>
<div className={style.ariane}>
<Helmet title='Patient Search' />
Function formatEdss
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatEdss = (edssList, typeTable) => {
if (edssList.length === 0) {
return () => [
blockgen(''),
blockgen(edssTitle(), [{ offset: 0, length: 11, style: 'BOLD' }]),
Function _handleSubmit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_handleSubmit(ev) {
ev.preventDefault();
if (this.state.lastSubmit && (new Date()).getTime() - this.state.lastSubmit < 500 ? true : false)
return;
Function getMeddraField
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static async getMeddraField({ query }, res) {
const result = [];
const maxOccurency = 20;
await MeddraController.loadMeddraCollection();
if (query.hasOwnProperty('search')) {
Function editTreatment
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static editTreatment({ body, user }, res) {
if (body.hasOwnProperty('id') && typeof body.id === 'number') {
const momentStart = moment(body.startDate, moment.ISO_8601);
const momentTerminated = moment(body.terminatedDate, moment.ISO_8601);
Function createImmunisation
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static createImmunisation({ body, user }, res) {
if (body.hasOwnProperty('patient') && body.hasOwnProperty('immunisationDate') && body.hasOwnProperty('vaccineName') &&
typeof body.patient === 'number' && typeof body.immunisationDate === 'string' && typeof body.vaccineName === 'string') {
const momentImmun = moment(body.immunisationDate, moment.ISO_8601);
if (!momentImmun.isValid() && body.immunisationDate !== null) {
Function getVisits
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getVisits(patientId, deleted) {
const _this = this;
const whereObj = { 'VISITS.patient': patientId };
if (deleted !== true)
whereObj['VISITS.deleted'] = '-';
Function getICD11Field
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static async getICD11Field({ query }, res) {
const result = [];
const maxOccurency = 20;
await ICD11Controller.loadICD11Collection();
if (query.hasOwnProperty('search')) {
Function render
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { yesOrNoQuestion } = this.props;
return <Switch>
<Route
path='/patientProfile/:patientId/visitFrontPage/:visitId/page/:currentPage/yes_or_no'
Function render
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { yesOrNoQuestion } = this.props;
return <Switch>
<Route
path='/patientProfile/:patientId/visitFrontPage/:visitId/page/:currentPage/yes_or_no'
Function render
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { yesOrNoQuestion } = this.props;
return <Switch>
<Route
path='/patientProfile/:patientId/visitFrontPage/:visitId/page/:currentPage/yes_or_no'
Function render
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
if (!this.props.data.visits)
return null;
Function _handleSubmitClick
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_handleSubmitClick(ev) {
ev.preventDefault();
if (this.state.lastSubmit && (new Date()).getTime() - this.state.lastSubmit < 500 ? true : false)
return;
if (!this.state.startDate
Function _handleSubmit
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_handleSubmit(ev) {
ev.preventDefault();
if (this.state.lastSubmit && (new Date()).getTime() - this.state.lastSubmit < 500 ? true : false)
return;
Function updateTest
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static updateTest({ body, user }, res) {
if (!body.hasOwnProperty('id')) {
res.status(400).json(ErrorHelper(message.userError.MISSINGARGUMENT));
return;
}
Function createPregnancyImage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static createPregnancyImage({ body, user }, res) {
if (!body.hasOwnProperty('visitId') || !body.hasOwnProperty('date') || !body.hasOwnProperty('mode') || !body.hasOwnProperty('result')) {
res.status(400).json(ErrorHelper(message.userError.MISSINGARGUMENT));
return;
Function fetchAssociatedDataForCEandTransform
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const fetchAssociatedDataForCEandTransform = async data => {
let entry;
let typeMap;
const associatedData = await dbcon()('CLINICAL_EVENTS_DATA').select('*').where('deleted', '-').where('clinicalEvent', data.id);
switch (data.type) {
Function updateCe
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static updateCe({ body, user }, res) {
if (!body.hasOwnProperty('id')) {
res.status(400).json(ErrorHelper(message.userError.MISSINGARGUMENT));
return;
}
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { yesOrNoQuestion } = this.props;
return <Switch>
<Route