<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MedCE Hub Engineering]]></title><description><![CDATA[MedCE Hub Engineering]]></description><link>https://medcehub.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Dec 2026 23:54:41 GMT</lastBuildDate><atom:link href="https://medcehub.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Check a clinician's CE requirements across states with 40 lines of Python]]></title><description><![CDATA[Use a free, keyless JSON API to read US state continuing education rules for nurses and physicians in 40 lines of standard-library Python.]]></description><link>https://medcehub.hashnode.dev/check-a-clinician-s-ce-requirements-across-states-with-40-lines-of-python</link><guid isPermaLink="true">https://medcehub.hashnode.dev/check-a-clinician-s-ce-requirements-across-states-with-40-lines-of-python</guid><category><![CDATA[Python]]></category><category><![CDATA[api]]></category><category><![CDATA[healthcare]]></category><category><![CDATA[#OpenData]]></category><dc:creator><![CDATA[MedCE Hub]]></dc:creator><pubDate>Tue, 24 Nov 2026 16:50:05 GMT</pubDate><content:encoded><![CDATA[<p>Clinicians who hold licenses in more than one state have to meet each board's continuing education (CE) rules separately: different hours, different cycles, different mandatory topics. If you build anything for healthcare staffing, credentialing or learning management, sooner or later you need those rules in code.</p>
<p>This short tutorial uses a free, keyless JSON API (<a href="https://api.medcehub.com/">api.medcehub.com</a>) to print the renewal rules for one nurse with three state licenses. It needs nothing but the Python standard library.</p>
<h2>The data we will use</h2>
<p>The API serves static JSON files, one per state and profession:</p>
<pre><code class="language-plaintext">https://api.medcehub.com/v1/requirements/{profession}/{state}.json
</code></pre>
<p>Each file has the board's name and a list of <code>rules</code>, one per license type (for nurses, usually RN and LPN). A rule has the hours (<code>credits_required</code>, <code>unit</code>, <code>period_months</code>), how the deadline is set (<code>cycle_basis</code>), mandatory <code>topics</code>, and the <code>source_url</code> and <code>checked_at</code> date of the official page it was taken from. Professions and states are listed at <code>/v1/professions.json</code> and <code>/v1/states.json</code>.</p>
<h2>The script</h2>
<pre><code class="language-python">import json
import urllib.request

API = "https://api.medcehub.com/v1"


def get(path):
    with urllib.request.urlopen(f"{API}/{path}", timeout=30) as r:
        return json.load(r)


def requirements(profession, state):
    data = get(f"requirements/{profession}/{state}.json")["data"]["attributes"]
    return data["board_name"], data["rules"]


def describe(rule):
    if rule.get("no_ce_required"):
        hours = "no general hour count"
    else:
        years = rule["period_months"] / 12
        hours = f'{rule["credits_required"]:g} {rule["unit"]} every {years:g} years'
    topics = [
        f'{t["topic"].replace("_", " ")}'
        + (f' ({t["hours"]:g} h)' if t.get("hours") else "")
        for t in rule.get("topics", [])
    ]
    return hours, topics


# One clinician, three licenses
licenses = [("nurses", "TX"), ("nurses", "VA"), ("nurses", "OR")]

for profession, state in licenses:
    board, rules = requirements(profession, state)
    for rule in rules:
        if rule["license"] != "RN":
            continue
        hours, topics = describe(rule)
        print(f"{state} RN: {hours}")
        print(f"   deadline basis: {rule.get('cycle_basis', 'see board')}")
        if topics:
            print(f"   topics: {', '.join(topics)}")
        print(f"   source: {rule['source_url']} (checked {rule['checked_at']})")
</code></pre>
<h2>The output</h2>
<p>Run today, it prints:</p>
<pre><code class="language-plaintext">TX RN: 20 contact hours every 2 years
   deadline basis: birth_month
   topics: jurisprudence (2 h), human trafficking, geriatrics (2 h), forensic evidence (2 h)
   source: https://www.bon.texas.gov/education_continuing_education.asp.html (checked 2026-10-28)
VA RN: 30 contact hours every 2 years
   deadline basis: birth_month
   source: https://www.dhp.virginia.gov/Boards/Nursing/PractitionerResources/ContinuedCompetency/RNLPN/ (checked 2026-10-28)
OR RN: no general hour count
   deadline basis: see board
   topics: pain management (1 h), cultural competency (2 h)
   source: https://www.oregon.gov/osbn/pages/competency-requirements.aspx (checked 2026-10-28)
</code></pre>
<p>Three licenses, three quite different answers. Texas wants 20 contact hours plus topics that depend on where the nurse works. Virginia wants 30, but lists that as one of several ways to show competency. Oregon has no general hour count right now, yet still requires two specific courses (general CE hours arrive there in 2028).</p>
<h2>Things to handle in real code</h2>
<p><strong>Topics have their own audience.</strong> In Texas, the human trafficking course is for nurses in direct patient care, geriatrics for those who work with older adults, and forensic evidence for emergency department nurses. Each topic object carries a <code>who</code> field with that scope; show it to the user instead of assuming every topic applies.</p>
<p><strong>Keep the unit.</strong> Physicians count AMA PRA Category 1 credits, nurses count contact hours, some boards count CEUs. The API keeps each board's own unit. Converting between them is where mistakes start, so display the unit rather than normalizing it.</p>
<p><strong>Check the date.</strong> <code>checked_at</code> tells you when the rule was last compared with the board's page. If your product makes decisions with it, surface that date and link <code>source_url</code>, so a user can confirm with the board.</p>
<p><strong>Alternatives and exemptions.</strong> Rules also have <code>alternatives</code> (for example, national certification instead of hours) and <code>new_licensee_rule</code>. A nurse in the first cycle after licensure is often exempt.</p>
<h2>Where to go from here</h2>
<ul>
<li>Swap the <code>licenses</code> list for the licenses on a staff roster and print one table per person.</li>
<li>Combine with <code>/v1/conferences.json</code> to suggest upcoming accredited meetings that cover a missing topic.</li>
<li>If you work with an AI assistant, there is also an MIT-licensed <a href="https://github.com/MedCE-hub/cme-conferences-api">MCP server</a> over the same data.</li>
</ul>
<p>The full specification is at <a href="https://api.medcehub.com/">api.medcehub.com</a>. The data comes from <a href="https://medcehub.com/">MedCE Hub</a>, is licensed CC BY 4.0, and every rule links back to its board. As always with regulations: this is information, not legal advice, and the board's own page is the final word.</p>
]]></content:encoded></item></channel></rss>