Repository navigation
Releases
v0.9.10
Results in full, panels, the raw files of records, and more that is kept private.
Results
- A result keeps its exact value and comparator, its parts (a reading of several parts, such as a blood pressure, is one result with each part) and the categories its source gives.
medrec reindexgives them to what was filed before. - A panel and a report name the results they list (
members), by what the source's own resource refers to. A panel with no value is a heading: it is no test and no latest result.
Private items. More is held back, and nothing opens.
- A result is judged by each of its parts, an answer is private with the questionnaire that lists it, and a panel or a report is private, or about another person, with all it lists, now or before.
- A claim, a visit, a prescription, a procedure, a result or a report is private where a paper of the person names the clinician it prints beside a practice or a credential that says what they treat (
from: clinician). So is each claim of the day of a paper from such a practice (learned: day), and each item of a clinician linked to one, by two such days or by one on which theirs is the only clinician's claim (learned: linked). It is a likely match: it holds the item back and decides nothing else.medrec private unmark <id> --clinicianopens every item of that clinician's, andreset <id> --cliniciantakes that back.medrec private listsays how each was learned and lists the clinicians the household opened. - A visit is judged by its name and reason, a condition with no ICD-10 code by its name, a report by its conclusion and its name, and a result by its name and a value that is a text. More ICD-10 codes count (Z29.81, Z97.5, Z79.3, O99.31, O99.32 and O99.34 among them, with their subcodes), and so do the brands of medicines.
- The text lines of every open paper that name an area are left out of shared answers and search, not of bills alone.
medrec reindex --dry-runcounts what each of these would change, per person, and of the items private by their clinician, those held by a day alone and those through a link. The household's own word opens an item (medrec private unmark).
Raw files
medrec records raw <ID>prints the raw files of a record. With--fieldsor--changesit prints the names and counts of their elements, or of what changed between versions, and no value.medrec records fieldscounts them over many records.
Viewers
MEDREC_VIEWERsets the viewer for one run, overconfig viewer.doctorand a launch error say where the viewer is from.documents openopens a paper in the system's viewer, or withMEDREC_VIEWER=nonenowhere.config vieweris for imaging studies alone now: anonethere no longer stops a paper opening, and no paper is given a DICOM viewer.
Imports and reindex
medrec importcounts the records a source gave before that its export does not have (records_not_served,not_served), and names what changed in each record it updated (updated), with no value. An import of downloaded files counts nothing, and its run saysfrom_files.medrec reindexlinks an index again by this version's rules even when nothing else changed (links_updated).views.jsonhasbuild, the commit medrec was built from: views another build wrote are made again.
Changed for readers. The answers of the MCP tools change: detail is panel for a heading, a result's fields gain value's comparator, components, categories and members, headings are left out of kind: "tests" and of latest results, and answers that name no person leave out more. An event asked for by its id in such a call leaves out of in_error and not_applied what that answer holds back; either is absent when nothing is left of it. The text of the tools' definitions does not change. Views change: heading: true on a record, no heading in tests.json, the new fields in records-result-<n>.json and records-report-<n>.json, in private.json the new rules, from: clinician with learned, heading: true on a private heading, and parts of every open paper, and in marks.json the household's clinicians. docs/data-contract.md has each.
After the upgrade run medrec reindex, and run 0.9.10 on every machine that writes the folder: an earlier medrec drops what is new from an index it saves.
What's Changed
- A result keeps its parts, exact values and categories (0.9.10) by @piekstra in #75
- Read the raw files of records, and count their elements with no value (0.9.10) by @piekstra in #76
- A panel and a report name the results they list (0.9.10) by @piekstra in #77
- An event asked for by its id names nothing in error that is held back (0.9.10) by @piekstra in #79
- An import counts what is not served any more and names what changed (0.9.10) by @piekstra in #78
- Headings are named in private.json, and the last findings of the import and by-id changes (0.9.10) by @piekstra in #80
- More words, codes and brands say what is private (0.9.10) by @piekstra in #81
- No test opens a viewer by @piekstra in #84
- An item is private where a paper of the person ties its clinician to an area (0.9.10) by @piekstra in #82
- The private lines of every open paper are left out (0.9.10) by @piekstra in #83
Full Changelog: v0.9.9...v0.9.10
v0.9.9
What is current is by every source's word, what is entered in error is out of every list and total, what a source made private stays private, and more is private: questionnaires, tobacco, services, and the private part of an open claim, bill or event.
Before upgrading: upgrade every machine that writes the folder. A machine still on 0.9.8 that saves an index drops what 0.9.9 keeps in it. Then run medrec reindex --dry-run, which writes nothing and counts for each person what the records and the views would say otherwise (how many items would be private, entered in error, current, and which money would move), and medrec reindex once on one machine, which makes the views again too. Until then a record with a source not read again is current, marked "not every source heard".
medrec mcp: conditions, allergies and medicines carrystandingandsays, what they are by all their sources and each source's word with the day it was read, in place of one source'sstatus.activeis one row for each condition or allergy and one for each prescription, then the medicines on hold, then those ended by their date. Any other item its sources differ on hasstanding: "sources differ"andsays. Warningsentered-in-errorandno-problem-list. The summary gains sectionsmedications_on_holdandmedications_ended_by_dateand a section'snote. Opening a paper entered in error says so first, with what the household decided of it. Tool titles and descriptions are shorter. A hosted connector needs the next port.medrec mcp, what is private: where no person is named, an answer leaves out the private members of an open event (private_memberscounts them), and the private part of an open claim, bill, receipt, explanation of benefits or event, withnot_shown("1 service not shown"); amounts stay.medrec_documentgives a paper's text without its private lines unless the new argumentpersonnames its owner. An event is named and placed by its open items there.- Questionnaires about depression, anxiety, suicide risk, alcohol, drugs or tobacco are private by their code and by our own names, their scores and answers alike, and so are smoking status and tobacco use whatever the answer. A pharmacy claim is judged by the medicine it names, a procedure and a claim by their services, a paper by the name its file came with too.
- About another person: a questionnaire a grown person answers in the chart of a child under 11 on that day, what a source says is about somebody else, and a paper only such results link, are in no list, search, event, total, answer or page. A list of that person's says "N items about another person, not shown" (warning
about-another).medrec records show <ID>andmedrec documents open <ID>open one at the Mac, andmedrec records about-anotherlists the ids. Such a result has a key of its own (about|…);medrec reindexparts one that was filed as, or with, the person's own (results_split). - Entered in error: an item every one of its sources says so of is out of every list, the timeline, the search, events, bills and totals, and is counted where it would be. It comes back by itself. One that some of its sources say so of stays, marked as differing. A household decision about one is kept and not applied, and says so (
not_applied,applied: false). A payment marked on a bill entered in error is in the count's line. - What a source gave: an item stays private while any source, then or now, gave a value the rules call private. Only
medrec private unmarkopens it.private.jsonentries andmedrec private listsaygiven: truewhere nothing shown makes it private. A record's and a document'sgiveninindex.jsonis read by the rules alone and shown nowhere. - Requests from the app:
private: trueapplies andnullundoes the household's own mark;falserecords no mark. A request of any kind that would open something the rules hold private, or show the private part of something open, is refused withreason: "kept_private", and no item is named. The commands at the Mac do what they did. - Views:
standing.json(medrec-standing/v1) for every person;summary.jsongainsstanding, what its lists are made of, and keeps its older lists as they were;events.jsongainsin_errorandevents_in_error;bills.jsongainsin_error; a row of the year files and ofdocuments.jsongainssays;private.jsongainspartsandclear_events;search-parts.jsonis new;documents.jsongainslinked_ids;views.jsongainspeople.<id>.in_errorandabout_another;tests.jsonand the summary's results and visits leave out what is entered in error. - The index: a record keeps each source's own words (
words,fields_from) and a paper each source that served it (also_from,words);errorsis since when, and until when, a source said it was entered in error.medrec reindexreads all of it from the raw files (statuses_updated,given_updated,papers_updated,papers_unread). A record of two sources that one leaves keeps what that one showed.Records/<source>/importing.jsonmarks an import that has not finished. medrec private listlists the open items with a private part (partswith--json).- Search: no id is in the text a search reads, so a snippet of a claim no longer holds the ids of its results. The
search-*views are made again. medrec reindexmakes every person's views again even when no record changes. With--dry-runit counts for each person what would be private, opened, entered in error, current, owed or about somebody else, as counts only, against the views the folder has.medrec conditions,allergiesandmedshavestandingandsays, and--activefollows every source. Lists, the timeline and the search havenotes.provider_messagein_status/is the provider's own words, empty when it gave none.
What's Changed
- Keep what each source says of a condition, an allergy or a medicine (0.9.9) by @piekstra in #62
- standing.json: what is current by every source's word (0.9.9) by @piekstra in #63
- provider_message is the provider's own words (0.9.9) by @piekstra in #64
- The tools and commands list what is current by every source's word (0.9.9) by @piekstra in #65
- Keep what each source says is entered in error (0.9.9) by @piekstra in #66
- What is entered in error is out of events, bills, papers and totals (0.9.9) by @piekstra in #67
- A page of bills counts bills, and a fill its sources differ on says so (0.9.9) by @piekstra in #69
- What a source gave stays private, whatever a source says later (0.9.9) by @piekstra in #68
- A request opens nothing the rules hold private (0.9.9) by @piekstra in #70
- Questionnaires are private, and what is about another person is shown nowhere (0.9.9) by @piekstra in #71
- The private part of an open item is left out where private items are (0.9.9) by @piekstra in #72
- No id is in the text a search reads (0.9.9) by @piekstra in #74
- A dry run of the reindex counts what the views would say otherwise (0.9.9) by @piekstra in #73
Full Changelog: v0.9.8...v0.9.9
v0.9.8
medrec 0.9.8
A spelled-out first name (#61). A printed name that several providers of the kept directory can be had no label. Where the text spells out the first name of exactly one of them, and nothing else the record says is against that one (state, city, service, a middle name or initial, a degree), that one is now the label. It is likely, with the reason first_name and the text it came from. An initial, a nickname, a shorter form or another spelling narrows nothing. Like every likely label it makes nothing private and gives no amount and no merge. medrec labels set and medrec labels wrong say otherwise, and undo takes that back.
After upgrading. Run medrec reindex, so that records already filed gain their providers' city, then medrec views write --all on a machine with the directory. Run 0.9.8 on every machine that writes the folder: an earlier one drops what this one adds, and no label comes of a first name until reindex runs again. Where the directory was never fetched, run medrec tables fetch nppes first.
For readers. No schema or format number changes. MCP output changes: an item's provider_labels can have a first_name reason with state, city and printed, and shows a text its own. View output changes: providers.json evidence gains first_name. A record's providers entries gain city; provider-state.json gains first_names. Tool text and server instructions do not change. tests/fixtures/labels gains one case.
What's Changed
Full Changelog: v0.9.7...v0.9.8
v0.9.7
medrec 0.9.7
Who a printed provider is (#54, #57). Each person's views gain providers.json: a name, practice, role and phone for a provider an item prints, with how sure it is and why. A label is sure when the record carries the provider's NPI, and likely when one provider in the kept directory, or one practice's own paper of the same visit, fits. A label changes nothing from a source. medrec mcp puts it beside the source's words as provider_labels.
What the household says (#56). medrec labels set|same|different|wrong|undo|list at a terminal, or the app's provider requests: a name, practice, role or phone, that two printed names are one provider or are not, or that a label is wrong. It wins over every match, edits no record and can be undone.
Undo of "Mark paid" from the app (#59). A request with unpaid takes back a payment the household marked. A payment taken back stays so when the request that made it is served again (payments_undone in marks.json). A decision that fails says which step failed, in medrec's own words, and repeats nothing from the folder.
No Keychain dialog from a scheduled pass (#60). A scheduled refresh reads medrec's own key with macOS's dialogs off. A key a person has to allow ends the pass with exit 3, naming medrec auth key to run at the screen, and the next pass looks again. medrec auth key reads the key once and says whether macOS asked (--no-dialog asks nobody). medrec --version and medrec info name the commit a binary was built from; a script that wants the version alone uses medrec -V.
Private items (#54, #56). A sure label, or the household's own, in a private area makes its item private; a likely one does not, and is withheld from open items. The household's mark on an item still wins.
After upgrading. Run medrec tables fetch nppes again: the kept directory is now medrec-nppes/v2, and one kept by 0.9.6 is not used. Then run medrec views write --all.
For readers. No schema or format number changes; every new field is optional. MCP tool text, server instructions and output change: provider_labels on claims, events, documents, bills and medrec_document, and on every record with response_format: detailed; the warnings provider-labels-left-out and private-labels-unreadable; output schemas no longer state a minimum for counts and offsets. View output changes: providers.json, labels_unreadable in private.json, provider_state in views.json. provider-state.json is the household's own file: a reader compares its MD5 and reads nothing from it. The contract's "Which source a record or document came from" is reworded as rules, with no change in what medrec does (#60). The samples readers copy are replaced (#58, #60).
What's Changed
- Provider labels: views//providers.json, and the private rule for them by @piekstra in #54
- What the household says of a provider: medrec labels and provider requests by @piekstra in #56
- Replaces the events samples by @piekstra in #58
- provider_labels in medrec mcp: who a printed provider is, beside the source's words by @piekstra in #57
- Undo of Mark paid from the app: the unpaid request by @piekstra in #59
- Scheduled passes raise no Keychain dialog; auth key; the build's commit (cli-common v0.39.1) by @piekstra in #60
Full Changelog: v0.9.6...v0.9.7
v0.9.6
medrec 0.9.6
Source names (#55). A visit, record or document takes its source's name only from its own person's sources, told apart by the patient it was imported as. Where one connection serves several practices under one key, 0.9.3 to 0.9.5 could show another practice's name, join one practice's result to another practice's visit on the same day, and label a record with the first practice. Several differently named sources now give no place, and the label is the CLI. Run medrec views write --all after upgrading, or let the next write do it: views from an older medrec are rebuilt.
Bills and private items (#55).
- A bill or receipt is private by the words on its first page, and any document by its title; so are its copies, the statements before and after it, and the receipt that pays it.
bills.jsongainsself_pay(storage,stated) on a bill with no claim that no insurer is billed for. It is not asked for a claim.- A settled bill is never in
worth_a_call.
Providers (#52, #53). Import and reindex keep each provider's NPI and state as the source gives them (providers on a record). medrec tables fetch nppes keeps CMS's rows for one folder's providers on this Mac, on request only; it states the download's size first. No answer uses either yet.
For readers. No schema or format number changes; every new field is optional. MCP and view output changes: source names and labels where practices share a connection, provenance[0].source.label in records-<kind>-<n>.json, the new private reasons words and paper, self_pay, and no settled bill in worth_a_call. The rule to port is in docs/data-contract.md, "Which source a record or document came from".
What's Changed
- Data contract: a table of each kind's fields by @piekstra in #51
- Records keep the NPI and state their source gives each provider by @piekstra in #52
- tables fetch nppes: read CMS's provider file for one folder by @piekstra in #53
- Only a person's own sources name their records; private bills by their own words by @piekstra in #55
Full Changelog: v0.9.5...v0.9.6
v0.9.5
Private items: linked documents and imaging studies
Two kinds of item could show in an answer about the whole household when they should not.
- A document that a private record links (
records[].documents) is now private, whatever else links it. Before, it was private only through an event, its organization or a mark. The household's own mark on the document still wins. - An imaging study is private when its report is. A study with no report, or one the person does not have, is left out of household-wide answers, counted with what was left out, and shown without a mark in an answer about its person.
private.jsongainsstudiesandunreported_studies. The schema staysmedrec-private/v1, andstudiesis in every file this version writes, an empty map included.medrec mcp: household-wide search and lists leave these items out, andprivate-left-outcounts them.medrec private listshows private studies.
The views are made again on the first pass after upgrading, and medrec views write does it at once.
Also
The fixtures' stories are new and invented. Nothing else changes.
After upgrading, run medrec views write on each profile.
What's Changed
- Linked documents and imaging studies follow the private rules (0.9.5) by @piekstra in #49
- New invented stories in the fixtures by @piekstra in #50
Full Changelog: v0.9.4...v0.9.5
v0.9.4
Plain names for conditions
medrec tables fetch downloads the official ICD-10-CM titles (Centers for Medicare & Medicaid Services, FY2027) and keeps them on this machine. A condition can then show its official name first, with the source's words beside it. The records keep the source's words.
- medrec includes no table. It keeps the publisher's whole file only if its size, SHA-256 and row count are those recorded, and no code is looked up over the network.
views/<person>/code-names.json(medrec-code-names/v1) has the names of the codes a person's conditions and claim diagnoses use. Codes only private items use are in a map of their own, which an answer about the whole household never reads.- A machine without the table keeps the names another machine wrote for codes still in use, and adds none. The next pass on a machine with it fills in the rest.
medrec mcp:plain_nameonconditionsrows and on the summary's condition lines.titleandnamestay the source's, and search, filters and private items go by those.summary.json's condition lines carryname_key.views.jsoncarriescode_tableper person. The views' schema staysmedrec-views/v2.medrec cache clearkeepstables/.
Also
- Slim records in views carry
organization_idaftercli: a string, or an explicitnull. - MCP tool text:
medrec_summary's title is "Household or person summary" and its description is shorter.medrec_summaryandmedrec_recordshave the new field in their output schemas. The instructions and the other tools are unchanged.
After upgrading, run medrec tables fetch, then medrec views write on each profile.
medrec is not affiliated with or endorsed by the publisher.
What's Changed
- Views keep each record's organization id (0.9.4) by @piekstra in #45
- Tests, fixtures and docs say billing things in our own words by @piekstra in #46
- Event fixtures: two practices renamed, and make.py writes the due date by @piekstra in #47
- Plain names for conditions, from published code tables kept on this machine by @piekstra in #48
Full Changelog: v0.9.3...v0.9.4
v0.9.3
Plain names for visits
src/plain.rs holds names bundled with medrec and never fetched.
| CPT codes | Name |
|---|---|
| 99202–99205 | New-patient visit |
| 99211–99215 | Follow-up visit |
| 99381, 99391 | Well-baby checkup |
| 99382–99384, 99392–99394 | Well-child checkup |
| 99385–99387, 99395–99397 | Preventive checkup |
| 99460–99463 | Newborn care |
| 99281–99285 | Emergency room visit |
An event's what:
- The portal's reason, unless it only names the kind of visit in billing words ("Follow up", "Office visit").
- Then, for an office, portal or ER visit, its visit code's plain name: the portal encounter's
typecode first, then the claims' counted lines. A stay, a series or tests keep their own names. - Else that reason, or a CPT-coded portal visit's descriptor, else the claims' services.
- A name written in capitals is put in title case with its acronyms kept, cut to 120 characters. It is never shown in capitals.
A line that only bills for giving a vaccine (CPT 90460–90461, 90471–90474, HCPCS G0008–G0010) names nothing. A doctor's claim for vaccines and giving them, and nothing else, is now a vaccine event; it was a service "Appointment".
Places that name the practice
- A records connection's name is never a place: a name ending "(all practices)", or a portal platform's own name (athenahealth, MyChart, Epic, …). This holds for the encounter's service provider and location, the claims' providers, a linked stay's hospital and the N5 aliases. No alias is learned to such a name.
- A portal encounter whose service provider and location give no name takes its source's
organization_namefrom household.json, keyed by CLI, organization id and FHIR base. - Import takes the stream header's
organization.nameon every pull, not only the first, but never gives back a learned practice's name for a connection's. It adds a household organization per name, not per FHIR base, since athenahealth serves every practice from one base. athena-cli 0.6.2 now names the practice in its header. - A record's source label (
medrec records, the record views) is its own sign-in's organization name: the household source with its CLI, organization id and FHIR base. The organization at its FHIR base is only a fallback, so two practices on one base are told apart.
Private test series
A household-wide kind: "tests" answer held a series back only when its latest result was private. A series is now private when any of its results is: it is left out whole and counted once. Where it is included, it is marked with the first private result's area.
Upgrading
Run medrec views write --all (or medrec reindex) once after upgrading, so each person's events.json carries the new names and places. Practice names reach athena sign-ins when they are imported again with athena-cli 0.6.2 or later.
What's Changed
Full Changelog: v0.9.2...v0.9.3
v0.9.2
Claim lines a provider marks as not counted
uhc-cli 0.3.6 marks each claim line its totals leave out, with an adjudication whose category is not-counted in its own …/fhir/adjudication code system. medrec 0.9.2 reads that mark from any own-your-health provider CLI:
- A marked line is
counted: false. - When any line of a claim carries the mark, the marks decide which lines are left out, and medrec's totals rule is skipped for that claim.
- Claims without the mark keep the totals rule.
The marks reach records when they are imported again with uhc-cli 0.3.6 installed.
Private items counted per page
medrec mcp now counts the private-left-out warning per page. A page counts the private items left out after the previous page's last item, up to its own last item. The last page counts to the end, so the pages add up to the whole answer's count. A reader that reads only what one page needs can give the same count.
Readers without current views
The data contract's Readers section says what a reader does without a current private.json or bills.json for a person:
- Household-wide answers hold back all of that person's items, with a
private-not-preparedwarning. - An answer about that person includes their items unmarked, with the same warning.
- Bills are shown as 0.9.0 showed them, with a
bills-not-preparedwarning.
medrec mcp never gives these warnings.
What's Changed
Full Changelog: v0.9.1...v0.9.2
v0.9.1
medrec 0.9.1
License. From this release medrec is AGPL-3.0-only. v0.9.0 and earlier stay MIT OR Apache-2.0.
After upgrading, run medrec reindex once. It reads the bills and receipts filed before 0.9.1, so their amounts, dates and numbers to call are known. The first write by 0.9.1 also makes every person's views again, with the new bills.json and private.json. Views written by 0.9.0 have neither.
Bills and payments
medrec bills list|paid|payments|undo. Each bill is matched to the claim it bills and to the receipts that pay it, and shows what is left.bills listalso lists the bills and desk payments worth a call, and the shares no bill has asked for yet.- A bill paid with no receipt filed can be marked paid. Payments are kept in the person's
marks.json. views/<person id>/bills.json(medrec-bills/v1).medrec_recordskindbillssays "past due", "paid" or what is left.
Private items
- Records, documents and events about mental health, reproductive and fertility care, sexual health or substance use, and the medicines tied to them, are listed in
views/<person id>/private.json(medrec-private/v1). Each item has its area and the rule that put it there. medrec private list|mark|unmark|reset, and the app's private requests, let the household overrule the rules. The marks are kept inmarks.json.medrec mcpleaves private items out of answers about the whole household and says how many in aprivate-left-outwarning. It includes them, markedprivate, in answers about one person or that name the item.- This is discretion, not access control: anyone who can read the folder can read every item.
Events
- A portal hospital stay spans its days.
- A portal-only stay or ER visit is
inpatientorer. - One day's vaccine doses from one source are one visit.
- Fills and doses without a claim are named by their records.
- Dates follow the zone of the machine that writes the views.
For the hosted connector
- Until the connector release that reads
private.jsonandbills.jsonis deployed, household-wide connector answers still include private items, and bills the household marked paid still show as due. summary.jsonlines now carry their record'sid.- The tool descriptions were shortened to make room for the
privatefields.
What's Changed
- Bills and payments: what each bill asks, what is paid and left (0.9.1) by @piekstra in #38
- Events: a portal stay spans its days, a day's doses are one visit, fills say which drug by @piekstra in #39
- Private items: kept off shared screens and household-wide answers (0.9.1) by @piekstra in #40
- Private items: hold back by id, and test event marks that follow their members by @piekstra in #41
- Relicense under AGPL-3.0-only by @piekstra in #42
Full Changelog: v0.9.0...v0.9.1