Class EncounterBuilder.Impl

    • Constructor Detail

      • Impl

        public Impl​(com.babylonhealth.lit.core.model.Coding _class,
                    com.babylonhealth.lit.hl7.ENCOUNTER_STATUS status)
        Required fields for Encounter
        Parameters:
        _class - - Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.
        status - - planned | arrived | triaged | in-progress | onleave | finished | cancelled +.
    • Method Detail

      • withId

        public EncounterBuilder.Impl withId​(@NonNull
                                            @NonNull java.lang.String id)
        Parameters:
        id - - The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
      • withMeta

        public EncounterBuilder.Impl withMeta​(@NonNull
                                              @NonNull com.babylonhealth.lit.core.model.Meta meta)
        Parameters:
        meta - - The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
      • withMeta

        public EncounterBuilder.Impl withMeta​(@NonNull
                                              @NonNull com.babylonhealth.lit.core_java.builders.MetaBuilder meta)
      • withText

        public EncounterBuilder.Impl withText​(@NonNull
                                              @NonNull com.babylonhealth.lit.hl7.model.Narrative text)
        Parameters:
        text - - A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.
      • withType

        public EncounterBuilder.Impl withType​(@NonNull
                                              @NonNull com.babylonhealth.lit.core.model.CodeableConcept... _type)
        Parameters:
        _type - - Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).
      • withType

        public EncounterBuilder.Impl withType​(@NonNull
                                              @NonNull java.util.Collection<com.babylonhealth.lit.core.model.CodeableConcept> _type)
        Parameters:
        _type - - Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).
      • withType

        public EncounterBuilder.Impl withType​(@NonNull
                                              @NonNull com.babylonhealth.lit.core_java.builders.CodeableConceptBuilder... _type)
      • withPeriod

        public EncounterBuilder.Impl withPeriod​(@NonNull
                                                @NonNull com.babylonhealth.lit.core.model.Period period)
        Parameters:
        period - - The start and end time of the encounter.
      • withPeriod

        public EncounterBuilder.Impl withPeriod​(@NonNull
                                                @NonNull com.babylonhealth.lit.core_java.builders.PeriodBuilder period)
      • withLength

        public EncounterBuilder.Impl withLength​(@NonNull
                                                @NonNull com.babylonhealth.lit.core.model.Duration length)
        Parameters:
        length - - Quantity of time the encounter lasted. This excludes the time during leaves of absence.
      • withLength

        public EncounterBuilder.Impl withLength​(@NonNull
                                                @NonNull com.babylonhealth.lit.core_java.builders.DurationBuilder length)
      • withPartOf

        public EncounterBuilder.Impl withPartOf​(@NonNull
                                                @NonNull com.babylonhealth.lit.core.model.Reference partOf)
        Parameters:
        partOf - - Another Encounter of which this encounter is a part of (administratively or in time).
      • withPartOf

        public EncounterBuilder.Impl withPartOf​(@NonNull
                                                @NonNull com.babylonhealth.lit.core_java.builders.ReferenceBuilder partOf)
      • withSubject

        public EncounterBuilder.Impl withSubject​(@NonNull
                                                 @NonNull com.babylonhealth.lit.core.model.Reference subject)
        Parameters:
        subject - - The patient or group present at the encounter.
      • withSubject

        public EncounterBuilder.Impl withSubject​(@NonNull
                                                 @NonNull com.babylonhealth.lit.core_java.builders.ReferenceBuilder subject)
      • withBasedOn

        public EncounterBuilder.Impl withBasedOn​(@NonNull
                                                 @NonNull com.babylonhealth.lit.core.model.Reference... basedOn)
        Parameters:
        basedOn - - The request this encounter satisfies (e.g. incoming referral or procedure request).
      • withBasedOn

        public EncounterBuilder.Impl withBasedOn​(@NonNull
                                                 @NonNull java.util.Collection<com.babylonhealth.lit.core.model.Reference> basedOn)
        Parameters:
        basedOn - - The request this encounter satisfies (e.g. incoming referral or procedure request).
      • withBasedOn

        public EncounterBuilder.Impl withBasedOn​(@NonNull
                                                 @NonNull com.babylonhealth.lit.core_java.builders.ReferenceBuilder... basedOn)
      • withAccount

        public EncounterBuilder.Impl withAccount​(@NonNull
                                                 @NonNull com.babylonhealth.lit.core.model.Reference... account)
        Parameters:
        account - - The set of accounts that may be used for billing for this Encounter.
      • withAccount

        public EncounterBuilder.Impl withAccount​(@NonNull
                                                 @NonNull java.util.Collection<com.babylonhealth.lit.core.model.Reference> account)
        Parameters:
        account - - The set of accounts that may be used for billing for this Encounter.
      • withAccount

        public EncounterBuilder.Impl withAccount​(@NonNull
                                                 @NonNull com.babylonhealth.lit.core_java.builders.ReferenceBuilder... account)
      • withLanguage

        public EncounterBuilder.Impl withLanguage​(@NonNull
                                                  @NonNull com.babylonhealth.lit.core.LANGUAGES language)
        Parameters:
        language - - The base language in which the resource is written.
      • withPriority

        public EncounterBuilder.Impl withPriority​(@NonNull
                                                  @NonNull com.babylonhealth.lit.core.model.CodeableConcept priority)
        Parameters:
        priority - - Indicates the urgency of the encounter.
      • withPriority

        public EncounterBuilder.Impl withPriority​(@NonNull
                                                  @NonNull com.babylonhealth.lit.core_java.builders.CodeableConceptBuilder priority)
      • withContained

        public EncounterBuilder.Impl withContained​(@NonNull
                                                   @NonNull com.babylonhealth.lit.core.model.Resource... contained)
        Parameters:
        contained - - These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
      • withContained

        public EncounterBuilder.Impl withContained​(@NonNull
                                                   @NonNull java.util.Collection<com.babylonhealth.lit.core.model.Resource> contained)
        Parameters:
        contained - - These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
      • withContained

        public EncounterBuilder.Impl withContained​(@NonNull
                                                   @NonNull com.babylonhealth.lit.core_java.builders.ResourceBuilder... contained)
      • withExtension

        public EncounterBuilder.Impl withExtension​(@NonNull
                                                   @NonNull com.babylonhealth.lit.core.model.Extension... extension)
        Parameters:
        extension - - May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
      • withExtension

        public EncounterBuilder.Impl withExtension​(@NonNull
                                                   @NonNull java.util.Collection<com.babylonhealth.lit.core.model.Extension> extension)
        Parameters:
        extension - - May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
      • withExtension

        public EncounterBuilder.Impl withExtension​(@NonNull
                                                   @NonNull com.babylonhealth.lit.core_java.builders.ExtensionBuilder... extension)
      • withIdentifier

        public EncounterBuilder.Impl withIdentifier​(@NonNull
                                                    @NonNull com.babylonhealth.lit.core.model.Identifier... identifier)
        Parameters:
        identifier - - Identifier(s) by which this encounter is known.
      • withIdentifier

        public EncounterBuilder.Impl withIdentifier​(@NonNull
                                                    @NonNull java.util.Collection<com.babylonhealth.lit.core.model.Identifier> identifier)
        Parameters:
        identifier - - Identifier(s) by which this encounter is known.
      • withIdentifier

        public EncounterBuilder.Impl withIdentifier​(@NonNull
                                                    @NonNull com.babylonhealth.lit.core_java.builders.IdentifierBuilder... identifier)
      • withReasonCode

        public EncounterBuilder.Impl withReasonCode​(@NonNull
                                                    @NonNull com.babylonhealth.lit.core.model.CodeableConcept... reasonCode)
        Parameters:
        reasonCode - - Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.
      • withReasonCode

        public EncounterBuilder.Impl withReasonCode​(@NonNull
                                                    @NonNull java.util.Collection<com.babylonhealth.lit.core.model.CodeableConcept> reasonCode)
        Parameters:
        reasonCode - - Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.
      • withReasonCode

        public EncounterBuilder.Impl withReasonCode​(@NonNull
                                                    @NonNull com.babylonhealth.lit.core_java.builders.CodeableConceptBuilder... reasonCode)
      • withServiceType

        public EncounterBuilder.Impl withServiceType​(@NonNull
                                                     @NonNull com.babylonhealth.lit.core.model.CodeableConcept serviceType)
        Parameters:
        serviceType - - Broad categorization of the service that is to be provided (e.g. cardiology).
      • withServiceType

        public EncounterBuilder.Impl withServiceType​(@NonNull
                                                     @NonNull com.babylonhealth.lit.core_java.builders.CodeableConceptBuilder serviceType)
      • withAppointment

        public EncounterBuilder.Impl withAppointment​(@NonNull
                                                     @NonNull com.babylonhealth.lit.core.model.Reference... appointment)
        Parameters:
        appointment - - The appointment that scheduled this encounter.
      • withAppointment

        public EncounterBuilder.Impl withAppointment​(@NonNull
                                                     @NonNull java.util.Collection<com.babylonhealth.lit.core.model.Reference> appointment)
        Parameters:
        appointment - - The appointment that scheduled this encounter.
      • withAppointment

        public EncounterBuilder.Impl withAppointment​(@NonNull
                                                     @NonNull com.babylonhealth.lit.core_java.builders.ReferenceBuilder... appointment)
      • withImplicitRules

        public EncounterBuilder.Impl withImplicitRules​(@NonNull
                                                       @NonNull java.lang.String implicitRules)
        Parameters:
        implicitRules - - A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
      • withEpisodeOfCare

        public EncounterBuilder.Impl withEpisodeOfCare​(@NonNull
                                                       @NonNull com.babylonhealth.lit.core.model.Reference... episodeOfCare)
        Parameters:
        episodeOfCare - - Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).
      • withEpisodeOfCare

        public EncounterBuilder.Impl withEpisodeOfCare​(@NonNull
                                                       @NonNull java.util.Collection<com.babylonhealth.lit.core.model.Reference> episodeOfCare)
        Parameters:
        episodeOfCare - - Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).
      • withEpisodeOfCare

        public EncounterBuilder.Impl withEpisodeOfCare​(@NonNull
                                                       @NonNull com.babylonhealth.lit.core_java.builders.ReferenceBuilder... episodeOfCare)
      • withReasonReference

        public EncounterBuilder.Impl withReasonReference​(@NonNull
                                                         @NonNull com.babylonhealth.lit.core.model.Reference... reasonReference)
        Parameters:
        reasonReference - - Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.
      • withReasonReference

        public EncounterBuilder.Impl withReasonReference​(@NonNull
                                                         @NonNull java.util.Collection<com.babylonhealth.lit.core.model.Reference> reasonReference)
        Parameters:
        reasonReference - - Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.
      • withReasonReference

        public EncounterBuilder.Impl withReasonReference​(@NonNull
                                                         @NonNull com.babylonhealth.lit.core_java.builders.ReferenceBuilder... reasonReference)
      • withServiceProvider

        public EncounterBuilder.Impl withServiceProvider​(@NonNull
                                                         @NonNull com.babylonhealth.lit.core.model.Reference serviceProvider)
        Parameters:
        serviceProvider - - The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the example bundle showing an abbreviated set of Encounters for a colonoscopy.
      • withServiceProvider

        public EncounterBuilder.Impl withServiceProvider​(@NonNull
                                                         @NonNull com.babylonhealth.lit.core_java.builders.ReferenceBuilder serviceProvider)
      • withModifierExtension

        public EncounterBuilder.Impl withModifierExtension​(@NonNull
                                                           @NonNull com.babylonhealth.lit.core.model.Extension... modifierExtension)
        Parameters:
        modifierExtension - - May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

        Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).

      • withModifierExtension

        public EncounterBuilder.Impl withModifierExtension​(@NonNull
                                                           @NonNull java.util.Collection<com.babylonhealth.lit.core.model.Extension> modifierExtension)
        Parameters:
        modifierExtension - - May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

        Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).

      • withModifierExtension

        public EncounterBuilder.Impl withModifierExtension​(@NonNull
                                                           @NonNull com.babylonhealth.lit.core_java.builders.ExtensionBuilder... modifierExtension)
      • withLocation

        public EncounterBuilder.Impl withLocation​(@NonNull
                                                  @NonNull com.babylonhealth.lit.hl7.model.Encounter.Location... location)
        Parameters:
        location - - List of locations where the patient has been during this encounter.
      • withLocation

        public EncounterBuilder.Impl withLocation​(@NonNull
                                                  @NonNull java.util.Collection<com.babylonhealth.lit.hl7.model.Encounter.Location> location)
        Parameters:
        location - - List of locations where the patient has been during this encounter.
      • withDiagnosis

        public EncounterBuilder.Impl withDiagnosis​(@NonNull
                                                   @NonNull com.babylonhealth.lit.hl7.model.Encounter.Diagnosis... diagnosis)
        Parameters:
        diagnosis - - The list of diagnosis relevant to this encounter.
      • withDiagnosis

        public EncounterBuilder.Impl withDiagnosis​(@NonNull
                                                   @NonNull java.util.Collection<com.babylonhealth.lit.hl7.model.Encounter.Diagnosis> diagnosis)
        Parameters:
        diagnosis - - The list of diagnosis relevant to this encounter.
      • withParticipant

        public EncounterBuilder.Impl withParticipant​(@NonNull
                                                     @NonNull com.babylonhealth.lit.hl7.model.Encounter.Participant... participant)
        Parameters:
        participant - - The list of people responsible for providing the service.
      • withParticipant

        public EncounterBuilder.Impl withParticipant​(@NonNull
                                                     @NonNull java.util.Collection<com.babylonhealth.lit.hl7.model.Encounter.Participant> participant)
        Parameters:
        participant - - The list of people responsible for providing the service.
      • withClassHistory

        public EncounterBuilder.Impl withClassHistory​(@NonNull
                                                      @NonNull com.babylonhealth.lit.hl7.model.Encounter.ClassHistory... classHistory)
        Parameters:
        classHistory - - The class history permits the tracking of the encounters transitions without needing to go through the resource history. This would be used for a case where an admission starts of as an emergency encounter, then transitions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kind of discharge from emergency to inpatient.
      • withClassHistory

        public EncounterBuilder.Impl withClassHistory​(@NonNull
                                                      @NonNull java.util.Collection<com.babylonhealth.lit.hl7.model.Encounter.ClassHistory> classHistory)
        Parameters:
        classHistory - - The class history permits the tracking of the encounters transitions without needing to go through the resource history. This would be used for a case where an admission starts of as an emergency encounter, then transitions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kind of discharge from emergency to inpatient.
      • withStatusHistory

        public EncounterBuilder.Impl withStatusHistory​(@NonNull
                                                       @NonNull com.babylonhealth.lit.hl7.model.Encounter.StatusHistory... statusHistory)
        Parameters:
        statusHistory - - The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.
      • withStatusHistory

        public EncounterBuilder.Impl withStatusHistory​(@NonNull
                                                       @NonNull java.util.Collection<com.babylonhealth.lit.hl7.model.Encounter.StatusHistory> statusHistory)
        Parameters:
        statusHistory - - The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.
      • withHospitalization

        public EncounterBuilder.Impl withHospitalization​(@NonNull
                                                         com.babylonhealth.lit.hl7.model.Encounter.Hospitalization hospitalization)
        Parameters:
        hospitalization - - Details about the admission to a healthcare service.
      • build

        public com.babylonhealth.lit.hl7.model.Encounter build()
        Specified by:
        build in interface DomainResourceBuilder
        Specified by:
        build in interface EncounterBuilder
        Specified by:
        build in interface com.babylonhealth.lit.core_java.builders.ResourceBuilder