rep_opd_visit

Update Delete

ID22
Parent ID8
Table Namerep_opd_visit
Titlerep_opd_visit
Description
Script#SQL_OPTIONS#
PROVIDERS=2
PROVIDER1=JHCIS
PROVIDER2=HOSXP
PROVIDER1_VALIDATE_TABLES=visitanc,visitancpregnancy,visit
PROVIDER2_VALIDATE_TABLES=person_anc_service,ovst,ovst_seq
SCRIPT_FLOW=SQL
#SQL_OPTIONS#

#PROVIDER1_SQL#
SET @provcode = :provcode;
SET @rep_year = :rep_year;
SET @hoscode = :hoscode;
SET @hosname = :hosname;
SET @hostype = :hostype;
SET @address = :address;
SET @subdistcode = :subdistcode;
SET @distcode = :distcode;
SET @level_service = :level_service;

SELECT
v.pcucode hospcode,
MONTHNAME(v.visitdate) visitmonth,
@rep_year visityear,
COUNT(1) visitcount
FROM
visit v
WHERE
v.visitdate BETWEEN CONCAT((@rep_year-1),'-10-01') AND CONCAT(@rep_year,'-09-30')
GROUP BY
MONTH(v.visitdate)
#PROVIDER1_SQL#


#PROVIDER2_SQL#
SET @provcode = :provcode;
SET @rep_year = :rep_year;
SET @hoscode = :hoscode;
SET @hosname = :hosname;
SET @hostype = :hostype;
SET @address = :address;
SET @subdistcode = :subdistcode;
SET @distcode = :distcode;
SET @level_service = :level_service;


SELECT

FROM

WHERE

;

#PROVIDER2_SQL#
Script Cron
Force Script Cron0
Active1
Client Office Type
Create Date2015-06-12 11:38:07
Last Update2015-06-12 01:12:07