{"id":32388124,"url":"https://github.com/robholme/hl7-powershell-module","last_synced_at":"2025-10-25T03:46:45.069Z","repository":{"id":108595108,"uuid":"87388990","full_name":"RobHolme/HL7-Powershell-Module","owner":"RobHolme","description":"HL7 PowerShell Module","archived":false,"fork":false,"pushed_at":"2025-03-22T08:19:18.000Z","size":474,"stargazers_count":35,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-22T08:25:49.323Z","etag":null,"topics":["hl7","powershell","powershell-modules"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobHolme.png","metadata":{"files":{"readme":"readme.md","changelog":"ChangeLog.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-06T05:18:58.000Z","updated_at":"2025-03-22T08:19:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"2bd3f7e5-97f0-43c2-85ab-bb2c90ebf4fb","html_url":"https://github.com/RobHolme/HL7-Powershell-Module","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/RobHolme/HL7-Powershell-Module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobHolme%2FHL7-Powershell-Module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobHolme%2FHL7-Powershell-Module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobHolme%2FHL7-Powershell-Module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobHolme%2FHL7-Powershell-Module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobHolme","download_url":"https://codeload.github.com/RobHolme/HL7-Powershell-Module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobHolme%2FHL7-Powershell-Module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280901486,"owners_count":26410586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hl7","powershell","powershell-modules"],"created_at":"2025-10-25T03:46:44.094Z","updated_at":"2025-10-25T03:46:45.057Z","avatar_url":"https://github.com/RobHolme.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Description\nThis PowerShell module is a small collection of CmdLets to manipulate HL7 v2.x files, including:\n\n* __Select-HL7Item__: queries a HL7 file (or list of files) to return a specific HL7 Item.\n* __Set-HL7Item__: changes the value of an existing item within a HL7 file\n* __Remove-HL7Item__: delete the value for a nominated item in the HL7 message.\n* __Send-HL7Messsage__: send a HL7 file to a remote host via TCP.\n* __Remove-HL7Identifiers__: remove personal identifiers for patients and next of kin from HL7 files.\n* __Split-HL7BatchFile__: Split a batch file containing multiple messages into a separate file per message.\n* __Receive-HL7Message__: Receive a HL7 v2.x message via a TCP connection\n* __Show-HL7MessageTimeline__: List messages chronologically based on the header timestamp (MSH-7)\n\n# Installation Instructions\nYou may install the module from existing build releases, from the Powershell Gallery, or build from source. \n## Install from Powershell Gallery\nFrom a powershell console, run:\n\n```Powershell\nInstall-Module -Name hl7tools\n```\n## Install from GitHub releases\nFollow these instructions if you plan on installing the module from a prebuilt release instead of building from source.\n1.  Download the zip file from the latest release from: https://github.com/RobHolme/HL7-Powershell-Module/releases. \n2.  Extract the 'hl7tools' folder from the archive to your PowerShell modules folder. You can confirm the location of your modules folder by running `$env:PSModulePath` from a PowerShell console. \n2.  Run the PowerShell command `Unblock-File` against all files extracted from the download.\n3.  Open a powershell console, the module will be imported when the console opens and the CmdLets available to use. Alternatively, if you don't wish to load the module with all new powershell sessions, run `import-module .\\hl7tools\\hl7tools.psd1` to use the module for the current session only.\n\n## Build from source\nThe solution will build versions for .Net 6.0 (Microsoft Powershell 6+) and .Net Framework 4.52 (Windows Powershell 5.1). The powershell module will load the relevant dll based on the Powershell environment it is run from. If you only wish to target .Net standard or .Net Framework alone, the .csproj file will need to be edited accordingly to specify a single TargetFramework.\n1. Install the .Net 6 SDK and the .Net Framework 4.5.2 SDK. Install instructions for the SDK for each platform are available from:\n* Linux: https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x\n* Windows: https://docs.microsoft.com/en-us/dotnet/core/windows-prerequisites?tabs=netcore2x\n* MacOS: https://docs.microsoft.com/en-us/dotnet/core/macos-prerequisites?tabs=netcore2x\n1. Open a command console, navigate to the root folder of this solution (containing hl7tools.csproj). Run the following commands to build the release and publish to the /module/lib folder:\n   \n`dotnet publish --configuration release --framework net6.0 --output .\\module\\hl7tools\\lib\\net6.0\\`\n\n`dotnet publish --configuration release --framework net48 --output .\\module\\hl7tools\\lib\\net48\\`\n\n(or run the .\\publish.cmd batch file)\n\n2. The build process will copy each version of hl7tools.dll to subfolders of `module\\hl7tools\\lib\\`. The contents of the `\\module\\hl7tools` folder will contain the Powershell Module.\n3. Move the `\\hl7tools` folder to your Powershell Module Path (query the path from the environment variable by running `$env:PSModulePath` from a powershell console). Restart powershell. Alternatively, if you don't wish to load the module with all new powershell sessions, run `import-module .\\hl7tools\\hl7tools.psd1` to use the module for the current session only.\n\n# CmdLet Usage \n## Select-HL7Item\nThis CmdLet returns the values of specific HL7 items from a file (or group of files). This is intended to aid with integration work to validate the values of fields over a large sample of HL7 messages. Some basic filtering is available to only include specific messages from a larger sample.\n\nOutput can be piped to other powershell CmdLets to refine the results. e.g. returning only the unique values across a range of files:\n\n```\nSelect-HL7Item [-LiteralPath] \u003cstring[]\u003e [-ItemPosition] \u003cstring[]\u003e [-Filter \u003cstring[]\u003e] [[-Encoding] \u003cString\u003e] [\u003cCommonParameters\u003e]\n\nSelect-HL7Item [-Path] \u003cstring[]\u003e [-ItemPosition] \u003cstring[]\u003e [-Filter \u003cstring[]\u003e] [[-Encoding] \u003cString\u003e] [\u003cCommonParameters\u003e]\n```\nExample:\n\n* `Select-HL7Item -Path c:\\test -ItemPosition PID-3.1` \nDisplay the Patient ID values for all hl7 files in c:\\test\n* `get-childitem *.hl7 | Select-HL7Item -ItemPosition PID-3.1` \nPipe all files with .hl7 extentions to the CmdLet, return Patient ID values\n* `Select-HL7Item -Path c:\\test -ItemPosition PID-5 -Filter PV1-2=INPATIENT` \nDisplay all PID-5 values where the value of PV1-2 is INPATIENT\n* `(Select-HL7Item -Path c:\\test -ItemPosition PID-3.1).ItemValue | Sort-Object -Unique` \nOnly return unique values\n* `Select-HL7Item -Path c:\\test\\*.hl7 -ItemPosition PID-3.1,PID-5` \nDisplay the Patient ID and Patient Name values for all hl7 files in c:\\test\n\n### Parameters\n__-Path \u003cstring[]\u003e__: The full or relative path a single HL7 file or directory. This may include wildcards in the path name. If a directory is provide, all files within the directory will be examined. Exceptions will be raised if a file isn't identified as a HL7 v2.x file. This parameter accepts a list of files, separate each file file with a ','\n\n__-LiteralPath \u003cstring[]\u003e__: Same as -Path, only wildcards are not expanded. Use this if the literal path includes a wildcard character you do not intent to expand.\n\n__-ItemPosition \\\u003cstring[]\\\u003e__: A string, or list of strings, identifying the location of the item(s) in the HL7 message you wish to retrieve the value for.\n\nItemPosition Examples:\n* `-ItemPosition PID`  All PID segments\n* `-ItemPosition PID-3`  The value for the 3rd PID field. If this item is a list all PID-3 values in the list will be returned.\n* `-ItemPosition PID-3[1]`  The value of the 3rd PID field, but for only the first occurrence of PID-3 (assuming PID-3 is a list)\n* `-ItemPosition PID-3.1`  The value for the 1st component of the PID-3 field. If the component belongs  to a list  of fields, all PID-3.1 components will be returned. \n* `-ItemPosition PID-3[2].1` The value for the 1st component of the second occurrence of the PID-3 field (assuming the field is a list).\n* `-ItemPosition PID-3.1.1` The value for the first sub-component of the first component of the 3rd field of the PID segment. \n* `-ItemPosition PID-3.1,PID-5` The value for the 1st component of the PID-3 field, and the value of the PID-5 field.\n\n__-Filter \u003cstring[]\u003e__: Only includes messages where a HL7 item equals a specific value. The format is: HL7Item=value. The HL7Item part of the filter is of the same format as the -ItemPosition parameter. The -Filter parameter accepts a list of filters (separated by a comma). If a list of filters is provided then a message must match all conditions to be included. \n\nIf a filter references a repeating element, then a match is returned as successful if any of the repeats match the condition. A position within the repeating element can be nominated if the order is known. \n\n\u003eThe filter is intended to filter at the message/file level when querying a large number of files (to include/exclude the messages from the results). It will not filter on individual repeating segments or fields within a message - the results will still include __all__ fields requested from the messages matched by the filter condition. e.g. if you filter on OBX-3=NM, all OBX-3 values from all OBX segments will be returned, but only for messages queried that contain at least 1 OBX-3 value equal to 'NM'. Message not matching the filter condition are excluded from the results.\n\nFilter Examples:\n* `-Filter MSH-9=ADT^A05` This filter would only include messages that had \"ADT^A05\" as the value for the MSH-9 field.\n* `-Filter MSH-9=ADT^A05,PV1-2=OUTPATIENT` This filter would only include messages where both the MSH-9 field contained \"ADT^A04\" and the PV1-2 field contained \"OUTPATIENT\" \n* `-Filter PID-3[2].1=Z9999` This filter would only include messages with the second repeat of the PID-3 fields matching 'Z9999'\n\n__-Encoding \\\u003cstring\\\u003e__: Specify the character encoding. Supports \"UTF-8\" or \"ISO-8859-1\" (Western European). Defaults to \"UTF-8\" if parameter not supplied.\n\n\u003e Note: Items that cannot be located in the message will display a warning. \n\u003e To suppress the warning messages use the `-WarningAction Ignore` common parameter.\n\n## Send-HL7Message\nSend a HL7 v2.x message from a file (or list of files) via TCP to a remote endpoint. Messages are framed using MLLP (Minimal Lower Layer Protocol).\n\n```\n    Send-HL7Message [-LiteralPath] \u003cString[]\u003e [-HostName] \u003cString\u003e [-Port] \u003cInt32\u003e [[-Delay] \u003cInt32\u003e] [[-Encoding] {UTF-8 | ISO-8859-1}] [-NoACK] [-SkipCertificateCheck] [-UseTLS] [-ProgressAction \u003cActionPreference\u003e] [\u003cCommonParameters\u003e]\n\n    Send-HL7Message [-MessageString] \u003cString[]\u003e [-HostName] \u003cString\u003e [-Port] \u003cInt32\u003e [[-Delay] \u003cInt32\u003e] [[-Encoding] {UTF-8 | ISO-8859-1}] [-NoACK] [-SkipCertificateCheck] [-UseTLS] [-ProgressAction \u003cActionPreference\u003e] [\u003cCommonParameters\u003e]\n\n    Send-HL7Message [-Path] \u003cString[]\u003e [-HostName] \u003cString\u003e [-Port] \u003cInt32\u003e [[-Delay] \u003cInt32\u003e] [[-Encoding] {UTF-8 | ISO-8859-1}] [-NoACK] [-SkipCertificateCheck] [-UseTLS] [-ProgressAction \u003cActionPreference\u003e] [\u003cCommonParameters\u003e]\n```\nexample:\n\n`Send-Hl7Message -Hostname 192.168.0.10 -Port 1234 -Path c:\\HL7Files\\message1.hl7`\n\n`Send-Hl7Message -Hostname 192.168.0.10 -Port 1234 -Path c:\\HL7Files\\*.hl7 -Encoding ISO-8859-1`\n\n`Send-Hl7Message -Hostname secure-hl7.company.com -Port 5000 -Path c:\\HL7Files\\*.hl7 -Encoding UTF-8 -UseTLS`\n\n`$msg = get-content c:\\hl7\\test.hl7; Send-Hl7Message -Hostname 192.168.0.10 -Port 1234 -MessageString $msg`\n\n### Parameters\n__-Hostname \\\u003cstring\\\u003e__:  The  IP Address or host name of the remote host to send the HL7 message to\n\n__-Port \\\u003cint\\\u003e__: The TCP port of the listener on the remote host to send the HL7 message to.\n\n__-Path \u003cstring[]\u003e__: The full or relative path a single HL7 file or directory. This may include wildcards in the path name. If a directory is provide, all files within the directory will be examined. Exceptions will be raised if a file isn't  identified as  a HL7 v2.x file. This parameter accepts a list of files, separate each file  file with a ',' (no spaces). \n\n__-LiteralPath \u003cstring[]\u003e__: Same as -Path, only wildcards are not expanded. Use this if the literal path includes a wildcard character you do not intent to expand.\n\n__-MessageString \u003cString[]\u003e__: Supply the message contents as a string value instead of a filename. Accepts either a string[] array [string[]] (one one segment per array item) or a single [string] value (with Carriage Returns between each         segment in a single string.)\n\n__-NoACK__: This switch instructs the CmdLet not to wait for an ACK response from the remote host.\n\n__-Delay \\\u003cint\\\u003e__: The delay (in seconds) between sending each message.\n\n__-Encoding \\\u003cstring\\\u003e__: Specify the character encoding used when sending the message. Supports \"UTF-8\" or \"ISO-8859-1\" (Western European). Defaults to \"UTF-8\" if parameter not supplied.\n\n__-UseTLS__: Secure the connection to the remote host via TLS. Requires the remote host to support TLS. Experimental, not widely tested.\n\n__-SkipCertificateCheck__: Ignore TLS certificate validation errors (trust, validity, etc). Used in conjunction with -UseTLS switch, has not impact otherwise.\n\n## Remove-HL7Identifiers\nRemoves names, addresses and other personally identifiable details from a HL7 v2.x Message.  \n\n\u003e Note:  Identifier codes in {\"PID-3\"} remain. This masks the following fields from a HL7 v2.x file:\n\u003e * All PID fields except {\"PID-1, PID-2, PID-3\"}\n\u003e * All NK1 fields except {\"NK1-1, NK1-3\"}\n\u003e * All IN1 fields \n\u003e * All IN2 fields \n\nBy default a new file is saved in the same location as the original file with \"MASKED_\" prefixed  to the file name. If the  optional \"-OverwriteFile\" switch is  set the original file will be modified.\n\n```\nRemove-HL7Identifiers [-LiteralPath] \u003cstring[]\u003e [[-CustomItemsList] \u003cstring[]\u003e] [[-MaskChar] \u003cchar\u003e] [[-OverwriteFile]] [[-Encoding] \u003cString\u003e] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\n\nRemove-HL7Identifiers [-Path] \u003cstring[]\u003e [[-CustomItemsList] \u003cstring[]\u003e] [[-MaskChar] \u003cchar\u003e] [[-OverwriteFile]] [[-Encoding] \u003cString\u003e] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\n```\nexamples:\n\n`Remove-HL7Identifiers -Path c:\\hl7files\\*.hl7 -OverwriteFile`\n\n`Remove-Hl7Identifiers -Path c:\\test.txt`\n\n`Remove-HL7Identifiers -Path c:\\test\\testfile.hl7 -CustomItemsList PID-3.1,NK1,DG1`\n\n### Parameters\n__-Path \u003cstring[]\u003e__: The full or relative path a single HL7 file or directory, or a list of files. This may include wildcards in the path name. If a directory is provide, all files within the directory will be examined. Exceptions will be raised if a file isn't  identified as  a HL7 v2.x file. This parameter accepts a list of files, separate each file  file with a ',' \n\n__-LiteralPath \u003cstring[]\u003e__: Same as -Path, only wildcards are not expanded. Use this if the literal path includes a wildcard character you do not intent to expand.\n\n__-CustomItemsList \u003cstring[]\u003e__: A list of the HL7 items to mask instead of the default segments and fields. List each item in a comma separated list (no spaces). Items can include a mix of segments (e.g. PV1), Fields (e.g. PID-3), Components (e.g. {\"PID-3.1\"}) or Subcomponents (e.g. {\"PV1-42.2.2\"}).  For repeating segments and fields a specific repeat can be identified (index starts at 1). e.g. {\"PID-3[1].1\"} will mask out the first occurrence of {\"PID-3.1\"}, leaving other repeats of {\"PID-3.1\"} unchanged. Likewise {\"IN1[2]\"} will mask out the second occurrence of the IN1 segments only.\n\nCustomItemsList Examples:\n* `-CustomItemsList PID-3.1,PID-5,PID-13,NK1`\n\n\n__-MaskChar \\\u003cchar\\\u003e__: The character used  to mask the identifier fields,  Defaults to '*' if not supplied\n\n__-OverwriteFile__: If this  switch is set, the original file is modified.\n\n__-Encoding \\\u003cstring\\\u003e__: Specify the character encoding. Supports \"UTF-8\" or \"ISO-8859-1\" (Western European). Defaults to \"UTF-8\" if parameter not supplied.\n\n## Set-HL7Item\n\nThis CmdLet changes the value of an existing HL7 item from a file (or group of files). Some basic filtering is available to only include specific messages within a large sample. By default only the first occurrence of an item will be changed unless the -UpdateAllRepeats switch is set.\n\n```\nSet-HL7Item [-LiteralPath] \u003cstring[]\u003e [-ItemPosition] \u003cstring\u003e [-Value] \u003cstring\u003e [-Filter \u003cstring[]\u003e]  [-UpdateAllRepeats] [-AppendToExistingValue] [[-Encoding] \u003cString\u003e] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\n\nSet-HL7Item [-Path] \u003cstring[]\u003e [-ItemPosition] \u003cstring\u003e [-Value] \u003cstring\u003e [-Filter \u003cstring[]\u003e]  [-UpdateAllRepeats] [-AppendToExistingValue] [[-Encoding] \u003cString\u003e] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\n```\nexamples:\n\n`Set-HL7Item -Path c:\\hl7files\\hl7file.txt -ItemPosition PID-3.1 -Value A1234567`\n\n`Set-HL7Item -Path c:\\hl7files\\*.hl7 -ItemPosition PV1-3.1 -Value A1234567 -Filter PV1-2=INPATIENT`\n\n### Parameters\n__-Path \u003cstring[]\u003e__: The full or relative path a single HL7 file or directory. This may include wildcards in the path name. If a directory is provide, all files within the directory will be examined. Exceptions will be raised if a file isn't  identified as  a HL7 v2.x file. This parameter accepts a list of files, separate each file  file with a ',' \n\n__-LiteralPath \u003cstring[]\u003e__: Same as -Path, only wildcards are not expanded. Use this if the literal path includes a wildcard character you do not intent to expand.\n\n__-ItemPosition \\\u003cstring\\\u003e__: A string identifying the location of the item in the HL7 message you wish to  retrieve the value for. \n\nItemPosition Examples\n* `-ItemPosition PID` All PID segments\n* `-ItemPosition PID-3` The value for the 3rd PID field. If this item is a list all PID-3 values in the list will be returned.\n* `-ItemPosition PID-3[1]` The value of the 3rd PID field, but for only the first occurrence of PID-3 (assuming PID-3 is a list)\n* `-ItemPosition PID-3.1` The value for the 1st component of the PID-3 field. If the component belongs  to a list  of fields, all PID-3.1 components will be returned. \n* `-ItemPosition PID-3[2].1` The value for the 1st component of the second occurrence of the PID-3 field (assuming the field is a list).\n* `-ItemPosition PID-3.1.1` The value for the first sub-component of the first component of the 3rd field of the PID segment. \n\n__-Value \u003cstring[]\u003e__: The new value to set the item to.\n\n__-UpdateAllRepeats__: Update all occurrences identified by -ItemPosition\n\n__-AppendToExistingValue__: The value supplied by the '-Value' parameter is appended to the original value in the message (instead of replacing it).\n\n__-Filter \u003cstring[]\u003e__ Only includes messages where a HL7 item equals a  specific value.  The format is: HL7Item=value. The HL7Item part  of the filter is of  the  same  format as the  -ItemPosition parameter. The -Filter parameter accepts a list of filters (separated by a comma). If a list of filters is provided then a message must match +all+ conditions to be included. \n\n\u003eThe filter is intended to filter at the message/file level when querying a large number of files (to include/exclude the messages from the results). It will not filter on individual repeating segments or fields within a message - the results will still include __all__ fields requested from the messages matched by the filter condition. e.g. if you filter on OBX-3=NM, all OBX-3 values from all OBX segments will be returned, but only for messages queried that contain at least 1 OBX-3 value equal to 'NM'. Message not matching the filter condition are excluded from the results.\n\nFilter Examples:\n* `-Filter MSH-9=ADT^A05` This filter would only include messages that had \"ADT^A05\" as the value for the MSH-9 field.\n* `-Filter MSH-9=ADT^A05,PV1-2=OUTPATIENT` This filter would only include messages where both the MSH-9 field contained \"ADT^A04\" and the PV1-2 field contained \"OUTPATIENT\" \n\n__-Encoding \\\u003cstring\\\u003e__: Specify the character encoding. Supports \"UTF-8\" or \"ISO-8859-1\" (Western European). Defaults to \"UTF-8\" if parameter not supplied.\n\n\u003e Note: items that cannot be located in the message will display a warning. To suppress the warning messages use the \"-WarningAction Ignore\" common parameter.\n\n\n## Remove-HL7Item\nDeletes the value of specified items from the HL7 message. A list of items, or single item can be specified.\n\n```\nRemove-HL7Item [-LiteralPath] \u003cstring[]\u003e [-ItemPosition] \u003cstring[]\u003e [[-Filter] \u003cstring[]\u003e] [-RemoveAllRepeats] [[-Encoding] \u003cString\u003e] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\n\nRemove-HL7Item [-Path] \u003cstring[]\u003e [-ItemPosition] \u003cstring[]\u003e [[-Filter] \u003cstring[]\u003e] [-RemoveAllRepeats] [[-Encoding] \u003cString\u003e] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e] \n```\n\n### Parameters\n__-Path \u003cstring[]\u003e__: The full or relative path a single HL7 file or directory. This may include wildcards in the path name. If a directory is provide, all files within the directory will be examined. Exceptions will be raised if a file isn't  identified as  a HL7 v2.x file. This parameter accepts a list of files, separate each file  file with a ',' \n\n__-LiteralPath \u003cstring[]\u003e__: Same as -Path, only wildcards are not expanded. Use this if the literal path includes a wildcard character you do not intent to expand.\n\n__-RemoveAllRepeats__: Delete all repeats identified, Defaults to only deleting the first occurrence if this switch is not set.\n\n__-ItemPosition \u003cstring[]\u003e__: A string identifying the location of the item in the HL7 message you wish to  delete the value for. Provide a list of items to identify more than one location to delete. \n\nItemPosition Examples:\n* `-ItemPosition PID` All PID segments\n* `-ItemPosition PID-3` The 3rd PID field. .\n* `-ItemPosition PID-3,PID-4,NK1-2` deletes the values for PID-3, PID-4 and NK-2.\n* `-ItemPosition PID-3[1]` The value of the 3rd PID field, but for only the first occurrence of PID-3 (assuming PID-3 is a list)\n* `-ItemPosition PID-3.1.1` The value for the first sub-component of the first component of the 3rd field of the PID segment. \n\n__-Filter \u003cstring[]\u003e__ Only includes messages where a HL7 item equals a  specific value.  The format is: HL7Item=value. The HL7Item part  of the filter is of  the  same  format as the  -ItemPosition parameter. The -Filter parameter accepts a list of filters (separated by a comma). If a list of filters is provided then a message must match +all+ conditions to be included. \n\n\u003eThe filter is intended to filter at the message/file level when querying a large number of files (to include/exclude the messages from the results). It will not filter on individual repeating segments or fields within a message - the results will still include __all__ fields requested from the messages matched by the filter condition. e.g. if you filter on OBX-3=NM, all OBX-3 values from all OBX segments will be returned, but only for messages queried that contain at least 1 OBX-3 value equal to 'NM'. Message not matching the filter condition are excluded from the results.\n\nFilter Examples:\n* `-Filter MSH-9=ADT^A05` This filter would only include messages that had \"ADT^A05\" as the value for the MSH-9 field.\n* `-Filter MSH-9=ADT^A05,PV1-2=OUTPATIENT` This filter would only include messages where both the MSH-9 field contained \"ADT^A04\" and the PV1-2 field contained \"OUTPATIENT\" \n\n__-Encoding \\\u003cstring\\\u003e__: Specify the character encoding. Supports \"UTF-8\" or \"ISO-8859-1\" (Western European). Defaults to \"UTF-8\" if parameter not supplied.\n\n## Split-HL7BatchFile\nSplits a HL7 batch file into a separate file per HL7 message\n\n```\nSplit-HL7BatchFile -LiteralPath \u003cstring[]\u003e [-OverwriteFile] [-WhatIf] [\u003cCommonParameters\u003e]\n\nSplit-HL7BatchFile [-Path] \u003cstring[]\u003e [-OverwriteFile] [-WhatIf] [\u003cCommonParameters\u003e]\n```\n\n### Parameters\n__-Path \u003cstring[]\u003e__: The full or relative path a single HL7 file or directory. This may include wildcards in the path name. If a directory is provide, all files within the directory will be examined. Exceptions will be raised if a file isn't  identified as  a HL7 v2.x file. This parameter accepts a list of files, separate each file  file with a ',' \n\n__-LiteralPath \u003cstring[]\u003e__: Same as -Path, only wildcards are not expanded. Use this if the literal path includes a wildcard character you do not intent to expand.\n\n__-OverwriteFile__: Don't warn when overwriting existing files\n\n## Receive-HL7Message\nReceives a HL7 v2.x message via a TCP connection (MLLP framing).\n\n```\nReceive-HL7Message [-Path] \u003cString\u003e [-Port] \u003cInt32\u003e [[-Timeout] \u003cInt32\u003e] [[-Encoding] \u003cString\u003e] [-NoACK \u003cSwitchParameter\u003e] [-InformationAction \u003cActionPreference\u003e] [-InformationVariable \u003cString\u003e] [\u003cCommonParameters\u003e]\n```\n\n### Parameters\n__-Path \\\u003cstring\\\u003e__: The path to store the messages received. Must be literal path.\n\n__-Port \\\u003cint\\\u003e__: The the TCP port to listen for messages on.\n\n__-Timeout \\\u003cint\\\u003e__: The timeout in seconds before idle connections are dropped (defaults to 60 seconds if not specified).\n\n__-Encoding \\\u003cstring\\\u003e__: The text encoding to use when receiving the message. Supports \"UTF-8\" or \"ISO-8859-1\" (Western European). Defaults to \"UTF-8\" if parameter not supplied.\n\n__-NoACK \\\u003cSwitchParameter\\\u003e__: Set this switch parameter to suppress acknowledgement (ACK) messages from being sent in reposne to messages received.\n\n\n## Show-HL7MessageTimeline\nLists messages chronologically based on the message header receive date/time field (MSH-7)\n\n```\nShow-HL7MessageTimeline -Path \u003cstring\u003e [-Descending] [\u003cCommonParameters\u003e]\n```\n\n### Parameters\n__-Path \u003cstring[]\u003e__: The full or relative path a single HL7 file or directory. This may include wildcards in the path name. If a directory is provide, all files within the directory will be examined. Exceptions will be raised if a file isn't  identified as  a HL7 v2.x file. This parameter accepts a list of files, separate each file  file with a ',' \n\n__-Descending__: Switch to show messages in descending chronological order (defaults to ascending without this switch).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobholme%2Fhl7-powershell-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobholme%2Fhl7-powershell-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobholme%2Fhl7-powershell-module/lists"}