[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77ZE3KN8FVE8127P8TTYY6S":3,"skill-same:01M77ZE3KN8FVE8127P8TTYY6S":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":29,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M77ZE3KN8FVE8127P8TTYY6S","pm-bahmni",null,"Bahmni connector knowledge and safe action guide.","polymetrics-ai\u002Fcli","polymetrics-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F177650388?v=4","01M77Z920R1RTP5NXCP1V1HNMS","Polymetrics","01M77Z921DPWZC4DQSSZNWF82B",7,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fpolymetrics-ai\u002Fcli\u002Fblob\u002Fmain\u002Fdocs\u002Fconnectors\u002Fbahmni\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: pm-bahmni\ndescription: Bahmni connector knowledge and safe action guide.\n---\n\n# pm-bahmni\n\n## Purpose\n\nReads clinical EMR data from a Bahmni deployment, including local Bahmni\u002Fbahmni-docker setups, through the OpenMRS REST, Bahmni-core REST, and OpenMRS FHIR2 R4 APIs — patients, encounters, observations, visits, concepts, locations, providers, orders, lab results, appointments, and diagnoses — executes bounded direct reads and a schema-gated typed GET patient search, and models retained OpenMRS\u002FBahmni clinical mutations as approval-gated, schema-bound reverse-ETL actions. Output is bounded; secret-shaped fields and typed patient-search declared sensitive fields are redacted by the current runtime, while broad clinical PHI field redaction remains a separate engine policy decision.\n\n## Icon\n\n- id: pm-sample\n- asset: icons\u002Fpm-sample.svg\n- source: polymetrics\n- review_status: polymetrics\n- review_url: https:\u002F\u002Fgithub.com\u002Fpolymetrics-ai\u002Fcli\n\n## Capabilities\n\n- check=true catalog=true read=true write=true query=false\n- Integration type: api\n\n## Authentication\n\n- Use pm credentials add with --from-env or --value-stdin for secret fields.\n\n## Configuration\n\n- appointment_date (required)\n- base_url (required)\n- lab_result_concepts (required)\n- patient_query (required)\n- patient_uuid (required)\n- username (required)\n- password (secret) (required)\n\n## ETL Streams\n\n- patients:\n  - primary key: uuid\n  - fields: display(string), identifiers(array), person(object), uuid(string), voided(boolean)\n- encounters:\n  - primary key: uuid\n  - fields: display(string), encounterDatetime(string), encounterType(object), patient(object), uuid(string), visit(object)\n- observations:\n  - primary key: uuid\n  - fields: concept(object), display(string), obsDatetime(string), uuid(string), value(string)\n- visits:\n  - primary key: uuid\n  - fields: display(string), location(object), startDatetime(string), stopDatetime(string), uuid(string), visitType(object)\n- concepts:\n  - primary key: uuid\n  - fields: conceptClass(object), datatype(object), display(string), name(object), uuid(string)\n- locations:\n  - primary key: uuid\n  - fields: description(string), display(string), name(string), tags(array), uuid(string)\n- providers:\n  - primary key: uuid\n  - fields: attributes(array), display(string), identifier(string), person(object), uuid(string)\n- drug_orders:\n  - primary key: uuid\n  - fields: dateActivated(string), display(string), dose(number), doseUnits(object), drug(object), uuid(string)\n- lab_orders:\n  - primary key: uuid\n  - fields: accessionNumber(string), concept(object), dateActivated(string), display(string), orderType(object), uuid(string)\n- lab_results:\n  - primary key: uuid\n  - fields: concept(object), display(string), obsDatetime(string), uuid(string), value(string)\n- appointments:\n  - primary key: uuid\n  - fields: display(string), endDateTime(string), patient(object), service(object), startDateTime(string), status(string), uuid(string)\n- diagnoses:\n  - fields: certainty(string), codedAnswer(object), diagnosisDateTime(string), display(string), existingObs(string), order(string)\n\n## Sync Modes\n\n- ETL sync modes: full_refresh_append, full_refresh_overwrite\n\n## Reverse ETL Actions\n\n- create_patient:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fpatient\n  - required fields: identifiers, person\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- update_patient:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fpatient\u002F{{ record.uuid }}\n  - required fields: uuid, person\n  - risk: critical: mutates clinical Bahmni\u002FOpenMRS records; requires reverse ETL approval and destructive confirmation for non-disposable use\n- create_encounter:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fencounter\n  - required fields: patient, encounterType, encounterDatetime, location\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- create_observation:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fobs\n  - required fields: person, obsDatetime, concept, value\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- create_visit:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fvisit\n  - required fields: patient, visitType, startDatetime, location\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- create_lab_order:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Forder\n  - required fields: type, encounter, patient, concept, careSetting, orderer, orderType, action\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- create_patient_diagnosis:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fpatientdiagnoses\n  - required fields: diagnosis, encounter, condition, certainty, patient, rank\n  - risk: critical: mutates clinical Bahmni\u002FOpenMRS records; requires reverse ETL approval and destructive confirmation for non-disposable use\n- create_appointment:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fappointments\n  - required fields: patientUuid, serviceUuid, startDateTime, endDateTime, appointmentKind, status\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- update_appointment_status:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fappointments\u002F{{ record.appointmentUuid }}\u002Fstatus-change\n  - required fields: appointmentUuid, toStatus, onDate\n  - risk: critical: mutates clinical Bahmni\u002FOpenMRS records; requires reverse ETL approval and destructive confirmation for non-disposable use\n- update_appointment_provider_response:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fappointments\u002F{{ record.appointmentUuid }}\u002FproviderResponse\n  - required fields: appointmentUuid, uuid, response\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- create_note:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fnotes\n  - required fields: notes\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n\n## Security\n\n- read risk: external Bahmni\u002FOpenMRS clinical PHI read of patient, encounter, observation, visit, order, lab, appointment, and diagnosis data; reads are bounded, secret-shaped fields are redacted by existing output policies, and typed patient search redacts declared identifier\u002Faddress\u002Fname\u002Fdate fields, but remaining clinical PHI fields are not generally field-redacted by the current engine\n- write risk: typed Bahmni\u002FOpenMRS reverse ETL clinical mutations for retained, live-proven patient, encounter, observation, visit, lab order, diagnosis, appointment create\u002Fstatus\u002Fprovider-response, and note routes; drug order, appointment reschedule, bulk observation, and document upload surfaces are blocked unless separately typed and live-proven\n- approval: reverse ETL writes require plan, preview, approval, execute; clinical\u002Fdestructive actions require --confirm destructive\n- Never pass secret values in chat, shell arguments, logs, docs, or JSON output.\n\n## Command Surface\n\n- Inspect, read, and safely plan typed Bahmni clinical operations.\n- Usage: pm bahmni \u003Ccommand> [flags]\n- Source CLI: Bahmni \u002F OpenMRS REST + FHIR2 (OpenMRS REST v1, Bahmni-core REST, OpenMRS FHIR2 R4)\n- PM execution policy pm-request-contract-bounds-v1: each max N bytes qualifier is the effective PM request limit, not a provider schema assertion; path\u002Fquery values are measured after exact wire encoding and rejected rather than truncated.\n- Global flags:\n  - --credential (string): Credential name to use for the Bahmni request.\n  - --connection (string): Alias for --credential.\n  - --config (string_array): Connector config override as key=value.\n  - --json (boolean): Emit machine-readable JSON output.\n  - --limit (integer): Maximum ETL records to emit for stream commands.\n  - --max-bytes (integer): Maximum direct-read response bytes; typed operations declare their own lower cap.\n  - --plan (string): Execute an approved reverse-ETL plan by id.\n  - --preview (boolean): Preview a reverse-ETL write command without making a network mutation.\n  - --approval-token-stdin (boolean): Read the approval token as one bounded line from standard input.\n  - --confirm (string): Typed confirmation challenge for destructive reverse-ETL writes.\n- Clinical data\n  - patients list - List Bahmni\u002FOpenMRS patients as ETL records (requires a patient search term). [intent=etl availability=implemented stream=patients]\n  - patients create - Create a Bahmni\u002FOpenMRS patient record (clinical PHI). [intent=reverse_etl availability=implemented write=create_patient]; approval: reverse ETL plan -> preview -> approval -> execute; clinical\u002Fdestructive actions require --confirm destructive.; risk: clinical reverse-ETL mutation of Bahmni\u002FOpenMRS PHI; runs only through plan, preview, approval, execute.; notes: Typed reverse-ETL action; no raw HTTP body, raw JSON, generic shell, or SQL write is exposed.; flags: --identifier, --identifier-type, --identifier-location, --identifier-preferred, --given-name, --family-name, --middle-name, --gender, --birthdate, --address1, --city-village, --state-province, --country, --postal-code\n  - patients update - Update an existing Bahmni\u002FOpenMRS patient record (clinical PHI). [intent=reverse_etl availability=implemented write=update_patient]; approval: reverse ETL plan -> preview -> approval -> execute; clinical\u002Fdestructive actions require --confirm destructive.; risk: clinical reverse-ETL mutation of Bahmni\u002FOpenMRS PHI; runs only through plan, preview, approval, execute.; notes: Typed reverse-ETL action; no raw HTTP body, raw JSON, generic shell, or SQL write is exposed.; flags: --uuid, --given-name, --family-name, --middle-name, --gender, --birthdate, --address1, --city-village, --state-province, --country, --postal-code\n  - encounters list - List patient encounters as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=encounters]\n  - encounters create - Create a clinical encounter with explicit typed scalar fields. [intent=reverse_etl availability=implemented write=create_encounter]; approval: reverse ETL plan -> preview -> approval -> execute; clinical\u002Fdestructive actions require --confirm destructive.; risk: clinical reverse-ETL mutation of Bahmni\u002FOpenMRS PHI; runs only through plan, preview, approval, execute.; notes: Typed reverse-ETL action; no raw HTTP body, raw JSON, generic shell, or SQL write is exposed.; flags: --patient, --encounter-type, --encounter-datetime, --location, --visit\n  - observations list - List patient observations (obs) as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=observations]\n  - observations create - Record a clinical observation (obs) for a patient. [intent=reverse_etl availability=implemented write=create_observation]; approval: reverse ETL plan -> preview -> approval -> execute; clinical\u002Fdestructive actions require --confirm destructive.; risk: clinical reverse-ETL mutation of Bahmni\u002FOpenMRS PHI; runs only through plan, preview, approval, execute.; notes: Typed reverse-ETL action; no raw HTTP body, raw JSON, generic shell, or SQL write is exposed.; flags: --person, --obs-datetime, --concept, --value\n  - visits list - List patient visits as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=visits]\n  - visits create - Create an OpenMRS visit. [intent=reverse_etl availability=implemented write=create_visit]; approval: reverse ETL writes require plan, preview, approval, execute; risk: high; notes: Version-pinned supported write route; execute only through reverse ETL approval against disposable synthetic records unless explicitly approved.; flags: --patient, --visit-type, --start-datetime, --stop-datetime, --location\n  - diagnoses list - List Bahmni-core patient diagnoses as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=diagnoses]\n  - diagnoses create - Create an OpenMRS patient diagnosis through the supported patientdiagnoses resource. [intent=reverse_etl availability=implemented write=create_patient_diagnosis]; approval: reverse ETL writes require plan, preview, approval, execute; risk: critical; notes: Version-pinned supported write route; execute only through reverse ETL approval against disposable synthetic records unless explicitly approved.; flags: --patient, --encounter, --condition, --certainty, --rank, --non-coded-diagnosis, --coded-diagnosis, --specific-name\n- Catalog & reference\n  - concepts list - List OpenMRS concepts as ETL records. [intent=etl availability=implemented stream=concepts]\n  - locations list - List OpenMRS locations as ETL records. [intent=etl availability=implemented stream=locations]\n  - providers list - List OpenMRS providers as ETL records. [intent=etl availability=implemented stream=providers]\n- Orders & labs\n  - drug_orders list - List active Bahmni drug orders as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=drug_orders]\n  - drug_orders create - Drug order creation is not exposed in this checkpoint; the local pinned Bahmni\u002FOpenMRS lab rejected the pinned drug-order body at execute and the direct counterfactual failed against the same endpoint. [intent=reverse_etl availability=unsupported_local unsupported local workflow]; approval: reverse ETL plan -> preview -> approval -> execute; clinical\u002Fdestructive actions require --confirm destructive.; risk: unsupported local drug-order mutation; no live proof, not retained as an executable write; notes: Blocked until a concrete upstream-required field or lab capability is proven. Diagnostic evidence: typed plan\u002Fpreview reached execute with HTTP 400 safe fields action,drug; direct counterfactual to POST \u002Fws\u002Frest\u002Fv1\u002Forder returned HTTP 400 with upstream code webservices.rest.error.invalid.submission. Pinned source: OpenMRS webservices REST OrderResource1_10 + DrugOrderSubclassHandler1_10\u002F1_12 define the route\u002Fproperties, but current lab did not accept the generated pinned-shape body.\n  - lab_orders list - List lab (test) orders as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=lab_orders]\n  - lab_orders create - Create an OpenMRS test\u002Flab order through the typed order resource. [intent=reverse_etl availability=implemented write=create_lab_order]; approval: reverse ETL writes require plan, preview, approval, execute; risk: high; notes: Version-pinned supported write route; execute only through reverse ETL approval against disposable synthetic records unless explicitly approved.; flags: --type, --patient, --encounter, --concept, --care-setting, --orderer, --order-type, --action, --clinical-history\n  - lab_results list - List Bahmni-core lab result observations as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=lab_results]\n- Scheduling\n  - appointments list - List Bahmni appointments as ETL records scoped by appointment_date only. [intent=etl availability=implemented stream=appointments]\n  - appointments create - Book a Bahmni patient appointment. [intent=reverse_etl availability=implemented write=create_appointment]; approval: reverse ETL plan -> preview -> approval -> execute; clinical\u002Fdestructive actions require --confirm destructive.; risk: clinical reverse-ETL mutation of Bahmni\u002FOpenMRS PHI; runs only through plan, preview, approval, execute.; notes: Typed reverse-ETL action; no raw HTTP body, raw JSON, generic shell, or SQL write is exposed.; flags: --patient-uuid, --service-uuid, --start-date-time, --end-date-time, --appointment-kind, --status, --provider-uuid, --provider-response, --location-uuid, --comments\n  - appointments status-change - Change an appointment status. [intent=reverse_etl availability=implemented write=update_appointment_status]; approval: reverse ETL writes require plan, preview, approval, execute; risk: critical; notes: Version-pinned supported write route; execute only through reverse ETL approval against disposable synthetic records unless explicitly approved.; flags: --appointment-uuid, --to-status, --on-date\n  - appointments provider-response - Update an appointment provider response. [intent=reverse_etl availability=implemented write=update_appointment_provider_response]; approval: reverse ETL writes require plan, preview, approval, execute; risk: high; notes: Version-pinned supported write route; execute only through reverse ETL approval against disposable synthetic records unless explicitly approved.; flags: --appointment-uuid, --provider-detail-uuid, --response\n  - appointments reschedule - Appointment reschedule is not exposed in this checkpoint; the local pinned Bahmni appointments lab rejected the singular-controller AppointmentRequest-shaped body. [intent=reverse_etl availability=unsupported_local unsupported local workflow]; approval: reverse ETL writes require plan, preview, approval, execute; risk: unsupported local appointment reschedule mutation; no live proof, not retained as an executable write; notes: Blocked until the singular reschedule route is live-proven or a concrete upstream-required field is identified. Diagnostic evidence: typed plan\u002Fpreview reached execute with HTTP 400 safe field uuid; direct counterfactual to POST \u002Fws\u002Frest\u002Fv1\u002Fappointment\u002F{uuid}\u002Freschedule returned HTTP 400 with upstream code org.hibernate.exception.internal.SQLExceptionTypeDelegate:59. Pinned source: AppointmentController.rescheduleAppointment accepts AppointmentRequest and calls AppointmentsServiceImpl.reschedule, but current lab did not accept the generated contract-shaped body.\n- Direct reads\n  - patient get - Retrieve a single patient resource by UUID. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --uuid (max 4096 bytes), --page, --page-cursor\n  - encounter get - Retrieve a single encounter resource by UUID. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --uuid (max 4096 bytes), --page, --page-cursor\n  - visit get - Retrieve a single visit resource by UUID. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --uuid (max 4096 bytes), --page, --page-cursor\n  - concept get - Retrieve a single concept resource by UUID. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --uuid (max 4096 bytes), --page, --page-cursor\n  - provider get - Retrieve a single provider resource by UUID. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --uuid (max 4096 bytes), --page, --page-cursor\n  - location get - Retrieve a single location resource by UUID. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --uuid (max 4096 bytes), --page, --page-cursor\n  - fhir patient-read - Read a FHIR R4 Patient resource by id. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --id (max 4096 bytes), --page, --page-cursor\n  - fhir observation-read - Read a FHIR R4 Observation resource by id. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --id (max 4096 bytes), --page, --page-cursor\n  - fhir encounter-read - Read a FHIR R4 Encounter resource by id. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --id (max 4096 bytes), --page, --page-cursor\n  - fhir condition-read - Read a FHIR R4 Condition resource by id. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --id (max 4096 bytes), --page, --page-cursor\n  - bahmnicore patient-search - Search patients with the pinned bahmni-commons GET patient search route. [intent=direct_read availability=implemented operation=bahmni.patient_search]; approval: none: read-only GET query with allow-listed query parameters and bounded JSON output.; risk: bounded typed GET read-query; the response is size-capped, secret-shaped fields are redacted, and the operation direct-read engine redacts declared patient-search sensitive fields including identifier, addressFieldValue, display, givenName, middleName, familyName, birthDate, and deathDate. Remaining clinical PHI fields should still be treated as clinical data.; notes: Executes through the typed operation direct-read engine; no raw request body or generic HTTP flag is exposed.; flags: --page, --page-cursor\n- Documents\n  - documents upload - Visit-document upload is not advertised until a file-backed bounded multipart\u002Fhash-gated typed surface is implemented and live-proven. [intent=reverse_etl availability=unsafe_or_disallowed]; approval: blocked: inline content upload is not a retained typed write surface; risk: critical; notes: Blocked for PR #533: current inline JSON content surface lacks the claimed file snapshot\u002FSHA-256 approval binding; do not use as an advertised write.\n- Other Commands\n  - notes create - Create one Bahmni note through a schema-bound top-level JSON array body. [intent=reverse_etl availability=implemented write=create_note]; approval: reverse ETL writes require plan, preview, approval, execute; risk: high; notes: Version-pinned supported write route; execute only through reverse ETL approval against disposable synthetic records unless explicitly approved.; flags: --note-type-name, --note-text, --note-date\n- Help topics:\n  - bahmni-auth - Point base_url at a Bahmni OpenMRS instance, including a local Bahmni\u002Fbahmni-docker deployment, and supply username\u002Fpassword via credentials; never pass secrets in command text.\n  - bahmni-writes - Bahmni clinical mutations are typed reverse-ETL actions with plan, preview, approval, execute gates; clinical\u002Fdestructive actions require --confirm destructive.\n  - bahmni-direct-read - Bahmni direct reads are bounded JSON GET-by-uuid, FHIR read-by-id, or a schema-gated typed GET patient search, all with a response byte cap; typed patient search redacts its declared identifier, address, name, birth-date, and death-date fields.\n  - bahmni-phi - Bahmni reads and writes can include clinical PHI. The current runtime bounds output, redacts secret-shaped fields, configured write path identifiers, and typed patient-search declared sensitive fields; broad clinical PHI field redaction remains a separate engine policy decision.\n\n## Commands\n\n### Inspect as a manual\n\n```bash\npm connectors inspect bahmni\n```\n\n### Inspect as structured JSON\n\n```bash\npm connectors inspect bahmni --json\n```\n\n### Command discovery\n\n```bash\npm bahmni --help\npm bahmni appointments --help\npm bahmni appointments create --help\n```\n\n### Synthetic appointment read\n\n```bash\npm bahmni appointments list --credential bahmni-local --config appointment_date=2026-01-01T00:00:00.000 --limit 10 --json\n```\n\n### Synthetic patient create plan\n\n```bash\npm bahmni patients create --credential bahmni-local --identifier SYN-CONN-EXAMPLE-001 --identifier-type \u003Cidentifier-type-uuid> --identifier-location \u003Clocation-uuid> --given-name Synthetic --family-name Connector --gender O --birthdate 1990-01-01 --preview --json\n```\n\n### Unsupported retained as blocked\n\n```bash\npm bahmni appointments reschedule --help\npm bahmni drug_orders create --help\n```\n\n## Agent Rules\n\n- Run pm connectors inspect bahmni before creating credentials or plans.\n- Use --json only when the caller needs structured output; use the manual for human-readable guidance.\n- Never ask the user to paste secret values into chat.\n- For reverse ETL writes, create a plan, show the preview, wait for explicit approval, then run with the approval token.\n","# pm-bahmni\n\n## Purpose\n\nReads clinical EMR data from a Bahmni deployment, including local Bahmni\u002Fbahmni-docker setups, through the OpenMRS REST, Bahmni-core REST, and OpenMRS FHIR2 R4 APIs — patients, encounters, observations, visits, concepts, locations, providers, orders, lab results, appointments, and diagnoses — executes bounded direct reads and a schema-gated typed GET patient search, and models retained OpenMRS\u002FBahmni clinical mutations as approval-gated, schema-bound reverse-ETL actions. Output is bounded; secret-shaped fields and typed patient-search declared sensitive fields are redacted by the current runtime, while broad clinical PHI field redaction remains a separate engine policy decision.\n\n## Icon\n\n- id: pm-sample\n- asset: icons\u002Fpm-sample.svg\n- source: polymetrics\n- review_status: polymetrics\n- review_url: https:\u002F\u002Fgithub.com\u002Fpolymetrics-ai\u002Fcli\n\n## Capabilities\n\n- check=true catalog=true read=true write=true query=false\n- Integration type: api\n\n## Authentication\n\n- Use pm credentials add with --from-env or --value-stdin for secret fields.\n\n## Configuration\n\n- appointment_date (required)\n- base_url (required)\n- lab_result_concepts (required)\n- patient_query (required)\n- patient_uuid (required)\n- username (required)\n- password (secret) (required)\n\n## ETL Streams\n\n- patients:\n  - primary key: uuid\n  - fields: display(string), identifiers(array), person(object), uuid(string), voided(boolean)\n- encounters:\n  - primary key: uuid\n  - fields: display(string), encounterDatetime(string), encounterType(object), patient(object), uuid(string), visit(object)\n- observations:\n  - primary key: uuid\n  - fields: concept(object), display(string), obsDatetime(string), uuid(string), value(string)\n- visits:\n  - primary key: uuid\n  - fields: display(string), location(object), startDatetime(string), stopDatetime(string), uuid(string), visitType(object)\n- concepts:\n  - primary key: uuid\n  - fields: conceptClass(object), datatype(object), display(string), name(object), uuid(string)\n- locations:\n  - primary key: uuid\n  - fields: description(string), display(string), name(string), tags(array), uuid(string)\n- providers:\n  - primary key: uuid\n  - fields: attributes(array), display(string), identifier(string), person(object), uuid(string)\n- drug_orders:\n  - primary key: uuid\n  - fields: dateActivated(string), display(string), dose(number), doseUnits(object), drug(object), uuid(string)\n- lab_orders:\n  - primary key: uuid\n  - fields: accessionNumber(string), concept(object), dateActivated(string), display(string), orderType(object), uuid(string)\n- lab_results:\n  - primary key: uuid\n  - fields: concept(object), display(string), obsDatetime(string), uuid(string), value(string)\n- appointments:\n  - primary key: uuid\n  - fields: display(string), endDateTime(string), patient(object), service(object), startDateTime(string), status(string), uuid(string)\n- diagnoses:\n  - fields: certainty(string), codedAnswer(object), diagnosisDateTime(string), display(string), existingObs(string), order(string)\n\n## Sync Modes\n\n- ETL sync modes: full_refresh_append, full_refresh_overwrite\n\n## Reverse ETL Actions\n\n- create_patient:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fpatient\n  - required fields: identifiers, person\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- update_patient:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fpatient\u002F{{ record.uuid }}\n  - required fields: uuid, person\n  - risk: critical: mutates clinical Bahmni\u002FOpenMRS records; requires reverse ETL approval and destructive confirmation for non-disposable use\n- create_encounter:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fencounter\n  - required fields: patient, encounterType, encounterDatetime, location\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- create_observation:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fobs\n  - required fields: person, obsDatetime, concept, value\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- create_visit:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fvisit\n  - required fields: patient, visitType, startDatetime, location\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- create_lab_order:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Forder\n  - required fields: type, encounter, patient, concept, careSetting, orderer, orderType, action\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- create_patient_diagnosis:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fpatientdiagnoses\n  - required fields: diagnosis, encounter, condition, certainty, patient, rank\n  - risk: critical: mutates clinical Bahmni\u002FOpenMRS records; requires reverse ETL approval and destructive confirmation for non-disposable use\n- create_appointment:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fappointments\n  - required fields: patientUuid, serviceUuid, startDateTime, endDateTime, appointmentKind, status\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- update_appointment_status:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fappointments\u002F{{ record.appointmentUuid }}\u002Fstatus-change\n  - required fields: appointmentUuid, toStatus, onDate\n  - risk: critical: mutates clinical Bahmni\u002FOpenMRS records; requires reverse ETL approval and destructive confirmation for non-disposable use\n- update_appointment_provider_response:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fappointments\u002F{{ record.appointmentUuid }}\u002FproviderResponse\n  - required fields: appointmentUuid, uuid, response\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n- create_note:\n  - endpoint: POST \u002Fws\u002Frest\u002Fv1\u002Fnotes\n  - required fields: notes\n  - risk: high: writes clinical Bahmni\u002FOpenMRS data; requires reverse ETL plan, preview, approval, execute against synthetic\u002Fdisposable records unless explicitly approved\n\n## Security\n\n- read risk: external Bahmni\u002FOpenMRS clinical PHI read of patient, encounter, observation, visit, order, lab, appointment, and diagnosis data; reads are bounded, secret-shaped fields are redacted by existing output policies, and typed patient search redacts declared identifier\u002Faddress\u002Fname\u002Fdate fields, but remaining clinical PHI fields are not generally field-redacted by the current engine\n- write risk: typed Bahmni\u002FOpenMRS reverse ETL clinical mutations for retained, live-proven patient, encounter, observation, visit, lab order, diagnosis, appointment create\u002Fstatus\u002Fprovider-response, and note routes; drug order, appointment reschedule, bulk observation, and document upload surfaces are blocked unless separately typed and live-proven\n- approval: reverse ETL writes require plan, preview, approval, execute; clinical\u002Fdestructive actions require --confirm destructive\n- Never pass secret values in chat, shell arguments, logs, docs, or JSON output.\n\n## Command Surface\n\n- Inspect, read, and safely plan typed Bahmni clinical operations.\n- Usage: pm bahmni \u003Ccommand> [flags]\n- Source CLI: Bahmni \u002F OpenMRS REST + FHIR2 (OpenMRS REST v1, Bahmni-core REST, OpenMRS FHIR2 R4)\n- PM execution policy pm-request-contract-bounds-v1: each max N bytes qualifier is the effective PM request limit, not a provider schema assertion; path\u002Fquery values are measured after exact wire encoding and rejected rather than truncated.\n- Global flags:\n  - --credential (string): Credential name to use for the Bahmni request.\n  - --connection (string): Alias for --credential.\n  - --config (string_array): Connector config override as key=value.\n  - --json (boolean): Emit machine-readable JSON output.\n  - --limit (integer): Maximum ETL records to emit for stream commands.\n  - --max-bytes (integer): Maximum direct-read response bytes; typed operations declare their own lower cap.\n  - --plan (string): Execute an approved reverse-ETL plan by id.\n  - --preview (boolean): Preview a reverse-ETL write command without making a network mutation.\n  - --approval-token-stdin (boolean): Read the approval token as one bounded line from standard input.\n  - --confirm (string): Typed confirmation challenge for destructive reverse-ETL writes.\n- Clinical data\n  - patients list - List Bahmni\u002FOpenMRS patients as ETL records (requires a patient search term). [intent=etl availability=implemented stream=patients]\n  - patients create - Create a Bahmni\u002FOpenMRS patient record (clinical PHI). [intent=reverse_etl availability=implemented write=create_patient]; approval: reverse ETL plan -> preview -> approval -> execute; clinical\u002Fdestructive actions require --confirm destructive.; risk: clinical reverse-ETL mutation of Bahmni\u002FOpenMRS PHI; runs only through plan, preview, approval, execute.; notes: Typed reverse-ETL action; no raw HTTP body, raw JSON, generic shell, or SQL write is exposed.; flags: --identifier, --identifier-type, --identifier-location, --identifier-preferred, --given-name, --family-name, --middle-name, --gender, --birthdate, --address1, --city-village, --state-province, --country, --postal-code\n  - patients update - Update an existing Bahmni\u002FOpenMRS patient record (clinical PHI). [intent=reverse_etl availability=implemented write=update_patient]; approval: reverse ETL plan -> preview -> approval -> execute; clinical\u002Fdestructive actions require --confirm destructive.; risk: clinical reverse-ETL mutation of Bahmni\u002FOpenMRS PHI; runs only through plan, preview, approval, execute.; notes: Typed reverse-ETL action; no raw HTTP body, raw JSON, generic shell, or SQL write is exposed.; flags: --uuid, --given-name, --family-name, --middle-name, --gender, --birthdate, --address1, --city-village, --state-province, --country, --postal-code\n  - encounters list - List patient encounters as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=encounters]\n  - encounters create - Create a clinical encounter with explicit typed scalar fields. [intent=reverse_etl availability=implemented write=create_encounter]; approval: reverse ETL plan -> preview -> approval -> execute; clinical\u002Fdestructive actions require --confirm destructive.; risk: clinical reverse-ETL mutation of Bahmni\u002FOpenMRS PHI; runs only through plan, preview, approval, execute.; notes: Typed reverse-ETL action; no raw HTTP body, raw JSON, generic shell, or SQL write is exposed.; flags: --patient, --encounter-type, --encounter-datetime, --location, --visit\n  - observations list - List patient observations (obs) as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=observations]\n  - observations create - Record a clinical observation (obs) for a patient. [intent=reverse_etl availability=implemented write=create_observation]; approval: reverse ETL plan -> preview -> approval -> execute; clinical\u002Fdestructive actions require --confirm destructive.; risk: clinical reverse-ETL mutation of Bahmni\u002FOpenMRS PHI; runs only through plan, preview, approval, execute.; notes: Typed reverse-ETL action; no raw HTTP body, raw JSON, generic shell, or SQL write is exposed.; flags: --person, --obs-datetime, --concept, --value\n  - visits list - List patient visits as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=visits]\n  - visits create - Create an OpenMRS visit. [intent=reverse_etl availability=implemented write=create_visit]; approval: reverse ETL writes require plan, preview, approval, execute; risk: high; notes: Version-pinned supported write route; execute only through reverse ETL approval against disposable synthetic records unless explicitly approved.; flags: --patient, --visit-type, --start-datetime, --stop-datetime, --location\n  - diagnoses list - List Bahmni-core patient diagnoses as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=diagnoses]\n  - diagnoses create - Create an OpenMRS patient diagnosis through the supported patientdiagnoses resource. [intent=reverse_etl availability=implemented write=create_patient_diagnosis]; approval: reverse ETL writes require plan, preview, approval, execute; risk: critical; notes: Version-pinned supported write route; execute only through reverse ETL approval against disposable synthetic records unless explicitly approved.; flags: --patient, --encounter, --condition, --certainty, --rank, --non-coded-diagnosis, --coded-diagnosis, --specific-name\n- Catalog & reference\n  - concepts list - List OpenMRS concepts as ETL records. [intent=etl availability=implemented stream=concepts]\n  - locations list - List OpenMRS locations as ETL records. [intent=etl availability=implemented stream=locations]\n  - providers list - List OpenMRS providers as ETL records. [intent=etl availability=implemented stream=providers]\n- Orders & labs\n  - drug_orders list - List active Bahmni drug orders as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=drug_orders]\n  - drug_orders create - Drug order creation is not exposed in this checkpoint; the local pinned Bahmni\u002FOpenMRS lab rejected the pinned drug-order body at execute and the direct counterfactual failed against the same endpoint. [intent=reverse_etl availability=unsupported_local unsupported local workflow]; approval: reverse ETL plan -> preview -> approval -> execute; clinical\u002Fdestructive actions require --confirm destructive.; risk: unsupported local drug-order mutation; no live proof, not retained as an executable write; notes: Blocked until a concrete upstream-required field or lab capability is proven. Diagnostic evidence: typed plan\u002Fpreview reached execute with HTTP 400 safe fields action,drug; direct counterfactual to POST \u002Fws\u002Frest\u002Fv1\u002Forder returned HTTP 400 with upstream code webservices.rest.error.invalid.submission. Pinned source: OpenMRS webservices REST OrderResource1_10 + DrugOrderSubclassHandler1_10\u002F1_12 define the route\u002Fproperties, but current lab did not accept the generated pinned-shape body.\n  - lab_orders list - List lab (test) orders as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=lab_orders]\n  - lab_orders create - Create an OpenMRS test\u002Flab order through the typed order resource. [intent=reverse_etl availability=implemented write=create_lab_order]; approval: reverse ETL writes require plan, preview, approval, execute; risk: high; notes: Version-pinned supported write route; execute only through reverse ETL approval against disposable synthetic records unless explicitly approved.; flags: --type, --patient, --encounter, --concept, --care-setting, --orderer, --order-type, --action, --clinical-history\n  - lab_results list - List Bahmni-core lab result observations as ETL records (scoped by patient_uuid). [intent=etl availability=implemented stream=lab_results]\n- Scheduling\n  - appointments list - List Bahmni appointments as ETL records scoped by appointment_date only. [intent=etl availability=implemented stream=appointments]\n  - appointments create - Book a Bahmni patient appointment. [intent=reverse_etl availability=implemented write=create_appointment]; approval: reverse ETL plan -> preview -> approval -> execute; clinical\u002Fdestructive actions require --confirm destructive.; risk: clinical reverse-ETL mutation of Bahmni\u002FOpenMRS PHI; runs only through plan, preview, approval, execute.; notes: Typed reverse-ETL action; no raw HTTP body, raw JSON, generic shell, or SQL write is exposed.; flags: --patient-uuid, --service-uuid, --start-date-time, --end-date-time, --appointment-kind, --status, --provider-uuid, --provider-response, --location-uuid, --comments\n  - appointments status-change - Change an appointment status. [intent=reverse_etl availability=implemented write=update_appointment_status]; approval: reverse ETL writes require plan, preview, approval, execute; risk: critical; notes: Version-pinned supported write route; execute only through reverse ETL approval against disposable synthetic records unless explicitly approved.; flags: --appointment-uuid, --to-status, --on-date\n  - appointments provider-response - Update an appointment provider response. [intent=reverse_etl availability=implemented write=update_appointment_provider_response]; approval: reverse ETL writes require plan, preview, approval, execute; risk: high; notes: Version-pinned supported write route; execute only through reverse ETL approval against disposable synthetic records unless explicitly approved.; flags: --appointment-uuid, --provider-detail-uuid, --response\n  - appointments reschedule - Appointment reschedule is not exposed in this checkpoint; the local pinned Bahmni appointments lab rejected the singular-controller AppointmentRequest-shaped body. [intent=reverse_etl availability=unsupported_local unsupported local workflow]; approval: reverse ETL writes require plan, preview, approval, execute; risk: unsupported local appointment reschedule mutation; no live proof, not retained as an executable write; notes: Blocked until the singular reschedule route is live-proven or a concrete upstream-required field is identified. Diagnostic evidence: typed plan\u002Fpreview reached execute with HTTP 400 safe field uuid; direct counterfactual to POST \u002Fws\u002Frest\u002Fv1\u002Fappointment\u002F{uuid}\u002Freschedule returned HTTP 400 with upstream code org.hibernate.exception.internal.SQLExceptionTypeDelegate:59. Pinned source: AppointmentController.rescheduleAppointment accepts AppointmentRequest and calls AppointmentsServiceImpl.reschedule, but current lab did not accept the generated contract-shaped body.\n- Direct reads\n  - patient get - Retrieve a single patient resource by UUID. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --uuid (max 4096 bytes), --page, --page-cursor\n  - encounter get - Retrieve a single encounter resource by UUID. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --uuid (max 4096 bytes), --page, --page-cursor\n  - visit get - Retrieve a single visit resource by UUID. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --uuid (max 4096 bytes), --page, --page-cursor\n  - concept get - Retrieve a single concept resource by UUID. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --uuid (max 4096 bytes), --page, --page-cursor\n  - provider get - Retrieve a single provider resource by UUID. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --uuid (max 4096 bytes), --page, --page-cursor\n  - location get - Retrieve a single location resource by UUID. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --uuid (max 4096 bytes), --page, --page-cursor\n  - fhir patient-read - Read a FHIR R4 Patient resource by id. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --id (max 4096 bytes), --page, --page-cursor\n  - fhir observation-read - Read a FHIR R4 Observation resource by id. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --id (max 4096 bytes), --page, --page-cursor\n  - fhir encounter-read - Read a FHIR R4 Encounter resource by id. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --id (max 4096 bytes), --page, --page-cursor\n  - fhir condition-read - Read a FHIR R4 Condition resource by id. [intent=direct_read availability=implemented]; risk: bounded Bahmni\u002FOpenMRS JSON read; the response is size-limited and secret-shaped fields are redacted.; flags: --id (max 4096 bytes), --page, --page-cursor\n  - bahmnicore patient-search - Search patients with the pinned bahmni-commons GET patient search route. [intent=direct_read availability=implemented operation=bahmni.patient_search]; approval: none: read-only GET query with allow-listed query parameters and bounded JSON output.; risk: bounded typed GET read-query; the response is size-capped, secret-shaped fields are redacted, and the operation direct-read engine redacts declared patient-search sensitive fields including identifier, addressFieldValue, display, givenName, middleName, familyName, birthDate, and deathDate. Remaining clinical PHI fields should still be treated as clinical data.; notes: Executes through the typed operation direct-read engine; no raw request body or generic HTTP flag is exposed.; flags: --page, --page-cursor\n- Documents\n  - documents upload - Visit-document upload is not advertised until a file-backed bounded multipart\u002Fhash-gated typed surface is implemented and live-proven. [intent=reverse_etl availability=unsafe_or_disallowed]; approval: blocked: inline content upload is not a retained typed write surface; risk: critical; notes: Blocked for PR #533: current inline JSON content surface lacks the claimed file snapshot\u002FSHA-256 approval binding; do not use as an advertised write.\n- Other Commands\n  - notes create - Create one Bahmni note through a schema-bound top-level JSON array body. [intent=reverse_etl availability=implemented write=create_note]; approval: reverse ETL writes require plan, preview, approval, execute; risk: high; notes: Version-pinned supported write route; execute only through reverse ETL approval against disposable synthetic records unless explicitly approved.; flags: --note-type-name, --note-text, --note-date\n- Help topics:\n  - bahmni-auth - Point base_url at a Bahmni OpenMRS instance, including a local Bahmni\u002Fbahmni-docker deployment, and supply username\u002Fpassword via credentials; never pass secrets in command text.\n  - bahmni-writes - Bahmni clinical mutations are typed reverse-ETL actions with plan, preview, approval, execute gates; clinical\u002Fdestructive actions require --confirm destructive.\n  - bahmni-direct-read - Bahmni direct reads are bounded JSON GET-by-uuid, FHIR read-by-id, or a schema-gated typed GET patient search, all with a response byte cap; typed patient search redacts its declared identifier, address, name, birth-date, and death-date fields.\n  - bahmni-phi - Bahmni reads and writes can include clinical PHI. The current runtime bounds output, redacts secret-shaped fields, configured write path identifiers, and typed patient-search declared sensitive fields; broad clinical PHI field redaction remains a separate engine policy decision.\n\n## Commands\n\n### Inspect as a manual\n\n```bash\npm connectors inspect bahmni\n```\n\n### Inspect as structured JSON\n\n```bash\npm connectors inspect bahmni --json\n```\n\n### Command discovery\n\n```bash\npm bahmni --help\npm bahmni appointments --help\npm bahmni appointments create --help\n```\n\n### Synthetic appointment read\n\n```bash\npm bahmni appointments list --credential bahmni-local --config appointment_date=2026-01-01T00:00:00.000 --limit 10 --json\n```\n\n### Synthetic patient create plan\n\n```bash\npm bahmni patients create --credential bahmni-local --identifier SYN-CONN-EXAMPLE-001 --identifier-type \u003Cidentifier-type-uuid> --identifier-location \u003Clocation-uuid> --given-name Synthetic --family-name Connector --gender O --birthdate 1990-01-01 --preview --json\n```\n\n### Unsupported retained as blocked\n\n```bash\npm bahmni appointments reschedule --help\npm bahmni drug_orders create --help\n```\n\n## Agent Rules\n\n- Run pm connectors inspect bahmni before creating credentials or plans.\n- Use --json only when the caller needs structured output; use the manual for human-readable guidance.\n- Never ask the user to paste secret values into chat.\n- For reverse ETL writes, create a plan, show the preview, wait for explicit approval, then run with the approval token.\n",{"name":5,"description":7},"main","813f457a925f7ee3fe3bea101a43e445992c8552","docs\u002Fconnectors\u002Fbahmni",0,"https:\u002F\u002Fgithub.com\u002Fpolymetrics-ai\u002Fcli","https:\u002F\u002Fcli.polymetrics.ai","https:\u002F\u002Fgithub.com\u002Fpolymetrics-ai","Local-first data infrastructure for agents and developers.","2026-09-21 12:42:03",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add polymetrics-ai\u002Fcli --skill pm-bahmni",{"tool":39,"command":40},"bunx","bunx skills add polymetrics-ai\u002Fcli --skill pm-bahmni",{"tool":42,"command":43},"pnpm","pnpm dlx skills add polymetrics-ai\u002Fcli --skill pm-bahmni","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpolymetrics-ai\u002Fcli\u002Fblob\u002Fmain\u002Fdocs\u002Fconnectors\u002Fbahmni\u002FSKILL.md",true,[47],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"MANUAL.md","REFERENCE","参考文档",24895,"https:\u002F\u002Fgithub.com\u002Fpolymetrics-ai\u002Fcli\u002Fblob\u002Fmain\u002Fdocs\u002Fconnectors\u002Fbahmni\u002FMANUAL.md",[54,61,68,75,82,89],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M782EH9BFHYZVECKJ31F427S","recipe-preview-approve-reverse-etl","Preview and approve a reverse ETL plan safely.","https:\u002F\u002Fgithub.com\u002Fpolymetrics-ai\u002Fcli\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Frecipe-preview-approve-reverse-etl\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M782EFGH5NRZ2CXDK0V9YWFW","recipe-github-prs-to-warehouse","Sync GitHub pull requests into the local warehouse.","https:\u002F\u002Fgithub.com\u002Fpolymetrics-ai\u002Fcli\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Frecipe-github-prs-to-warehouse\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M782ECJZRQAK8E86CE7R2YM2","pm-zoom","Zoom connector knowledge and safe action guide.","https:\u002F\u002Fgithub.com\u002Fpolymetrics-ai\u002Fcli\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Fpm-zoom\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M782EASYDANMV35W2ZHG2QD0","pm-zonka-feedback","Zonka Feedback connector knowledge and safe action guide.","https:\u002F\u002Fgithub.com\u002Fpolymetrics-ai\u002Fcli\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Fpm-zonka-feedback\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M782E8WA94A906385AET1ZWH","pm-zoho-invoice","Zoho Invoice connector knowledge and safe action guide.","https:\u002F\u002Fgithub.com\u002Fpolymetrics-ai\u002Fcli\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Fpm-zoho-invoice\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M782E73M7F23B6VBGM72QMMQ","pm-zoho-inventory","Zoho Inventory connector knowledge and safe action guide.","https:\u002F\u002Fgithub.com\u002Fpolymetrics-ai\u002Fcli\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Fpm-zoho-inventory\u002FSKILL.md",[],[]]