APIs

Standards

Field-level parse, get, set, serialize, and validate for interchange formats. Most families share the same shape: parse → tree, get/set by path, serialize back to the wire, validate for structure.

When Studio recognizes the sample content type, msg.parsed is already a tree. You can still call these helpers on msg.raw.

const family = sirius.hl7.get(msg.raw, "PID-5.1");
const out = sirius.hl7.set(msg.raw, "PID-5.1", sirius.text.upper(family));
result = { message: out };
const id = sirius.x12.get(msg.raw, "N1-2");
const tree = sirius.iso20022.parse(msg.raw);
const ack = sirius.ack.build(msg.raw, { accepted: true });

This page lists 79 symbols. The same catalog drives Studio autocomplete.

See also: Overview · Core · I/O and runtime · Devices

sirius.hl7

SymbolSignatureReturnsSummary
sirius.hl7.acksirius.hl7.ack(raw, code?)string (ACK)build an HL7 ACK
sirius.hl7.getsirius.hl7.get(raw, path)stringread a field/component by HL7 path (e.g. PID-5.1)
sirius.hl7.get_allsirius.hl7.get_all(raw, path)list of stringsread EVERY value matching an HL7 path across repeating segments/fields (e.g. all OBX-5, all PID-3 reps)
sirius.hl7.parsesirius.hl7.parse(raw)tree (map)parse HL7 v2 to a named tree
sirius.hl7.serializesirius.hl7.serialize(tree)string (raw)rebuild a raw HL7 message from a parsed tree
sirius.hl7.setsirius.hl7.set(raw, path, value)string (raw)set a field/component by HL7 path, auto-extending; build outbound HL7
sirius.hl7.parse_schemasirius.hl7.parse_schema(raw, schema)treeparse against a message schema (kind-dispatched)
sirius.hl7.messagesirius.hl7.message()nodeconstruct an empty HL7 node
sirius.hl7.treesirius.hl7.tree(raw)nodeparse HL7 v2 into a navigable node

sirius.fhir

SymbolSignatureReturnsSummary
sirius.fhir.bundlesirius.fhir.bundle(entries, type?)Bundle (map)wrap resources into a FHIR Bundle
sirius.fhir.getsirius.fhir.get(resource, path)valueFHIRPath-lite accessor (e.g. name[0].family)
sirius.fhir.referencesirius.fhir.reference(resource)stringbuild a relative reference (ResourceType/id)
sirius.fhir.validatesirius.fhir.validate(resource, profile?)list of issuesprofile/IG-aware validation → list of { path, severity, message }. profile may be a JSON StructureDefinition (cardinality, fixed[x]/pattern[x], type, required bindings via binding.valueSetCodes) or a CSV of required top-level elements

sirius.x12

SymbolSignatureReturnsSummary
sirius.x12.acksirius.x12.ack(raw, kind?, accepted?)string (ack interchange)generate an X12 acknowledgement addressed back to the sender: kind 997 (functional), 999 (implementation), or TA1 (interchange envelope); accepted?=false reports rejection
sirius.x12.getsirius.x12.get(raw, path)stringread an element/component by X12 path (e.g. NM1-3, NM1-3.2, REF[2]-2)
sirius.x12.parsesirius.x12.parse(raw)tree (map)parse X12 to a tree
sirius.x12.serializesirius.x12.serialize(tree)string (raw)rebuild a raw X12 interchange from a parsed tree
sirius.x12.setsirius.x12.set(raw, path, value)string (raw)set an element/component by X12 path, auto-extending; build outbound X12
sirius.x12.validatesirius.x12.validate(raw, accepted?, expected_sender?){ ok, sender_id, receiver_id, functional_id, transaction_sets, error? }structurally validate an X12 interchange (ISA…IEA + ST), optional accepted-set allowlist + expected sender
sirius.x12.parse_schemasirius.x12.parse_schema(raw, schema)treeparse against an X12 message schema
sirius.x12.treesirius.x12.tree(raw)nodeparse X12 into a navigable node

sirius.edifact

SymbolSignatureReturnsSummary
sirius.edifact.acksirius.edifact.ack(raw, accepted?)string (CONTRL interchange)generate a CONTRL service acknowledgement addressed back to the sender; accepted?=false emits a true NEGATIVE CONTRL (UCI action 4)
sirius.edifact.getsirius.edifact.get(raw, path)stringread an element/component by EDIFACT path (e.g. BGM-1, NAD-3.1, LIN[2]-1)
sirius.edifact.parsesirius.edifact.parse(raw)tree (map)parse EDIFACT to a named tree (components expand into leaves)
sirius.edifact.serializesirius.edifact.serialize(tree)string (raw)rebuild a raw EDIFACT interchange from a parsed tree
sirius.edifact.setsirius.edifact.set(raw, path, value)string (raw)set an element/component by EDIFACT path, auto-extending; build outbound EDIFACT
sirius.edifact.validatesirius.edifact.validate(raw, accepted?, expected_sender?){ ok, sender_id, receiver_id, control_ref, message_types, error? }structurally validate an EDIFACT interchange (UNB…UNZ), optional accepted message-type allowlist + expected sender

sirius.edi

SymbolSignatureReturnsSummary
sirius.edi.infersirius.edi.infer(samples, opts?){ guideline, report }infer a draft X12/EDIFACT implementation guide from a set of real partner sample interchanges, plus a variance report explaining each rule (present in N of M samples, code confidence). opts: standard?, transaction_set?, id?, name?, version?, max_codes?, max_code_len?. Auto-detects the dialect and transaction set; per-sample parse failures are reported under report.skipped

sirius.iso20022

SymbolSignatureReturnsSummary
sirius.iso20022.getsirius.iso20022.get(raw, path)stringread a leaf by element path (e.g. CstmrCdtTrfInitn/GrpHdr/MsgId; //Tag descends; PmtInf[2] indexes)
sirius.iso20022.parsesirius.iso20022.parse(raw)tree (map)parse an ISO 20022 XML document to a faithful tree ({ tag, attrs, text, children })
sirius.iso20022.serializesirius.iso20022.serialize(tree)string (raw)rebuild a raw ISO 20022 document from a parsed tree
sirius.iso20022.setsirius.iso20022.set(raw, path, value)string (raw)set a leaf by element path, auto-extending missing elements; build outbound ISO 20022
sirius.iso20022.validatesirius.iso20022.validate(raw, accepted?){ ok, message_type, message_root, namespace, errors }structurally validate an ISO 20022 document (Document wrapper, ISO xsd namespace, single message def, group header), optional accepted message-type allowlist (e.g. pain.001)

sirius.swift.mt

SymbolSignatureReturnsSummary
sirius.swift.mt.getsirius.swift.mt.get(raw, path)stringread a value by block/field path (e.g. 4/20, 2, 3/108, 4/71F[2], 5/CHK)
sirius.swift.mt.parsesirius.swift.mt.parse(raw)tree (map)parse a SWIFT MT (FIN) message to a tree ({ block1, block2, block3[], block4[], block5[] })
sirius.swift.mt.serializesirius.swift.mt.serialize(tree)string (raw)rebuild a raw SWIFT MT message from a parsed tree
sirius.swift.mt.setsirius.swift.mt.set(raw, path, value)string (raw)set a value by block/field path, auto-extending a missing field; build outbound MT
sirius.swift.mt.validatesirius.swift.mt.validate(raw, accepted?){ ok, message_type, direction, sender_bic, receiver_bic, errors }structurally validate a SWIFT MT message (basic + application headers + text block) and derive type/direction/BICs; optional accepted MT-type allowlist (e.g. 103)

sirius.fix

SymbolSignatureReturnsSummary
sirius.fix.getsirius.fix.get(raw, path)stringread a value by tag path (e.g. 35, 44, 268[2] for the 2nd occurrence)
sirius.fix.parsesirius.fix.parse(raw)tree (map)parse a FIX message (SOH or //^ delimited) to a tree ({ fields: [{ tag, value }], msg_type, begin_string })
sirius.fix.serializesirius.fix.serialize(tree)string (raw)rebuild a raw FIX message from a parsed tree, recomputing BodyLength (9) + CheckSum (10)
sirius.fix.setsirius.fix.set(raw, path, value)string (raw)set a value by tag path, auto-extending a missing field; build outbound FIX (frame refreshed)
sirius.fix.validatesirius.fix.validate(raw, accepted?){ ok, message_type, begin_string, sender_comp_id, target_comp_id, msg_seq_num, errors }structurally validate a FIX message (BeginString + MsgType, BodyLength + CheckSum), optional accepted MsgType allowlist (e.g. D or NewOrderSingle)

sirius.fpml

SymbolSignatureReturnsSummary
sirius.fpml.getsirius.fpml.get(raw, path)stringread a leaf by element path (e.g. trade/tradeHeader/partyTradeIdentifier/tradeId; //tradeId descends; swapStream[2] indexes)
sirius.fpml.parsesirius.fpml.parse(raw)tree (map)parse an FpML XML document to a faithful tree ({ tag, attrs, text, children })
sirius.fpml.serializesirius.fpml.serialize(tree)string (raw)rebuild a raw FpML document from a parsed tree
sirius.fpml.setsirius.fpml.set(raw, path, value)string (raw)set a leaf by element path, auto-extending missing elements; build outbound FpML
sirius.fpml.validatesirius.fpml.validate(raw, accepted?){ ok, message_type, view, version, namespace, errors }structurally validate an FpML document (FpML namespace + schema view, fpmlVersion, resolvable message type), optional accepted message-type allowlist (e.g. RequestConfirmation)

sirius.ncpdp

SymbolSignatureReturnsSummary
sirius.ncpdp.getsirius.ncpdp.get(raw, path)stringread a leaf by element path in a SCRIPT document (e.g. Body/NewRx/MedicationPrescribed/DrugDescription; //DrugDescription descends; MedicationPrescribed[2] indexes). SCRIPT-only
sirius.ncpdp.parsesirius.ncpdp.parse(raw)tree (map)parse an NCPDP message — SCRIPT XML to a { tag, attrs, text, children } tree, or a Telecom D.0 stream (0x1E/0x1D/0x1C framing) to { standard, version, transaction_code, header, groups[][] }
sirius.ncpdp.serializesirius.ncpdp.serialize(tree)string (raw)rebuild a raw NCPDP message from a parsed tree (SCRIPT XML when the tree has a tag; Telecom D.0 when standard=telecom)
sirius.ncpdp.setsirius.ncpdp.set(raw, path, value)string (raw)set a leaf by element path in a SCRIPT document, auto-extending missing elements; build outbound SCRIPT. SCRIPT-only
sirius.ncpdp.validatesirius.ncpdp.validate(raw, accepted?){ ok, message_type, version, namespace, errors }structurally validate an NCPDP message (SCRIPT: namespace + version + Header/Body + resolvable transaction; Telecom: header version + known transaction code + segments), optional accepted transaction allowlist (e.g. NewRx or B1)

sirius.gs1

SymbolSignatureReturnsSummary
sirius.gs1.check_digitsirius.gs1.check_digit(payload)string (digit)compute the GS1 mod-10 check digit for a digit payload (key without its check digit)
sirius.gs1.parse_aisirius.gs1.parse_ai(element){ elements: [{ ai, value, title }], errors }parse a GS1 Application Identifier element string ((01)…(10)… or raw FNC1 scan data) into AI/value pairs
sirius.gs1.validatesirius.gs1.validate(kind, value){ ok, kind, value, errors }validate a GS1 key (kind: gtin/gln/sscc) — digits, length, and mod-10 check digit

sirius.rosettanet

SymbolSignatureReturnsSummary
sirius.rosettanet.acksirius.rosettanet.ack(raw)string (signal xml)build an RNIF Receipt Acknowledgment signal referencing the inbound message’s PIP + tracking id
sirius.rosettanet.getsirius.rosettanet.get(raw, path)stringread a value by path: a part kind (preamble/delivery_header/service_header/service_content), part+element (service_header/GlobalUsageCode), or a metadata shortcut (pip_code, message_tracking_id, …)
sirius.rosettanet.parsesirius.rosettanet.parse(raw)tree (map)parse an RNIF message (MIME multipart/related) to a tree ({ boundary, parts:[{kind,content_id,content_type,body}], metadata })
sirius.rosettanet.serializesirius.rosettanet.serialize(tree)string (raw)rebuild a raw RNIF MIME entity from a parsed tree
sirius.rosettanet.setsirius.rosettanet.set(raw, path, value)string (raw)set an element’s text within a part; returns the re-serialized message
sirius.rosettanet.validatesirius.rosettanet.validate(raw, accepted?){ ok, rnif_version, pip_code, pip_version, message_type, action_or_signal, from_duns, to_duns, message_tracking_id, usage_code, errors }structurally validate an RNIF message (required parts + resolvable PIP), optional accepted PIP-code allowlist (e.g. 3A4)

sirius.as2

SymbolSignatureReturnsSummary
sirius.as2.mdn_buildsirius.as2.mdn_build(params){ body_b64, content_type }assemble a multipart/report MDN body, returning { body_b64, content_type }
sirius.as2.mdn_parsesirius.as2.mdn_parse(body_b64)objectparse a base64 MDN body into its disposition outcome
sirius.as2.micsirius.as2.mic(content_b64, alg?)stringcompute the Received-Content-MIC (’, ’) over base64 content
sirius.as2.mic_algsirius.as2.mic_alg(name)stringnormalize a MIC-algorithm spelling onto sha-256 or sha-1
sirius.as2.options_headersirius.as2.options_header(request)stringrender the Disposition-Notification-Options header a sender emits

sirius.dicom

SymbolSignatureReturnsSummary
sirius.dicom.is_dicomsirius.dicom.is_dicom(data_b64)boolreport whether base64 data carries the Part-10 preamble + DICM magic
sirius.dicom.parsesirius.dicom.parse(data_b64)objectextract routing metadata (SOP/Study/Series UIDs, modality, patient) from base64 DICOM
sirius.dicom.transfer_syntax_namesirius.dicom.transfer_syntax_name(uid)stringmap a transfer-syntax UID to a friendly name

sirius.ack

SymbolSignatureReturnsSummary
sirius.ack.assertsirius.ack.assert(raw, expected?){ ok, standard, kind, accepted, code?, reason? }classify a returned acknowledgement and assert it against expectations (standard?, kind?, accepted?, code?, contains?) — the primitive an in-IDE trading-partner simulator uses to turn a 997/CONTRL/MDN/HL7-ACK into a pass/fail regression check
sirius.ack.buildsirius.ack.build(raw, opts?){ standard, kind, accepted, ack, content_type? }build the canonical acknowledgement for a raw inbound message, auto-detecting the standard (or opts.standard). Emits HL7-ACK / 997/999/TA1 / CONTRL / OperationOutcome / MDN. opts: standard?, accepted?, kind? (x12), code? (hl7), profile? (fhir), message_id?/recipient?/mic?/reporting_ua?/text? (as2)
sirius.ack.classifysirius.ack.classify(raw){ standard, kind, accepted, code? }classify a raw acknowledgement a partner returned (X12 997/999/TA1, EDIFACT CONTRL, AS2 MDN, HL7 ACK, FHIR OperationOutcome) — the inverse of ack.build
sirius.ack.detectsirius.ack.detect(raw)string (standard)detect the message standard of a raw payload (hl7/x12/edifact/fhir/as2/unknown)

sirius.batch

SymbolSignatureReturnsSummary
sirius.batch.splitsirius.batch.split(raw)list of messagessplit an HL7/X12 batch into individual messages (drops FHS/BHS/BTS/FTS or ISA/GS envelope)
sirius.batch.wrapsirius.batch.wrap(messages)string (batch)wrap messages into an HL7 batch (BHS header + BTS count)

sirius.terminology

SymbolSignatureReturnsSummary
sirius.terminology.expandsirius.terminology.expand(valueSet)list of stringsexpand a value set into its member codes
sirius.terminology.translatesirius.terminology.translate(code, from, to)string (code)translate a code between code systems
sirius.terminology.validatesirius.terminology.validate(code, system)booltest whether a code is valid in a code system