001package ca.cdr.api.pub.hl7v2.common.abstraction; 002 003/*- 004 * #%L 005 * Smile CDR - CDR 006 * %% 007 * Copyright (C) 2016 - 2024 Smile CDR, Inc. 008 * %% 009 * All rights reserved. 010 * #L% 011 */ 012 013import ca.uhn.hl7v2.HL7Exception; 014import ca.uhn.hl7v2.model.v25.segment.AL1; 015import ca.uhn.hl7v2.model.v25.segment.DG1; 016import ca.uhn.hl7v2.model.v25.segment.GT1; 017import ca.uhn.hl7v2.model.v25.segment.IN1; 018import ca.uhn.hl7v2.model.v25.segment.IN2; 019import ca.uhn.hl7v2.model.v25.segment.OBX; 020import ca.uhn.hl7v2.model.v25.segment.PR1; 021import ca.uhn.hl7v2.model.v25.segment.PV1; 022import ca.uhn.hl7v2.model.v25.segment.PV2; 023 024import java.util.List; 025 026/** 027 * Serves as an abstraction for HL7 V2 message structures containing with a collection of segments and groups 028 */ 029// wipjv could/should this grow Encounter knowledge? Similarly, could its subinterfaces have an idea of a patient? 030public interface IVisitMessage extends IHasRol { 031 032 List<DG1> getDG1(); 033 034 List<GT1> getGT1(); 035 036 List<IVisitMessageInsurance> getInsurance(); 037 038 List<OBX> getOBX(); 039 040 PV1 getPV1(); 041 042 PV2 getPV2(); 043 044 List<IVisitMessageProcedure> getProcedure(); 045 046 DG1 addDG1(); 047 048 IVisitMessageProcedure addProcedure(); 049 050 IVisitMessageInsurance addInsurance(); 051 052 boolean canAddDg1(); 053 054 boolean canAddProcedure(); 055 056 boolean canAddInsurance(); 057 058 List<AL1> getAL1(); 059 060 boolean canAddAL1(); 061 062 AL1 addAL1(); 063 064 boolean hasPV1() throws HL7Exception; 065 066 interface IVisitMessageInsurance { 067 IN1 getIN1(); 068 069 IN2 getIN2(); 070 } 071 072 interface IVisitMessageProcedure { 073 void clear(); 074 075 PR1 getPR1(); 076 } 077}