Category: Development

CI Development Routine

CI Development Routine
Daily Scrum:  9:30AM Daily
Peer Code Review:  Every Friday
Sprint Period:  2 weeks
Sprint Planning:  Bi-weekly (1st & 3rd Monday)
Sprint Review:  Bi-weekly (2nd & 4th Friday)
Knowledge Sharing: Monthly (Every last Friday of the month)

 

 

Daily Scrum
DS is to get latest development updates. Each dev will answer:-

1. What did you do on previous working day? Scrum Progress %?
2. What do you plan to do today?
3. Any blockers?

Each dev should spend less than 3 mins to update. Anything longer should be in a separate discussion.
Expected Attendees:-

1. Project Manager (Optional)
2. Tech Manager
3. All dev
4. All support engineer

 

 

Sprint Planning
SP is to set a Sprint Backlog (Sprint Goal, Product Backlog, Deliverable Plan). Topics to cover:-

1. Why is this Sprint valuable?
2. What can be Done this Sprint?
3. How will the chosen work get done?

Product Backlogs will be entered into MantisBT.
Max time: 4 hours

Expected Attendees:-

1. Project Manager
2. Tech Manager
3. Product Owner
4. All dev

 

 

Sprint Review
SRV is to inspect the outcome of the previous Sprint and to determine future adaptations. Dev will present what was accomplished in that Sprint and its progress towards  the Sprint Backlog. Incomplete tasks will be moved back to the Product Backlog. Product Backlog will be adjusted to meet new opportunities.
Max time: 2 hours
Expected Attendees:-
1. Project Manager
2. Tech Manager
3. Product Owner
4. All dev

 

 

Sprint Retrospective
SRT is to plan ways to improve quality & effectiveness. Topics:-
1. What went well?
2. What problems were encountered?
3. How were the problems solved?
4. What did you learn from this Sprint?

Max time: 1 hour
Expected Attendees:-
1. Project Manager (Optional)
2. Tech Manager
3. All dev

 

 

Peer Code Review
PCR is for dev to reduce code smells and also to improve coding style, convention and code readability. Review should be objective. The purpose is not to review system functionality. Each week, each dev will review code that was committed onto our SVN for the past week. Reviewer and reviewee will rotate every week so that each dev will have a chance to view coding styles of all team members.

 

 

Knowledge Sharing Session
KSS is for dev to share new technical skills or information  on newly developed tech or modules to peers.  Each dev will contribute to KSS every month.

Max time:  3 hours

Expected Attendees:-
1. Tech Manager
2. All dev

ChemoLIMS NX Permission & Role Setup

Each module contains a permission file to configure and identify which role allow to take certain action on page or facility, follow below guide for the configuration steps:

  1. After boot intellij, double tap “SHIFT” to search for permission.yml file or locate by path: \webapps\webappcore\src\main\java\ci\com\apps\webappcore\[module_name]\assets\config

    module_name represent the module you’re looking for to setup permission.- What if the module was newly added, possible the permission file haven create. To create a new permission file, simply copy an existing permission.yml file, and create the folder path start from [module_name]\assets\config– Once folder created, you can drop the copied permission.yml file into config folder and start editing permission content.
  2. To modify the content, simply open new or existing permission.yml file by using any file editor or IntelliJ, and refer below image for more details:

    modulecode is to set which module using this permission, modulecode can refer from gulfile.js when setting xmodule.- modulename is the name of the module.- User role can be trigger based on the list of “green text”, #[number] represent rolelevel from Database table base_approles, but in opposite way, which mean if #20 “Remote Users” in table will be list as rolelevel 90.
  3. After setup the identification of the permission, next will be configure what page allow to take what action. Before we go for the list, you can retrieve the page id and action from JS file, take sample-list.js as example, refer below image:

    $scope.pageid is represent the page name to use in permission file- $scope.permissions is represent what action can be taken from the page, default will be create, read (default), update, delete, which equal to #crud in permission.yml.
    id represent the page id / name retrieve from JS file
    actions represent the permission control in page
    access represent the role level, level can refer from step 2
  4. To set permission command / code into DOM, simply refer below example:

  5. Now move to UI/UX, login as Administrator account and to completely install permission into the selected module, navigate to Settings > Manage Roles.
  6. In Manage Role page, look for the green button “Permission Install” and click on it. A pop should appear to let you insert the permission content copy from permission.yml file.
    After a pop up appear, just insert the permission content into the text box / text field, and click “Install” to save the permission into database. Once install successfully, a “success” message will be show beside the Install button. Refresh the page and the table shall display properly if the permission set correctly.
  7. To trigger the permission for specific role to use under UI/UX, simply click any role row from the table, and a slide down form will display on top of the table.
    Permission Role represent how many percent of action can be perform on the role.
    Below image is the slide down form to setup how many permissions can be perform in a page.
    – Click the button one time and change to green color, permission will be Activate and allow the role to take that action.
    – Click the button one time and change to grey color, permission will be Deactivate and not allow the role to take that action.
  8. To change the role from user account, login as Administrator or any account have the right to modify login details, and navigate to Settings > Manage Roles.
  9. In Manage Logins page, to add a new login user can click the blue + button, for edit existing user just simply click the row of user and a slide down form will display on top of the table.
  10. To change the role of user, look for Role on the form, and choose another role from the dropdown / list selection. Once complete the editing, click “Save” button for update.

ChemoDMS Development

Prerequisites

  • Windows – 7,8,10
  • IDE – Intellij Community Edition
  • Java version – 1.8
  • Maven

Project requirement

Develop a multiple page window application using JavaFx. Use Scene Builder app to design front-end and RESTAPIs endpoints, process JSON to get data and populate in containers and controls. Show complete testresults, single patient testresults and quality control showing statistics, LJcharts, DataTable vertical view and horizontal view and NOVA screens. Configure into a deployable jar using maven.

Project Structure

Project follows maven structure

Each page in the application will have a FXML file and related controller file. We can find all the controller java files in the following path. Path => Chemolimsmini\src\main\java\ChemoLIMS\mini\ui.

We can find all the FXML files in the following path. Path => Chemolimsmini\src\main\resources\fxml.

POJO classes(Model) to map the json is at the following path. Path => Chemolimsmini\src\main\java\ChemoLIMS\mini\pojo.

External Jars used for feature development is placed at the following location. Path => Chemolimsmini\src\main\java\ChemoLIMS\mini\Libraries

Images, icon and other resources were stored in the following path. Path => Chemolimsmini\src\main\resources\resrc

RestClient

RestClient allows you to send authenticated HTTP requests to a server. It is the entry point for all rest service operations.The RestClient.java can be found in the following path. Path => Chemolimsmini\src\main\java\ChemoLIMS\mini\controllers\RestClient.java

Global Variables

Since we are using endpoints to get data and accessing server with both internal and external IP it is recommended to declare the domain globally as a variable. Some of the globally declared variables are as follows.

public static RestClient restClient = new RestClient();
public static ObjectMapper mapper = new ObjectMapper();
public static String endpointurl = "http://chemolims.chemopharm.com";
public static String endpointurl = "http://cidevsvr";

These variables are declared globally in the following location. Chemolimsmini\src\main\java\ChemoLIMS\mini\controllers\GlobalVariables.java

Application Theme

The theme of application classified into two(dark theme and light theme).It is an user configurable theme, an user can select the theme type before logging in.

Application Css

We are using custom css for styling the application. Included two css files one for the dark mode and another for light mode. The following css files can be found at the below location.

Dark Theme => Chemolimsmini\src\main\resources\StyleSheets\darkcss\style.css

LightTheme => Chemolimsmini\src\main\resources\StyleSheets\lightcss\stylelight.css

Selectors used in css files are mainly based on id,element,class.

For example, All the button in the application should follow same color pattern can be coded as below.

.button{
    -fx-background-color: #005288;
    -fx-text-fill:#ffffff;
}

Styling a button to show unique has been coded as

#buttonid{
    -fx-border-color: white;
    -fx-background-color: #3c3f41;
}

External Jars

The application uses several jars for enhancement. The below are some of the jars and its purpose.

jackson-annotations-2.10.0.pr3 => Jackson is a simple java based library to serialize java objects to JSON and vice versa.

jackson-databind-2.10.0.pr3 => Data Binding API is used to convert JSON to and from POJO (Plain Old Java Object) using property accessor or using annotations.

jackson-core-2.10.0.pr3 => catch JsonProcessingException.

itextpdf-5.5.13.1 => Generate PDF files and show reports including datatable, LJcharts, Statistics. Theme selection also done using creating PDF file.

jfoenix-8.0.8 – Scene Builder element – Navigation drawer and hamburger functionality.

spring-core-5.1.5.RELEASE, slf4j, spring-jcl-5.1.5.RELEASE, spring-web-5.1.5.RELEASE, spring-beans-5.1.5.RELEASE,spring-context-5.1.5.RELEASE=> RestClient Execution.

poi-4.1.2 => Generate excel sheets with datatable value.

Containers and Controls used

Application Structure
  • Stage – A stage (a window) contains all the objects of a JavaFX application. It is represented by Stage class of the package javafx.stage.
  • Scene – A scene represents the physical contents of a JavaFX application. It contains all the contents of a scene graph.
  • Scene Graph and Nodes – The Node Class of the package javafx.scene represents a node in JavaFX, this class is the super class of all the nodes.

Login Page

  • Containers -> AnchorPane.
  • Controls -> Label, TextField, Buttons, ChoiceBox.

TestResultList

  • Containers -> StackPane, AnchorPane, FlowPane, BorderPane, ScrollPane, JFXDrawer.
  • Controls -> Label, TextField, Buttons, ChoiceBox, TableView, ProgressBar, Hamburger, TableColumn.

Patient TestResults

  • Containers -> StackPane, AnchorPane, FlowPane, BorderPane, ScrollPane, JFXDrawer.
  • Controls -> Label, TextField, Buttons, ChoiceBox, TableView, ProgressBar, Hamburger, TableColumn.

Quality Control

  • Containers -> StackPane, AnchorPane, FlowPane, BorderPane, ScrollPane, JFXDrawer, TabPane, Tab, TilePane.
  • Controls -> Label, TextField, Buttons, ChoiceBox, TableView, ProgressBar, Hamburger, TableColumn, LineChart.

Nova Screens

  • Containers -> StackPane, AnchorPane, FlowPane, BorderPane, ScrollPane, JFXDrawer, TilePane.
  • Controls -> Label, TextField, Buttons, TableView, Hamburger, TableColumn.

Deployable Jar Configuration

Deployable jar can be configured by two ways.

Application follows Maven Structure and on executing maven lifecycle it will generate a jar inside the target folder.

Intellij provides an option to create an executable jar with adding external dependencies.

Here we are using the second approach to create jar. Have to execute the following steps in Intellij to generate the deployable jar.

File -> Project Structure -> Artifacts -> JAR -> from modules with dependencies.

Opens a pop-up window, Select Main Class(ChemoLIMS.mini.Main.java) -> Select the external dependencies which needs to be included. Click Apply and Ok.

The Executable jar with dependencies generated in the following path. Chemolimsmini\out\artifacts\chemolimsmini\chemolimsmini.jar

If any code modifications done in java or fxml files after creating jar and needs to be updated in jar, can follow the steps to do.

in Intellij, Build -> Build Artifacts -> chemolimsmini(Jar name) -> Rebuild. Will reproduce the jar updated and locate in the same path.

The optimal resolution for the application is 1366 x 768.

 

Update HTTPS Certificate

Step 1:

Search Command Prompt (CMD) on Start Menu, right click and select “Run as administrator”

Step 2:

In CMD, “cd” to the path of “C:\Program Files\Java\jre8\bin”.

Step 3:

Export the certificate storing file to plain text to search correct aliasname, by using command keytool -list -keystore ../lib/security/cacerts -rfc > C:\Users\master\Desktop\certfile.txt

  • Password may require: changeit
  • .txt file was created under desktop, you can look for certfile.txt

Step 4:

Look for the latest “Creation date” and that’s the certificate using and require to replace a new certificate. Take note on the “Alias Name”, for example NameOfTheAlias

Step 5:

Once locate the alias name, back to Administrator Command Prompt and insert command keytool -delete -alias NameOfTheAlias -keystore ../lib/security/cacerts

  • NameOfTheAlias is the alias name, how’s going to retrieve may refer Step 3 & Step 4
  • Password may require: changeit

Once successfully remove old certificate, minimize CMD and proceed next step.

Step 6:

Open browser (Google Chrome) and navigate to API connect URL (for example: https://app.geneexpress.com/api/1.0/). Retrieve the certificate by click the lock beside URL > Certificate > Details > Copy to file… , select Base-64 encoded X.509, and complete the wizard for export to Desktop/Folder. Extension may select (.cer) or (.crt).

Step 7:

Once certificate successfully downloaded, rename to any specific project for easy search in future, for example: ge2020.crt / ge2020.cer

  • You may store certificate file under a folder (for example, store under C:\apps\chemolimsnx)

Step 8:

Open back the CMD minimize from Step 5, make sure the CMD existing path is at “C:\Program Files\Java\jre8\lib\security”, let said the certificate name we just added at Step 6 & Step 7 is call “ge2020.crt”, and store under chemolimsnx folder, insert below command:


keytool -import -trustcacerts -file C:\apps\chemolimsnx\ge2020.crt -alias NameOfTheAlias -keystore ../lib/security/cacerts

  • NameOfTheAlias is the alias name, how to retrieve may refer to Step 3 & Step 4
  • Password may require: changeit
  • Trust this certificate? Will be asking after insert password, insert/input “Yes” and click Enter

ChemoLIMS NX Frontend & Backend Setup Should Know

  1. Database Setup:

    To assign database, for shortcut quick click “Shift” twice, and look for webappcore\src\main\resources\application.properties


    Look from line 1x, you will found the line of code “spring.datasource.url”, simply change to the database you want:

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen1.jpg’ title=” title_color=” title_tag=”]- localhost:5434 can change to your desire port using
    temp_dwnp_live can change to your desire database name

    [/image_with_text]

  2. CALL FUNCTIONS: GET, UPDATE, DELETE:

    Each module contains one of FomService.js file under sections folder. FormService will contain all the method to be call from backend to frontend. Refer below image for the page view.


    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen2.jpg’ title=” title_color=” title_tag=”]

    – You may direct use the white label as the function to call
    – To create new call function, simply duplicate one and change the label, method & url

    [/image_with_text]
  3. Setup HTML & Controller:

    Each module contains one of module.js file under module root folder. Module JS use to identify which HTML is belong to which controller.


    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen3.jpg’ title=” title_color=” title_tag=”]

    – Controller name has to be unique
    – File path cannot be same or duplicate

    [/image_with_text]
  4. Create & Setup New Module:


    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen4.jpg’ title=” title_color=” title_tag=”]

    Step 1: Frontend, navigate to this path and duplicate one of existing, and rename to the new module name.
    (For example, module-newmoudlename.json)

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen5.jpg’ title=” title_color=” title_tag=”]

    Step 2: Fronend, open the new created json file, change:
    href to the module url path
    title to module full name
    package to module short name / call name

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen6.jpg’ title=” title_color=” title_tag=”]

    Step 3: Backend, open file from or shortcut click “shift” twice, and search for apps\common\config\WebappProperties.java


    – Insert module short name / call name into last value of MODS_ALL
    – MODS_yourmodulename
    can be added, but remember to change the value from String modules

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen7.jpg’ title=” title_color=” title_tag=”]

    Step 4: Backend, open file from or shortcut click “shift” twice, and search for apps \core\WebappProperties.java


    – Insert module short name / call name into last value of “all” under packmodules

    [/image_with_text]
  5. Setup Permission:

    Module of page would have a section to tell which permission applicable on the page.


    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen8.jpg’ title=” title_color=” title_tag=”]

    Step 1: Frontend, open page would like to apply permission, and use above image code or duplicate from another existing permission page and change:


    $scope.pageid change to a unique id for your page
    $scope.permissions can set permission you want in the page

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen9.jpg’ title=” title_color=” title_tag=”]

    Step 2: Backend, create or open your backend module folder from apps\webappcore\[YOUR_MODULE] and create a folder path \assets\config if don’t have.

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen10.jpg’ title=” title_color=” title_tag=”]

    Step 3: Create or duplicate an existing permissions.yml file, and change the content to your module permission style:


    modulecode change to your module short name / call name
    modulename change to your module full name
    id is the page of id ($scope.pageid)
    actions is the permission you set for the page ($scope.permissions)
    access is the level of person can be access below of the page(s)

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen11.jpg’ title=” title_color=” title_tag=”]

    Step 4: Open Chemolims NX application and navigate to Settings > Manage Role page. Click “Permission Install” button and a pop up should display.

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen12.jpg’ title=” title_color=” title_tag=”]

    Step 5: Copy & paste the complete version of code from permission.yml into the textfield of the popup and click “Install” button. Now permission should install according the format you set.

    [/image_with_text]
  6. API Connection:

    For certain client such as Elken DNAecomLab, our Chemolims NX application has to communicate with their third party system to retrieve data into our application.


    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen13.jpg’ title=” title_color=” title_tag=”]

    Navigate webappcore\src\main\resources\application.properties and scroll to line 5x, you should have this few line of code to setup Elken TruYou API.


    webapp.dnaecomlab.truyouapi.url for API url, have to concern about the certificate of expiration
    webapp.dnaecomlab.truyouapi.enabled for enable/disabled API function in the application

    [/image_with_text]

Start ChemoLIMS NX Module

After an update has been made or certain new file added, you have to re-compile the new file with the local application, to do it follow below guide:

  1. After boot intellij, navigate to a JS file or for shortcut click “Shift” twice and insert \webappcore\src\main\resources\static\apps\gulpfile.js
    To specific which module to run for gulp, scroll to line 2x and change xcommon & xmodule

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/start-chemolimsnx-module-screen1.jpg’ title=” title_color=” title_tag=”]- xcommon to specific which common module using
    xmodule to specific which module will be editing[/image_with_text]
  2. Navigate to below and look for “Terminal” to click. A terminal panel shall pop up/float up, refer sample image in below.

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/start-chemolimsnx-module-screen2.jpg’ title=” title_color=” title_tag=”]- Ensure the path of terminal prompt is same as the path you import project by selecting build.gradle from Setup ChemoLIMS NX Project.[/image_with_text]
  3. Insert “env” and auto redirect will be direct to static\apps folder path.
    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/start-chemolimsnx-module-screen3.jpg’ title=” title_color=” title_tag=”][/image_with_text]
  4. Next, insert “gulp buildmods” command to build up all module.

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/start-chemolimsnx-module-screen4.jpg’ title=” title_color=” title_tag=”][/image_with_text]
  5. Finished build module, ton of message will be prompt until it shows finished buildmods in last line. Insert “gulp buildapp” to build up the overall application.

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/start-chemolimsnx-module-screen5.jpg’ title=” title_color=” title_tag=”][/image_with_text]
  6. Lastly, after finished buildapp message been prompt, insert “gulp” to do a full compile and finalize and keep gulp running so you won’t need to insert command for every time if file update/modify.

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/start-chemolimsnx-module-screen6.jpg’ title=” title_color=” title_tag=”][/image_with_text]
  7. For every moment you have update, modify or any action been done in existing application file, you have to build the module again to trigger gulp run update command. To do this, on the top left of intellij, navigate to “Build” and click “Build Module” for TWICE to keep the update.

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/start-chemolimsnx-module-screen7.jpg’ title=” title_color=” title_tag=”][/image_with_text]

HL7 Result Status for ORU-Message OBR-Segment

HL7 v2.6 – 0123 – Result Status

Taken from:-
https://hl7-definition.caristix.com/v2/HL7v2.6/Tables/0123

HL7 Standard Tables – Tables defined by the HL7 organization. Most tables in this category are related to the standard and its message structures.

VALUE DESCRIPTION COMMENT
A Some, but not all, results available
C Correction to results
F Final results; results stored and verified.  Can only be changed with a corrected result.
I No results available; specimen received, procedure incomplete
O Order received; specimen not yet received
P Preliminary: A verified early result is available, final results not yet obtained
R Results stored; not yet verified
S No results available; procedure scheduled, but not done
X No results available; Order canceled.
Y No order on record for this test.  (Used only on queries)
Z No record of this patient. (Used only on queries)

Connecting Microsoft Excel with PostgreSQL DB

Environment Setup

Window 7 - 64 bit
Microsoft Office 2016 - 32 bit

Requirement

Need to install a plugin so that Microsoft Excel can communicate with PostgreSQL DB.
Plugin name: psqlodbc
Download Link: https://www.postgresql.org/ftp/odbc/versions/msi/
Notes: Choose a msi installer based on your office version. In this case it use 32 bit version.
       Can choose the latest version. In this case I download version psqlodbc_12_01_0000-x86.

 

Steps

    1. After download the installer, we will get a zip file that contains a msi type file and a README file. Double click the msi installer and just proceed like a normal installation. Choose default option for all setting.
    2. After finish all the installation step, go to ‘Control Panel\Programs\Programs and Features’ and check whether psqlODBC was successfully installed on your machine or not.
    3. To start connecting Microsoft Excel to PostgreSQL DB, open any Excel sheet and go to Data -> Get External Data -> From Microsoft Query and click that option.
    4. Then a popup window will appear asking for data source connection. Choose <New Data Source> and click OK.
    5. For option 1, put any name that you like for this datasource connecetion, in this case it is called ‘excel_postgreSQL’. Option 2, choose ‘PostgreSQL Unicode’. Then for Option 3, click on the connect button and another popup will open.
    6. For this popup window, it will ask for your postgreSQL connection. Fill in the form based on your setup. Click OK after finish filling all field.
    7. It will bring us back to Create New Data Source popup window. Optional step, you can choose to save User ID and password for this datasource setup.
    8. After that, choose the datasource that you just created and click OK.
    9. Then Query Wizard will appear, this wizard is a tool use to get record from PostgreSQL DB without need to write a query. In this case, just closed that window and use Microsoft Query window to create your own query.
    10. Click on the SQL button inside the window, to show SQL script window so we can put customize query to get all the record.
    11. After click on that SQL button, another window will popup and can put customize query on that window to generate the result as wanted.
    12. After that, click OK and and it will go back to Microsoft Query window. If the query is valid, it will automatically show the result at this window. If already satisfied with the query, click Return Data button on the top to populate the record at Excel sheet.
    13. Another window will appear asking on how we want to show the record inside Excel sheet and asking where do you want to populate the record (eg: in sheet 1 cell A10).
    14. This is the final result for this session.

 

Extra Notes

Red box -> Refresh All -> Use to refresh and fetch new record for database based on the query. Green box -> Properties -> Excel and connection configuration. This is also where you can edit your query and connection setting.

 

Query with Parameter

Excel can also accept query with parameter. To use this feature, you need to insert question mark (?) inside the query. It will detect 
this symbol and automatically asking for parameter value. It also can accept multiple parameter. Parameter number will be based on the 
symbol sequence inside the query.

 

Steps to produce

  1. Exactly the same step, Open any Excel sheet and go to Data tab.
  2. Choose Get External Data -> From Other Sources -> From Microsoft Query.
  3. It will prompt Choose Data Source window, choose previously created data source or can create a new data source by following the step mention previously in this document.
  4. After choosing data source, insert Username and Password for the data source if applicable.
  5. Then it will show Query Wizard window, just choose Cancel option.
  6. After that it will show Add Table window, just choose Close option.
  7. Choose SQL option and insert this query: SELECT doctorid, doctorname, qualification, gpsp, specialistin, doctorcode FROM doctor_masters where doctorname = ?
  8. The question mark symbol will indicate a parameter that user can dynamically choose the value for it. Excel will automatically prompt a parameter window and you can insert the value. In this case you just put Admin value
  9. After click OK, it will show the result and you can click Return Data to show the record inside Excel sheet.

 

Fetch New Data With Drop down Selection

Previously we managed to create a query that accept parameter so we can put any value and change that value whenever needed. In this case, it 
will show how the data will  keep on changing based on value selection.

1. Create new drop down list to use as selection. Click on any cell, then go to Data tab, choose Data Validation. Choose Type List and 
Select the Source.
  
2. Select cell that have the query record, then inside Data tab, choose the properties to change the query properties. Then click on Connection 
properties button beside Connection name field. 

3. Then it will shows Connection properties window and click on the Definition tab. Inside  that tab, it has Connection properties and query 
that had been created previously. Make sure your query have question mark symbol (?) to make this things work. 

4. Inside this window, just click OK button, then it will prompt Enter Parameter Value and you need to choose the cell that had drop down list 
and check those 2 option also.


5. After you click OK, then if your query is valid and data existed, the record value will keep on changing when you change the drop down value. 
Here is sample record display after we change the drop down value.



Revalidate Flag in HL7 Results File for Nova Vesalius HIS

Introduction

For results transmission to Nova Vesalius HIS, the generated HL7 message contains the result’s a flag to indicate whether the result has been revalidated or not.

 

Script to Reset Revalidate Flag

UPDATE pmo_patient_specimens
   SET firsttransmitted=null, lasttransmitted=null
 WHERE 
sampleid = _sample_barcode_number_

 

_sample_barcode_number_ is the value from the sampleid column ofr the pmo_patient_specimens table.

 

Committing to SVN

When doing “SVN Commit”, the messages field should be filled up with relevant information.  Effort should be made to avoid pushing cumulative tickets.  Here is the minimum amount of information to be filled:-

  1. MantisBT ticket no. in the format of:  #M[TicketCode][TicketID]
    • Ticket Code:
      • B – bug
      • E – enhancement
      • F- feature
      • O – others
  2. Short description of the codes to be committed.

For example, to push a bug with ID 786, the commit message would be:-

 

   #MB786 Fix for Reset Password feature