dpc's notebooks

  • dedupe an array on keys - /dpc/dedupe-an-array-on-keys
    Last edited 2 years ago
    const data = [ { one: 1, two: 2, three: 3 }, { one: 1, two: 2, three: 3 }, { one: 2, two: 3, three: 4 }, { one: 3, two: 4, three: 5 } ] const keys = ['one', 'two', 'three'] const findUniqueKeys = p => p.one == curr.one && p.two == curr.two && p.three == curr.three // const findUniqueKeys = p => Object.keys(p).includes(keys) console.log( data.reduce((prev, curr, idx) => { const exists = prev.find(findUniqueKeys) if (!exists) { prev.push(curr) } return prev }, []) )
  • static vs dynamic obj chain accessing - /dpc/static-vs-dynamic-obj-chain-accessing
    Last edited 3 years ago
    // https://github.optum.com/paymentintegrity/artemis-ui/blob/e5c205e66b98f322897dddf9a3f2a74a1044a617/src/pages/investigation/subforms/investigation-results-form-converted.js#L168 // https://www.npmtrends.com/lodash.clonedeep-vs-clone-deep-vs-clone-vs-merge-deep-vs-rfdc // https://www.npmjs.com/package/clone // https://www.npmjs.com/package/lodash.clonedeep const { performance } = require('perf_hooks'); const perf = (op, fn) => { const t0 = performance.now(); const result = fn(); const ms = performance.now() - t0; return { meta: { perf: { message: `Execute ${op} in ${ms}ms`, ms } }, data: result }; }; const investigation = [ { "memberPolicies": [ { "rowId": 18599411, "businessRowId": 30, "memberDemographicRowId": 18599411, "inventoryGroupRowId": 1085902, "memberIdNumber": "KEN01376000908355338000", "galaxyMemberSystemId": "123656591", "fundingType": "F ", "feedback": null, "familyId": "00908355338", "divisionCode": "KEN ", "contractNumber": null, "cirrusMemberId": null, "alternateId": null, "subscriberStateProvinceTerritoryRowId": 25, "subscriberWorkPhone": null, "subscriberMiddleName": null, "subscriberLastName": "CHANG", "subscriberId": "KEN01376000908355338000", "subscriberHomePhone": "5734456568 ", "subscriberGender": "M", "subscriberFirstName": "CHENG-HSIUNG", "subscriberDateOfBirth": "1945-08-07T00:00:00", "spouseSignificantOtherId": null, "spouseSignificantOtherGroupNumber": null, "spouseSignificantOtherGroupName": null, "spouseSignificantOtherEmployerPhone": null, "retireeExpirationDate": null, "retireeEffectiveDate": null, "relationshipCode": null, "memberStipulations": null, "memberPolicyEffectiveStartDate": "2020-12-01T00:00:00", "memberPolicyEffectiveEndDate": "2020-12-31T00:00:00", "memberClaimSpend": 44653.65, "medicalFinancialProduct": "01003", "medicalLegalEntity": "01385", "lineOfBusiness": "MCR ", "isRetiree": false, "groupCode": "KEN013760", "productId": null, "subGroupId": "KEN013760", "subGroupName": "UNIVERSITY OF MISSOURI", "accidental": false, "commercialRxCoverage": false, "hasDental": false, "medicare": false, "otherInsurance": false, "studentPolicyCoordinates": false, "memberDemographic": { "rowId": 18599411, "dateOfBirth": "1945-08-07T00:00:00", "emailAddress": null, "firstName": "CHENG-HSIUNG", "middleName": null, "lastName": "CHANG", "gender": "M", "lastFourOfSocialSecurityNumber": "1823", "lastFourOfSubscriberSocialSecurityNumber": "1823", "memberCellPhone": null, "suffix": null, "developerNotes": null, "dateOfDeath": null, "preferredContactMethod": null, "logicalDelete": false }, "cdbVerifications": [], "cobras": [], "cosmosMemberPolicyInvestigations": [], "cspFacetsMemberPolicyInvestigations": [], "hospices": [], "investigationResults": [], "memberFamilyDynamics": [ { "memberPolicyRowId": 18599411, "subscriberCustodialParent": false, "subscriberBiologicalParent": false, "responsibleParty": null, "otherInsurancePolicyHolderCustodialParent": false, "otherInsurancePolicyHolderBiologicalParent": false, "jointPhysicalCustody": false, "jointLegalCustody": false, "familyDynamics": false, "contactSuccessful": false, "applicableCourtDecree": false } ], "otherPolicyAccidentalCoverages": [], "otherPolicyCommercialCoverages": [], "otherPolicyDentalCoverages": [], "otherPolicyMedicareCoverages": [], "otherPolicyMedicareEligibles": [ { "rowId": 8, "memberPolicyRowId": 18599411, "startDate": "2021-02-16T06:11:13.447", "endDate": "2022-02-16T06:11:13.447", "enrollmentStartDate": "2021-02-16T06:11:13.447", "enrollmentEndDate": "2022-02-16T06:11:13.447", "partType": "A" }, { "rowId": 9, "memberPolicyRowId": 18599411, "startDate": "2021-02-16T06:11:16.5", "endDate": "2022-02-16T06:11:16.5", "enrollmentStartDate": "2021-02-16T06:11:16.5", "enrollmentEndDate": "2022-02-16T06:11:16.5", "partType": "A" } ], "otherPolicyMedicareEntitlements": [ { "rowId": 14, "memberPolicyRowId": 18599411, "startDate": "2021-02-16T06:11:13.447", "endDate": "2022-02-16T06:11:13.447", "eligibilityType": "Age" }, { "rowId": 15, "memberPolicyRowId": 18599411, "startDate": "2021-02-16T06:11:16.5", "endDate": "2022-02-16T06:11:16.5", "eligibilityType": "Age" } ], "otherPolicyPharmacyCoverages": [] } ], "inventories": [ { "rowId": 27716599, "inventoryStatusRowId": 100, "businessRowId": 30, "workflowRowId": 3783, "importDate": "2020-12-19T14:10:09.037", "wowuserRowId": 1002583, "inventoryMultipleRowId": 1, "assignedDate": "2021-01-04T12:47:02.803", "pendedDate": "2021-05-06T07:59:24.803", "completionDate": null, "memberIdNumber": "KEN01376000908355338000", "inventoryGroupRowId": 1085902, "familyId": "00908355338", "medicarePolicyNumber": null, "otherInsurancePolicyNumber": null, "pharmacyPolicy": null, "otherInsurancePolicyHolder": null, "otherInsuranceOtherEmployeeId": null, "otherInsuranceMemberSystemId": null, "coreSystemUpdateStatusRowId": 0, "coreSystemWowuser": null, "coreSystemCompletionDate": null, "coreSystemPendDate": null, "dentalCarrier": null, "coreSystemUniqueIdentifier": null, "authorizationNumber": null, "dollarAmount": 1000, "providerNumber": null, "providerName": null, "groupCode": "KEN013760", "medicareAeffectiveDate": null, "medicareAendDate": null, "medicareBeffectiveDate": null, "medicareBendDate": null, "medicareDeffectiveDate": null, "medicareDendDate": null, "otherInsuranceCarrierCode": null, "otherInsuranceCarrierName": null, "otherInsurancePhone": null, "pharmacyCarrierName": null, "otherCarrierEffDate": null, "otherCarrierEndDate": null, "pharmacyEffectiveStartDate": null, "pharmacyEffectiveEndDateAllNull": null, "referenceNumber": null, "claimNumber": "935203533555800", "dentalCoverageEffectiveDate": null, "dentalCoverageTerminationDate": null, "dentalCoverageCoordinationOfBenefitEffectiveDate": null, "dentalCoverageCoordinationOfBenefitEndDate": null, "cobraTerminationDate": null, "retireeEffectiveDate": null, "retireeExpirationDate": null, "externalNotes": "", "internalNotes": "CLAIM ID: 935203533555800 BILLED AMOUNT: 379073.72", "wowautomatedInvestigation": false, "memberRowId": 18599411, "courtOrdered": false, "visionIndicator": false, "behavioralHealthIndicator": false, "autismIndicator": false, "naiccode": null, "otherInsuranceGroupNumber": null, "autoWorkersCompensationCarrierName": null, "type": null, "dateOfAccident": null, "diagnosis": null, "accidentCarrierCode": null, "jitClaimNumber": null, "jitBilledCharges": null, "inventoryGroupReviewRowId": null, "inventorySourceID": 0, "inventorySourceDescription": null, "rpaWorkedStatus": null, "businessRow": { "rowId": 30, "businessName": "United Healthcare", "platformDelete": null, "clientDelete": null, "clientRowId": 4, "platformRowId": 3, "addDate": "2010-05-03T13:41:51.737", "addBy": 237, "changeDate": "2018-12-26T07:32:41.767", "changeBy": 19, "effectiveDate": "2010-05-03T13:41:51.737", "logicalDelete": false, "developerNotes": "Add Client * DataMod WI #27117", "writeToMemberAuthority": false, "jitageOutDuration": 5, "segmentName": "United Healthcare Medicare Advantage", "detailBusinessName": null, "businessNameWithId": null }, "workflowRow": { "rowId": 3783, "workflowName": "High Dollar UFE Claim ", "workflowDescription": "Standard", "workflowSourceId": 16, "workflowSourceIddescription": "Algorithm Commercial Claims (P)", "businessId": 30, "businessName": "United Healthcare", "statusId": 7, "insuranceType": "OI ", "insuranceSubType": 25, "insuranceSubTypeService": 20, "updatePotential": 0.008, "turnAroundTimeRequired": false, "monthlyVolumeEstimate": 50, "issuesPerHour": 3.7, "allowStartTime": "2015-02-03T05:00:00", "allowEndTime": "2015-02-03T20:00:00", "allowWeekday": true, "allowWeekend": true, "allowRPA": false, "frequency": "Weekly ", "peot1AllNull": null, "peot2": null, "peoi1AllNull": null, "peoi2AllNull": null, "peod1AllNull": null, "peod2AllNull": null, "workflowGroupingRowId": 3, "addDate": "2015-02-03T16:17:41.293", "addBy": 237, "changeDate": "2021-05-13T06:31:30.69", "changeBy": 999999, "fileLoadedName": null, "resubmissionException": "Y", "resubmissionRule": 180, "proactiveReactive": "P", "newProductionIdsPerHour": null, "effectiveDate": "2015-02-03T16:17:41.293", "logicalDelete": false, "developerNotes": "Data Mod for US364078 * *DataMod INC5850213 * *DataMod INC6188528 * *DataMod INC6570132 * *Incident INC8563287 * *Incident INC8563287 * *Incident INC8563287* *DataMod INC9279077* *DataMod INC15422284", "isEmployeeImport": false, "totalMedicalExpenses": 4504048.61, "countOfCompletedRecords": 297, "turnAroundTimeInDays": 30, "priorityOutOfSync": false, "agingOfId": null, "cobprogram": 31, "market": null, "roleDelineation": true, "isEmployeeProtected": false, "newborn": false, "outputRowId": 1, "isMedicare": false, "investigationGuideTypeRowId": -1, "workflowPrioritization": null, "knowledgeCategoryRowId": null, "addByName": null, "changeByName": null, "workflowAnalytics": [], "workflowStateProvinceTerritory": [] }, "wowUserRow": { "rowId": 1002583, "userName": "dchan5", "wowuserAccessRowId": 0, "employeeId": "001615853 ", "firstName": "DANIEL", "middleName": null, "lastName": "CHAN", "title": "Dev", "emailAddress": "daniel.chan@optum.com", "employeeManagerId": 0, "phoneNumber": " ", "extension": null, "jackNumber": null, "mailStopCode": null, "assetTagNumber": null, "scheduledStartTimeDelete": null, "scheduledStopTimeDelete": null, "projectHoursPerDay": 0, "overTimeAllowed": true, "numberOfPendsAllowed": 25, "pendTurnaroundTime": 5, "allowedPiecesOfWork": 1, "currentlyAvailable": 1, "reassignAllowed": "Y", "maximumNoResolutionPerDay": 0, "performanceStatus": null, "userCobstartDate": null, "effectiveDate": "2020-11-05T08:24:37.36", "logicalDelete": false, "developerNotes": null, "lastActivityDate": null, "scheduledStart": "1900-01-01T00:01:00", "scheduledStop": "1900-01-01T23:59:00", "wowuserPerformanceStatusRowId": null, "investigationGuideExempt": false, "justInTimeInvestigator": false, "retroInvestigator": false, "isRobotProcessAutomationUser": false }, "fileAttachments": [], "ecrsSubmissions": [], "studentSurveyResults": [], "cosmosMemberPolicyInvestigation": [], "cspFacetsMemberPolicyInvestigation": [], "inventoryAccessory": [ { "rowId": 15603037, "inventoryRowId": 27716599, "workflowRowId": 3783, "totalPriority": 186, "highestPriorityOverride": false, "highestPriorityOverrideDate": null, "priorityOutOfSync": false, "effectiveDate": "2020-12-19T14:10:09.083", "logicalDelete": false, "developerNotes": null, "partitionIndex": null, "maintenancePriority": 0, "cobscorePriority": 0, "jitpriority": null, "mlscorePriority": 1 } ], "inventoryGroupingCarrier": [], "inventoryGroupingFamily": [ { "rowId": 7480539, "inventoryRowId": 27716599, "groupingNumber": 4597449, "effectiveDate": "2021-05-11T14:36:48.947", "logicalDelete": null, "developerNotes": null, "familyId": "00908355338" } ], "investigationResult": [], "investigationSourceSystemErrorTracking": [], "investigationErrorTracking": [], "phoneLog": [], "outsourcedInvestigation": [], "inventoryStatusDescription": null, "inventoryMultipleDescription": null, "businessDescription": null, "wowUserDescription": null, "coreSystemUpdateStatusDescription": null, "coreSystemWowUserDescription": null } ] } ]; const pathify = obj => { const result = {}; const dig = (obj, chain = '') => { if (typeof obj !== 'object') { return; } if (Array.isArray(obj)) { dig( obj[0], chain ? `${chain}[0]` : '' ); } const keys = Object.keys(obj); for (let i = 0; i < keys.length; i++) { const propertyName = keys[i]; const propertyValue = obj[propertyName]; const path = chain ? `${chain}.${propertyName}` : propertyName; if ( typeof propertyValue !== 'object' || Array.isArray(propertyValue) === false ) { result[propertyName] = path; continue; } dig(propertyValue, path); } }; dig(obj); return result; }; const pathsResult = perf( 'pathify(investigation)', () => pathify(investigation) ); const paths = pathsResult.data; const fields = Object.keys(paths); const fieldCount = fields.length; console.log(fieldCount); console.log(pathsResult.meta.perf.message); console.log(paths); const propsIndex = 0; const currentInvestigationResultsIndex = 0; const getFieldName = field => `memberPolicies[${propsIndex}].investigationResults[${currentInvestigationResultsIndex}].${field}`; const getFieldsStatically = () => { for (let i = 0; i < fieldCount; i++) { getFieldName(fields[i]); } }; const getFieldsStaticallyResults = perf( 'getFieldsStatically()', () => getFieldsStatically() ); console.log(getFieldsStaticallyResults.meta.perf.message); const getFieldsDynamically = () => { for (let i = 0; i < fieldCount; i++) { paths[fields[i]]; } }; const getFieldsDynamicallyResults = perf( 'getFieldsDynamically()', () => getFieldsDynamically() ); console.log(getFieldsDynamicallyResults.meta.perf.message); console.log( `Total time saved by pathify() perf is ${ (getFieldsStaticallyResults.meta.perf.ms - getFieldsDynamicallyResults.meta.perf.ms) }ms` ); console.log( `Total time saved by pathify() perf per call is ${ (getFieldsStaticallyResults.meta.perf.ms - getFieldsDynamicallyResults.meta.perf.ms) / fieldCount }ms` );
  • lodash.clonedeep vs clone - /dpc/lodash-clonedeep-vs-clone
    Last edited 3 years ago
    // https://www.npmtrends.com/lodash.clonedeep-vs-clone-deep-vs-clone-vs-merge-deep-vs-rfdc // https://www.npmjs.com/package/clone // https://www.npmjs.com/package/lodash.clonedeep const lodashCloneDeep = require('lodash.clonedeep'); const clone = require('clone'); const { performance } = require('perf_hooks'); const perf = (op, fn) => { const t0 = performance.now(); const result = fn(); console.log(`Execute ${op} in ${performance.now() - t0}ms`); return result; }; const investigation = [ { "memberPolicies": [ { "rowId": 18599411, "businessRowId": 30, "memberDemographicRowId": 18599411, "inventoryGroupRowId": 1085902, "memberIdNumber": "KEN01376000908355338000", "galaxyMemberSystemId": "123656591", "fundingType": "F ", "feedback": null, "familyId": "00908355338", "divisionCode": "KEN ", "contractNumber": null, "cirrusMemberId": null, "alternateId": null, "subscriberStateProvinceTerritoryRowId": 25, "subscriberWorkPhone": null, "subscriberMiddleName": null, "subscriberLastName": "CHANG", "subscriberId": "KEN01376000908355338000", "subscriberHomePhone": "5734456568 ", "subscriberGender": "M", "subscriberFirstName": "CHENG-HSIUNG", "subscriberDateOfBirth": "1945-08-07T00:00:00", "spouseSignificantOtherId": null, "spouseSignificantOtherGroupNumber": null, "spouseSignificantOtherGroupName": null, "spouseSignificantOtherEmployerPhone": null, "retireeExpirationDate": null, "retireeEffectiveDate": null, "relationshipCode": null, "memberStipulations": null, "memberPolicyEffectiveStartDate": "2020-12-01T00:00:00", "memberPolicyEffectiveEndDate": "2020-12-31T00:00:00", "memberClaimSpend": 44653.65, "medicalFinancialProduct": "01003", "medicalLegalEntity": "01385", "lineOfBusiness": "MCR ", "isRetiree": false, "groupCode": "KEN013760", "productId": null, "subGroupId": "KEN013760", "subGroupName": "UNIVERSITY OF MISSOURI", "accidental": false, "commercialRxCoverage": false, "hasDental": false, "medicare": false, "otherInsurance": false, "studentPolicyCoordinates": false, "memberDemographic": { "rowId": 18599411, "dateOfBirth": "1945-08-07T00:00:00", "emailAddress": null, "firstName": "CHENG-HSIUNG", "middleName": null, "lastName": "CHANG", "gender": "M", "lastFourOfSocialSecurityNumber": "1823", "lastFourOfSubscriberSocialSecurityNumber": "1823", "memberCellPhone": null, "suffix": null, "developerNotes": null, "dateOfDeath": null, "preferredContactMethod": null, "logicalDelete": false }, "cdbVerifications": [], "cobras": [], "cosmosMemberPolicyInvestigations": [], "cspFacetsMemberPolicyInvestigations": [], "hospices": [], "investigationResults": [], "memberFamilyDynamics": [ { "memberPolicyRowId": 18599411, "subscriberCustodialParent": false, "subscriberBiologicalParent": false, "responsibleParty": null, "otherInsurancePolicyHolderCustodialParent": false, "otherInsurancePolicyHolderBiologicalParent": false, "jointPhysicalCustody": false, "jointLegalCustody": false, "familyDynamics": false, "contactSuccessful": false, "applicableCourtDecree": false } ], "otherPolicyAccidentalCoverages": [], "otherPolicyCommercialCoverages": [], "otherPolicyDentalCoverages": [], "otherPolicyMedicareCoverages": [], "otherPolicyMedicareEligibles": [ { "rowId": 8, "memberPolicyRowId": 18599411, "startDate": "2021-02-16T06:11:13.447", "endDate": "2022-02-16T06:11:13.447", "enrollmentStartDate": "2021-02-16T06:11:13.447", "enrollmentEndDate": "2022-02-16T06:11:13.447", "partType": "A" }, { "rowId": 9, "memberPolicyRowId": 18599411, "startDate": "2021-02-16T06:11:16.5", "endDate": "2022-02-16T06:11:16.5", "enrollmentStartDate": "2021-02-16T06:11:16.5", "enrollmentEndDate": "2022-02-16T06:11:16.5", "partType": "A" } ], "otherPolicyMedicareEntitlements": [ { "rowId": 14, "memberPolicyRowId": 18599411, "startDate": "2021-02-16T06:11:13.447", "endDate": "2022-02-16T06:11:13.447", "eligibilityType": "Age" }, { "rowId": 15, "memberPolicyRowId": 18599411, "startDate": "2021-02-16T06:11:16.5", "endDate": "2022-02-16T06:11:16.5", "eligibilityType": "Age" } ], "otherPolicyPharmacyCoverages": [] } ], "inventories": [ { "rowId": 27716599, "inventoryStatusRowId": 100, "businessRowId": 30, "workflowRowId": 3783, "importDate": "2020-12-19T14:10:09.037", "wowuserRowId": 1002583, "inventoryMultipleRowId": 1, "assignedDate": "2021-01-04T12:47:02.803", "pendedDate": "2021-05-06T07:59:24.803", "completionDate": null, "memberIdNumber": "KEN01376000908355338000", "inventoryGroupRowId": 1085902, "familyId": "00908355338", "medicarePolicyNumber": null, "otherInsurancePolicyNumber": null, "pharmacyPolicy": null, "otherInsurancePolicyHolder": null, "otherInsuranceOtherEmployeeId": null, "otherInsuranceMemberSystemId": null, "coreSystemUpdateStatusRowId": 0, "coreSystemWowuser": null, "coreSystemCompletionDate": null, "coreSystemPendDate": null, "dentalCarrier": null, "coreSystemUniqueIdentifier": null, "authorizationNumber": null, "dollarAmount": 1000, "providerNumber": null, "providerName": null, "groupCode": "KEN013760", "medicareAeffectiveDate": null, "medicareAendDate": null, "medicareBeffectiveDate": null, "medicareBendDate": null, "medicareDeffectiveDate": null, "medicareDendDate": null, "otherInsuranceCarrierCode": null, "otherInsuranceCarrierName": null, "otherInsurancePhone": null, "pharmacyCarrierName": null, "otherCarrierEffDate": null, "otherCarrierEndDate": null, "pharmacyEffectiveStartDate": null, "pharmacyEffectiveEndDateAllNull": null, "referenceNumber": null, "claimNumber": "935203533555800", "dentalCoverageEffectiveDate": null, "dentalCoverageTerminationDate": null, "dentalCoverageCoordinationOfBenefitEffectiveDate": null, "dentalCoverageCoordinationOfBenefitEndDate": null, "cobraTerminationDate": null, "retireeEffectiveDate": null, "retireeExpirationDate": null, "externalNotes": "", "internalNotes": "CLAIM ID: 935203533555800 BILLED AMOUNT: 379073.72", "wowautomatedInvestigation": false, "memberRowId": 18599411, "courtOrdered": false, "visionIndicator": false, "behavioralHealthIndicator": false, "autismIndicator": false, "naiccode": null, "otherInsuranceGroupNumber": null, "autoWorkersCompensationCarrierName": null, "type": null, "dateOfAccident": null, "diagnosis": null, "accidentCarrierCode": null, "jitClaimNumber": null, "jitBilledCharges": null, "inventoryGroupReviewRowId": null, "inventorySourceID": 0, "inventorySourceDescription": null, "rpaWorkedStatus": null, "businessRow": { "rowId": 30, "businessName": "United Healthcare", "platformDelete": null, "clientDelete": null, "clientRowId": 4, "platformRowId": 3, "addDate": "2010-05-03T13:41:51.737", "addBy": 237, "changeDate": "2018-12-26T07:32:41.767", "changeBy": 19, "effectiveDate": "2010-05-03T13:41:51.737", "logicalDelete": false, "developerNotes": "Add Client * DataMod WI #27117", "writeToMemberAuthority": false, "jitageOutDuration": 5, "segmentName": "United Healthcare Medicare Advantage", "detailBusinessName": null, "businessNameWithId": null }, "workflowRow": { "rowId": 3783, "workflowName": "High Dollar UFE Claim ", "workflowDescription": "Standard", "workflowSourceId": 16, "workflowSourceIddescription": "Algorithm Commercial Claims (P)", "businessId": 30, "businessName": "United Healthcare", "statusId": 7, "insuranceType": "OI ", "insuranceSubType": 25, "insuranceSubTypeService": 20, "updatePotential": 0.008, "turnAroundTimeRequired": false, "monthlyVolumeEstimate": 50, "issuesPerHour": 3.7, "allowStartTime": "2015-02-03T05:00:00", "allowEndTime": "2015-02-03T20:00:00", "allowWeekday": true, "allowWeekend": true, "allowRPA": false, "frequency": "Weekly ", "peot1AllNull": null, "peot2": null, "peoi1AllNull": null, "peoi2AllNull": null, "peod1AllNull": null, "peod2AllNull": null, "workflowGroupingRowId": 3, "addDate": "2015-02-03T16:17:41.293", "addBy": 237, "changeDate": "2021-05-13T06:31:30.69", "changeBy": 999999, "fileLoadedName": null, "resubmissionException": "Y", "resubmissionRule": 180, "proactiveReactive": "P", "newProductionIdsPerHour": null, "effectiveDate": "2015-02-03T16:17:41.293", "logicalDelete": false, "developerNotes": "Data Mod for US364078 * *DataMod INC5850213 * *DataMod INC6188528 * *DataMod INC6570132 * *Incident INC8563287 * *Incident INC8563287 * *Incident INC8563287* *DataMod INC9279077* *DataMod INC15422284", "isEmployeeImport": false, "totalMedicalExpenses": 4504048.61, "countOfCompletedRecords": 297, "turnAroundTimeInDays": 30, "priorityOutOfSync": false, "agingOfId": null, "cobprogram": 31, "market": null, "roleDelineation": true, "isEmployeeProtected": false, "newborn": false, "outputRowId": 1, "isMedicare": false, "investigationGuideTypeRowId": -1, "workflowPrioritization": null, "knowledgeCategoryRowId": null, "addByName": null, "changeByName": null, "workflowAnalytics": [], "workflowStateProvinceTerritory": [] }, "wowUserRow": { "rowId": 1002583, "userName": "dchan5", "wowuserAccessRowId": 0, "employeeId": "001615853 ", "firstName": "DANIEL", "middleName": null, "lastName": "CHAN", "title": "Dev", "emailAddress": "daniel.chan@optum.com", "employeeManagerId": 0, "phoneNumber": " ", "extension": null, "jackNumber": null, "mailStopCode": null, "assetTagNumber": null, "scheduledStartTimeDelete": null, "scheduledStopTimeDelete": null, "projectHoursPerDay": 0, "overTimeAllowed": true, "numberOfPendsAllowed": 25, "pendTurnaroundTime": 5, "allowedPiecesOfWork": 1, "currentlyAvailable": 1, "reassignAllowed": "Y", "maximumNoResolutionPerDay": 0, "performanceStatus": null, "userCobstartDate": null, "effectiveDate": "2020-11-05T08:24:37.36", "logicalDelete": false, "developerNotes": null, "lastActivityDate": null, "scheduledStart": "1900-01-01T00:01:00", "scheduledStop": "1900-01-01T23:59:00", "wowuserPerformanceStatusRowId": null, "investigationGuideExempt": false, "justInTimeInvestigator": false, "retroInvestigator": false, "isRobotProcessAutomationUser": false }, "fileAttachments": [], "ecrsSubmissions": [], "studentSurveyResults": [], "cosmosMemberPolicyInvestigation": [], "cspFacetsMemberPolicyInvestigation": [], "inventoryAccessory": [ { "rowId": 15603037, "inventoryRowId": 27716599, "workflowRowId": 3783, "totalPriority": 186, "highestPriorityOverride": false, "highestPriorityOverrideDate": null, "priorityOutOfSync": false, "effectiveDate": "2020-12-19T14:10:09.083", "logicalDelete": false, "developerNotes": null, "partitionIndex": null, "maintenancePriority": 0, "cobscorePriority": 0, "jitpriority": null, "mlscorePriority": 1 } ], "inventoryGroupingCarrier": [], "inventoryGroupingFamily": [ { "rowId": 7480539, "inventoryRowId": 27716599, "groupingNumber": 4597449, "effectiveDate": "2021-05-11T14:36:48.947", "logicalDelete": null, "developerNotes": null, "familyId": "00908355338" } ], "investigationResult": [], "investigationSourceSystemErrorTracking": [], "investigationErrorTracking": [], "phoneLog": [], "outsourcedInvestigation": [], "inventoryStatusDescription": null, "inventoryMultipleDescription": null, "businessDescription": null, "wowUserDescription": null, "coreSystemUpdateStatusDescription": null, "coreSystemWowUserDescription": null } ] } ]; perf( 'lodashCloneDeep(investigation)', () => lodashCloneDeep(investigation) ); perf( 'clone(investigation)', () => clone(investigation) );
  • Practical Refactoring 1 - /dpc/practical-refactoring-1
    Last edited 3 years ago
    // https://github.optum.com/paymentintegrity/artemis-ui/pull/1038/files
  • safe error handling - /dpc/safe-error-handling
    Last edited 3 years ago
    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects#error_objects // Global // Local
  • Loops and Iteration - /dpc/loops-and-iteration
    Last edited 3 years ago
    // https://github.optum.com/paymentintegrity/artemis-ui/blob/eeb8f68541373dd83affc37d3f1ed1dd84d74ea9/src/pages/investigation-page-converted.js#L717
  • Switch vs If - /dpc/switch-vs-if
    Last edited 3 years ago
    // https://www.oreilly.com/library/view/high-performance-javascript/9781449382308/ch04.html#if-else_versus_switch // https://github.optum.com/paymentintegrity/artemis-ui/blob/f0515fe9c99f163dcc972c122fdca1b619a0552c/src/pages/investigation/models/investigation-form-model.js#L345
  • lodash omit - /dpc/lodash-omit
    Last edited 3 years ago
    // https://github.optum.com/paymentintegrity/artemis-ui/blob/d4062562323fdc904216601b06fce7eab44cb7b2/src/pages/investigation-page-converted.js#L490 // https://lodash.com/docs/4.17.15#omit
  • Short Circuits - /dpc/short-circuits
    Last edited 3 years ago
    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND // https://stackoverflow.com/questions/48433008/js-es6-destructuring-of-undefined/48433029 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR#short-circuit_evaluation
  • Option Chaining - /dpc/option-chaining
    Last edited 3 years ago
    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining