Cerner CCL


Cerner CCL is the Cerner Corporation fourth-generation programming language, which is expressed in the Cerner Discern Explorer solution. CCL is patterned after the Structured Query Language. All Cerner Millennium health information technology solutions use CCL/Discern Explorer to select from, insert into, update into and delete from a Cerner Millennium database. CCL allows a programmer to fetch data from an Oracle database and display it as the user wants to see. With features like, Record Structure and subroutines, it allows us to get data from database and manipulate it by storing in a temporary structure; execute a particular section of the code, if required using a subroutine.
for CCL is provided by Cerner Corporation.
Discern Explorer provides several applications that can be used to create, execute, and analyze ad hoc queries, reports and programs. These applications provide flexibility in the skill set needed to build programs and design reports. Discern Explorer programs can be written using, VisualExplorer.exe, DiscernVisualDeveloper.exe, an operating system command-line editor, or any other text editor. ExplorerMenu.exe is used to execute Discern Explorer programs on demand. ExplorerAnalyzer.exe allows its users to analyze the system resources used by RDBMS queries.

CCL Hello World examples:
;Example 1
call echo go
;Example 2
drop program helloworld2 go
create program helloworld2
call echo
end go
;Example 3
drop program helloworld3 go
create program helloworld3
PAINT
call TEXT
end go
;Example 4 class example
DROP PROGRAM JCMCLASS1A GO
CREATE PROGRAM JCMCLASS1A
CREATE CLASS c_pat
;The c_pat class is an example class type which encapsulates the demographic members as well as the
;methods needed to operate on this class.
;The class consists of optional sections with member and methods denoted with a namespace
init ;class constructor
call echo
DECLARE _::pvar1 = vc WITH CONSTANT ;class instance member
DECLARE class::pvar2 = vc WITH NOCONSTANT ;class member shared across instances
DECLARE _::pvar3 = vc WITH CONSTANT
DECLARE private::pvar4 = i4 ;private class instance member
DECLARE _::instance_name = vc
RECORD _::rec1
DECLARE _::set_month = null
call echo
SUBROUTINE _::set_month
SET _::rec1->year = year
SET _::rec1->month = month
SET _::rec1->day = day
END ;subroutine
END ;class constructor
FINAL ;class destructor
call echo
END ;class destructor
WITH copy=1
END GO
DROP PROGRAM JCMCLASS1 GO
CREATE PROGRAM JCMCLASS1
execute jcmclass1a ;load class definition
declare c1::i_patient1 = null with class ;declare first instance from class c_pat
declare c1::i_patient2 = null with class ;declare second instance from class c_pat
call echo
set c1::i_patient1.instance_name = "c1::i_patient1"
set c1::i_patient2.instance_name = "c1::i_patient2"
call echo
set c1::i_patient1.rec1->birth_dt_tm = cnvtdatetime
set c1::i_patient2.rec1->birth_dt_tm = cnvtdatetime
call echo
call c1::i_patient1.set_month
call c1::i_patient2.set_month
call echo
call echo
call echorecord
call echorecord
if call trace endif
;display class info using class
declare class_info=vc
declare cid = i4
set cid = 1
while
set class_info = class
if set cid = 0 else call echo set cid=cid+1 endif
endwhile
set cid = 1
while
set class_info = class
if set cid = 0 else call echo set cid=cid+1 endif
endwhile
set curalias r1 c1::i_patient1.rec1->qual
set r1->race="AB"
select into nl from dummyt
detail
call echo
call echo
with nocounter
call echo
free set c1::i_patient1
free set c1::i_patient2
if call trace endif
END GO