Cerner CCL
This article needs additional citations for verification. (February 2013) |
Cerner CCL (Cerner Command Language) is the Cerner Corporation fourth-generation programming language, which is expressed in the Cerner Discern Explorer.[1] CCL is patterned after the Structured Query Language (SQL). All Cerner Millennium health information technology software uses CCL/Discern Explorer to select from, insert into, update into and delete from a Cerner Millennium database and 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 a user to get data from a database and manipulate it by storing it in a temporary structure; execute a particular section of the code, if required using a subroutine.
Complete for CCL (Cerner Command Language) 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 (VE), DiscernVisualDeveloper.exe (DVDev), an operating system command-line editor, or any other text editor. ExplorerMenu.exe (EM) is used to execute Discern Explorer programs on demand. ExplorerAnalyzer.exe (EA) allows its users to analyze the system resources used by RDBMS queries.
CCL Hello World examples:
- Example 1
call echo("Hello World!") go
- Example 2
drop program helloworld2 go create program helloworld2 call echo("Hello World!") end go
- Example 3
drop program helloworld3 go create program helloworld3 PAINT call TEXT(1,1, "Hello World!") 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("init c_pat class section") DECLARE _::pvar1 = vc WITH CONSTANT("pvar1 test") ;class instance member (default if namespace omitted) DECLARE class::pvar2 = vc WITH NOCONSTANT("pvar2 test") ;class member shared across instances DECLARE _::pvar3 = vc WITH CONSTANT("pvar3 test") DECLARE private::pvar4 = i4 ;private class instance member DECLARE _::instance_name = vc RECORD _::rec1( 1 qual 2 birth_dt_tm = dq8 2 race = c2 2 religion = c2 2 year = i4 2 month = i4 2 day = i4 ) DECLARE _::set_month(year=i4,month=i4,day=i4) = null call echo(build("class::pvar2=",class::pvar2)) SUBROUTINE _::set_month(year,month,day) SET _::rec1->year = year SET _::rec1->month = month SET _::rec1->day = day END ;subroutine END ;class constructor FINAL ;class destructor call echo(build("final c_pat class instance section:",instance_name)) 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(c_pat) ;declare first instance from class c_pat declare c1::i_patient2 = null with class(c_pat) ;declare second instance from class c_pat call echo(">>>class variable") set c1::i_patient1.instance_name = "c1::i_patient1" set c1::i_patient2.instance_name = "c1::i_patient2" call echo(">>>class record member") set c1::i_patient1.rec1->birth_dt_tm = cnvtdatetime("01-JAN-2012 08:30.00") set c1::i_patient2.rec1->birth_dt_tm = cnvtdatetime("01-FEB-2013 10:30.00") call echo(">>>class function") call c1::i_patient1.set_month(2012,10,16) call c1::i_patient2.set_month(2012,06,10) call echo(build("instance_name=",c1::i_patient1.instance_name)) call echo(build("instance_name=",c1::i_patient2.instance_name)) call echorecord(c1::i_patient1.rec1) call echorecord(c1::i_patient2.rec1) if ($1=1) call trace(38) endif ;display class info using class(<class_instance>,<class_info_id>[,<mode>]) declare class_info=vc declare cid = i4 set cid = 1 while (cid > 0) set class_info = class(c1::i_patient1,cid,1) if (class_info=" ") set cid = 0 else call echo(class_info) set cid=cid+1 endif endwhile set cid = 1 while (cid > 0) set class_info = class(c1::i_patient1,cid,3) if (class_info=" ") set cid = 0 else call echo(class_info) 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(build("report=",c1::i_patient1.instance_name)) call echo(r1->race) with nocounter call echo(build(">>>>>>>>>>>c1::i_patient1=",c1::i_patient1)) free set c1::i_patient1 free set c1::i_patient2 if ($1=2) call trace(38) endif END GO
References
[edit]- ^ Report & Query Creation Using Cerner's DVDev, CCL and Layout Builder: Discern Visual Developer Release 2008.01. CreateSpace Independent Publishing Platform (April 27, 2010). April 27, 2010. pp. 388 pages. ISBN 145281368X.