Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vinioliveira/c7db49ec1c45c9c8eb36039c4a530f7d to your computer and use it in GitHub Desktop.
Save vinioliveira/c7db49ec1c45c9c8eb36039c4a530f7d to your computer and use it in GitHub Desktop.
error.log.sample
Error: makeRequest - url=https://page-buider/queues/ status=200
{
_id: 5aac0de33d8848b755f7ee7f,
type: 'page',
name: 'case',
title: 'Case Management',
queue: 'cases',
allowedGroups:
[ 'Cognito_Admin',
'Cognito_CSStaff',
'Cognito_CSMgr',
'Cognito_CMStaff',
'Cognito_CMMgr',
'Cognito_FSStaff',
'Cognito_FSMgr',
'Cognito_BillDEMgr',
'Cognito_BillStaff',
'Cognito_BillMgr',
'Cognito_GCMgr',
'Cognito_MedCodStaff',
'Cognito_MedCodMgr' ],
providers:
[ { name: 'detailed-orders',
key: 'OrderId',
provides: 'order',
main: true,
preProcess: '(function(inOrder, _) {\n const order = _.cloneDeep(inOrder);\n const res = inOrder.Samples.reduce((obj, sample) => {\n sample.OrderChoices.forEach(orderChoice => {\n obj.FormattedSamples.push({\n SampleId: sample.SampleId,\n TestName: `${orderChoice.HostCode} - ${orderChoice.TestName}`,\n Status: orderChoice.OrderChoiceStatus,\n StatusName: orderChoice.OrderChoiceStatusName,\n CancelledReason: orderChoice.CancelledReason,\n });\n\n orderChoice.AOEs.forEach(AOE => {\n obj.FormattedAOEs.push({\n TestName: orderChoice.TestName,\n SampleId: sample.SampleId,\n HostCode: orderChoice.HostCode,\n AOE,\n });\n });\n });\n return obj;\n }, { FormattedSamples: [], FormattedAOEs: [] });\n\n order.FormattedSamples = res.FormattedSamples;\n order.FormattedAOEs = res.FormattedAOEs;\n return order;\n /* eslint-disable no-undef */\n})(data, _);\n',
postProcess: [Array],
fetchOnSave: true },
{ name: 'api-cases',
provides: 'case',
key: 'order.OrderId',
allowNullOrEmpty: true,
preProcess: '(function(inCase, _) {\n if (!inCase) {\n return;\n }\n\n const resCase = _.cloneDeep(inCase);\n\n const sortTerm = [n => new Date(n.ModifiedAt)];\n\n // sort case notes\n if (inCase.Notes && inCase.Notes.length) {\n const caseNotes = _.sortBy(inCase.Notes, sortTerm).reverse();\n resCase.Notes = caseNotes;\n }\n\n // sort subcases notes\n if (inCase.Children && inCase.Children.length) {\n inCase.Children.forEach((c, i) => {\n if (c.Notes && c.Notes.length) {\n const subcaseNotes = _.sortBy(c.Notes, sortTerm).reverse();\n resCase.Children[i].Notes = subcaseNotes;\n }\n });\n }\n\n return resCase;\n /* eslint-disable no-undef */\n})(data, _);\n',
postProcess: '(function(inCase, changedFields, originalData, _) {\n const data = _.merge({}, inCase, {\n _changedData: changedFields,\n _originalData: originalData,\n });\n return { data };\n /* eslint-disable no-undef */\n})(data, changedData, originalData, _);\n',
fetchOnSave: true },
{ name: 'api-sales-rep',
provides: 'salesReps',
key: 'order.Location.LocationId',
allowNullOrEmpty: true,
readonly: true },
{ name: 'api-location-alerts',
provides: 'locationAlerts',
key: 'order.Location.LocationKey',
allowNullOrEmpty: true,
readonly: true },
{ name: 'api-case-attachments',
provides: 'attachments',
readonly: true,
fetchOnSave: true,
preProcess: '(function(attachments, _) {\n attachments = attachments || [];\n\n const OrderAttachments = attachments.filter((att) => (\n att.metaInfo.OrderId && !att.metaInfo.SubCaseId && !att.metaInfo.NoteId\n ));\n\n const CaseAttachments = attachments.filter((att) => (\n att.metaInfo.OrderId && att.metaInfo.SubCaseId && !att.metaInfo.NoteId\n ));\n\n const NoteAttachments = attachments.filter((att) => (\n att.metaInfo.OrderId && att.metaInfo.SubCaseId && att.metaInfo.NoteId\n ));\n\n return {\n OrderAttachments,\n CaseAttachments,\n NoteAttachments,\n };\n /* eslint-disable no-undef */\n})(data, _);\n',
association: [Object] },
{ name: 'api-outgoing-faxes',
provides: 'faxHistory',
readonly: true,
association: [Object],
preProcess: '(function(data, _) {\n return data.rows;\n /* eslint-disable no-undef */\n})(data, _);\n' } ],
fields:
[ { field: 'case.Username',
type: 'hidden',
value: '${global.login.email}',
label: ' Username' },
{ field: 'case.OrderId',
type: 'hidden',
value: '${order.OrderId}',
label: ' Order ID' },
{ field: 'order.Username',
type: 'hidden',
value: '${global.login.email}',
label: ' Username' },
{ field: 'order.Patient.PatientId',
label: 'Patient ID',
missingInfo: true,
readonly: true,
metadata: [Object],
type: 'string' },
{ field: 'order.Patient.FirstName',
metadata: [Object],
missingInfo: true,
label: ' First Name',
type: 'string' },
{ field: 'order.Patient.MiddleName',
label: 'Middle',
metadata: [Object],
type: 'string' },
{ field: 'order.Patient.LastName',
metadata: [Object],
missingInfo: true,
label: ' Last Name',
type: 'string' },
{ field: 'order.Patient.Ssn',
label: 'SSN',
type: 'masked',
validFormat: '^\\d{3}-?\\d{2}-?\\d{4}$',
preFormat: 'value.replace(/[^0-9\\.]+/g, \'\')',
mask: '999-99-9999',
metadata: [Object] },
{ type: 'date',
label: 'DOB',
field: 'order.Patient.Dob',
missingInfo: true,
metadata: [Object] },
{ type: 'lookup',
label: 'Sex',
field: 'order.Patient.Sex',
missingInfo: true,
values: [Array],
metadata: [Object] },
{ type: 'lookup',
nested: true,
label: 'Ethnicity',
field: 'order.Patient.Ethnicity',
missingInfo: true,
source: 'mongo-ethnicity',
key: 'EthnicityId',
value: 'EthnicityName',
metadata: [Object] },
{ field: 'order.Patient.Address',
metadata: [Object],
missingInfo: true,
label: ' Address',
type: 'string' },
{ field: 'order.Patient.Address2',
metadata: [Object],
label: ' Address 2',
type: 'string' },
{ field: 'order.Patient.City',
metadata: [Object],
missingInfo: true,
label: ' City',
type: 'string' },
{ field: 'order.Patient.State',
metadata: [Object],
missingInfo: true,
label: ' State',
type: 'string' },
{ field: 'order.Patient',
label: 'Zip',
metadata: [Object],
type: 'lookup',
nested: true,
source: 'api-zipcode',
key: 'Zipcode',
value: 'ZipCode',
columns: [Array],
display: 'Zipcode',
filterFields: [Array],
keySet: 'RecordNumber',
set: 'order.Patient' },
{ field: 'order.Patient.Country',
metadata: [Object],
missingInfo: true,
label: ' Country',
type: 'string' },
{ field: 'order.Patient.Phone1',
type: 'masked',
validFormat: '^\\(?\\d{3}\\)?\\s?\\d{3}-?\\d{4}$',
preFormat: 'value.replace(/[^0-9\\.]+/g, \'\')',
mask: '(999) 999-9999',
metadata: [Object],
label: ' Phone 1' },
{ field: 'order.Patient.Phone2',
type: 'masked',
validFormat: '^\\(?\\d{3}\\)?\\s?\\d{3}-?\\d{4}$',
preFormat: 'value.replace(/[^0-9\\.]+/g, \'\')',
mask: '(999) 999-9999',
metadata: [Object],
label: ' Phone 2' },
{ field: 'order.Patient.EmailAddress',
metadata: [Object],
label: ' Email Address',
type: 'string' },
{ field: 'order.OrderId',
readonly: true,
metadata: [Object],
label: ' Order ID',
type: 'string' },
{ field: 'order.ConcatenatedSamples',
readonly: true,
label: 'Accession Number / Specimen ID',
metadata: [Object],
type: 'string' },
{ field: 'order.Location',
missingInfo: true,
type: 'lookup',
nested: true,
source: 'api-locations',
key: 'LocationKey',
value: 'Name',
metadata: [Object],
label: ' Location' },
{ field: 'order.Location.Phone',
label: 'Location Phone',
type: 'masked',
validFormat: '^\\(?\\d{3}\\)?\\s?\\d{3}-?\\d{4}$',
preFormat: 'value.replace(/[^0-9\\.]+/g, \'\')',
mask: '(999) 999-9999',
metadata: [Object] },
{ field: 'order.Location.LocationFax',
type: 'masked',
validFormat: '^\\(?\\d{3}\\)?\\s?\\d{3}-?\\d{4}$',
preFormat: 'value.replace(/[^0-9\\.]+/g, \'\')',
mask: '(999) 999-9999',
metadata: [Object],
label: ' Location Fax' },
{ field: 'order.Provider',
type: 'lookup',
nested: true,
missingInfo: true,
source: 'api-providers',
params: [Object],
key: 'ProviderKey',
value: 'Name',
metadata: [Object],
label: ' Provider' },
{ field: 'salesRep.SalesRepFirstName',
readonly: true,
metadata: [Object],
label: ' Sales Rep First Name',
type: 'string' },
{ field: 'salesRep.SalesRepLastName',
readonly: true,
metadata: [Object],
label: ' Sales Rep Last Name',
type: 'string' },
{ field: 'salesRep.SalesRepPhone',
readonly: true,
metadata: [Object],
validFormat: '^\\(?\\d{3}\\)?\\s?\\d{3}-?\\d{4}$',
preFormat: 'value.replace(/[^0-9\\.]+/g, \'\')',
mask: '(999) 999-9999',
label: ' Sales Rep Phone',
type: 'string' },
{ field: 'salesRep.SalesRepEmail',
readonly: true,
metadata: [Object],
label: ' Sales Rep Email',
type: 'string' },
{ field: 'locationAlert.CommentText',
type: 'text',
source: false,
label: 'Alerts',
readonly: true,
headerStyle: [Object],
style: [Object] },
{ field: 'order.OrderDate',
label: 'Order',
type: 'datetime',
readonly: true,
metadata: [Object] },
{ field: 'order.CollectionDateTime',
label: 'Collection',
type: 'datetime',
readonly: true,
metadata: [Object] },
{ field: 'order.ReceivedDateTime',
label: 'Received',
type: 'datetime',
readonly: true,
metadata: [Object] },
{ field: 'order.ReceivedDateTimeFormatted',
label: 'Received Date',
transient: true,
type: 'date',
readonly: true,
expr: 'data.order.ReceivedDateTime' },
{ field: 'order.OrderDateFormatted',
label: 'Order Date',
transient: true,
type: 'date',
readonly: true,
expr: 'data.order.OrderDate' },
{ field: 'order.CollectionDateTimeFormatted',
label: 'Collection Date',
transient: true,
type: 'date',
readonly: true,
expr: 'data.order.CollectionDateTime' },
{ field: 'order.NextFollowUp',
type: 'date',
readonly: true,
expr: '_.get(_.sortBy(data.case.Children, (c) => new Date(c.FollowUp)), \'0.FollowUp\')',
label: ' Next Follow Up' },
{ field: 'order.AssessionerFirstName',
label: 'Accessioner First Name',
type: 'string' },
{ field: 'order.AssessionerLastName',
label: 'Accessioner Last Name',
type: 'string' },
{ field: 'order.FormattedSample.SampleId',
label: 'Specimen ID',
type: 'text',
readonly: true,
source: false },
{ field: 'order.FormattedSample.TestName',
label: 'Order Choice',
type: 'text',
readonly: true,
source: false },
{ field: 'order.FormattedSample.StatusName',
label: 'Test Status',
type: 'text',
readonly: true,
source: false },
{ field: 'order.FormattedSample.CancelledReason',
label: 'Reason',
type: 'text',
readonly: true,
source: false },
{ field: 'order.FormattedAOE.TestName',
label: 'Test Name',
type: 'text',
source: false,
style: [Object],
readonly: true },
{ field: 'order.FormattedAOE.AOE.AskOnEnterQuestionText',
label: 'Clinical Info',
type: 'text',
source: false,
style: [Object],
readonly: true },
{ field: 'order.FormattedAOE.AOE.AskOnEnterQuestionAnswer',
label: 'Response',
type: 'dynamic-input',
source: 'api-aoe-types',
sourceKey: 'AskOnEnterQuestionId',
value: 'AskOnEnterQuestionAnswer',
mapTypes: [Array] },
{ field: 'order.ICDCode.IcdDef',
label: 'Diagnosis Code',
type: 'lookup',
nested: true,
source: 'api-icds',
key: 'IcdCode',
value: 'IcdCode',
columns: [Array],
display: 'IcdDesc',
set: 'order.ICDCodes.${row}.IcdDef' },
{ field: 'order.ICDCode.IcdDef.IcdDesc',
label: 'ICD-10 Description',
type: 'text',
elementStyle: [Object],
colSpan: 2,
source: false },
{ field: 'order.Insurances.PatientInsurance.FirstName',
label: 'First Name',
metadata: [Object],
type: 'string' },
{ field: 'order.Insurances.PatientInsurance.MiddleName',
label: 'Middle Name',
metadata: [Object],
type: 'string' },
{ field: 'order.Insurances.PatientInsurance.LastName',
label: 'Last Name',
metadata: [Object],
type: 'string' },
{ field: 'order.Insurances.PatientInsurance.Dob',
label: 'DOB',
type: 'date',
metadata: [Object] },
{ field: 'order.Insurances.PatientInsurance.Phone',
type: 'masked',
validFormat: '^\\(?\\d{3}\\)?\\s?\\d{3}-?\\d{4}$',
preFormat: 'value.replace(/[^0-9\\.]+/g, \'\')',
mask: '(999) 999-9999',
metadata: [Object],
label: ' Phone' },
{ field: 'order.Insurances.PatientInsurance.EmailAddress',
metadata: [Object],
label: ' Email Address',
type: 'string' },
{ field: 'order.Insurances.PatientInsurance.EffectiveDate',
label: 'Effective From',
metadata: [Object],
type: 'date' },
{ field: 'order.Insurances.PatientInsurance.ExpirationDate',
label: 'Effective To',
metadata: [Object],
type: 'date' },
{ field: 'order.Insurances.PatientInsurance.InsurancePlan.PlanId',
label: 'Insurance Code',
metadata: [Object],
type: 'string' },
{ field: 'order.Insurances.PayerAddress.PayerAddress1',
label: 'Address1',
metadata: [Object],
type: 'string' },
{ field: 'order.Insurances.PayerAddress.PayerAddress2',
label: 'Address2',
metadata: [Object],
type: 'string' },
{ field: 'order.Insurances.PayerAddress.PayerAddressCity',
label: 'City',
metadata: [Object],
type: 'string' },
{ field: 'order.Insurances.PayerAddress.PayerAddressState',
label: 'State',
metadata: [Object],
type: 'string' },
{ field: 'order.Insurances.PayerAddress.PayerAddressZip',
label: 'Zip',
metadata: [Object],
type: 'lookup',
nested: true,
source: 'api-zipcode',
key: 'Zipcode',
value: 'ZipCode',
useOwnValue: true,
columns: [Array],
filterFields: [Array],
keySet: 'RecordNumber',
set: '${fieldPrefix}PayerAddress' },
{ field: 'order.Insurances.PayerAddress.PayerAddressCountry',
label: 'Country',
metadata: [Object],
type: 'string' },
{ field: 'order.Insurances.PatientInsurance.GroupId',
label: 'Group Number',
metadata: [Object],
type: 'string' },
{ field: 'order.Insurances.PatientInsurance.PolicyId',
label: 'Policy Number',
metadata: [Object],
type: 'string' },
{ field: 'order.Insurances.Picker',
base: '${fieldPrefix}',
label: 'Address Id',
metadata: [Object],
type: 'lookup',
nested: true,
transient: true,
source: 'api-addresses-and-plans',
key: 'PayerAddressId.PayerAddressId',
value: 'PayerAddressId.PayerAddressId',
display: 'PayerAddressId.PayerAddressId',
columns: [Array],
useRow: true,
fullWidth: true,
set: [Object] },
{ field: 'order.Insurances.PatientInsurance.InsurancePlan',
label: 'Insurance Plan',
type: 'lookup',
nested: true,
source: 'api-insurance-plans',
key: 'InsurancePlanKey',
value: 'InsuredPlanName',
display: 'InsuredPlanName',
columns: [Array],
searchOnClient: false,
metadata: [Object],
resetValue: '${fieldPrefix}PayerAddress' },
{ field: 'order.Insurances.PatientInsurance.InsurancePlan.PlanId',
label: 'Insurance Code',
metadata: [Object],
type: 'lookup',
nested: true,
source: 'api-insurance-plans-by-plan-id',
firstOccurrence: true,
useOwnValue: true,
value: 'PlanId',
set: '${fieldPrefix}PatientInsurance.InsurancePlan',
resetValue: '${fieldPrefix}PayerAddress' },
{ field: 'order.Insurances.PatientInsurance.PlanNameOverride',
label: 'Insurance Plan Name',
metadata: [Object],
type: 'string' },
{ field: 'order.Insurances.PayerAddressDisabled',
label: 'Address Id',
readonly: true,
type: 'lookup',
nested: true,
source: 'api-payer-addresses',
transient: true },
{ field: 'order.Insurances.PayerAddress',
label: 'Address Id',
type: 'lookup',
nested: true,
source: 'api-payer-addresses',
key: 'PayerAddressId',
value: 'PayerAddressId',
display: 'PayerAddressId',
columns: [Array],
metadata: [Object],
emptyObject: [Object],
params: [Object],
resetValue: '${fieldPrefix}PayerAddress' },
{ field: 'order.Insurances.PatientInsurance.Relationship',
label: 'Relation to Subscriber',
type: 'lookup',
nested: true,
source: 'api-relationships',
key: 'RelationshipId',
value: 'RelationshipName',
display: 'RelationshipName',
metadata: [Object],
conditionalSet: [Object] },
{ field: 'order.Note.NoteText',
rows: 3,
multiLine: true,
metadata: [Object],
label: ' Note Text',
type: 'string' },
{ field: 'case.Children.SubCaseId',
readonly: true,
label: ' Sub Case ID',
type: 'string' },
{ field: 'case.Children.Status',
type: 'select',
values: [Array],
label: ' Status' },
{ field: 'case.Children.PrimaryType',
type: 'select',
values: [Array],
label: ' Primary Type' },
{ field: 'case.Children.Team',
type: 'select',
values: [Array],
setValue: [Object],
label: ' Team' },
{ field: 'case.Children.AssignedToDisabled',
label: 'Assigned To',
readonly: true,
type: 'string' },
{ field: 'case.Children.AssignedTo',
type: 'lookup',
source: 'ad-users',
params: [Object],
key: 'sAMAccountName',
value: 'cn',
label: ' Assigned To' },
{ field: 'case.Children.FollowUp',
type: 'date',
label: ' Follow Up' },
{ field: 'case.Children.Resolution',
rows: 3,
multiLine: true,
label: ' Resolution',
type: 'string' },
{ field: 'case.Children.MetaInfo.MissingFields',
readonly: 'true',
label: ' Missing Fields',
type: 'string' },
{ field: 'case.Children.Notes.CreatedBy',
readonly: true,
label: ' Created By',
type: 'string' },
{ field: 'case.Children.Notes.CreatedAt',
readonly: true,
type: 'date',
label: ' Created At' },
{ field: 'case.Children.Notes.ModifiedBy',
readonly: true,
label: ' Modified By',
type: 'string' },
{ field: 'case.Children.Notes.ModifiedAt',
readonly: true,
type: 'date',
label: ' Modified At' },
{ field: 'case.Children.Notes.Text',
rows: 3,
multiLine: true,
label: ' Text',
type: 'string' },
{ field: 'case.Children.Notes.Type',
type: 'select',
values: [Array],
label: ' Type' },
{ field: 'case.Children.MetaInfo.MissingField.Field',
type: 'lookup',
source: 'missing-fields',
key: 'field',
value: 'field',
columns: [Array],
display: 'field',
set: '${fieldPrefix}MetaInfo.MissingFields.${row}',
label: ' Field' },
{ field: 'case.Children.MetaInfo.SMIRF.Code',
label: 'SMIRF Code',
type: 'lookup',
nested: true,
source: 'api-smirfs',
key: 'Code',
value: 'Code',
columns: [Array],
display: 'Code',
useOwnValue: true,
set: '${fieldPrefix}MetaInfo.SMIRFs.${row}' },
{ field: 'case.Children.MetaInfo.SMIRF.Description',
type: 'text',
source: false,
label: ' Description' },
{ field: 'case.Children.MetaInfo.SMIRF.Urgent',
type: 'lookup',
values: [Array],
label: ' Urgent' },
{ field: 'faxHistory.faxNumber',
type: 'text',
source: false,
label: 'Fax Number' },
{ field: 'faxHistory.status',
type: 'text',
source: false,
label: 'Status' },
{ field: 'faxHistory.username',
type: 'text',
source: false,
label: 'Username' },
{ field: 'faxHistory.createdAt',
type: 'datetime',
readonly: true,
title: 'Created At',
label: false,
source: false } ],
display: [ [ [Object] ], [ [Object], [Object] ] ],
client:
Client {
url: 'mongodb://localhost:27017/config',
connection:
Db {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
s: [Object],
serverConfig: [Getter],
bufferMaxEntries: [Getter],
databaseName: [Getter] } } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment