Skip to content

refactor(jubilee): rename DocType "Jubilee Service Request" to "Jubilee Approval Request"#1196

Merged
av-dev2 merged 1 commit intoAakvatech-Limited:nurse-ot-modulefrom
av-dev2:feat_nurse_ot_module
Apr 28, 2026
Merged

refactor(jubilee): rename DocType "Jubilee Service Request" to "Jubilee Approval Request"#1196
av-dev2 merged 1 commit intoAakvatech-Limited:nurse-ot-modulefrom
av-dev2:feat_nurse_ot_module

Conversation

@av-dev2
Copy link
Copy Markdown
Collaborator

@av-dev2 av-dev2 commented Apr 28, 2026

Summary

Renamed the Jubilee pre-authorization DocType and its two child tables across the entire hms_tz Jubilee module. "Service Request" was ambiguous; "Approval Request" accurately describes the workflow — a pre-authorization request submitted to Jubilee Insurance for clinical approval before rendering services to a patient.

DocType Renames

jubilee_service_request → jubilee_approval_request
jubilee_service_request_disease → jubilee_approval_request_disease
jubilee_service_request_item → jubilee_approval_request_item

The child tables were renamed first to avoid broken field options on the parent. All three renamed DocTypes retain full schema compatibility.

Files Changed

Directories / File renames (tracked by git as R)

  • jubilee/doctype/jubilee_service_request/ → jubilee_approval_request/

    • jubilee_service_request.json → jubilee_approval_request.json
    • jubilee_service_request.py → jubilee_approval_request.py
    • jubilee_service_request.js → jubilee_approval_request.js
    • test_jubilee_service_request.py → test_jubilee_approval_request.py
    • init.py → init.py (unchanged)
  • jubilee/doctype/jubilee_service_request_disease/ → jubilee_approval_request_disease/

    • jubilee_service_request_disease.json → jubilee_approval_request_disease.json
    • jubilee_service_request_disease.py → jubilee_approval_request_disease.py
  • jubilee/doctype/jubilee_service_request_item/ → jubilee_approval_request_item/

    • jubilee_service_request_item.json → jubilee_approval_request_item.json
    • jubilee_service_request_item.py → jubilee_approval_request_item.py

jubilee_approval_request.json

  • Updated "name" field from "Jubilee Service Request" to "Jubilee Approval Request"
  • Updated Table field "options" for the diseases child table: "Jubilee Service Request Disease" → "Jubilee Approval Request Disease"
  • Updated Table field "options" for the items child table: "Jubilee Service Request Item" → "Jubilee Approval Request Item"
  • Updated Link field "options" on amended_from: "Jubilee Service Request" → "Jubilee Approval Request"
  • Updated naming series prefix: "JSR-.YYYY.-.####" → "JAR-.YYYY.-.####"

jubilee_approval_request_disease.json

  • Updated "name": "Jubilee Service Request Disease" → "Jubilee Approval Request Disease"

jubilee_approval_request_item.json

  • Updated "name": "Jubilee Service Request Item" → "Jubilee Approval Request Item"

jubilee_approval_request.py

  • Renamed Python class: JubileeServiceRequest → JubileeApprovalRequest (required so Frappe's get_controller() resolves the class correctly without marking the DocType as orphaned during bench migrate)
  • Updated frappe.db.get_value() doctype arg to "Jubilee Approval Request"
  • Updated frappe.get_doc() doctype arg to "Jubilee Approval Request"
  • Updated frappe.new_doc() doctype arg to "Jubilee Approval Request"
  • Updated add_comment text reference from "Service Request" to "Approval Request"
  • Updated docstring for create_preauthorization_doc()

jubilee_approval_request_disease.py

  • Renamed Python class: JubileeServiceRequestDisease → JubileeApprovalRequestDisease

jubilee_approval_request_item.py

  • Renamed Python class: JubileeServiceRequestItem → JubileeApprovalRequestItem

jubilee_approval_request.js

  • Updated frappe.ui.form.on() registration from "Jubilee Service Request" → "Jubilee Approval Request"

jubilee/api/api.py

  • Replaced all 11 occurrences of "Jubilee Service Request" with "Jubilee Approval Request" (frappe.get_doc calls, ref_doctype values, frappe.db.set_value calls, and docstring references)
  • Affected functions: get_preauthorization_status(), get_inpatient_admission_status()

nhif/api/patient_encounter.js

  • Updated frappe.call() method path from: hms_tz.jubilee.doctype.jubilee_service_request.jubilee_service_request.create_preauthorization_doc to: hms_tz.jubilee.doctype.jubilee_approval_request.jubilee_approval_request.create_preauthorization_doc

Notes

  • No database patch required; this is a development-phase change and no production data exists under the old DocType name.
  • Running bench migrate after this commit is required to register the renamed DocTypes in the database.

…ee Approval Request"

## Summary

Renamed the Jubilee pre-authorization DocType and its two child tables
across the entire hms_tz Jubilee module. "Service Request" was
ambiguous; "Approval Request" accurately describes the workflow — a
pre-authorization request submitted to Jubilee Insurance for clinical
approval before rendering services to a patient.

## DocType Renames

  jubilee_service_request          → jubilee_approval_request
  jubilee_service_request_disease  → jubilee_approval_request_disease
  jubilee_service_request_item     → jubilee_approval_request_item

The child tables were renamed first to avoid broken field options on
the parent. All three renamed DocTypes retain full schema compatibility.

## Files Changed

### Directories / File renames (tracked by git as R)
- jubilee/doctype/jubilee_service_request/  → jubilee_approval_request/
  - jubilee_service_request.json            → jubilee_approval_request.json
  - jubilee_service_request.py              → jubilee_approval_request.py
  - jubilee_service_request.js              → jubilee_approval_request.js
  - test_jubilee_service_request.py         → test_jubilee_approval_request.py
  - __init__.py                             → __init__.py (unchanged)

- jubilee/doctype/jubilee_service_request_disease/ → jubilee_approval_request_disease/
  - jubilee_service_request_disease.json    → jubilee_approval_request_disease.json
  - jubilee_service_request_disease.py      → jubilee_approval_request_disease.py

- jubilee/doctype/jubilee_service_request_item/ → jubilee_approval_request_item/
  - jubilee_service_request_item.json       → jubilee_approval_request_item.json
  - jubilee_service_request_item.py         → jubilee_approval_request_item.py

### jubilee_approval_request.json
- Updated "name" field from "Jubilee Service Request" to "Jubilee Approval Request"
- Updated Table field "options" for the diseases child table:
    "Jubilee Service Request Disease" → "Jubilee Approval Request Disease"
- Updated Table field "options" for the items child table:
    "Jubilee Service Request Item" → "Jubilee Approval Request Item"
- Updated Link field "options" on amended_from:
    "Jubilee Service Request" → "Jubilee Approval Request"
- Updated naming series prefix:
    "JSR-.YYYY.-.####" → "JAR-.YYYY.-.####"

### jubilee_approval_request_disease.json
- Updated "name": "Jubilee Service Request Disease" → "Jubilee Approval Request Disease"

### jubilee_approval_request_item.json
- Updated "name": "Jubilee Service Request Item" → "Jubilee Approval Request Item"

### jubilee_approval_request.py
- Renamed Python class: JubileeServiceRequest → JubileeApprovalRequest
  (required so Frappe's get_controller() resolves the class correctly
  without marking the DocType as orphaned during bench migrate)
- Updated frappe.db.get_value() doctype arg to "Jubilee Approval Request"
- Updated frappe.get_doc() doctype arg to "Jubilee Approval Request"
- Updated frappe.new_doc() doctype arg to "Jubilee Approval Request"
- Updated add_comment text reference from "Service Request" to "Approval Request"
- Updated docstring for create_preauthorization_doc()

### jubilee_approval_request_disease.py
- Renamed Python class: JubileeServiceRequestDisease → JubileeApprovalRequestDisease

### jubilee_approval_request_item.py
- Renamed Python class: JubileeServiceRequestItem → JubileeApprovalRequestItem

### jubilee_approval_request.js
- Updated frappe.ui.form.on() registration from
    "Jubilee Service Request" → "Jubilee Approval Request"

### jubilee/api/api.py
- Replaced all 11 occurrences of "Jubilee Service Request" with
  "Jubilee Approval Request" (frappe.get_doc calls, ref_doctype values,
  frappe.db.set_value calls, and docstring references)
- Affected functions: get_preauthorization_status(),
  get_inpatient_admission_status()

### nhif/api/patient_encounter.js
- Updated frappe.call() method path from:
    hms_tz.jubilee.doctype.jubilee_service_request.jubilee_service_request.create_preauthorization_doc
  to:
    hms_tz.jubilee.doctype.jubilee_approval_request.jubilee_approval_request.create_preauthorization_doc

## Notes
- No database patch required; this is a development-phase change and
  no production data exists under the old DocType name.
- Running bench migrate after this commit is required to register
  the renamed DocTypes in the database.
@av-dev2 av-dev2 merged commit dc19c05 into Aakvatech-Limited:nurse-ot-module Apr 28, 2026
1 check failed
@codacy-production
Copy link
Copy Markdown

Not up to standards ⛔

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant