X12 EDI Examples
Eclipse Tips and Tricks
Hibernate Introduction Part 3
Data query.
Well, Now we will see how to query all the records inserted into the database that we have done
in part 1 and part 2.
For all the future examples (including this), i am going use only JPA Annotations
let's start.
Step 1: Development environment
1. My sql server 5.0 Download
2. Hibernate 4.1.1 Download
3. JDBC Driver for Mysql ((mysql-connector-java-5.1.19.zip)) Download
4. Eclipse IDE
Unzip the hibernate buddle and you should have the following structure after you unzip
Documentation folder
lib Folder
Project folder
log text file
hibernate logo image
license text file
Step 2:
Open mysql and create the following table in any of the exisitng database or create new database.
Here is the script for our table
CREATE TABLE `patient`
(
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`FirstName` VARCHAR(100) DEFAULT NULL,
`LastName` VARCHAR(100) DEFAULT NULL,
`Email` VARCHAR(200) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=INNODB DEFAULT
Step 3: Eclipse Java project
1. Click File -> New -> Other -> Java Project
2. Say Example3 for Project Name and leave all other to default values.
(Make sure, JRE has been configured).
3. Next we will add all dependencies in the example3. Now click Example3 project in the project
explorer and right click -> Click New-> Folder. Say folder name as lib
Now copy the following files into lib folder
(Note : Eclipse project explorer accepts all copy and paste operation. For example, you can copy
file or folder in windows explorer and then you can come back to eclipse project explorer and paste
it)
All the files in Hibernate->Lib->required.
All the files in Hibernate->Lib->jpa.
All the files in Hibernate->Lib->envers
mysql-connector-java-5.1.18-bin.jar
4. Now setup the build path. In order to execute our example, all the above jar files should be in
class build path
Again, click on the Example1, right click, and select build Path->configure build path.
Go to Libraries-> External jars, browse lib folder you created earlier. Then add external jars by
selecting all jar files that you copied to lib folder in one of previous step
Step 4: Creating Java beans
Now let us create the java bean for the patient where we want to store in the database.
Again, right click on Example1, Select New -> Class; Package Name : mypack and Class name
:patient Leave the all other to default values
Now type or copy the following
package mypack;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Column;
@Entity
@Table(name="patient")
public class patient {
private Integer id;
private String firstName;
private String lastName;
@Id
@GeneratedValue
@Column(name="ID")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(name="firstname")
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
@Column(name="lastname")
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
}
Step 6 : Hibernate Configuration
Now we have the persistent class and its mapping information using Annotations in place.
Let’s configure Hibernate.
Right Click src->New->File. File Name as hibernate.hbm.xml
Paste following code there. Save it as hibernate.cfg.xml. Here you have to give the
username,password and database name according to your MySQL account.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost/sampledb</property>
<property name="connection.username">root</property>
<property name="connection.password">123</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">update</property>
<!-- Mapping files -->
<mapping resource="patient.hbm.xml" />
</session-factory>
</hibernate-configuration>
Step 7: Create Test class to store the objects
To create new class right click on "mypack" package and select New --> Class and give Name as
Test.java and paste the following code in class file.
package mypack;
import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.service.ServiceRegistryBuilder;
import org.hibernate.HibernateException;
public class Test {
private static SessionFactory factory;
private static ServiceRegistry serviceRegistry;
public static void main(String[] args) {
createRecords();
}
public static void createRecords() {
try {
Configuration configuration = new Configuration();
configuration.configure();
serviceRegistry = new ServiceRegistryBuilder().applySettings(
configuration.getProperties()).buildServiceRegistry();
factory = configuration.buildSessionFactory(serviceRegistry);
} catch (Throwable ex) {
System.err.println("Failed to create sessionFactory object." + ex);
throw new ExceptionInInitializerError(ex);
}
System.out.println("**Example : Hibernate 4 SessionFactory**");
System.out.println("----------------------------------------");
Session session = factory.openSession();
Transaction tx = null;
try {
tx = session.beginTransaction();
patient pt = new patient();
pt.setFirstName("John124");
pt.setLastName("Smith234");
session.saveOrUpdate(pt);
tx.commit();
} catch (HibernateException e) {
if (tx != null)
tx.rollback();
e.printStackTrace();
} finally {
session.close();
}
}
}
Now right click on test.java file and select Run as -> Java Application
If every thing configured correctly, then you will the see the following lines in the console at the
end
INFO: HHH000126: Indexes: [primary]
Apr 29, 2012 10:14:49 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000232: Schema update complete
**Example : Hibernate 4 SessionFactory**
----------------------------------------
Hibernate: insert into PATIENT (FIRSTNAME, LASTNAME) values (?, ?)
Now go to database and check records are inserted into patient table.
Run again and again to insert more records by changing the last name and first name.
So that in the next step, we can see how we can retrieve the records.
Step 7: Get records and display in the console.
Small Intro on Hibernate Query Language
Hibernate uses a powerful query language (HQL) that is similar in appearance to SQL. Compared with SQL,
however, HQL is fully object-oriented and understands notions like inheritance, polymorphism and
association. Since it is an object-oriented equivalent of SQL, all of the functions of retrieval are
provided out-of-the-box in HQL. These functions can be classified into four categories:
1. Projection
2. Restriction
3. Aggregation
4. Grouping
Examples for Projection
"from patient"
The above will returns all of the instances of the patient.
This is equivalent to the following SQL : SELECT * FROM patient
Examples for Restriction
SELECT * FROM patient WHERE lastname='John';
Coming back to our example, let us get all the patients from the database and print the last name
in the console.
Modified Test.Java as follows
package mypack;
import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.service.ServiceRegistryBuilder;
import org.hibernate.HibernateException;
public class Test {
private static SessionFactory factory;
private static ServiceRegistry serviceRegistry;
public static void main(String[] args) {
createRecords();
getAllRecords();
}
public static void createRecords() {
try {
Configuration configuration = new Configuration();
configuration.configure();
serviceRegistry = new ServiceRegistryBuilder().applySettings(
configuration.getProperties()).buildServiceRegistry();
factory = configuration.buildSessionFactory(serviceRegistry);
} catch (Throwable ex) {
System.err.println("Failed to create sessionFactory object." + ex);
throw new ExceptionInInitializerError(ex);
}
System.out.println("**Example : Hibernate 4 SessionFactory**");
System.out.println("----------------------------------------");
Session session = factory.openSession();
Transaction tx = null;
try {
tx = session.beginTransaction();
patient pt = new patient();
pt.setFirstName("John12");
pt.setLastName("Smith23");
session.saveOrUpdate(pt);
tx.commit();
} catch (HibernateException e) {
if (tx != null)
tx.rollback();
e.printStackTrace();
} finally {
session.close();
}
}
public static void getAllRecords() {
try {
Configuration configuration = new Configuration();
configuration.configure();
serviceRegistry = new ServiceRegistryBuilder().applySettings(
configuration.getProperties()).buildServiceRegistry();
factory = configuration.buildSessionFactory(serviceRegistry);
} catch (Throwable ex) {
System.err.println("Failed to create sessionFactory object." + ex);
throw new ExceptionInInitializerError(ex);
}
System.out.println("**Example : Hibernate SessionFactory**");
System.out.println("----------------------------------------");
List allpatients;
Session session = factory.openSession();
Transaction tx = null;
try {
tx = session.beginTransaction();
Query q1 = session.createQuery("from patient");
allpatients = q1.list();
for (int i =0; i < allpatients.size(); i++)
{
patient pt = (patient) allpatients.get(i);
System.out.println(pt.getLastName());
}
tx.commit();
} catch (HibernateException e) {
if (tx != null)
tx.rollback();
e.printStackTrace();
} finally {
session.close();
}
}
}
Now right click on test.java file and select Run as -> Java Application. Last name will be
printed in the console.
Look and Feel for listitem with paging and with crud actions
Output
Click here to see the demo
Click here to download the source code
Hibernate Introduction Part 2
Hibernate Annotations
This example is the same as the first example except that it uses annotations. There we first started
by creating the .hbm.xml file, here there is no need to create it instead we will use annotations to do
the object relational mapping.
Step 1 : Remove the patient.hbm.xml file
Step 2 ; Open the hibernate.cfg.xml and replace the following line
<!-- Mapping files -->
<mapping resource="patient.hbm.xml" />
With
<!-- Mapping Classes -->
<mapping class="mypack.patient" />
Step 3 : Open the patient.java and replace as follows
package mypack;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Column;
@Entity
@Table(name="patient")
public class patient {
private Integer id;
private String firstName;
private String lastName;
@Id
@GeneratedValue
@Column(name="ID")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(name="firstname")
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
@Column(name="lastname")
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
}
Step 4: No Change in Test.java . Just right click as Test.java and run as Java application.
Hibernate POC
I am not sure whether title for this post is correct or wrong. But in the post , i am going to write how hibernate works if we play around in the application.
1. Tables are automatically created
After Hibernate Introduction Part 1, i just went to the back end database, change the table name from patient
Hibernate Introduction Part 1
So What is hibernate ?
Here is the answer
Click the following link
Link
:) Well, if you have time, just go thru each and understand. Otherwise, simply put, using hibernate
it is each save the data into the database or load the data from the database.
Well, let's start.
Step 1: Development environment
1. My sql server 5.0 Download
2. Hibernate 4.1.1 Download
3. JDBC Driver for Mysql ((mysql-connector-java-5.1.19.zip)) Download
4. Eclipse IDE
Unzip the hibernate buddle and you should have the following structure after you unzip
Documentation folder
lib Folder
Project folder
log text file
hibernate logo image
license text file
Step 2:
Open mysql and create the following table in any of the exisitng database or create new database.
Here is the script for our table
CREATE TABLE `patient`
(
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`FirstName` VARCHAR(100) DEFAULT NULL,
`LastName` VARCHAR(100) DEFAULT NULL,
`Email` VARCHAR(200) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=INNODB DEFAULT
Step 3: Eclipse Java project
1. Click File -> New -> Other -> Java Project
2. Say Example1 for Project Name and leave all other to default values.
(Make sure, JRE has been configured).
3. Next we will add all dependencies in the example1. Now click Example1 project in the project
explorer and right click -> Click New-> Folder. Say folder name as lib
Now copy the following files into lib folder
(Eclipse project explorer accepts all copy and paste operation. For example, you can copy file
or folder in windows explorer and then you can come back to eclipse project explorer and paste it)
All the files in Hibernate->Lib->required.
All the files in Hibernate->Lib->jpa.
All the files in Hibernate->Lib->envers
mysql-connector-java-5.1.18-bin.jar
4. Now setup the build path. In order to execute our example, all the above jar files should be in
class build path
Again, click on the Example1, right click, and select build Path->configure build path.
Go to Libraries-> External jars, browse lib folder you created earlier. Then add external jars by
selecting all jar files that you copied to lib folder in one of previous step
Step 4: Creating Java beans
Now let us create the java bean for the patient where we want to store in the database.
Again, right click on Example1, Select New -> Class; Package Name : mypack and Class name :patient
Leave the all other to default values
Now type or copy the following
package mypack;
public class patient {
private Integer id;
private String firstName;
private String lastName;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
}
Step 5: Mapping between Java bean and Table.
Let us first summarize what we have done so far. 1) My sql table 2) Java bean.
Now, important step, we will see how to map 1) and 2) , so that whenever new object is created,
it will insert one record in the database.
Hibernate makes persisting the state of your Java objects incredibly simple. However, in order for
Hibernate to know where to story your JavaBeans, or how to map the property of a JavaBean to a database
column, the developer has to provide a bit of direction to the Hibernate framework.
This is where the Hibernate mapping file comes into play. The mapping file tells Hibernate what table
in the database it has to access, and what columns in that table it should use.
Using JPA annotations also, we can do the same. In this example, first we will see using mapping files
and then we will convert the same example to JPA annotations.
Now let us create the mapping file
Right Click src->New->File. File Name as patient.hbm.xml
Type or copy the below content
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Apr 29, 2012 6:48:24 PM by Hibernate Tools 3.4.0.CR1 -->
<hibernate-mapping>
<class name="mypack.patient" table="PATIENT">
<id name="id" type="java.lang.Integer">
<column name="ID" />
<generator class="native" />
</id>
<property name="firstName" type="java.lang.String">
<column name="FIRSTNAME" />
</property>
<property name="lastName" type="java.lang.String">
<column name="LASTNAME" />
</property>
</class>
</hibernate-mapping>
Step 6 : Hibernate Configuration
Now we have the persistent class and its mapping file in place. Let’s configure Hibernate.
Right Click src->New->File. File Name as hibernate.hbm.xml
Paste following code there. Save it as hibernate.cfg.xml. Here you have to give the username,password
and database name according to your MySQL account.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost/sampledb</property>
<property name="connection.username">root</property>
<property name="connection.password">123</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">update</property>
<!-- Mapping files -->
<mapping resource="patient.hbm.xml" />
</session-factory>
</hibernate-configuration>
Step 7: Create Test class to store the objects
To create new class right click on "mypack" package and select New --> Class and give Name as Test.java
and paste the following code in class file.
package mypack;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.service.ServiceRegistryBuilder;
import org.hibernate.HibernateException;
public class Test {
private static SessionFactory factory;
private static ServiceRegistry serviceRegistry;
public static void main(String[] args) {
try {
Configuration configuration = new Configuration();
configuration.configure();
serviceRegistry = new ServiceRegistryBuilder().applySettings(
configuration.getProperties()).buildServiceRegistry();
factory = configuration.buildSessionFactory(serviceRegistry);
} catch (Throwable ex) {
System.err.println("Failed to create sessionFactory object." + ex);
throw new ExceptionInInitializerError(ex);
}
System.out.println("**Example : Hibernate 4 SessionFactory**");
System.out.println("----------------------------------------");
Session session = factory.openSession();
Transaction tx = null;
try {
tx = session.beginTransaction();
patient pt = new patient();
pt.setFirstName("John");
pt.setLastName("Smith");
session.saveOrUpdate(pt);
tx.commit();
} catch (HibernateException e) {
if (tx != null)
tx.rollback();
e.printStackTrace();
} finally {
session.close();
}
}
}
Now right click on test.java file and select Run as -> Java Application
If every thing configured correctly, then you will the see the following lines in the console at the
end
INFO: HHH000126: Indexes: [primary]
Apr 29, 2012 10:14:49 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000232: Schema update complete
**Example : Hibernate 4 SessionFactory**
----------------------------------------
Hibernate: insert into PATIENT (FIRSTNAME, LASTNAME) values (?, ?)
Now go to database and check records are inserted into patient table.
Dynamic Include Source
Dynamic Include Source
Let us see how we can dymanically set the source for the include Component
Our objective is if user clicks on male, then load another zul page. If user clicks on female
, then load another page.
Here is the Root Zul File
<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="Dynamic Include Example" id="rootWin"
apply="mypack.DynamicInclude">
<window id="innerWin">
<radiogroup id="radio">
<radio label="Male" />
<radio label="Female" />
</radiogroup>
</window>
<include id="innerIncld" />
</window>
</zk>
Here is the female.zul
<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="Female" border="normal">Female zul File</window>
</zk>
Here is the male.zul
<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="Male" border="normal">Male Zul file</window>
</zk>
Here is the composer
package mypack;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.Include;
import org.zkoss.zul.Radiogroup;
@SuppressWarnings("rawtypes")
public class DynamicInclude extends GenericForwardComposer {
private static final long serialVersionUID = 1L;
Radiogroup innerWin$radio;
Include innerIncld;
public void onCheck$radio$innerWin() {
boolean tf = innerWin$radio.getSelectedItem().getLabel().equals("Male");
String s = tf ? "male.zul" : "female.zul";
innerIncld.setSrc(s);
}
}
Handle the events in the nested ids space
The following example show how we can handle the events in the nested ids space
Zul File
<window id="win1" title="Win1" border="normal" width="300px" apply="mypack.Example6">
<button id="btn1" label="Win 1 Button" />
<separator bar="true" />
<space />
<window id="win2" title="Win2" border="normal" width="200px">
<button id="btn2" label="Win 2 Button" />
<separator bar="true" />
<space />
<window id="win3" title="Win3 " border="normal" width="200px">
<button id="btn3" label="Win 3 Button" />
</window>
</window>
</window>
In order to manipulate the UI Components, let us follow the MVC Pattern
First we need to create a composer and let us connect the zul and composer by using apply attribute
Here is the composer java class
package mypack;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.Textbox;
public class Example6 extends GenericForwardComposer {
public void onClick$btn1(Event event) {
alert("Button 1 Clicked");
}
public void onClick$btn2$win2() {
alert("Button 2 Clicked");
}
public void onClick$btn3$win3$win2() {
alert("Button 3 Clicked");
}
}
ID Space - Different method to access UI Elements
The following example is based on the following zk doc
http://books.zkoss.org/wiki/ZK_Essentials/Introduction_to_ZK/Component_Based_UI
http://books.zkoss.org/wiki/ZK_Developer's_Guide/Fundamental_ZK/Basic_Concepts/UI_Component_Forest
http://books.zkoss.org/wiki/ZK_Developer's_Reference/UI_Composing/ID_Space
Here is the simple zul file
<?page title="Example5" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="Example" id="outerWin" border="normal" apply="mypack.Example5">
<button id="outerBtn" label="Outer Win Button" />
<window id="innerWin" border="normal">
<button id="innerBtn" label="Inner Win Button" />
</window>
</window>
</zk>
Now we will see how we can access all these components and do some actions. In this example,
i have just changed the caption, so that's action for us now.
In order to manipulate the UI Components, let us follow the MVC Pattern
First we need to create a composer and let us connect the zul and composer by using apply attribute
Here is the composer java class
package mypack;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Path;
import org.zkoss.zul.Button;
import org.zkoss.zul.Window;
@SuppressWarnings("rawtypes")
public class Example5 extends GenericForwardComposer {
private static final long serialVersionUID = 1L;
private Window outerWin;
private Window innerWin;
private Button innerBtn;
private Button outerBtn;
@SuppressWarnings("unchecked")
public void doAfterCompose(Component comp) throws Exception {
/**
* Dont forget to call super doaftercomposer. By calling this, it will
* add the event listner for us
*/
super.doAfterCompose(comp);
outerWin = (Window) comp;
// Set the outer window title
outerWin.setTitle("Title Changed");
// Now let us try to access outerbtn by different methods
// Using getfellow
outerBtn = (Button) outerWin.getFellow("outerBtn");
outerBtn.setLabel("Outer Button accessed 1");
/**
* The Path provides the utility method getComponent which takes the
* relative path of the component as its argument. outerBtn is
* equivalent to outerWin/outerBtn
*/
// Using Path
outerBtn = (Button) Path.getComponent("/outerWin/outerBtn");
outerBtn.setLabel("Outer Button accessed 2");
/**
* The getFirstChild method returns the first child component of the
* caller. The advantage of using this method is that you don't even
* need to know the component ID to fetch the component.
*/
// Using Getfirstchild
outerBtn = (Button) outerWin.getFirstChild();
outerBtn.setLabel("Outer Button accessed 3");
// Now let us try to access innerBtn by different methods
// Using getfellow
innerBtn = (Button) outerWin.getFellow("innerWin")
.getFellow("innerBtn");
innerBtn.setLabel("inner Button accessed 1");
// Using Path
innerBtn = (Button) Path.getComponent("/outerWin/innerWin/innerBtn");
innerBtn.setLabel("inner Button accessed 2");
// Using Getfirstchild
innerBtn = (Button) outerWin.getFirstChild().getNextSibling()
.getFirstChild();
innerBtn.setLabel("inner Button accessed 3");
// Now let us try to access innerWin by different methods
// Using getfellow
// Using getfellow
innerWin = (Window) outerWin.getFellow("innerWin");
innerWin.setTitle("Inner window accessed 1");
// Using Path
// We can also use (Window)Path.getComponent("outerWin/innerWin");
innerWin = (Window)Path.getComponent("/outerWin/innerWin");
innerWin.setTitle("Inner window accessed 2");
// Using Getfirstchild
innerWin = (Window)outerWin.getFirstChild().getNextSibling();
innerWin.setTitle("Inner window accessed 3");
}
}
You can see above, we have used different methods to access the UI Components
Change the color of the selected item in the listbox
Changing Selection Colour - List Box (from default blue) to another custom colour
ZK MVC An Annotation Based Composer For MVC
Finally , we will end using zk 6 An Annotation Based Composer For MVC
This is the 5th post in a series of ZK MVC
Here is the zk documentation and we are following that
and creating new example
http://books.zkoss.org/wiki/Small_Talks/2008/August/ZK_MVC_Made_Easy
http://books.zkoss.org/wiki/Small_Talks/2011/January/Envisage_ZK_6:_An_Annotation_Based_Composer_For_MVC
ZK MVC Using GenericForwardComposer utility class
Welcome back
This is the 4th post in a series of ZK MVC
Here is the zk documentation and we are following that
and creating new example
http://books.zkoss.org/wiki/Small_Talks/2008/August/ZK_MVC_Made_Easy
ZK MVC Using .GenericAutowireComposer utility class
This is the third post in a series of ZK MVC
ZK MVC Using .GenericComposer utility class
This is the second post in a series of ZK MVC
This post is continuation of previous post
ZK Documentation is here
http://books.zkoss.org/wiki/Small_Talks/2008/August/ZK_MVC_Made_Easy
Now we will use Genericcomposer class to reduce some code from my previous post
ZK MVC Using composer interface
This is the first post in a series of ZK MVC
http://books.zkoss.org/wiki/Small_Talks/2008/August/ZK_MVC_Made_Easy
Everything went fine as long as i copied and paste from the examples
But when i started my own example, got into problem and came to know some concepts or tricks or whatever be
Medical Billing
1. Medical Billing Use Case
Chapter 2: Medical Billing Process
1. What is Medical Billing Process?
2. Different Format of Medical Form.
3. Patient Insurance
5. Claim Life Cycle – Provider
6. Claim Life Cycle – Payer
7. Electronic Claim Transmission
8. Medical Billing Clearinghouse
9. Medical Billing Process in detail
10. Healthcare Coding system.
11. Maintaining Patient Insurance in the software.
12. What are the Billing Entities?
13 What is Pre Authorization?
14 What is Assignment of Benefits - CMS 1500 Box 27
Chapter 3: EDI Transactions
1. What is an EDI?
2. EDI Transactions
3. Understanding EDI Structure (Beginner)
4. Understanding EDI Structure (Detail )
5. EDI Instruction
6. How to Read and Understand EDI File ?
7. ASC X12 270/271: Eligibility, Coverage, or Benefit Inquiry
8. Rejection Followup Using Claim Acknowledgement EDI 277CA
9. Difference between 277CA and 277
10. Difference Between 837 Institutional and 837 Professional
11. EDI 5010 Documentation 837 Health care claim: Professional
12. EDI 270 - 5010 Health Care Eligibility/Benefit Inquiry
13. Claim Forward to other Insurance
14. Difference between claims and encounters EDI 837 transactions
15. Understanding EDI 835 Health Care Claim Payment/Advice Transaction
16. X12 EDI Examples with Payer Claim Number
17. Map claim information between EDI 837 and EDI 837
18. Understanding EDI 999 functional Acknowledgement – Example 1
19. EDI 837 Professional Loops
Chapter 4: Payment
1. EOB – Explanation of Benefits
2. Understanding EOB - Explanation of Benefits
3. Understanding EDI 835 Electronic Remittance Advice
4. What is Copay, Co-Insurance, and Deductible in Insurance Payment Posting?
5. Types of Reimbursement
6. How to process Copay, Co-Insurance, and Deductible Amount in Insurance Payment Posting?
Chapter 5: Claim Submission after Primary Insurance
1. How to submit the claims after primary insurance?
Chapter 7: Claim Processing by the insurance company
1. Claims adjudication and Payment process.?
New to Health care Domain? Here are some documents which can help you to understand the basics. I am trying to refer to the official link(where I downloaded the document) and as well as a link to my server(sometimes, official links are broken).
1. Introduction_to_Health_Care_in_USA (or you can click here to download)
2. Medicare Incentive Program Beginners guide MU Stage 1 ( or you can click here to download)
All about Prescription
- An Introduction to ePrescription
- How ePrescribing works
- Paper Prescription workflow
- Electronic Prescription workflow
- Refill Paper Prescription workflow
- Refill Electronic Prescription workflow
Flow charts
- Medical Billing Overview
- Rooming Overview
- Medical Billing Flow chart
- EMR Test Visit Flow chart
- EMR Patient Examination Flow chart
- EMR Office visit Flow chart
- Medical Claim Life Cycle
- Claim Adjudication and Payment Flow chart
- EMR Office Visit
- Billing Flow chart
Medical Billing blogs
Patient Demographics
Here is the excellent UI which shows how to design patient search window
Patient Search window
or you can see the screen shot here
MU Certification Smoking Status
MU Certification
Data Set 1
Data set 2
Data set 3
Individual and Group NPI
http://www.iridiumsuite.com/npi-and-billing
EDI 5010 Documentation – 837 Institutional - Loop 2300 Prior Authorization or Referral Number
All My Healthcare Domain stuffs
1. Medical Billing concepts
2. Medical Billing Terminology
3. Health care Introduction documents
4. EMR Appointment Features
5. EMR SOAP Note
6. EMR History of Present Illness
7. EMR Use cases
8. EMR Test visit (Lab) workflow
9. Most commonly Used Lab Test Panels
10. EMR Most Commonly Used Vital Signs
11. Physician Quality Reporting System – PQRS
Healthcare Technical
1 EDI 5010 Documentation 837 Health care claim: Professional with Sample Files
2 EDI 5010 Documentation 837 Health care claim: Institutional with sample Files
3 EDI 5010 Documentation 835 Health Care Claim Payment/Advice with sample Files and Parsing Tool
4. EDI 5010 Documentation 270 Health Care Eligibility/Benefit Inquiry
5. EDI 5010 Documentation 271 Health Care Eligibility Benefit Response
6. SQL Server Stored Procedure for EDI 837 P 5010 Version
7. MYSQL Stored Procedure for EDI 837 P 5010 Version
8. Apply Insurance Payment (EOB Posting) Use cases.
9. Difference Between 837 Institutional and 837 Professional
10. Sample HL7 Files
11. HL7 Parsing
12. My Own HL7 Parser in java
13. MSH Message Header Segment
14. OBX Observation/result Segment
EDI RESTful Web Service API
Many Healthcare software development company needs Subject Matter Expert to complete their Medical Billing Component. In order to develop the Medical Billing Application, X12 EDI plays a major role. For example, from the Medical Billing software, they need to send the bill (claim) to the Insurance via Clearing House and the format should be X12 EDI 837. So i decided to provide a Latest Spring Boot Restful web services API Calls for all the major transactions that are needed in the Medical Billing Application. Here is the List of transactions available and please connect with me to use these API Service calls.
3. JSON to EDI 837 Professional Claims
4. Parse EDI 837p Message into JSON




