Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (zotonic001@cvm)16> 08:57:19.983 [warning] [cvm] warning @ z_pivot_rsc:355 Pivot error 318: {'EXIT',
- {function_clause,
- [{z_memo,is_enabled,
- [{context,cvm,undefined,undefined,undefined,
- undefined,undefined,undefined,undefined,
- 'z_depcache$cvm','z_notifier$cvm',
- 'z_session_manager$cvm','z_dispatcher$cvm',
- 'z_template$cvm','z_scomp$cvm',
- 'z_dropbox$cvm','z_pivot_rsc$cvm',
- 'z_module_indexer$cvm',188509,<0.264.0>,
- {'z_db_pool$cvm',z_db_pgsql},
- en,<<"UTC">>,undefined,undefined,[],[],[],
- [],[],[],[],[]}],
- [{file,"src/support/z_memo.erl"},{line,57}]},
- {z_acl,rsc_visible,2,
- [{file,"src/support/z_acl.erl"},{line,98}]},
- {m_rsc,p,3,
- [{file,"src/models/m_rsc.erl"},{line,442}]},
- {mod_endo,do_custom_pivot,2,
- [{file,
- "/home/cvm/production/sites/cvm/modules/mod_endo/mod_endo.erl"},
- {line,277}]},
- {lists,map,2,[{file,"lists.erl"},{line,1224}]},
- {z_pivot_rsc,pivot_resource,2,
- [{file,"src/support/z_pivot_rsc.erl"},
- {line,483}]},
- {z_pivot_rsc,'-do_poll/1-lc$^0/1-0-',2,
- [{file,"src/support/z_pivot_rsc.erl"},
- {line,334}]},
- {z_db,'-transaction1/2-fun-0-',3,
- [{file,"src/db/z_db.erl"},{line,138}]}]}}
- init(Context) ->
- z_pivot_rsc:define_custom_pivot(endo_stills, [
- {study_rsc, "integer"},
- {study_id, "varchar"},
- {patient_rsc, "integer"},
- {raw_path, "varchar"}
- ], Context),
- z_pivot_rsc:define_custom_pivot(endo_videos, [
- {study_rsc, "integer"},
- {study_id, "varchar"},
- {patient_rsc, "integer"},
- {raw_path, "varchar"}
- ], Context),
- z_pivot_rsc:define_custom_pivot(endo_study, [
- {date_of_treatment, "timestamp with time zone"},
- {study_id, "varchar"},
- {accession_num, "varchar"},
- {patient_id, "varchar"},
- {patient_last, "varchar"},
- {patient_first, "varchar"},
- {patient_rsc, "integer"},
- {surgeon, "varchar"},
- {description, "varchar"}
- ], Context),
- z_pivot_rsc:define_custom_pivot(endo_patient, [
- {patient_last, "varchar"},
- {patient_first, "varchar"},
- {patient_id, "varchar"},
- {patient_dob, "timestamp with time zone"},
- {gender, "varchar"}
- ], Context),
- z_notifier:observe(custom_pivot, {?MODULE, do_custom_pivot}, Context).
- do_custom_pivot({custom_pivot, Id}, Context) ->
- case m_rsc:is_a(Id, Context) of
- [study] ->
- StudyDate = m_rsc:p(Id, date_of_treatment, Context),
- StudyId = m_rsc:p(Id, study_id, Context),
- Accession = m_rsc:p(Id, accession_num, Context),
- PtMrn = m_rsc:p(Id, patient_id, Context),
- PtLast = m_rsc:p(Id, patient_last, Context),
- PtFirst = m_rsc:p(Id, patient_first, Context),
- PtRsc = m_rsc:p(Id, patient_rsc, Context),
- Surgeon = m_rsc:p(Id, surgeon, Context),
- Description = m_rsc:p(Id, description, Context),
- {endo_study, [
- {date_of_treatment, StudyDate},
- {study_id, StudyId},
- {accession_num, Accession},
- {patient_last, PtLast},
- {patient_first, PtFirst},
- {patient_id, PtMrn},
- {patient_rsc, PtRsc},
- {surgeon, Surgeon},
- {description, Description}
- ]
- };
- [patient] ->
- LINE 277: PtLast = m_rsc:p(Id, patient_last, Context),
- PtFirst = m_rsc:p(Id, patient_first, Context),
- PtMrn = m_rsc:p(Id, patient_id, Context),
- PatientDob = m_rsc:p(Id, patient_dob, Context),
- Gender = m_rsc:p(Id, gender, Context),
- {endo_patient, [
- {patient_last, PtLast},
- {patient_first, PtFirst},
- {patient_id, PtMrn},
- {patient_dob, PatientDob},
- {gender, Gender}
- ]
- };
- [stills] ->
- StudyRsc = m_rsc:p(Id, study_rsc, Context),
- StudyId = m_rsc:p(Id, study_id, Context),
- RawPath = m_rsc:p(Id, raw_path, Context),
- PatientRsc = m_rsc:p(Id, patient_rsc, Context),
- {endo_stills, [
- {study_rsc, StudyRsc},
- {study_id, StudyId},
- {patient_rsc, PatientRsc},
- {raw_path, RawPath}
- ]
- };
- [videos] ->
- StudyRsc = m_rsc:p(Id, study_rsc, Context),
- StudyId = m_rsc:p(Id, study_id, Context),
- RawPath = m_rsc:p(Id, raw_path, Context),
- PatientRsc = m_rsc:p(Id, patient_rsc, Context),
- {endo_videos, [
- {study_rsc, StudyRsc},
- {study_id, StudyId},
- {patient_rsc, PatientRsc},
- {raw_path, RawPath}
- ]
- };
- _ ->
- none
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement