correccion consulta informes - servicio-
This commit is contained in:
		| @ -54,14 +54,15 @@ defmodule Api.Downloadpdf do | ||||
|         informantphysician: u.username, | ||||
|         insurer: fragment("COALESCE(?, '')",s.insurer), | ||||
|         institutionname: s.institutionname, | ||||
|         referringphysiciansname: fragment("COALESCE(?, '')", s.referringphysiciansname) | ||||
|         referringphysiciansname: fragment("COALESCE(?, '')", s.referringphysiciansname), | ||||
|         servicio: fragment("COALESCE(?, '')", s.servicio) | ||||
|       } | ||||
|  | ||||
|  | ||||
|     result = Repo.one( | ||||
|       from q in subquery(query), | ||||
|       select: fragment("json_build_object('idstudyreport', ?, 'body', ?, 'idstudy', ?, 'accessionnumber', ?, 'patientname', ?, 'studydate', ?, 'studytime', ?, 'studydescription', ?, 'proceduredescription', ?, 'procedurecode', ?, 'modality', ?, 'patientid', ?, 'patientbirthdate', ?, 'fin_signature', ?, 'matricula_finalized', ?, 'informantphysician', ?, 'insurer', ?, 'institutionname', ?, 'referringphysiciansname', ?, 'printtemplate', ?)", | ||||
|         q.idstudyreport, q.body, q.idstudy, q.accessionnumber, q.patientname, q.studydate, q.studytime, q.studydescription, q.proceduredescription, q.procedurecode, q.modality, q.patientid, q.patientbirthdate, q.fin_signature, q.matricula_finalized, q.informantphysician, q.insurer, q.institutionname, q.referringphysiciansname, q.printtemplate | ||||
|       select: fragment("json_build_object('idstudyreport', ?, 'body', ?, 'idstudy', ?, 'accessionnumber', ?, 'patientname', ?, 'studydate', ?, 'studytime', ?, 'studydescription', ?, 'proceduredescription', ?, 'procedurecode', ?, 'modality', ?, 'patientid', ?, 'patientbirthdate', ?, 'fin_signature', ?, 'matricula_finalized', ?, 'informantphysician', ?, 'insurer', ?, 'institutionname', ?, 'referringphysiciansname', ?, 'printtemplate', ?, 'servicio', ?)", | ||||
|         q.idstudyreport, q.body, q.idstudy, q.accessionnumber, q.patientname, q.studydate, q.studytime, q.studydescription, q.proceduredescription, q.procedurecode, q.modality, q.patientid, q.patientbirthdate, q.fin_signature, q.matricula_finalized, q.informantphysician, q.insurer, q.institutionname, q.referringphysiciansname, q.printtemplate, q.servicio | ||||
|       ) | ||||
|     ) | ||||
|     Logger.info("#{inspect(result)}") | ||||
|  | ||||
		Reference in New Issue
	
	Block a user