HL7 MFR_M05 Patient Location Master File Response

HL7 message structure MFR_M05 groups and segments from HL7 v2.5.1 Hide structure

These are the generated groups and segments for the version selected at the top of the page. The article explains the workflow, and this panel follows the chosen HL7 version.

Message Structure

SegmentNameRequiredRepeatable
Message Header Yes No
Software Segment No Yes
Message Acknowledgment Yes No
Error No Yes
Query Acknowledgment No No
Original-Style Query Definition Yes No
Original style query filter No No
Master File Identification Yes No
MFR_M05.MF_QUERY
Mf Query group Yes Yes
Master File Entry Yes No
Location Identification Yes No
Location Characteristic No Yes
Location Relationship No Yes
Location Department Yes Yes
Location Characteristic No Yes
Location Charge Code No Yes
Continuation Pointer No No

MFR_M05 returns patient location master-file records in response to an original-style master-file query. It is the pull version of the same reference data that MFN_M05 can push.

Use it when a system needs to ask for a location, a range of locations, or a refreshed subset of the location master instead of waiting for a notification feed.

A small MFR M05 example

MSH|^~\&|ADTADMIN|CITYHOSP|EHR|CITYHOSP|20260722124000||MFR^M05^MFR_M05|MFR050001|P|2.5.1 MSA|AA|MFQ050001 QAK|Q050001|OK|MFQ^Master file query^HL70471|1|1|0 QRD|20260722123900|R|I|Q050001|||1^RD|EHR^Location query|MFQ^Master file query^HL7|WARD1^101^1^CITYHOSP|R MFI|LOC^Patient location master^HL70175|ADTADMIN^CITYHOSP|UPD|20260722101000|20260722110000|AL MFE|MAD|MFQ050001|20260722110000|WARD1^101^1^CITYHOSP|PL LOC|WARD1^101^1^CITYHOSP|Ward 1 Room 101 Bed 1|B|City Hospital LCH|WARD1^101^1^CITYHOSP|A||PRIVATE^Private room^L|Y^Yes^HL70136 LRL|WARD1^101^1^CITYHOSP|A||PARTOF^Part of^L|City Hospital|WARD1^101^^CITYHOSP LDP|WARD1^101^1^CITYHOSP|CARD^Cardiology^L|MED|CARD^Cardiology^L|I~O|A|20260722 LCC|WARD1^101^1^CITYHOSP|CARD^Cardiology^L|PRIVATE^Private room^L|ROOMDAILY^Daily room charge^L

What workflow it represents

A consuming system queries the location master. The owner responds with location identity, optional characteristics and relationships, department assignment, and optional charge codes.

Receivers use this to repair or bootstrap local location tables, validate ADT locations, or reconcile location metadata without taking a full unsolicited feed.

How to read the structure

The response envelope starts with MSH, MSA, optional ERR, optional QAK, required QRD, and optional QRF.

MFI identifies the location master file. Each MF_QUERY group returns MFE, required LOC, optional LCH and LRL, required repeating LDP, and optional department-level LCH and LCC. DSC handles continuation.

Implementation traps

Do not confuse returned location master data with current patient occupancy. MFR_M05 can tell you what a bed is; ADT tells you who is in it.

Also preserve hierarchy and department context. A flat display label may be enough for a dropdown, but it is not enough for routing, reporting, or bed-management logic.

If the response uses continuation, do not rebuild the local location master from the first page only. That is how half a hospital disappears from a lookup table.

Reference notes

HL7 master-file query material defines MFR as the response to an MFQ query. The MFR_M05 structure returns patient location records with LOC plus location characteristic, relationship, department, and charge-code details.