Skip to main content
Version: v0.0.4

Function: parseRrfLine()

parseRrfLine(line): readonly string[]

Split one RRF line into its fields, dropping the single reserved trailing pipe.

Parameters

line

string

One RRF line (no line terminator).

Returns

readonly string[]

The fields, in column order.

Example

import { parseRrfLine } from "@cosyte/terminology";

parseRrfLine("316151|ENG|lisinopril 10 MG|"); // => ["316151", "ENG", "lisinopril 10 MG"]