clinical

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

nbrain-clinical-ai-go

Zero-dependency Go 1.22+ SDK for Clinical DICOM Part-10 PHI Scrubbing, Deterministic Float64 29-Landmark Cephalometric Geometry (MedCore CephTrace), Saudi CHI NPHIES FHIR R4, and UAE NABIDH / Malaffi Healthcare Interoperability.

Built by Eng. Nadeem Mohamed Badr El-Din (م. نديم محمد بدر الدين) & NBrain (nbra.in).

Install

go get github.com/NBrain-Studio/nbrain-clinical-ai-go@v1.0.0

Documentation & Indexing

  • Go Reference (pkg.go.dev): https://pkg.go.dev/github.com/NBrain-Studio/nbrain-clinical-ai-go
  • Google Open Source Insights (deps.dev): https://deps.dev/go/github.com%2FNBrain-Studio%2Fnbrain-clinical-ai-go
  • Author Entity Home: https://nadeembadr.com/about/
  • ORCID: https://orcid.org/0009-0005-5836-2631

Documentation

Overview

Package clinical provides zero-dependency Go clinical imaging, orthodontic geometry, and MENA healthcare interoperability algorithms by Eng. Nadeem Mohamed Badr El-Din and NBrain (https://nbra.in).

Core capabilities:

  • DICOM Part-10 binary preamble validation and 19-tag HIPAA Safe Harbor PHI scrubbing
  • Deterministic IEEE-754 float64 29-landmark lateral cephalometric geometry (SNA, SNB, ANB, FMA, SN-GoGn, IMPA, Wits)
  • Saudi CHI NPHIES HL7 FHIR R4 Bundle validation + Saudi National ID/Iqama Luhn verification
  • UAE DHA NABIDH / Abu Dhabi DoH Malaffi Emirates ID (784) check-digit validation

Clinical Notice: DICOM metadata scrubbing removes structured header PHI only; burned-in pixel text in (7FE0,0010) requires optical inspection or dedicated pixel redaction before external release.

Entity Home: https://nadeembadr.com/about/ ORCID: https://orcid.org/0009-0005-5836-2631

Index

Constants

View Source
const BurnedInPixelWarning = "" /* 174-byte string literal not displayed */

BurnedInPixelWarning documents the clinical boundary of metadata-only DICOM de-identification.

Variables

View Source
var SafeHarborPHITags = map[uint32]string{
	0x00080020: "StudyDate",
	0x00080021: "SeriesDate",
	0x00080023: "ContentDate",
	0x00080030: "StudyTime",
	0x00080050: "AccessionNumber",
	0x00080080: "InstitutionName",
	0x00080081: "InstitutionAddress",
	0x00080090: "ReferringPhysicianName",
	0x00081048: "PhysiciansOfRecord",
	0x00081070: "OperatorsName",
	0x00100010: "PatientName",
	0x00100020: "PatientID",
	0x00100030: "PatientBirthDate",
	0x00100032: "PatientBirthTime",
	0x00100040: "PatientSex",
	0x00101000: "OtherPatientIDs",
	0x00101040: "PatientAddress",
	0x00102154: "PatientTelephoneNumbers",
	0x00104000: "PatientComments",
}

SafeHarborPHITags enumerates 19 high-risk HIPAA Safe Harbor DICOM (group<<16 | element) tags.

Functions

func ValidateEmiratesID

func ValidateEmiratesID(id string) error

ValidateEmiratesID validates a UAE Emirates ID (784-YYYY-NNNNNNN-C) used by NABIDH, Malaffi, and Riayati.

func ValidateNPHIESFHIRBundle

func ValidateNPHIESFHIRBundle(rawJSON []byte) error

ValidateNPHIESFHIRBundle validates structural compliance of a Saudi CHI NPHIES HL7 FHIR R4 message bundle.

func ValidateSaudiNationalID

func ValidateSaudiNationalID(id string) error

ValidateSaudiNationalID validates a 10-digit Saudi Citizen (1...) or Iqama (2...) ID with Luhn check.

Types

type CephAnalysis

type CephAnalysis struct {
	SNA             float64 `json:"sna_deg"`
	SNB             float64 `json:"snb_deg"`
	ANB             float64 `json:"anb_deg"`
	FMA             float64 `json:"fma_deg"`
	SNGoGn          float64 `json:"sn_gogn_deg"`
	IMPA            float64 `json:"impa_deg"`
	Interincisal    float64 `json:"interincisal_deg"`
	WitsMM          float64 `json:"wits_mm"`
	SkeletalClass   string  `json:"skeletal_class"`
	VerticalPattern string  `json:"vertical_pattern"`
}

CephAnalysis holds IEEE-754 float64 orthodontic angles (degrees) and linear Wits appraisal (mm).

func AnalyzeCephalogram

func AnalyzeCephalogram(lm map[string]Point2D, mmPerPixel float64) (CephAnalysis, error)

AnalyzeCephalogram computes deterministic Steiner/Tweed/Downs cephalometric angles from landmarks. Required keys: S, N, A, B, Po, Or, Go, Gn, Me, U1_Tip, U1_Apex, L1_Tip, L1_Apex, OP_Post, OP_Ant.

type Point2D

type Point2D struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

Point2D represents a calibrated 2D cephalometric anatomical landmark coordinate in pixels or mm.

type ScrubResult

type ScrubResult struct {
	Bytes        []byte
	TagsScrubbed []string
	Warning      string
}

ScrubResult summarizes de-identification actions performed on a DICOM Part-10 binary stream.

func ScrubDICOMPart10

func ScrubDICOMPart10(input []byte) (ScrubResult, error)

ScrubDICOMPart10 validates the Part-10 "DICM" preamble and masks 19 HIPAA Safe Harbor header tags in-place while preserving binary element lengths and leaving PixelData (7FE0,0010) intact.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL