-- CarePulse IoT — Phase 3 device library: therapy devices, waveforms, stethoscopes, CGM, wearables.
-- certified = 0 until the model passes the CarePulse test-lab checklist (docs/DEVICE_CERTIFICATION.md).
INSERT INTO device_models (category, manufacturer, model, connection, ble_service, name_prefix, parameters, protocol_notes, certified, phase) VALUES
-- Waveforms from bedside monitors
('patient_monitor','Mindray / Philips / GE','Monitor waveforms (ECG, pleth, resp, CO2, arterial)','hl7',NULL,NULL,'hr,spo2,rr,etco2,bp_sys','HL7 v2 ORU^R01 with OBX value type NA (IHE PCD waveform content) to CarePulse Edge; sample rate from MDC_ATTR_SAMP_RATE or edge.json. Enable "waveform export" on the vendor gateway.',0,3),
('ecg_patch','Generic','Wearable ECG patch / Holter with streaming API','cloud_api',NULL,NULL,'hr','POST /api/v1/waveforms (ecg_ii, 125–500 Hz) per docs/DEVICE_ADAPTER_API.md.',0,3),
-- Ventilators
('ventilator','Mindray','SV300 / SV800 / SV600','hl7',NULL,NULL,'peep,ppeak,pplat,vt,mv,fio2,rr,etco2','HL7 via BeneLink to the monitor network / eGateway, or direct serial via Edge driver.',0,3),
('ventilator','Hamilton Medical','C1 / C3 / C6 / G5','serial',NULL,NULL,'peep,ppeak,pplat,vt,mv,fio2,rr','Vendor serial/LAN interface through a medical device integration gateway or Edge driver; HL7 where licensed.',0,3),
('ventilator','Draeger','Evita V / Savina 300 (MEDIBUS)','serial',NULL,NULL,'peep,ppeak,pplat,vt,mv,fio2,rr','MEDIBUS.X via Draeger gateway or Infinity Gateway HL7 to Edge.',0,3),
('ventilator','Philips / GE / Medtronic','Other ICU ventilators','hl7',NULL,NULL,'peep,ppeak,vt,mv,fio2,rr','Via the monitor network or an MDI gateway sending HL7 ORU.',0,3),
-- Anaesthesia workstations
('anaesthesia','Mindray','WATO EX / A7 / A9','hl7',NULL,NULL,'mac,et_agent,fgf,fio2,etco2,ppeak,peep,vt','HL7 via BeneLink / eGateway to Edge; agent and MAC as numerics.',0,3),
('anaesthesia','GE HealthCare','Aisys CS² / Carestation','hl7',NULL,NULL,'mac,et_agent,fgf,fio2,etco2,ppeak,peep,vt','Through CARESCAPE Gateway HL7 or serial via Edge driver.',0,3),
('anaesthesia','Draeger','Perseus A500 / Fabius / Atlan (MEDIBUS)','serial',NULL,NULL,'mac,et_agent,fgf,fio2,etco2,ppeak,peep,vt','MEDIBUS.X via Draeger gateway or Edge driver.',0,3),
('depth_monitor','Medtronic / Masimo','BIS / SedLine depth of anaesthesia','hl7',NULL,NULL,'bis','Usually via the patient monitor module (HL7 numeric).',0,3),
-- Infusion and syringe pumps
('infusion_pump','B. Braun','Space / SpaceStation (OneView / SpaceCom)','hl7',NULL,NULL,'infusion_rate,vtbi,volume_infused','IHE PCD-01 ORU from B. Braun connectivity server to Edge; pump alarms as ORU^R40 (IHE ACM).',0,3),
('infusion_pump','Fresenius Kabi','Agilia / Volumat (Vigilant Centerium)','hl7',NULL,NULL,'infusion_rate,vtbi,volume_infused','HL7 from Vigilant Centerium / Agilia Connect to Edge.',0,3),
('infusion_pump','BD','Alaris (Alaris Systems Manager)','hl7',NULL,NULL,'infusion_rate,vtbi,volume_infused','IHE PCD via Systems Manager to Edge.',0,3),
('infusion_pump','Indian makes (Smiths / Mindray / Lars)','Syringe & volumetric pumps','serial',NULL,NULL,'infusion_rate,volume_infused','HL7 where available (Mindray BeneFusion via eGateway), otherwise serial via Edge driver.',0,3),
-- Dialysis
('dialysis','Fresenius Medical Care','4008 / 5008 / 6008 (TDMS / Therapy Monitor)','hl7',NULL,NULL,'blood_flow,uf_rate,uf_volume,venous_pressure,arterial_pressure,tmp,dialysate_cond,ktv,bp_sys,bp_dia,pulse','From the vendor data-management system as HL7 ORU or CSV export to Edge folder watch.',0,3),
('dialysis','Nipro / B. Braun / Baxter','Haemodialysis machines','serial',NULL,NULL,'blood_flow,uf_rate,uf_volume,venous_pressure,arterial_pressure,tmp,dialysate_cond','Serial/LAN via Edge driver or vendor software export.',0,3),
-- Foetal monitors (CTG)
('ctg','Philips','Avalon FM20 / FM30 / FM50','hl7',NULL,NULL,'fhr,uc,mhr','Via IntelliSpace Perinatal HL7 or direct LAN; CTG traces as waveform channels ctg_fhr / ctg_toco (4 Hz).',0,3),
('ctg','GE / Edan / Bistos / Sunray','Foetal monitors','serial',NULL,NULL,'fhr,uc,mhr','Serial/LAN via Edge driver or vendor central station HL7; PDF strips via folder watch.',0,3),
-- Digital stethoscopes
('stethoscope','Eko','CORE 500 / DUO','file',NULL,NULL,'hr','Recordings exported (WAV) from the vendor app and uploaded to the patient record or teleconsult; live streaming stays in the vendor app.',0,3),
('stethoscope','Ayu / Thinklabs / others','Digital stethoscope','file',NULL,NULL,'hr','WAV / MP3 / M4A recordings uploaded from the web, the CarePulse app or POST /api/v1/documents (doc_type audio).',0,3),
-- CGM and wearables
('cgm','Abbott','FreeStyle Libre','cloud_api',NULL,NULL,'glucose','LibreView CSV import, or Apple Health / Health Connect where the Libre app shares glucose on that phone.',0,3),
('cgm','Dexcom','G6 / G7 / ONE+','cloud_api',NULL,NULL,'glucose','Dexcom Clarity CSV import or Apple Health (Dexcom app writes glucose to Health). Dexcom partner API under agreement.',0,3),
('wearable','Apple','Apple Watch (via Apple Health)','cloud_api',NULL,NULL,'hr,resting_hr,hrv,spo2,rr,steps,sleep_hours,active_energy','CarePulse iPhone app reads HealthKit with patient permission.',0,3),
('wearable','Samsung / Fitbit / Garmin / Noise / boAt','Smartwatches (via Health Connect)','cloud_api',NULL,NULL,'hr,resting_hr,hrv,spo2,steps,sleep_hours,active_energy','CarePulse Android app reads Android Health Connect with patient permission; only data the watch app writes there.',0,3),
('wearable','Dozee / others','Under-mattress & contactless monitors','cloud_api',NULL,NULL,'hr,rr,spo2','Vendor cloud API under partnership, posting to /api/v1/readings.',0,3);
