Healthcare Workflow Example
This program models healthcare workflow.
Problem Statement
Write a Java program to model Patient and HealthcareWorkflow classes.
Source Code
| 1 | class Patient { |
| 2 | String name; String treatment; |
| 3 | Patient(String n,String t){ name=n; treatment=t; } |
| 4 | } |
| 5 | class HealthcareWorkflow { |
| 6 | void process(Patient p){ System.out.println("Patient "+p.name+" receives "+p.treatment); } |
| 7 | } |
| 8 | public class HealthcareWorkflowExample { |
| 9 | public static void main(String[] args) { |
| 10 | System.out.println("Eduinq Healthcare Workflow"); |
| 11 | Patient p=new Patient("Arun","Physiotherapy"); |
| 12 | HealthcareWorkflow hw=new HealthcareWorkflow(); |
| 13 | hw.process(p); |
| 14 | } |
| 15 | } |
Program Output
Eduinq Healthcare Workflow Patient Arun receives Physiotherapy
Explanation
Patient models healthcare details. - HealthcareWorkflow processes treatment. - This demonstrates enterprise healthcare workflow modeling. Conclusion: Shows healthcare workflow example.