EMR Appointment Features

Let me list the most common features in the Appointment module and their priority using MoSCoW Method.

Good Website Design Links

Form Design



Left Navigation Bar

Search Form
Buttons

CRUD operations

    Long Input


    Background and Foreground colors


    Open Source Demo

    All about Menu
    Theme


    Gradient


    JQuery

    History of Present Illness

    HPI - One of the main component of Clinical History.

    EMR Use cases

    In this category, let us see some common use cases in the doctor office.

    Java Static Import

    This is one of feature in Java 5.

    Claims adjudication and payment

    The Following picture demonstrates how insurance company processing the claims received from the clearing house. 

    How to install Maven in the Windows

    Let us see how we can first setup Maven in the Windows  step by step.

    EDI 5010 Documentation 837 Professional - Loop 2000C Patient Hierarchical Level

    LOOP 2000C Patient Hierarchical Level and  and LOOP 2010CA – Patient Name

    EDI 5010 Documentation 837 Professional - Loop 2010BB Payer Name

    2010BB Payer Name

    EDI 5010 Documentation – 837 Professional IEA Interchange Control Trailer

    IEA – Interchange Control Trailer

    Some Important Master screens for PMS

    Last year I was involved in developing an independent system for PMS using VB6 with sql server 2005. I really enjoyed myself and love to work/complete that project. One of my best period in my life. But unfortunately, we could not able to market the product because of VB6 no longer used widely in the industry.

    EDI 5010 Documentation 837 Professional - Loop 2010AA Billing Provider

    2010AA Billing Provider

    EDI 5010 Documentation–837 Loop 2000A - HL–Billing Provider Hierarchical Level

    HL – Billing Provider Hierarchical Level

    Physician Quality Reporting System - PQRS

    Let me just summarized the information which i understood clearly about PQRS . The following information are taken from different websites and some of them of my own question and answer Eye rolling smile. And also I just want to have a reference about this, so that when I get chance to implement this, I can always come and refer here. At the end, I just summarized my thought on how we can implement in the EMR PMS Application.

    EDI 5010 Documentation 837 Health care claim : Professional

    Looking for best Practice Management software ? Please email at vbsenthilinnet@gmail.com


    If you are new to Medical Billing, then please read this article
    first.
    If you are new to EDI, then  read the following articles

    1. What is an EDI ?
    2. EDI Transactions 

    3. Understanding EDI Structure
    4. How to Read and Understand EDI File
    5. EDI Instruction
    6. Beginners Guide to EDI X12 (including HIPAA)
    7. What is EDI Transaction Loops and Segments?
    8. Understanding EDI-Loops, Segments, and Elements

     


    We will see the complete documentation on 837 with different use case sample EDI File.

    837 Loops (Click each of the loop to see the complete documentation)

    EDI 837 Professional Loops and Segments


    1. ISA Interchange Control Record
    2. GS  Functional Group Header
    3. ST Transaction Set Header
    4. BHT Beginning Hierarchical Transaction Segment
    5. LOOP 1000A Submitter Name
    6. LOOP 1000B Receiver Name 
    7. LOOP 2000A Billing Provider Hierarchical Level
    8. LOOP 2010AA Billing Provider Name
    9. LOOP 2000B Subscriber Hierarchical Level
    10. LOOP 2010BA Subscriber Name
    11. LOOP 2010BB Payer Name
    12. LOOP 2000C  Patient Hierarchical Level
    13. LOOP 2300 Claim Information
    13. LOOP 2300 Date information
    14. LOOP 2300 CLIA Number
    15. LOOP 2300 Prior Authorization or Referral Number
    16. LOOP 2300 K3 Segment
    17. LOOP 2300 Health care Diagnosis Code
    18. LOOP 2310A Referring Provider Name
    19. LOOP 2310B Rendering Provider
    20. LOOP 2310C Service Facility Location
    21. LOOP 2320 Other Subscriber Information (Coordination of Benefit COB)
    22. LOOP 2330A Other Subscriber Name(Coordination of Benefit COB)
    23. LOOP 2330B Other Payer Name (Coordination of Benefit COB)
    24. LOOP 2400 Service Line
    25. LOOP 2430 Line Adjudication Info (Coordination of Benefit COB)
    26. SE Transaction Set Trailer

    27. GE Functional Group Trailer
    28. IEA Interchange Control Trailer

     
    Looking for best Practice Management software ? Please email at vbsenthilinnet@gmail.com

     

    EDI 837 Examples

    Please note ; all these examples are tested against WPC First Pass software.

    You can download trial version here.

    Also, you can download the following trial version software to view/validate EDI File.

    1. EDI Notepad
    2. HIPPA Document Viewer 2
    3. On Line Validator American Coders
    4. On Line Validator EDIVance

    The following open source converts X12 EDI File to XML and 1500.
    OopFactory X12 Parser

    The following URL discuss about other open source in EDI Software.
    Comparing Open Source EDI Software

     

    Download all  EDI 837 Use cases

     

    Sample EDI 837 File with different use case

    Use case 1
    Bill with Individual NPI
    Patient is same as the Insurer (Self).
    Bill to Patient Primary Insurance.
    No of Claims : 1
    Claim No : 249
    Download All files
    Use case 2
    Bill with Individual NPI
    Patient is same as the Insurer (Self).
    Bill to Patient Primary Insurance.
    No of Claims : 2 (Two different patients, same primary insurance and same rendering provider )
    Claim No  : 249 and 250
    Download All files


    Use case 3
    Bill with Individual NPI
    Patient is same as the Insurer (Self).
    Bill to Patient Primary Insurance.
    Patient is referred by another Physician (Referring Provider)
    No of Claims : 1
    No of Line Items : 4
    Claim No : 251
    Download All files

     

    Use case 4
    In use case 4, we will combine the above three use cases claims and make one EDI File. So this EDI File will contain  3 Claims
    Download All files
     

     

    Use case 5
    Bill with Group  NPI
    Patient is same as the Insurer (Self).
    Bill to Patient Primary Insurance.
    No of Claims : 1
    Claim No : 252
    Download All files

     

    Use case 6
    In this use case, we will combine all the claims created so far (use case 1 to use case 5) and we will make as one EDI File.
    No Of Claims : 4
    Claim No : 249, 250, 251 and 252
    Download All files


     

    Use case 7
    Bill with Individual NPI
    Patient is NOT as Same as Insurer
    Bill to Patient Primary Insurance.
    No of Claims : 1
    Claim No : 253
    Download All filess

    Use case 8
    Bill with Individual NPI
    Patient is same as the Insurer (Self).
    Bill to Patient Primary Insurance.
    All Claim Level Date included :
    Date Onset (431), Date Initial Treatment (454), Date Last Seen (304), Date Acute Manifestation (453), Date Accident (439), Date Last Menstrual (484), Date Last X-Ray (455), Date Last Worked(297)
    No of Claims : 1
    Claim No : 254
    Download All files

     

    Use case 9
    Example for creating EDI for Secondary Insurance (Coordination of Benefits  COB Segments)
    Download All files

     

    Use case 10
    Example for creating EDI for Secondary Insurance (Coordination of Benefits  COB Segments)
    Download All files

     

    Use case 11
    Example for LOOP 2300 K3 Segment and CLIA Number
    Download All files

     

    Use case 12
    Example for creating EDI for Secondary Insurance for more than one line item (Coordination of Benefits  COB Segments)
    Download All files

     

    Use case 13
    Example for creating EDI for Tertiary (3nd) Insurance for more than one line item (Coordination of Benefits  COB Segments)
    Download All files

     

    Use case 14
    Bulk Volume Claims 20 Claims in one EDI File
    Download All files

     

    You can download all use cases as one zip file here

     

    Reference

    JSON to EDI 837 Professional
    https://emrpms.blogspot.com/2020/04/json-to-edi-837-p.html

    For more option, check our EDI Tool
    URL : https://demo.nagatabilling.com/NagataEDITool/login.zhtml
    User Name : demo
    password : demo



    Looking for best Practice Management software ? Please email at vbsenthilinnet@gmail.com 

    Questions or feedback are always welcome. You can email me at vbsenthilinnet@gmail.com

    EDI 5010 Documentation 837 Professional - Loop 1000B Receiver Name

    1000B – Receiver Name

    Hibernate Validator - Creating custom constraints–Example

    In this post, we will see how we can create our own custom constraints tailored to our specific requirements.

    Hibernate Validator Example 2

    In this example, we will see some more validation constraints such as @email, @past, @length, etc. And also we will also define custom error message.

    Hibernate Validator Examples

    Let us some examples for Hibernate validator
    Here is the introduction notes from the hibernate documentation
    Bean Validation standardizes how to define and declare domain model level constraints. You can, for example, express that a property should never be null, that the account balance should be strictly positive, etc. These domain model constraints are declared in the bean itself by annotating its properties. Bean Validation can then read them and check for constraint violations. The validation mechanism can be executed in different layers in your application without having to duplicate any of these rules (presentation layer, data access layer). Following the DRY principle, Bean Validation and its reference implementation Hibernate Validator has been designed for that purpose.
    The integration between Hibernate and Bean Validation works at two levels. First, it is able to check in-memory instances of a class for constraint violations. Second, it can apply the constraints to the Hibernate metamodel and incorporate them into the generated database schema.
    Each constraint annotation is associated to a validator implementation responsible for checking the constraint on the entity instance. A validator can also (optionally) apply the constraint to the Hibernate metamodel, allowing Hibernate to generate DDL that expresses the constraint. With the appropriate event listener, you can execute the checking operation on inserts, updates and deletes done by Hibernate.
    When checking instances at runtime, Hibernate Validator returns information about constraint violations in a set of ConstraintViolations. Among other information, the ConstraintViolation contains an error description message that can embed the parameter values bundle with the annotation (eg. size limit), and message strings that may be externalized to a ResourceBundle.
    Example 1:
    In the first example, we will see very basic not null constraint validation. Here is the Step by Step Tutorial.
    Example 2:
    In the second example, we will see some more constraint validation. Here is the Step by Step Tutorial.
    Example 3:
    In this example, we will see how we can create our custom constraint validation. Here is the Step by Step Tutorial.
    Example 4:
    In this example, we will see how we can create our custom constraint @Required. Here is the Step by Step Tutorial.
    Example 5:
    In this example, nothing is new, we will take care example 2 and will use the utility class to perform validationHere is the Step by Step Tutorial.

    Hibernate Validator Example 1

    In this example, we will see very basic validation @NotNull.

    ZK Examples Index Page

    ZK Projects

    ZK 7 Project Start-up Kit – Theme with full source code and support
    Demo Link : User Name : demo, password : demo

     

         

    ZK 8.5 Version Video Tutorials . All New created in July 2018

    1. Create and Run your First ZK 8.5 Application with Eclipse and Maven
    2. ZK 8.5 Component Reference Window - Part 1
    3. ZK 8.5 Component Reference Window - Part 2
    4. ZK 8.5 Component Reference Layout - vlayout and hlayout
    5. ZK 8.5 Component Reference Textbox Part 1
    6. ZK 8.5 Component Reference Textbox Part 2
    7. ZK 8.5 Component Reference Grid Part 1
    8. Sample UI Design Form in 8.5 Part 1
    9. CSS Classes and Styles
    10. Sample Screens for Training to Create UI in ZK


    ZK Free Examples and Tutorials
     
         
    ZK Maven Create and Run Your First ZK 7 Application with Eclipse and Maven  
    ZK 7 ZK 7 Simple Form Design(s) Part 1  
    ZK 7 ZK with External style sheet  
    ZK MVVM MVVM – Introduction  
    ZK MVVM MVVM Examples–Example 1  
    ZK MVVM MVVM Examples–Example 2  
    ZK 7 ZK MVVM Simple List Box Example  
    ZK 7 How to show particular row in ZK Listbox with different color in MVVM  
    ZK 7 ZK 7 MVVM List Box Select All and Unselect all Records  
    ZK 7 ZK MVVM List box with check box – Simple Example  
    ZK List Box Move List box item up and Down using MVVM Design Pattern  
    ZK List Box List Item Double click event on selected Item using MVVM  
    ZK List Box ZK List box inline Editing with Add New and Delete action  
    ZK List Box ZK MVVM List box with Dynamic Template  
    ZK 7 Hibernate ZK 7 + MySQL + Hibernate + Spring + Integration example  
    ZK 7 Excel ZK 7 Export to Excel  
    ZK File Upload Simple example to upload PDF file in the server and show the content using iframe - MVVM  
    ZK File Upload ZK 7 upload PDF to server and show in the screen using MVVM–Part 2  
    ZK Tab box Load Tab box Content on Demand Using MVVM  (Onselect Event)  
    ZK Grid ZK Grid inline Editing with Add New and Delete action  
    ZK Upload ZK Dropupload example  
    ZK Report Create a Report with ZK using iReport 5.1.0 and JasperReports  
    ZK Menu ZK Dynamic Menu Part 1 Demo
    ZK Tree ZK Dynamic Menu Part 2 Using Tree Component Demo
    ZK Group Box ZK Dynamic Menu Part 3 Using Group Box and Tool Bar Button Demo
    ZK Tab Box ZK Dynamic Menu Part 4 Using Tab box and Tool Bar Button Demo
    ZK Menu ZK Dynamic Menu Part 5 Using Tab Box, Tool Bar and Group Box Demo
    ZK 7 Nav Bar ZK Dynamic Menu Part 6 Using ZK 7 Navigation Bar  
    ZK Combo MVC Two combo Box – Fill second combo based on first combo selection  
    ZK Combo ZK MVVM Combo Box value Converter  
    ZK Validation Simple Example for ZK Input Form Validation  
    ZK MVC Listing Search using MVC Pattern Demo
    ZK MVC Passing arguments Part 1, This article will focus on the How to pass some arguments from one window(Parent) to modal window(Child) where child window does not have any controller attached. Demo
    ZK MVC Passing arguments Part 2, This article will focus on the How to pass some arguments from one window(Parent) to modal window(Child) where child window attached to the controller and we will receive the arguments in the controller and display back to UI. Demo
    ZK MVC Passing arguments Part 3, This article will focus on the How to pass some arguments from one window(Parent) to modal window(Child) where child window attached to the controller and we will receive the arguments in the controller and display back to UI. Same as Part 2, but we will use ZK ‘s annotated data binding manager utility. Demo
    ZK MVC Passing arguments Part 4, This article will focus on the How to return values from the child window (Modal) to the Calling Parent Window using ZK Event Queues concept. Demo
    ZK MVC Passing arguments Part 5, This article will focus on the How to return values from the child window (Modal) to the Calling Parent Window using ZK Send Event Demo
    ZK MVC Passing arguments Example on Passing arguments in MVC Demo
    ZK MVVM Passing arguments Part 1, This article will focus on the How to pass some arguments from one window(Parent) to modal window(Child) where child window does not have any VM attached. Demo
    ZK MVVM Passing arguments Part 2, This article will focus on the How to pass some arguments from one window(Parent) to modal window(Child) where child window attached with VM and arguments are received in the VM and update the UI. Demo
    ZK MVVM Passing arguments Part 3, This article will focus on the How to pass some arguments from one window(Parent) to modal window(Child) where child window attached with VM and arguments are received in the VM and update the UI. After child window is closed, we will return the value to the parent window. Demo
    ZK MVVM Passing arguments Part 4, In this post, we will see how we can pass parameter between two zul files attached by MVVM using URL Redirect Demo
    ZK Login Form CSS ZK Login form Design  
    ZK Login ZK + Spring Security Login form–Part 1  
    ZK Login ZK + Spring Security Login form–Part 2  
    ZK Login ZK + Spring Security Login form–Part 3  
    ZK Login ZK + Spring Security Login form– Additional Login Parameters - Part 4  
    ZK Login ZK + Spring Security Login form–Part 5  

    ZK 7 CSS

    ZK Window ZK 7 Window CSS Example1  
    ZK Group Box ZK 7 Group Box Example 1  
    ZK 7 ZK 7 Message box CSS  
    ZK TextBox Small Search Box  

     


    ZK 6 CSS

    Please Note : All the below Examples will work correctly only on ZK 5 and ZK 6 Version

    ZK Button Stylish Button created using ZK Link component. Demo
    ZK Button Part 2 Stylish Button created using ZK Link component. Demo
    ZK Button Part 3 Stylish Button created using ZK Link component. Demo
    ZK Button ZK Fancy Buttons Demo
    ZK TextBox Big Search Box. Demo
    ZK TextBox CSS3 Search Box. Demo
    ZK Login Sample Login Form Design in ZK  
    ZK Grid Customize ZK Grid CSS  
    ZK Tab Box Tabbed Dialog Form - 2 Demo
    ZK Tab Box Tabbed Dialog Form - 1 Demo
    ZK Tab Box Navigation Menu  
    ZK Menu ZK Vertical Menu  
    ZK Form ZK Form Design CRUD Example  
    ZK Form Search Screen Example  
    ZK Form Multi Column Big Screen Design  
    ZK Search ZK Search Box  
    ZK Button ZK Button CSS Customization  
    ZK Window ZK Modal Window CSS Customization  
    ZK ListBox ZK Listbox CSS  
    ZK Panel ZK Panel CSS Customization  
    ZK Messagebox ZK Message box CSS  
    ZK ToolBar ZK Tabbox with Tool Bar Button  
    CSS File How to Refer External CSS File in ZUL  
    ZK Button Button Collection  
    ZK Window ZK Window CSS  
    ZK Group Box Group Box with Collapse and Expand Button in the Right  


    ZK Small Application

    ZK MVVM CRUD Example without DB Connection
    Step by step tutorial on ZK MVVM CRUD Operation without any DB Connection. online Demo here

    ZK MVVM With Spring + JPA + Hibernate Entity Manager
    Step by step Tutorial on how to Integrate ZK With spring and JPA (Hibernate vendor)

    ZK MVVM With Spring + Hibernate 4 API Direct
    Step by step Tutorial on how to Integrate ZK With spring and Hibernate API

     

    ZK MVC CRUD With Spring 3 + JPA + Hibernate 4 Entity Manager.
    A simple CRUD Application based on JPA. Step by step Tutorial on how to create simple CRUD application using ZK as Presentation layer with Spring 3 and JPA (Hibernate vendor).

     
    ZK + Spring Security Custom Login form.
    Step by step Tutorial on how to integrate ZK and Spring security


    ZK + Spring + MVVM + Hibernate - Small Application

    Highlights
    1. ZK Maven Project Steps
    2. Spring Security integration with custom login form
    3. Spring and Hibernate integration
    4. Generic DAO and Service Layer
    5. Theme customization by each user
    6. jQuery integration with ZK Framework
    7. Store Image in the Database
    8. Validation using Hibernate Validator

     

     

    ZK 7 + Spring + MVVM + Hibernate + MySQL + List Box

    Highlights
    1. ZK Maven Project Steps
    2. Spring and Hibernate integration
    3. Explained the following features in ZK List box

    a) Format the amount field and show the currency symbol.
    b) Column sorting.
    c) Showing date fields in preferred format using ZK Converter.
    d) Showing phone numbers in preferred format using ZK Converter.
    e) Use EL expression to call a method in a ViewModel.
    f) Binding label value according to run time value.
    g) Dynamic sclass based on value.
    h) Dynamic Template.

    Hibernate n+1 problem

    First let us try to understand what n+1 Problem in hibernate

    MVVM Command annotation and Notify change example

    Here is an example, how to pass parameter on a zul through MVVM Command binding annotation.

    EMR Most Commonly used Vital sign

    ZK Hibernate one to Many annotation mapping bidirectional CRUD example using MVVM

    In this post, we will see how we can implement hibernate one to Many mapping (master & detail) bidirectional using ZK Components

    EDI 5010 Documentation – 837 Professional GE Functional Group Trailer

    GE – Functional Group Trailer

    One to many mapping using bidirectional relationship – onetoMany as Owner

    First let us look the hibernate documentation on this as follows

    Sample HL7 Files

    LAB Test Panels

    Let us see some most commonly used panels.

    EMR In-house Lab workflow

    Back to domain Smile

    In my last company, we follow the below workflow for the in-house lab order. Please note : Even though I mention as use case, but it may not have all the typical structure of a use case. I will explain in my own way. 

    One to many mapping using bidirectional relationship– ManytoOne as owner

    First let is look the hibernate documentation on this as follows

    Hibernate–Java Environment setup

    We will see how we can setup the Environment in eclipse to learn our examples in hibernate.

    My date box Component

    Using jquery plugin, we will create our date box component in ZK and apply mask and water mark. You can download the jquery plugin from the following site
    http://digitalbush.com/projects/masked-input-plugin/
    http://digitalbush.com/projects/watermark-input-plugin/

    Tech Links

    Hibernate


    Spring Security


    Spring  + Hibernate + JPA + Entity Manager


    Spring Service and DAO Layer

     

    HibernateTemplate or EntityManager

    Generic DAO

     

    Spring and Hibernate ORM Framework Integration.
    1.
    http://www.javabeat.net/2007/10/integrating-spring-framework-with-hibernate-orm-framework/
    2. http://static.springsource.org/spring/docs/2.5.x/reference/orm.html
    3. http://blog.springsource.org/2012/04/06/migrating-to-spring-3-1-and-hibernate-4-1/
    4. http://javaprogrammingtips4u.blogspot.in/2010/04/spring-integration-with-hibernate_23.html


    ZK Hibernate one to one annotation mapping bidirectional CRUD example using MVVM

    In this post, we will see how we can implement hibernate one to one mapping bidirectional using ZK Components

    ZK Component extend

    In this post, we will see how we can create our component by extending ZK Component. All the jquery plugin can be used in ZK. The following example will explain how to create Phonebox, Zip Code and Tax ID.

    ZK Messagebox Styling

    This examples show how you can use change the Look and Feel of ZK MessageBox Component.

    Combo Box– Show images for Items based on some condition

    We will see how we can also show the images for the combo items bases on some conditions.

    ZK Border Layout–Another example

    This examples show how you can use ZK Border Layout to show the product information on clicking image.

    MVVM–List Item–Hibernate–MySQL–Part 3

    Note: This is continuation of my previous article Part 2.  Please click here to go to Part 2

    In this Part 3, we will enhance our Listing and model window as follows

    1. We will include one more column as last named as Actions. This action will contain image such as edit, activate and delete.
    2. We will also give hyperlink for the first column. If the user clicks the first column, then we will show the information in the read-only and if the user clicks the edit image in the action column, then we will show the information in the read only and will allow the user to edit and save.

    C Workbook

    In the year 1999-2002, I was working as faculty in a computer center. During that period, I developed a small VB Application to explain the concept of C. Here are the some screenshots from that VB Project

    image

     

    image

     

    image

     

    image

     

    image

     

    image

    MVVM Modal window–Pass Parameter and Return values

    In this post, we will see how we can pass some values to the modal window when calling from the parent window and also vice versa (i.e) return some values from the modal window to parent window

     

    Project Name : MVVMModalWindow
    Project Structure:

    image

    Demo.zul

    <?page title="new page title" contentType="text/html;charset=UTF-8"?>
    <zk>
    <window title="MVVM Modal window Passing arguments and retur values"
    border="normal" apply="org.zkoss.bind.BindComposer"
    viewModel="@id('e') @init('com.demo.UI.demoVM')">
    Type any value and Press the Model Window Button
    <separator />
    Value 1 :
    <textbox value="@bind(e.value1)" />
    Value 2 :
    <textbox value="@bind(e.value2)" />
    <button label="Model Window" onClick="@command('showModelWin')" />
    </window>
    </zk>

     

    demoVM.java

     

    package com.demo.UI;

    import java.util.HashMap;

    import org.zkoss.bind.annotation.BindingParam;
    import org.zkoss.bind.annotation.Command;
    import org.zkoss.bind.annotation.GlobalCommand;
    import org.zkoss.zk.ui.Executions;
    import org.zkoss.bind.annotation.NotifyChange;

    public class demoVM {

    private String value1;
    private String value2;


    public String getValue1() {
    return value1;
    }

    public void setValue1(String value1) {
    this.value1 = value1;
    }

    public String getValue2() {
    return value2;
    }

    public void setValue2(String value2) {
    this.value2 = value2;
    }

    @Command
    public void showModelWin()
    {
    final HashMap<String, Object> map = new HashMap<String, Object>();
    map.put("value1", this.value1 );
    map.put("value2", this.value2);
    Executions.createComponents("ModelWindow.zul", null, map);
    }

    @GlobalCommand
    @NotifyChange({"value1","value2"})
    public void refreshvalues(@BindingParam("returnvalue1") String str1, @BindingParam("returnvalue2") String str2)
    {
    this.value1 = str1;
    this.value2 = str2;
    }
    }


    ModelWindow.zul

    <?page title="new page title" contentType="text/html;charset=UTF-8"?>
    <zk>

    <window id="modalDialog"
    title="MVVM Modal window Passing arguments and retur values"
    width="420px" height="auto" border="normal" minimizable="false"
    mode="modal" maximizable="false" closable="true"
    action="hide: slideUp" apply="org.zkoss.bind.BindComposer"
    onCancel="@command('closeThis')"
    viewModel="@id('e') @init('com.demo.UI.ModelWindowVM')">

    Change the values and Press the Ok Button to return changed
    values.
    <separator />
    Value 1 :
    <textbox value="@bind(e.value1)" />
    Value 2 :
    <textbox value="@bind(e.value2)" />
    <button label="Ok" onClick="@command('save')" />
    </window>
    </zk>


    ModelWindowVM.java

     


    package com.demo.UI;

    import org.zkoss.bind.annotation.Command;
    import org.zkoss.bind.annotation.ContextParam;
    import org.zkoss.bind.annotation.ContextType;
    import org.zkoss.bind.annotation.ExecutionArgParam;
    import org.zkoss.bind.annotation.Init;
    import org.zkoss.zk.ui.Component;
    import org.zkoss.zk.ui.select.Selectors;
    import org.zkoss.zk.ui.select.annotation.Wire;
    import org.zkoss.zul.Window;
    import java.util.HashMap;
    import org.zkoss.bind.BindUtils;
    import java.util.Map;

    public class ModelWindowVM {

    @Wire("#modalDialog")
    private Window win;
    private String value1;
    private String value2;


    public String getValue1() {
    return value1;
    }

    public void setValue1(String value1) {
    this.value1 = value1;
    }

    public String getValue2() {
    return value2;
    }

    public void setValue2(String value2) {
    this.value2 = value2;
    }

    @Init
    public void init(@ContextParam(ContextType.VIEW) Component view,
    @ExecutionArgParam("value1") String v1,
    @ExecutionArgParam("value2") String v2) {
    Selectors.wireComponents(view, this, false);
    this.value1 = v1;
    this.value2 = v2;

    }

    @SuppressWarnings({ "unchecked", "rawtypes" })
    @Command
    public void save() {
    Map args = new HashMap();
    args.put("returnvalue1", this.value1);
    args.put("returnvalue2", this.value2);
    BindUtils.postGlobalCommand(null, null, "refreshvalues", args);
    win.detach();
    }

    @Command
    public void closeThis() {
    win.detach();
    }
    }


    Now you can run the demo.zul file