Skip to content

Java attributes and methods

Rashmika_Harshamal edited this page Jul 20, 2026 · 27 revisions

Java Attributes and Methods in the HMIS System

Java attributes and methods are essential parts of HMIS development.

Attributes store information such as:

Patient name Patient code Bill total Created date Department Investigation Report status Retired status

Methods are used to:

Read attribute values Change attribute values Validate data Calculate totals Process reports Search database records Clear filters Format information for display

A simple HMIS-style example is:

private String patientCode; private double total; private boolean retired;

public String getPatientCode() { return patientCode; }

public void setPatientCode(String patientCode) { this.patientCode = patientCode; }

public double calculateNetTotal(double discount) { return total - discount; }

In this example:

patientCode, total, and retired are attributes. getPatientCode(), setPatientCode(), and calculateNetTotal() are methods.

Clone this wiki locally