diff --git a/dcm4chee-arc-ui2/src/app/helpers/j4care.service.ts b/dcm4chee-arc-ui2/src/app/helpers/j4care.service.ts index a40ee4c8ac..c0edad1021 100644 --- a/dcm4chee-arc-ui2/src/app/helpers/j4care.service.ts +++ b/dcm4chee-arc-ui2/src/app/helpers/j4care.service.ts @@ -485,6 +485,29 @@ export class j4care { } } + /* + *Removes the last empty elements until it finds one that is not empty + *Example: + * input: ['test', 'selam', '', 'hb', '', ''] + * output:["test", "selam", "", "hb"] + * */ + static removeLastEmptyStringsFromArray(arr:string[]) { + try{ + let emergencyBrake = arr.length; + while (arr.length > 0 && emergencyBrake > 0) { + if (!arr[arr.length - 1] || arr[arr.length - 1] === '') { + arr.splice(arr.length - 1, 1); + } else { + break; + } + emergencyBrake--; + } + return arr; + }catch (e) { + return arr; + } + }; + static isAtLeastOneElementOfArrayInArray(firstArray:string[],secondArray:string[]){ try{ return firstArray.filter((el1:string) => secondArray.filter(el2 => el1===el2).length > 0).length > 0; diff --git a/dcm4chee-arc-ui2/src/app/widgets/dialogs/edit-patient/edit-patient.service.spec.ts b/dcm4chee-arc-ui2/src/app/widgets/dialogs/edit-patient/edit-patient.service.spec.ts index 93fcc858b6..a5cb02120f 100644 --- a/dcm4chee-arc-ui2/src/app/widgets/dialogs/edit-patient/edit-patient.service.spec.ts +++ b/dcm4chee-arc-ui2/src/app/widgets/dialogs/edit-patient/edit-patient.service.spec.ts @@ -45,7 +45,7 @@ describe('EditPatientService', () => { firstLevelCode:"00100024" }, TypeofPatientID:{ - text:"typeOfPID", + text:"TEXT", modelPath:"00100022.Value[0]", firstLevelCode:"00100022" } diff --git a/dcm4chee-arc-ui2/src/app/widgets/issuer-selector/issuer-selector.component.html b/dcm4chee-arc-ui2/src/app/widgets/issuer-selector/issuer-selector.component.html index 111829d122..3f71baedd4 100644 --- a/dcm4chee-arc-ui2/src/app/widgets/issuer-selector/issuer-selector.component.html +++ b/dcm4chee-arc-ui2/src/app/widgets/issuer-selector/issuer-selector.component.html @@ -1,37 +1,41 @@ -