Notice: Undefined variable: emp_first_name in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 107

Notice: Undefined variable: emp_last_name in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 107

Notice: Undefined variable: anrap in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 109

Notice: Undefined variable: lunarap in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 109

Notice: Undefined variable: from in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 180

Notice: Undefined variable: from in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 181

Notice: Undefined variable: from in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 182

Notice: Undefined variable: from in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 182

Notice: Undefined variable: cnpmedic in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 195

Notice: Undefined variable: raf_data in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 195

Warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "reg_asig_fmk" does not exist LINE 65: from reg_asig_fmk ^ in C:\Data\web\backup-si\simm\serv\db_pgsql.php on line 55

Query esuat: select raf_cnpmedic as cnpmedic, raf_fmk_id as id, raf_cnp as cnp, raf_carnet as carnet, case when raf_strain='t' then 'T' else 'F' end as strain, substr(raf_datan::text,1,4) || substr(raf_datan::text,6,2) || substr(raf_datan::text,9,2) as datan, raf_sex as sex, pat_last_name as nume, --raf_nume pat_first_name as prenume, --raf_prenume raf_adresa as adresa, raf_iesit as iesit, substr(raf_datai::text,1,4) || substr(raf_datai::text,6,2) || substr(raf_datai::text,9,2) as datai, substr(raf_datais::text,1,4) || substr(raf_datais::text,6,2) || substr(raf_datais::text,9,2) as datais, case when pat_pc_code='1' then 'COPIL' when pat_pc_code='2' then 'PLASAMENT' when pat_pc_code='3' then 'SALARIAT' when pat_pc_code='4' then 'PENSIONAR' when pat_pc_code='5' then 'PENS.MED.' when pat_pc_code='6' then 'SOMER' when pat_pc_code='7' then 'STUDENT' when pat_pc_code='8' then 'HANDICAPAT' when pat_pc_code='9' then 'COASIGURAT' when pat_pc_code='10' then 'PERSEC. POLITIC(L 189/2000)' when pat_pc_code='11' then 'VET/INV/VAD RAZ(L 44/1994)' when pat_pc_code='12' then 'REVOLUTIONAR(L 42/1999)' when pat_pc_code='55' then 'PENS. IMPOZIT PE VENIT 13' when pat_pc_code='14' then 'AJUTOR SOCIAL(L416/2001)' when pat_pc_code='15' then 'PRIVATI LIBERTATE' when pat_pc_code='16' then 'LIBER PROFESIONIST' when pat_pc_code='17' then 'AGRICULTORI' when pat_pc_code='18' then 'INST IN CENTRE DE INGR SI ASIS' when pat_pc_code='20' then 'TINERI CU VARSTA 18-26 FARA VENIT' when pat_pc_code='21' then 'ALTE(magist,judec,proc,etc)' when pat_pc_code='22' then 'GRAVIDE FARA VENIT' when pat_pc_code='23' then 'PERS DIN PROGR NAT.' when pat_pc_code='24' then 'PERS. RETURN SAU EXPULZATE' when pat_pc_code='25' then 'LUCRATORI MIGRANTI' when pat_pc_code='26' then 'PERS. CU VEN. DIN CHIRII' when pat_pc_code='27' then 'PERS. CU VEN. DIN DIVIDENDE' when pat_pc_code='28' then 'PERS. CU VEN. PROPR. INTEL.' when pat_pc_code='29' then 'PERS. CU VEN. (L 571/2003)' when pat_pc_code='F' then 'ASIG. FACULTATIV' when pat_pc_code='34' then 'PERS. IN CONC. DE CREST. COP.' when pat_pc_code='32' then 'ASIG.ART.259AL.9L 95/2006' when pat_pc_code='33' then 'STRAINI (L 122/2006)' when pat_pc_code='PDT' then 'ASIG. MINIMAL' when pat_pc_code='35' then 'ASIG. MINIMAL' else raf_categ end as categ, raf_ruda as ruda, raf_cnpco as cnpco, raf_cas as cas, case when (length(listaboli(raf_cnp))>5 or raf_nume != pat_last_name or raf_prenume != pat_first_name) then '' else '18991230' end as modtext, -- case when length(listaboli(raf_cnp))>5 or (pat_pc_code in ('5','8') and raf_categ not in ('PENS.MED.','HANDICAPAT'))then '' else '18991230' end as modcat, case when length(listaboli(raf_cnp))>5 or (patd_modif_date>'') then '' else '18991230' end as modcat, -- substr(raf_modtext::text,1,4) || substr(raf_modtext::text,6,2) || substr(raf_modtext::text,9,2) as modtext, -- substr(raf_modcat::text,1,4) || substr(raf_modcat::text,6,2) || substr(raf_modcat::text,9,2) as modcat, case when pat_pc_code='5' then patd_nrpens else raf_nrpens end as nrpens, case when pat_pc_code='5' and length(patd_dpens::text)>9 then substr(patd_dpens::text,1,4) || substr(patd_dpens::text,6,2) || substr(patd_dpens::text,9,2) else substr(raf_dpens::text,1,4) || substr(raf_dpens::text,6,2) || substr(raf_dpens::text,9,2) end as dpens, case when pat_pc_code='5' and length(patd_drpens::text)>9 then substr(patd_drpens::text,1,4) || substr(patd_drpens::text,6,2) || substr(patd_drpens::text,9,2) else substr(raf_drpens::text,1,4) || substr(raf_drpens::text,6,2) || substr(raf_drpens::text,9,2) end as drpens, -- raf_motive as motive null as motive, case when length(listaboli(raf_cnp))>5 then 'T' else 'F' end as cronic, listaboli(raf_cnp) as listaboli from reg_asig_fmk left join patients on pat_cnp=raf_cnp left join patients_data on patd_cnp=raf_cnp where raf_cnpmedic='' and raf_data=''
Warning: pg_num_fields(): supplied argument is not a valid PostgreSQL result resource in C:\Data\web\backup-si\simm\serv\db_pgsql.php on line 78

Notice: Undefined variable: arr in C:\Data\web\backup-si\simm\serv\db_pgsql.php on line 102

Warning: array_diff_key() [function.array-diff-key]: Argument #1 is not an array in C:\Data\web\backup-si\simm\serv\db_pgsql.php on line 102

Warning: pg_free_result(): supplied argument is not a valid PostgreSQL result resource in C:\Data\web\backup-si\simm\serv\db_pgsql.php on line 120

Notice: Undefined index: regasigfmk in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 198

Notice: Undefined variable: cnpmedic in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 221

Notice: Undefined variable: from in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 221

Notice: Undefined variable: to in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 226

Notice: Undefined variable: from in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 229

Notice: Undefined variable: from in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 230

Notice: Undefined variable: from in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 234

Notice: Undefined variable: to in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 243

Notice: Undefined variable: from in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 244

Notice: Undefined variable: cnpmedic in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 244

Notice: Undefined variable: from in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 244

Notice: Undefined variable: to in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 244

Notice: Undefined variable: from in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 244

Notice: Undefined variable: to in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 245

Warning: pg_query() [function.pg-query]: Query failed: ERROR: invalid input syntax for type date: "" LINE 42: ...emp_stencil_no and (emp_valid_to is null or emp_valid_to>'') ^ in C:\Data\web\backup-si\simm\serv\db_pgsql.php on line 55

Query esuat: select '' as cnpmedic, pat_cnp as cnp, '' as carnet, case when patd_strain=true then 'T' else 'F' end as strain, substr(pat_birth_date::text,1,4) || substr(pat_birth_date::text,6,2) || substr(pat_birth_date::text,9,2) as datan, case when pat_gender_code='1' then 'M' when pat_gender_code='2' then 'F' else '' end as sex, pat_last_name as nume, pat_first_name as prenume, case when length(dst_name)>0 then dst_name else '' end || ' ' || case when length(cit_name)>0 then cit_name else '' end || ' ' || case when addr_stt_code<>'undefined' and length(addr_stt_code)>0 then addr_stt_code|| ' ' else 'Str ' end || case when length(addr_st_name)>0 then addr_st_name else '' end || case when length(addr_street_no)>0 then ' nr ' || addr_street_no else '' end || case when length(addr_building)>0 then ' bl.'||addr_building else '' end || case when length(addr_entrance)>0 then ' sc.'|| addr_entrance else '' end || case when length(addr_floor)>0 then ' et.'||addr_floor else '' end || case when length(addr_apartment)>0 then ' ap.'||addr_apartment else '' end as adresa, case when patd_exit_date between '' and '' then '*' else '' end as iesit, substr(patd_entry_date::text,1,4) || substr(patd_entry_date::text,6,2) || substr(patd_entry_date::text,9,2) as datai, substr(patd_exit_date::text,1,4) || substr(patd_exit_date::text,6,2) || substr(patd_exit_date::text,9,2) as datais, -- substr(pc_description,1,30) as categ, pat_pc_code as categ, case when patr_is_co_insured='t' then case when patr_rel_code='S' then 'SOT' when patr_rel_code='P' then 'PARINTE' else '' end else '' end as ruda, case when patr_is_co_insured='t' then patr_cnp else '' end as cnpco, pat_ou_code as cas, case when length(listaboli(pat_cnp))>5 then '' else '18991230' end as modtext, case when length(listaboli(pat_cnp))>5 then '' else '18991230' end as modcat, patd_nrpens as nrpens, -- when pat_pc_code=[cod pensionar invaliditate] then datele se iau din documentul justificativ case when length(patd_dpens::text)=10 then substr(patd_dpens::text,1,4) || substr(patd_dpens::text,6,2) || substr(patd_dpens::text,9,2) else '18991230' end as dpens, case when length(patd_drpens::text)=10 then substr(patd_drpens::text,1,4) || substr(patd_drpens::text,6,2) || substr(patd_drpens::text,9,2) else '18991230' end as drpens, case when patd_exit_date between '' and '' then patd_motiv_iesire else null end as motive, case when length(listaboli(pat_cnp))>5 then 'T' else 'F' end as cronic, listaboli(pat_cnp) as listaboli from patients inner join patients_data on pat_cnp=patd_cnp -- left join person_categories on pc_code=pat_pc_code left join pat_relatives on patr_pat_cnp=pat_cnp left join addresses on pat_addr_id=addr_id left join districts on addr_dst_code=dst_code left join cities on addr_cit_code=cit_code left join employees on pat_emp_stencil_no=emp_stencil_no and (emp_valid_to is null or emp_valid_to>'') where emp_cnp='' and ((patd_entry_date between '' and '') or (patd_exit_date between '' and ''))
Warning: pg_num_fields(): supplied argument is not a valid PostgreSQL result resource in C:\Data\web\backup-si\simm\serv\db_pgsql.php on line 78

Notice: Undefined variable: arr in C:\Data\web\backup-si\simm\serv\db_pgsql.php on line 102

Warning: array_diff_key() [function.array-diff-key]: Argument #1 is not an array in C:\Data\web\backup-si\simm\serv\db_pgsql.php on line 102

Warning: pg_free_result(): supplied argument is not a valid PostgreSQL result resource in C:\Data\web\backup-si\simm\serv\db_pgsql.php on line 120

Fatal error: Call to undefined function dbase_create() in C:\Data\web\backup-si\simm\dbf\pac2dbf.php on line 266