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.model.v25.segment.AL1;
014import ca.uhn.hl7v2.model.v25.segment.DG1;
015import ca.uhn.hl7v2.model.v25.segment.GT1;
016import ca.uhn.hl7v2.model.v25.segment.IN1;
017import ca.uhn.hl7v2.model.v25.segment.IN2;
018import ca.uhn.hl7v2.model.v25.segment.OBX;
019import ca.uhn.hl7v2.model.v25.segment.PR1;
020import ca.uhn.hl7v2.model.v25.segment.PV1;
021import ca.uhn.hl7v2.model.v25.segment.PV2;
022
023import java.util.List;
024
025/**
026 * Serves as an abstraction for HL7 V2 message structures containing with a collection of segments and groups
027 */
028// wipjv could/should this grow Encounter knowledge?  Similarly, could its subinterfaces have an idea of a patient?
029public interface IVisitMessage extends IHasRol {
030
031        List<DG1> getDG1();
032
033        List<GT1> getGT1();
034
035        List<IVisitMessageInsurance> getInsurance();
036
037        List<OBX> getOBX();
038
039        PV1 getPV1();
040
041        PV2 getPV2();
042
043        List<IVisitMessageProcedure> getProcedure();
044
045        DG1 addDG1();
046
047        IVisitMessageProcedure addProcedure();
048
049        IVisitMessageInsurance addInsurance();
050
051        boolean canAddDg1();
052
053        boolean canAddProcedure();
054
055        boolean canAddInsurance();
056
057        List<AL1> getAL1();
058
059        boolean canAddAL1();
060
061        AL1 addAL1();
062
063        interface IVisitMessageInsurance {
064                IN1 getIN1();
065
066                IN2 getIN2();
067        }
068
069        interface IVisitMessageProcedure {
070                void clear();
071
072                PR1 getPR1();
073        }
074}