Schedule a demo
Segment

Goal detail

Communicates patient care goal information, such as a specific clinical goal (for example, blood glucose below a target threshold), its priority, lifecycle status (active, completed, or cancelled), and expected achievement dates. It is exchanged between point-of-care systems and clinical repositories via PPG (Patient Pathway Goal) and PPR (Patient Problem) messages, supporting care plan documentation and coordinated multidisciplinary care.

21fields
4required
v2.9HL7 version
gol.py
from zato.hl7v2.v2_9 import GOL
from zato.hl7v2.v2_9 import CWE, EI, DTM

gol = GOL()
gol.action_code = 'AD'
gol.goal_id = CWE(
    identifier='WEIGHT-LOSS',
    text='Weight Loss Goal'
)

Build GOL segments in Python

How to construct and work with real-world GOL segments.

1

Weight loss goal

Fitness program weight target

from zato.hl7v2.v2_9 import GOL
from zato.hl7v2.v2_9 import CWE, EI, DTM

gol = GOL()
gol.action_code = 'AD'
gol.action_date_time = DTM('20240115')
gol.goal_id = CWE(
    identifier='WEIGHT-LOSS',
    text='Weight Loss Goal'
)
gol.goal_instance_id = EI(entity_identifier='GOL001')
gol.episode_of_care_id = EI(entity_identifier='1')
gol.goal_life_cycle_status = CWE(
    identifier='A',
    text='Active'
)
gol.goal_target_date_time = DTM('20240615')
2

Nutrition improvement goal

Dietary program objective

from zato.hl7v2.v2_9 import GOL
from zato.hl7v2.v2_9 import CWE, EI, DTM

gol = GOL()
gol.action_code = 'AD'
gol.action_date_time = DTM('20240116')
gol.goal_id = CWE(
    identifier='DIET-IMPROVE',
    text='Dietary Improvement'
)
gol.goal_instance_id = EI(entity_identifier='GOL002')
gol.episode_of_care_id = EI(entity_identifier='2')
gol.goal_life_cycle_status = CWE(
    identifier='A',
    text='Active'
)
gol.goal_target_date_time = DTM('20240416')
3

Exercise frequency goal

Fitness activity target

from zato.hl7v2.v2_9 import GOL
from zato.hl7v2.v2_9 import CWE, EI, DTM, NM

gol = GOL()
gol.action_code = 'AD'
gol.action_date_time = DTM('20240117')
gol.goal_id = CWE(
    identifier='EXERCISE-FREQ',
    text='Exercise Frequency'
)
gol.goal_instance_id = EI(entity_identifier='GOL003')
gol.episode_of_care_id = EI(entity_identifier='3')
gol.goal_list_priority = '1'
gol.goal_life_cycle_status = CWE(
    identifier='A',
    text='Active'
)
gol.goal_target_date_time = DTM('20240317')

Learn by building

Step-by-step guides for working with HL7 v2 in Zato.

Frequently asked questions

GOL contains goal detail information including goal identifiers, status, priorities, and target dates for tracking wellness program objectives.

Common action codes include AD (add), UP (update), and DE (delete). These track changes to wellness goals over time.

Use goal_list_priority field with numeric values:

gol.goal_list_priority = '1'

GOL contains goals while PRB contains problems. Goals are often created to address specific problems in wellness programs.

Zato connects to any system that speaks HL7v2 over MLLP or FHIR over REST. This includes Epic, Cerner, Meditech, Allscripts, and other EHR platforms.

Yes, Zato has built-in MLLP support for sending and receiving HL7v2 messages. MLLP channels handle the framing protocol automatically.

Zato supports HL7 v2.9, which is backward compatible with earlier versions including v2.3, v2.5, and v2.7. Standard segments and datatypes are available as typed Python classes.

Yes. Zato handles both HL7v2 and FHIR natively, so you can parse v2 messages and build FHIR resources with IG-specific extensions in the same service. Typed Python classes are available for both protocols, including extensions from US Core, UK Core, Da Vinci, and other Implementation Guides.

GOL field reference

Complete list of fields in the GOL segment, HL7 v2.9.

#Python nameDatatypeUsageRepeatableTable
1action_codeIDRequiredNo-
2action_date_timeDTMRequiredNo-
3goal_idCWERequiredNo-
4goal_instance_idEIRequiredNo-
5episode_of_care_idEIOptionalNo-
6goal_list_priorityNMOptionalNo-
7goal_established_date_timeDTMOptionalNo-
8expected_goal_achieve_date_timeDTMOptionalNo-
9goal_classificationCWEOptionalNo-
10goal_management_disciplineCWEOptionalNo-
11current_goal_review_statusCWEOptionalNo-
12current_goal_review_date_timeDTMOptionalNo-
13next_goal_review_date_timeDTMOptionalNo-
14previous_goal_review_date_timeDTMOptionalNo-
16goal_evaluationCWEOptionalNo-
17goal_evaluation_commentSTOptionalYes-
18goal_life_cycle_statusCWEOptionalNo-
19goal_life_cycle_status_date_timeDTMOptionalNo-
20goal_target_typeCWEOptionalYes-
21goal_target_nameXPNOptionalYes-
22mood_codeCNEOptionalNoHL70725

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python