diff --git a/.gitignore b/.gitignore index be05392..4c57c78 100644 --- a/.gitignore +++ b/.gitignore @@ -126,7 +126,5 @@ _modules/* /phpunit*.xml /public/.htaccess -#------------------------- -# Claude -#------------------------- -.claude \ No newline at end of file +.serena/ +.claude/ \ No newline at end of file diff --git a/app/Config/Routes.php b/app/Config/Routes.php index c95b6b5..05bd8f2 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -54,7 +54,10 @@ $routes->group('v2', ['filter' => 'auth'], function ($routes) { // Master Data - Tests & ValueSets $routes->get('master/tests', 'PagesController::masterTests'); - $routes->get('master/valuesets', 'PagesController::masterValueSets'); + + $routes->get('valueset', 'PagesController::valueSetLibrary'); + $routes->get('result/valueset', 'PagesController::resultValueSet'); + $routes->get('result/valuesetdef', 'PagesController::resultValueSetDef'); }); // Faker @@ -161,12 +164,22 @@ $routes->group('api', function ($routes) { $routes->delete('items/(:num)', 'ValueSetController::deleteItem/$1'); }); - $routes->group('valuesetdef', function ($routes) { - $routes->get('/', 'ValueSetDefController::index'); - $routes->get('(:num)', 'ValueSetDefController::show/$1'); - $routes->post('/', 'ValueSetDefController::create'); - $routes->put('(:num)', 'ValueSetDefController::update/$1'); - $routes->delete('(:num)', 'ValueSetDefController::delete/$1'); + $routes->group('result', function ($routes) { + $routes->group('valueset', function ($routes) { + $routes->get('/', 'Result\ResultValueSetController::index'); + $routes->get('(:num)', 'Result\ResultValueSetController::show/$1'); + $routes->post('/', 'Result\ResultValueSetController::create'); + $routes->put('(:num)', 'Result\ResultValueSetController::update/$1'); + $routes->delete('(:num)', 'Result\ResultValueSetController::delete/$1'); + }); + + $routes->group('valuesetdef', function ($routes) { + $routes->get('/', 'ValueSetDefController::index'); + $routes->get('(:num)', 'ValueSetDefController::show/$1'); + $routes->post('/', 'ValueSetDefController::create'); + $routes->put('(:num)', 'ValueSetDefController::update/$1'); + $routes->delete('(:num)', 'ValueSetDefController::delete/$1'); + }); }); // Counter diff --git a/app/Controllers/AreaGeoController.php b/app/Controllers/AreaGeoController.php index 2775469..c2f1797 100644 --- a/app/Controllers/AreaGeoController.php +++ b/app/Controllers/AreaGeoController.php @@ -32,16 +32,21 @@ class AreaGeoController extends BaseController { public function getProvinces() { $rows = $this->model->getProvinces(); - if (empty($rows)) { return $this->respond([ 'status' => 'success', 'message' => "data not found", 'data' => '' ], 200); } - return $this->respond([ 'status' => 'success', 'message'=> "Data fetched successfully", 'data' => $rows ], 200); + $transformed = array_map(function($row) { + return ['value' => $row['AreaGeoID'], 'label' => $row['AreaName']]; + }, $rows); + if (empty($transformed)) { return $this->respond([ 'status' => 'success', 'data' => [] ], 200); } + return $this->respond([ 'status' => 'success', 'data' => $transformed ], 200); } public function getCities() { $filter = [ 'Parent' => $this->request->getVar('Parent') ?? null ]; $rows = $this->model->getCities($filter); - - if (empty($rows)) { return $this->respond([ 'status' => 'success', 'message' => "data not found", 'data' => [] ], 200); } - return $this->respond([ 'status' => 'success', 'message'=> "Data fetched successfully", 'data' => $rows ], 200); + $transformed = array_map(function($row) { + return ['value' => $row['AreaGeoID'], 'label' => $row['AreaName']]; + }, $rows); + if (empty($transformed)) { return $this->respond([ 'status' => 'success', 'data' => [] ], 200); } + return $this->respond([ 'status' => 'success', 'data' => $transformed ], 200); } } diff --git a/app/Controllers/PagesController.php b/app/Controllers/PagesController.php index 9330317..5c3e457 100644 --- a/app/Controllers/PagesController.php +++ b/app/Controllers/PagesController.php @@ -155,13 +155,35 @@ class PagesController extends BaseController } /** - * Master Data - Value Sets + * Value Set Library - Read-only */ - public function masterValueSets() + public function valueSetLibrary() { - return view('v2/master/valuesets/valuesets_index', [ - 'pageTitle' => 'Value Sets', - 'activePage' => 'master-valuesets' + return view('v2/valueset/valueset_index', [ + 'pageTitle' => 'Value Set Library', + 'activePage' => 'valueset-library' + ]); + } + + /** + * Result Valueset - CRUD for valueset table + */ + public function resultValueSet() + { + return view('v2/result/valueset/resultvalueset_index', [ + 'pageTitle' => 'Result Valuesets', + 'activePage' => 'result-valueset' + ]); + } + + /** + * Result Valueset Definition - CRUD for valuesetdef table + */ + public function resultValueSetDef() + { + return view('v2/result/valuesetdef/resultvaluesetdef_index', [ + 'pageTitle' => 'Valueset Definitions', + 'activePage' => 'result-valuesetdef' ]); } diff --git a/app/Controllers/Result/ResultValueSetController.php b/app/Controllers/Result/ResultValueSetController.php new file mode 100644 index 0000000..21555f0 --- /dev/null +++ b/app/Controllers/Result/ResultValueSetController.php @@ -0,0 +1,144 @@ +dbModel = new ValueSetModel(); + } + + public function index() + { + $search = $this->request->getGet('search') ?? $this->request->getGet('param') ?? null; + $VSetID = $this->request->getGet('VSetID') ?? null; + + $rows = $this->dbModel->getValueSets($search, $VSetID); + + return $this->respond([ + 'status' => 'success', + 'data' => $rows + ], 200); + } + + public function show($id = null) + { + $row = $this->dbModel->getValueSet($id); + if (!$row) { + return $this->failNotFound("ValueSet item not found: $id"); + } + + return $this->respond([ + 'status' => 'success', + 'data' => $row + ], 200); + } + + public function create() + { + $input = $this->request->getJSON(true); + if (!$input) { + return $this->failValidationErrors(['Invalid JSON input']); + } + + $data = [ + 'SiteID' => $input['SiteID'] ?? 1, + 'VSetID' => $input['VSetID'] ?? null, + 'VOrder' => $input['VOrder'] ?? 0, + 'VValue' => $input['VValue'] ?? '', + 'VDesc' => $input['VDesc'] ?? '', + 'VCategory' => $input['VCategory'] ?? null + ]; + + if ($data['VSetID'] === null) { + return $this->failValidationErrors(['VSetID is required']); + } + + try { + $id = $this->dbModel->insert($data, true); + if (!$id) { + return $this->failValidationErrors($this->dbModel->errors()); + } + + $newRow = $this->dbModel->getValueSet($id); + return $this->respondCreated([ + 'status' => 'success', + 'message' => 'ValueSet item created', + 'data' => $newRow + ]); + } catch (\Exception $e) { + return $this->failServerError('Failed to create: ' . $e->getMessage()); + } + } + + public function update($id = null) + { + $input = $this->request->getJSON(true); + if (!$input) { + return $this->failValidationErrors(['Invalid JSON input']); + } + + $existing = $this->dbModel->getValueSet($id); + if (!$existing) { + return $this->failNotFound("ValueSet item not found: $id"); + } + + $data = []; + if (isset($input['VSetID'])) $data['VSetID'] = $input['VSetID']; + if (isset($input['VOrder'])) $data['VOrder'] = $input['VOrder']; + if (isset($input['VValue'])) $data['VValue'] = $input['VValue']; + if (isset($input['VDesc'])) $data['VDesc'] = $input['VDesc']; + if (isset($input['SiteID'])) $data['SiteID'] = $input['SiteID']; + if (isset($input['VCategory'])) $data['VCategory'] = $input['VCategory']; + + if (empty($data)) { + return $this->respond([ + 'status' => 'success', + 'message' => 'No changes to update', + 'data' => $existing + ], 200); + } + + try { + $updated = $this->dbModel->update($id, $data); + if (!$updated) { + return $this->failValidationErrors($this->dbModel->errors()); + } + + $newRow = $this->dbModel->getValueSet($id); + return $this->respond([ + 'status' => 'success', + 'message' => 'ValueSet item updated', + 'data' => $newRow + ], 200); + } catch (\Exception $e) { + return $this->failServerError('Failed to update: ' . $e->getMessage()); + } + } + + public function delete($id = null) + { + $existing = $this->dbModel->getValueSet($id); + if (!$existing) { + return $this->failNotFound("ValueSet item not found: $id"); + } + + try { + $this->dbModel->delete($id); + return $this->respond([ + 'status' => 'success', + 'message' => 'ValueSet item deleted' + ], 200); + } catch (\Exception $e) { + return $this->failServerError('Failed to delete: ' . $e->getMessage()); + } + } +} diff --git a/app/Controllers/TestsController.php b/app/Controllers/TestsController.php index 28fa87d..4312f69 100644 --- a/app/Controllers/TestsController.php +++ b/app/Controllers/TestsController.php @@ -158,12 +158,13 @@ class TestsController extends BaseController $row['refnum'] = array_map(function ($r) { return [ 'RefNumID' => $r['RefNumID'], - 'NumRefType' => $r['NumRefType'], - 'NumRefTypeVValue' => ValueSet::getLabel('numeric_ref_type', $r['NumRefType']), - 'RangeTypeVValue' => ValueSet::getLabel('range_type', $r['RangeType']), - 'SexVValue' => ValueSet::getLabel('gender', $r['Sex']), - 'LowSignVValue' => ValueSet::getLabel('math_sign', $r['LowSign']), - 'HighSignVValue' => ValueSet::getLabel('math_sign', $r['HighSign']), + 'NumRefTypeKey' => $r['NumRefType'], + 'NumRefType' => ValueSet::getLabel('numeric_ref_type', $r['NumRefType']), + 'RangeType' => ValueSet::getLabel('range_type', $r['RangeType']), + 'SexKey' => $r['Sex'], + 'Sex' => ValueSet::getLabel('gender', $r['Sex']), + 'LowSign' => ValueSet::getLabel('math_sign', $r['LowSign']), + 'HighSign' => ValueSet::getLabel('math_sign', $r['HighSign']), 'High' => $r['High'] !== null ? (int) $r['High'] : null, 'Flag' => $r['Flag'] ]; @@ -183,10 +184,10 @@ class TestsController extends BaseController $row['reftxt'] = array_map(function ($r) { return [ 'RefTxtID' => $r['RefTxtID'], - 'TxtRefType' => $r['TxtRefType'], - 'TxtRefTypeVValue' => ValueSet::getLabel('text_ref_type', $r['TxtRefType']), - 'Sex' => $r['Sex'], - 'SexVValue' => ValueSet::getLabel('gender', $r['Sex']), + 'TxtRefTypeKey' => $r['TxtRefType'], + 'TxtRefType' => ValueSet::getLabel('text_ref_type', $r['TxtRefType']), + 'SexKey' => $r['Sex'], + 'Sex' => ValueSet::getLabel('gender', $r['Sex']), 'AgeStart' => (int) $r['AgeStart'], 'AgeEnd' => (int) $r['AgeEnd'], 'RefTxt' => $r['RefTxt'], diff --git a/app/Controllers/ValueSetController.php b/app/Controllers/ValueSetController.php index 94a54a8..972476d 100644 --- a/app/Controllers/ValueSetController.php +++ b/app/Controllers/ValueSetController.php @@ -19,10 +19,19 @@ class ValueSetController extends \CodeIgniter\Controller public function index(?string $lookupName = null) { + $search = $this->request->getGet('search') ?? null; + if ($lookupName === null) { $all = ValueSet::getAll(); $result = []; foreach ($all as $name => $entry) { + if ($search) { + $nameLower = strtolower($name); + $searchLower = strtolower($search); + if (strpos($nameLower, $searchLower) === false) { + continue; + } + } $count = count($entry['values'] ?? []); $result[$name] = $count; } diff --git a/app/Database/Migrations/2026-01-01-000001_CreateLookups.php b/app/Database/Migrations/2026-01-01-000001_CreateValueSet.php similarity index 100% rename from app/Database/Migrations/2026-01-01-000001_CreateLookups.php rename to app/Database/Migrations/2026-01-01-000001_CreateValueSet.php diff --git a/app/Libraries/ValueSet.php b/app/Libraries/ValueSet.php index e1a2315..787988d 100644 --- a/app/Libraries/ValueSet.php +++ b/app/Libraries/ValueSet.php @@ -68,7 +68,9 @@ class ValueSet { foreach ($data as &$row) { foreach ($fieldMappings as $field => $lookupName) { if (isset($row[$field]) && $row[$field] !== null) { - $row[$field . 'Text'] = self::getLabel($lookupName, $row[$field]) ?? ''; + $keyValue = $row[$field]; + $row[$field . 'Key'] = $keyValue; + $row[$field] = self::getLabel($lookupName, $keyValue) ?? ''; } } } diff --git a/app/Models/Patient/PatientModel.php b/app/Models/Patient/PatientModel.php index 822df55..bd64106 100644 --- a/app/Models/Patient/PatientModel.php +++ b/app/Models/Patient/PatientModel.php @@ -44,7 +44,7 @@ class PatientModel extends BaseModel { $rows = $this->findAll(); $rows = ValueSet::transformLabels($rows, [ - 'Sex' => 'gender', + 'Sex' => 'sex', ]); return $rows; } @@ -81,7 +81,7 @@ class PatientModel extends BaseModel { unset($patient['Comment']); $patient = ValueSet::transformLabels([$patient], [ - 'Sex' => 'gender', + 'Sex' => 'sex', 'Country' => 'country', 'Race' => 'race', 'Religion' => 'religion', diff --git a/app/Views/v2/layout/main_layout.php b/app/Views/v2/layout/main_layout.php index aa81d9f..d33b57e 100644 --- a/app/Views/v2/layout/main_layout.php +++ b/app/Views/v2/layout/main_layout.php @@ -173,14 +173,39 @@ - +
  • - - - Value Sets - +
    + + +
  • @@ -319,6 +344,7 @@ lightMode: localStorage.getItem('theme') !== 'dark', orgOpen: false, specimenOpen: false, + valuesetOpen: false, currentPath: window.location.pathname, init() { @@ -333,6 +359,7 @@ // Auto-expand menus based on active path this.orgOpen = this.currentPath.includes('organization'); this.specimenOpen = this.currentPath.includes('specimen'); + this.valuesetOpen = this.currentPath.includes('valueset'); // Watch sidebar state to persist this.$watch('sidebarOpen', val => localStorage.setItem('sidebarOpen', val)); diff --git a/app/Views/v2/master/valuesets/valueset_nested_crud.php b/app/Views/v2/master/valuesets/valueset_nested_crud.php deleted file mode 100644 index f1f4152..0000000 --- a/app/Views/v2/master/valuesets/valueset_nested_crud.php +++ /dev/null @@ -1,363 +0,0 @@ - - - - diff --git a/app/Views/v2/master/valuesets/valuesets_index.php b/app/Views/v2/master/valuesets/valuesets_index.php deleted file mode 100644 index 6761013..0000000 --- a/app/Views/v2/master/valuesets/valuesets_index.php +++ /dev/null @@ -1,678 +0,0 @@ -extend("v2/layout/main_layout"); ?> - -section("content") ?> -
    - - -
    -
    -
    - -
    -
    -

    Value Set Manager

    -

    Manage value set categories and their items

    -
    -
    -
    - - -
    - - -
    - -
    -
    -
    - -
    -
    -

    Categories

    -

    Value Set Definitions

    -
    -
    - -
    - - -
    -
    - - -
    -
    - - -
    -
    -

    Loading categories...

    -
    - - -
    - - - - - - - - - - - - - - -
    IDCategory NameItemsActions
    -
    - - -
    - -
    -
    - - -
    - -
    -
    -
    - -
    -
    -

    Items

    -

    - - -

    -
    -
    - -
    - - -
    -
    - - -
    -
    - - -
    -
    - -

    Select a category

    -

    Click on a category from the left panel to view and manage its items

    -
    -
    - - -
    -
    -

    Loading items...

    -
    - - -
    - - - - - - - - - - - - - - - -
    IDValueDescriptionOrderActions
    -
    - - -
    - -
    -
    -
    - - - include('v2/master/valuesets/valuesetdef_dialog') ?> - - - include('v2/master/valuesets/valueset_dialog') ?> - - - - - - - -
    -endSection() ?> - -section("script") ?> - -endSection() ?> diff --git a/app/Views/v2/master/valuesets/valueset_dialog.php b/app/Views/v2/result/valueset/resultvalueset_dialog.php similarity index 94% rename from app/Views/v2/master/valuesets/valueset_dialog.php rename to app/Views/v2/result/valueset/resultvalueset_dialog.php index 6e23069..440392c 100644 --- a/app/Views/v2/master/valuesets/valueset_dialog.php +++ b/app/Views/v2/result/valueset/resultvalueset_dialog.php @@ -1,4 +1,4 @@ - +
    -

    @@ -32,10 +31,8 @@

    -
    - - -
    +

    Category Assignment

    @@ -63,7 +59,6 @@
    -

    Item Details

    @@ -109,7 +104,6 @@
    -

    System Information

    @@ -143,7 +137,6 @@
    -
    +
    + +
    +
    + + +
    +
    +
    +

    Loading valuesets...

    +
    + +
    + + + + + + + + + + + + + + + + +
    IDCategoryValueDescriptionOrderActions
    +
    +
    + + include('v2/result/valueset/resultvalueset_dialog') ?> + + + + +endSection() ?> + +section("script") ?> + +endSection() ?> diff --git a/app/Views/v2/master/valuesets/valuesetdef_dialog.php b/app/Views/v2/result/valuesetdef/resultvaluesetdef_dialog.php similarity index 95% rename from app/Views/v2/master/valuesets/valuesetdef_dialog.php rename to app/Views/v2/result/valuesetdef/resultvaluesetdef_dialog.php index 6723c51..c191efd 100644 --- a/app/Views/v2/master/valuesets/valuesetdef_dialog.php +++ b/app/Views/v2/result/valuesetdef/resultvaluesetdef_dialog.php @@ -1,4 +1,4 @@ - +
    -

    @@ -32,10 +31,8 @@

    -
    - -

    Basic Information

    @@ -75,7 +71,6 @@
    -

    System Information

    @@ -109,7 +104,6 @@
    -
    +
    + +
    + + + +
    +
    +
    +

    Loading definitions...

    +
    + +
    + + + + + + + + + + + + + + + +
    IDCategory NameDescriptionItemsActions
    +
    +
    + + include('v2/result/valuesetdef/resultvaluesetdef_dialog') ?> + + + + +endSection() ?> + +section("script") ?> + +endSection() ?> diff --git a/app/Views/v2/valueset/valueset_index.php b/app/Views/v2/valueset/valueset_index.php new file mode 100644 index 0000000..f32b003 --- /dev/null +++ b/app/Views/v2/valueset/valueset_index.php @@ -0,0 +1,371 @@ +extend("v2/layout/main_layout"); ?> + +section("content") ?> +
    + + +
    +
    +
    +
    + +
    +
    +

    Value Set Library

    +

    Browse predefined value sets from library

    +
    +
    + +
    +
    +

    +

    Value Sets

    +
    +
    +
    +

    +

    Total Items

    +
    +
    +
    +
    + + +
    + + +
    + +
    +

    Categories

    +
    + + + +
    +
    + + +
    + +
    + +
    + + +
    + +

    No categories found

    +
    + + +
    + +
    +
    + + +
    + categories +
    +
    + + +
    + +
    +
    +
    +
    + +
    +
    +

    +

    +
    +
    +
    + + +
    +
    + + +
    +
    +
    + + +
    + +
    + +

    Select a category from the left to view values

    +
    + + +
    +
    +

    Loading items...

    +
    + + +
    + + + + + + +
    +
    + + +
    + Showing of items +
    +
    + +
    + +
    +endSection() ?> + +section("script") ?> + +endSection() ?> diff --git a/app/Views/v2/welcome_message.php b/app/Views/v2/welcome_message.php deleted file mode 100644 index 90abad7..0000000 --- a/app/Views/v2/welcome_message.php +++ /dev/null @@ -1,12 +0,0 @@ - - - - Hello World Page - - - -

    Hello World!

    -

    This is a simple HTML page.

    - - - \ No newline at end of file diff --git a/app/Views/welcome_message.php b/app/Views/welcome_message.php deleted file mode 100644 index 90abad7..0000000 --- a/app/Views/welcome_message.php +++ /dev/null @@ -1,12 +0,0 @@ - - - - Hello World Page - - - -

    Hello World!

    -

    This is a simple HTML page.

    - - - \ No newline at end of file diff --git a/docs/ERD_EXTRACT.md b/docs/ERD_EXTRACT.md new file mode 100644 index 0000000..161421d --- /dev/null +++ b/docs/ERD_EXTRACT.md @@ -0,0 +1,1129 @@ +# CLQMS Database Tables - ERD Source Document + +## Overview +This document contains all database tables extracted from prj_3c.md for ERD creation in Figma. + +--- + +## Table 1: Organization Structure + +### account +| Column | Type | Description | +|--------|------|-------------| +| AccountID | int | Primary key - from SMCRM | +| AccountName | string | Organization name | +| ParentAccountID | int | Parent organization (for chain labs) | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### site +| Column | Type | Description | +|--------|------|-------------| +| SiteID | int | Primary key - from SMCRM | +| AccountID | int | Foreign key to account | +| SiteName | string | Location name | +| Location | string | Geographic coordinates | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### discipline +| Column | Type | Description | +|--------|------|-------------| +| DisciplineID | int | Primary key | +| DisciplineName | string | e.g., Microbiology, Hematology, Immunology | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### department +| Column | Type | Description | +|--------|------|-------------| +| DepartmentID | int | Primary key | +| DepartmentName | string | Department name | +| DisciplineID | int | Foreign key to discipline | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### workstation +| Column | Type | Description | +|--------|------|-------------| +| WorkstationID | int | Primary key | +| SiteID | int | Foreign key to site | +| DepartmentID | int | Foreign key to department | +| WorkstationName | string | Workstation identifier | +| LocalDB | boolean | Has local database | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### instrument +| Column | Type | Description | +|--------|------|-------------| +| InstrumentID | int | Primary key | +| SiteID | int | Foreign key to site | +| WorkstationID | int | Foreign key to workstation | +| InstrumentAlias | string | Instrument identifier for interfacing | +| InstrumentName | string | Manufacturer model name | +| InstrumentType | string | IVD equipment type | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +--- + +## Table 2: Personnel + +### personnel +| Column | Type | Description | +|--------|------|-------------| +| PersonnelID | int | Primary key | +| SiteID | int | Foreign key to site | +| PersonnelName | string | Full name | +| Position | string | Job title/position | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### personneldocument +| Column | Type | Description | +|--------|------|-------------| +| DocID | int | Primary key | +| PersonnelID | int | Foreign key to personnel | +| DocType | string | Document type (e.g., training certificate) | +| DocFile | blob | Document file | +| ExpiryDate | datetime | Document expiry | +| CreateDate | datetime | UTC+0 | + +### personnelaccess +| Column | Type | Description | +|--------|------|-------------| +| AccessID | int | Primary key | +| PersonnelID | int | Foreign key to personnel | +| Role | string | Access role | +| Permissions | string | JSON permissions | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 3: Location Management + +### locationtype +| Column | Type | Description | +|--------|------|-------------| +| LocationTypeID | int | Primary key | +| LocationTypeName | string | e.g., floor, point of care, room, bed, mobile, remote | +| CreateDate | datetime | UTC+0 | + +### location +| Column | Type | Description | +|--------|------|-------------| +| LocationID | int | Primary key | +| SiteID | int | Foreign key to site | +| ParentLocationID | int | Parent location (cascade) | +| LocationTypeID | int | Foreign key to locationtype | +| LocationName | string | Location name | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### locationaddress +| Column | Type | Description | +|--------|------|-------------| +| AddressID | int | Primary key | +| LocationID | int | Foreign key to location | +| AddressLine1 | string | Address line 1 | +| AddressLine2 | string | Address line 2 | +| City | string | City | +| PostalCode | string | Postal code | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 4: Patient Registration + +### patient +| Column | Type | Description | +|--------|------|-------------| +| PatientID | int | Primary key - external ID | +| SiteID | int | Foreign key to site | +| InternalPID | int | Internal patient ID (auto-increment) | +| FirstName | string | First name (encrypted) | +| LastName | string | Last name (encrypted) | +| DateOfBirth | datetime | Date of birth (stored as-is) | +| Sex | string | Gender code | +| Race | string | Race code | +| Ethnicity | string | Ethnicity code | +| Religion | string | Religion code | +| CreateDate | datetime | UTC+0 | +| DelDate | datetime | UTC+0 | + +### patientcontact +| Column | Type | Description | +|--------|------|-------------| +| ContactID | int | Primary key | +| InternalPID | int | Foreign key to patient | +| ContactType | string | e.g., phone, email, address | +| ContactValue | string | Contact information (encrypted) | +| CreateDate | datetime | UTC+0 | + +### patientinsurance +| Column | Type | Description | +|--------|------|-------------| +| InsuranceID | int | Primary key | +| InternalPID | int | Foreign key to patient | +| InsuranceProvider | string | Insurance company | +| PolicyNumber | string | Policy number | +| GroupNumber | string | Group number | +| EffectiveDate | datetime | Policy effective date | +| ExpiryDate | datetime | Policy expiry date | +| CreateDate | datetime | UTC+0 | + +### patientvisit +| Column | Type | Description | +|--------|------|-------------| +| VisitID | int | Primary key | +| InternalPID | int | Foreign key to patient | +| SiteID | int | Foreign key to site | +| VisitClass | string | Visit classification | +| VisitType | string | Visit type | +| VisitDate | datetime | Visit datetime | +| DischargeDate | datetime | Discharge datetime | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 5: Patient Admission + +### admission +| Column | Type | Description | +|--------|------|-------------| +| AdmissionID | int | Primary key | +| VisitID | int | Foreign key to patientvisit | +| PatientID | int | Foreign key to patient | +| SiteID | int | Foreign key to site | +| AdmissionDate | datetime | Admission datetime | +| DischargeDate | datetime | Discharge datetime | +| ADTCode | string | Admission-Discharge-Transfer code | +| ReferringParty | string | Referring party | +| BillingAccount | string | Billing account | +| AttendingDoctor | string | Attending doctor | +| ReferringDoctor | string | Referring doctor | +| VitalSigns | json | Heart rate, BP, weight, height | +| CreateDate | datetime | UTC+0 | + +### admissionlocation +| Column | Type | Description | +|--------|------|-------------| +| ID | int | Primary key | +| AdmissionID | int | Foreign key to admission | +| LocationID | int | Foreign key to location | +| TransferDate | datetime | Transfer datetime | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 6: Test Ordering + +### testorder +| Column | Type | Description | +|--------|------|-------------| +| OrderID | string | Primary key - LLYYMMDDXXXXX format | +| SiteID | int | Foreign key to site (source site) | +| PatientID | int | Foreign key to patient | +| VisitID | int | Foreign key to patientvisit | +| OrderDate | datetime | Order datetime | +| Urgency | string | Order urgency level | +| Status | string | Order status | +| OrderingProvider | string | Ordering doctor | +| ProductionSiteID | int | Foreign key to site (production site) | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### testorderdetail +| Column | Type | Description | +|--------|------|-------------| +| OrderDetailID | int | Primary key | +| OrderID | string | Foreign key to testorder | +| TestID | int | Foreign key to testdef | +| Priority | int | Test priority | +| Status | string | Test order status | +| CreateDate | datetime | UTC+0 | + +### orderstatus +| Column | Type | Description | +|--------|------|-------------| +| StatusID | int | Primary key | +| StatusName | string | Status name | +| Description | string | Status description | +| Active | boolean | Is active | + +--- + +## Table 7: Specimen Management + +### specimen +| Column | Type | Description | +|--------|------|-------------| +| SID | string | Primary key - OrderID + SSS + C (17 chars) | +| OrderID | string | Foreign key to testorder | +| SpecimenDefID | int | Foreign key to specimendefinition | +| ParentSID | string | Parent specimen (for secondary specimens) | +| SpecimenType | string | Specimen type code | +| SpecimenRole | string | e.g., patient, EQC, blood bag, internal QC | +| CollectionDate | datetime | Collection datetime | +| CollectionSite | int | Collection site | +| CollectedBy | int | Personnel ID | +| ContainerType | string | Container type code | +| Additive | string | Additive code | +| CollectionMethod | string | Collection method code | +| BodySite | string | Body site code | +| SpecimenCondition | string | Specimen condition | +| Status | string | Current specimen status | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### specimencollection +| Column | Type | Description | +|--------|------|-------------| +| ID | int | Primary key | +| SID | string | Foreign key to specimen | +| Activity | string | Activity code | +| ActivityName | string | Activity name | +| ActRes | string | Activity result | +| LocationID | int | Foreign key to location | +| EquipmentID | int | Foreign key to instrument | +| PersonnelID | int | Personnel performing activity | +| ActivityDate | datetime | Activity datetime | +| Notes | string | Activity notes | +| CreateDate | datetime | UTC+0 | + +### specimenstatus +| Column | Type | Description | +|--------|------|-------------| +| StatusID | int | Primary key | +| SiteID | int | Site ID | +| LocationID | int | Location ID | +| EquipmentID | int | Instrument ID | +| Activity | string | Activity code | +| ActivityName | string | Activity name | +| ActRes | string | Activity result | +| SpecimenStatus | string | Specimen status name | +| Description | string | Status description | + +### specimentransport +| Column | Type | Description | +|--------|------|-------------| +| TransportID | int | Primary key | +| SID | string | Foreign key to specimen | +| SenderID | int | Sender personnel ID | +| ReceiverID | int | Receiver personnel ID | +| TransportDate | datetime | Transport datetime | +| Condition | json | Transport conditions (temperature, etc.) | +| PackagingID | string | Packaging identification | +| FromLocation | int | From location | +| ToLocation | int | To location | +| CreateDate | datetime | UTC+0 | + +### specimenstorage +| Column | Type | Description | +|--------|------|-------------| +| StorageID | int | Primary key | +| SID | string | Foreign key to specimen | +| LocationID | int | Storage location ID | +| StorageTemperature | decimal | Storage temperature | +| StorageDate | datetime | Storage datetime | +| ThawCount | int | Number of thaws | +| ExpiryDate | datetime | Storage expiry | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 8: Specimen Definitions + +### specimendefinition +| Column | Type | Description | +|--------|------|-------------| +| SpecimenDefID | int | Primary key | +| SpecimenName | string | Specimen name | +| SpecimenCode | string | Specimen code | +| SpecimenTypeID | int | Foreign key to specimentype | +| ContainerTypeID | int | Foreign key to containertype | +| AdditiveID | int | Foreign key to additive | +| CollectionMethodID | int | Foreign key to collectionmethod | +| Volume | decimal | Required volume | +| VolumeUnit | string | Volume unit | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### specimentype +| Column | Type | Description | +|--------|------|-------------| +| SpecimenTypeID | int | Primary key | +| SpecimenTypeName | string | e.g., blood, urine, stool, tissue | +| CodingSystem | string | Coding system (LOINC, etc.) | +| Code | string | Code value | +| CreateDate | datetime | UTC+0 | + +### containertype +| Column | Type | Description | +|--------|------|-------------| +| ContainerTypeID | int | Primary key | +| ContainerName | string | Container name | +| ContainerCode | string | Container code | +| Volume | decimal | Container volume | +| VolumeUnit | string | Volume unit | +| CreateDate | datetime | UTC+0 | + +### additive +| Column | Type | Description | +|--------|------|-------------| +| AdditiveID | int | Primary key | +| AdditiveName | string | Additive name | +| AdditiveCode | string | Additive code | +| Description | string | Additive description | +| CreateDate | datetime | UTC+0 | + +### collectionmethod +| Column | Type | Description | +|--------|------|-------------| +| MethodID | int | Primary key | +| MethodName | string | Method name | +| MethodCode | string | Method code | +| Description | string | Method description | +| CreateDate | datetime | UTC+0 | + +### bodysite +| Column | Type | Description | +|--------|------|-------------| +| BodySiteID | int | Primary key | +| BodySiteName | string | Body site name | +| CodingSystem | string | Coding system | +| Code | string | Code value | +| CreateDate | datetime | UTC+0 | + +### specimenrole +| Column | Type | Description | +|--------|------|-------------| +| RoleID | int | Primary key | +| RoleName | string | Role name | +| RoleCode | string | Role code | +| Description | string | Role description | +| CreateDate | datetime | UTC+0 | + +### specimencondition +| Column | Type | Description | +|--------|------|-------------| +| ConditionID | int | Primary key | +| ConditionName | string | Condition name | +| ConditionCode | string | Condition code | +| Description | string | Condition description | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 9: Test Management + +### testdef +| Column | Type | Description | +|--------|------|-------------| +| TestID | int | Primary key | +| TestName | string | Test name | +| TestCode | string | Test code | +| LOINCCode | string | LOINC code | +| TestType | string | Test type (atomic, calculated, profile, etc.) | +| DisciplineID | int | Foreign key to discipline | +| SpecimenTypeID | int | Foreign key to specimentype | +| ContainerTypeID | int | Foreign key to containertype | +| ResultType | string | Result type (numeric, range, text, valueset) | +| ResultUnit | string | Result unit (UCUM) | +| Methodology | string | Test methodology | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### testdefsite +| Column | Type | Description | +|--------|------|-------------| +| ID | int | Primary key | +| TestID | int | Foreign key to testdef | +| SiteID | int | Foreign key to site | +| TestNameLocal | string | Local test name | +| TestCodeLocal | string | Local test code | +| WorkstationID | int | Default workstation | +| InstrumentID | int | Default instrument | +| Active | boolean | Is active | +| CreateDate | datetime | UTC+0 | + +### testdeftech +| Column | Type | Description | +|--------|------|-------------| +| ID | int | Primary key | +| TestID | int | Foreign key to testdef | +| InstrumentID | int | Foreign key to instrument | +| InstrumentTestCode | string | Test code on instrument | +| TestMapping | string | Test mapping (one-to-many) | +| Active | boolean | Is active | +| CreateDate | datetime | UTC+0 | + +### calculatedtest +| Column | Type | Description | +|--------|------|-------------| +| CalculatedTestID | int | Primary key | +| TestID | int | Foreign key to testdef | +| Formula | string | Calculation formula | +| ParamTestID1 | int | Parameter test 1 | +| ParamTestID2 | int | Parameter test 2 | +| ParamTestID3 | int | Parameter test 3 | +| ParamTestID4 | int | Parameter test 4 | +| CreateDate | datetime | UTC+0 | + +### grouptest +| Column | Type | Description | +|--------|------|-------------| +| GroupTestID | int | Primary key | +| GroupTestName | string | Group test name | +| GroupTestType | string | Type (Profile, Functional Procedure, Superset) | +| CreateDate | datetime | UTC+0 | + +### grouptestmember +| Column | Type | Description | +|--------|------|-------------| +| ID | int | Primary key | +| GroupTestID | int | Foreign key to grouptest | +| TestID | int | Foreign key to testdef | +| Sequence | int | Display sequence | +| CreateDate | datetime | UTC+0 | + +### panel +| Column | Type | Description | +|--------|------|-------------| +| PanelID | int | Primary key | +| PanelName | string | Panel name | +| PanelType | string | Fixed or Flexible | +| ParentPanelID | int | Parent panel (for nested panels) | +| DisciplineID | int | Foreign key to discipline | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### panelmember +| Column | Type | Description | +|--------|------|-------------| +| ID | int | Primary key | +| PanelID | int | Foreign key to panel | +| TestID | int | Foreign key to testdef | +| Sequence | int | Display sequence | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 10: Reference Range + +### referencerangenumeric +| Column | Type | Description | +|--------|------|-------------| +| RefRangeID | int | Primary key | +| TestID | int | Foreign key to testdef | +| AgeFrom | int | Age from (years) | +| AgeTo | int | Age to (years) | +| Sex | string | Gender | +| LowValue | decimal | Low reference value | +| HighValue | decimal | High reference value | +| Unit | string | Unit | +| SpecimenTypeID | int | Foreign key to specimentype | +| SiteID | int | Foreign key to site | +| EffectiveDate | datetime | Effective date | +| ExpiryDate | datetime | Expiry date | +| CreateDate | datetime | UTC+0 | + +### referencerangethreshold +| Column | Type | Description | +|--------|------|-------------| +| RefRangeID | int | Primary key | +| TestID | int | Foreign key to testdef | +| AgeFrom | int | Age from (years) | +| AgeTo | int | Age to (years) | +| Sex | string | Gender | +| CutOffLow | decimal | Low cut-off | +| CutOffHigh | decimal | High cut-off | +| GrayZoneLow | decimal | Low gray zone | +| GrayZoneHigh | decimal | High gray zone | +| SpecimenTypeID | int | Foreign key to specimentype | +| SiteID | int | Foreign key to site | +| EffectiveDate | datetime | Effective date | +| ExpiryDate | datetime | Expiry date | +| CreateDate | datetime | UTC+0 | + +### referencerangetext +| Column | Type | Description | +|--------|------|-------------| +| RefRangeID | int | Primary key | +| TestID | int | Foreign key to testdef | +| AgeFrom | int | Age from (years) | +| AgeTo | int | Age to (years) | +| Sex | string | Gender | +| TextValue | string | Text reference value | +| SpecimenTypeID | int | Foreign key to specimentype | +| SiteID | int | Foreign key to site | +| EffectiveDate | datetime | Effective date | +| ExpiryDate | datetime | Expiry date | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 11: Calibration + +### calibrator +| Column | Type | Description | +|--------|------|-------------| +| CalibratorID | int | Primary key | +| CalibratorName | string | Calibrator name | +| Manufacturer | string | Manufacturer | +| LotNumber | string | Lot number | +| ExpiryDate | datetime | Expiry date | +| TestID | int | Foreign key to testdef | +| CreateDate | datetime | UTC+0 | + +### calibration +| Column | Type | Description | +|--------|------|-------------| +| CalibrationID | int | Primary key | +| InstrumentID | int | Foreign key to instrument | +| TestID | int | Foreign key to testdef | +| CalibratorID | int | Foreign key to calibrator | +| Level | int | Calibration level | +| CalibrationDate | datetime | Calibration datetime | +| Factor | decimal | Calibration factor | +| Absorbance | decimal | Absorbance value | +| TargetValue | decimal | Target value | +| TargetUnit | string | Target unit | +| PersonnelID | int | Personnel performing calibration | +| Status | string | Calibration status | +| CreateDate | datetime | UTC+0 | + +### caldef +| Column | Type | Description | +|--------|------|-------------| +| CalDefID | int | Primary key | +| Calibrator | string | Calibrator name | +| LotNumber | string | Lot number | +| ExpiryDate | datetime | Expiry date | +| Reagent | string | Reagent name | +| SpcTypeID | int | Specimen type ID | +| Level | int | Level | +| Value | decimal | Value | +| Unit | string | Unit | +| InstrumentAlias | string | Instrument alias | +| CreateDate | datetime | UTC+0 | + +### calparinst +| Column | Type | Description | +|--------|------|-------------| +| CalParInstID | int | Primary key | +| EquipmentID | int | Foreign key to instrument | +| Calibrator | string | Calibrator name | +| LotNo | string | Lot number | +| ExpiryDate | datetime | Expiry date | +| TestInstID1 | int | Test instrument ID 1 | +| SampleType | string | Sample type | +| Level | int | Level | +| Concentration | decimal | Concentration | +| CalUnit | string | Calibration unit | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 12: Quality Control + +### qcmaterial +| Column | Type | Description | +|--------|------|-------------| +| QCMaterialID | int | Primary key | +| MaterialName | string | QC material name | +| Manufacturer | string | Manufacturer | +| LotNumber | string | Lot number | +| ExpiryDate | datetime | Expiry date | +| Level | int | QC level | +| TestID | int | Foreign key to testdef | +| TargetMean | decimal | Target mean | +| TargetSD | decimal | Target SD | +| TargetCV | decimal | Target CV | +| CreateDate | datetime | UTC+0 | + +### qcresult +| Column | Type | Description | +|--------|------|-------------| +| QCResultID | int | Primary key | +| InstrumentID | int | Foreign key to instrument | +| TestID | int | Foreign key to testdef | +| QCMaterialID | int | Foreign key to qcmaterial | +| Level | int | QC level | +| QCDate | datetime | QC datetime | +| ResultValue | decimal | QC result value | +| Mean | decimal | Mean | +| SD | decimal | Standard deviation | +| CV | decimal | Coefficient of variation | +| Sigma | decimal | Sigma score | +| ZScore | decimal | Z-score | +| Flag | string | Result flag | +| PersonnelID | int | Personnel performing QC | +| Status | string | QC status | +| CreateDate | datetime | UTC+0 | + +### qcstatistic +| Column | Type | Description | +|--------|------|-------------| +| StatisticID | int | Primary key | +| InstrumentID | int | Foreign key to instrument | +| TestID | int | Foreign key to testdef | +| QCMaterialID | int | Foreign key to qcmaterial | +| Level | int | QC level | +| StatisticDate | datetime | Statistic date | +| Mean | decimal | Calculated mean | +| SD | decimal | Calculated SD | +| CV | decimal | Calculated CV | +| SampleSize | int | Sample size | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 13: Test Results + +### patres +| Column | Type | Description | +|--------|------|-------------| +| ResultID | int | Primary key | +| SID | string | Foreign key to specimen | +| TestID | int | Foreign key to testdef | +| OrderID | string | Foreign key to testorder | +| ResultValue | string | Result value | +| ResultNumeric | decimal | Numeric result | +| ResultText | string | Text result | +| ResultUnit | string | Result unit | +| ResultStatus | string | Result status | +| PersonnelID | int | Personnel entering result | +| VerificationDate | datetime | Verification datetime | +| VerificationPersonnel | int | Verifying personnel | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### patrestech +| Column | Type | Description | +|--------|------|-------------| +| TechResultID | int | Primary key | +| ResultID | int | Foreign key to patres | +| InstrumentID | int | Foreign key to instrument | +| RawResult | string | Raw instrument result | +| ResultDate | datetime | Result datetime | +| RerunCount | int | Rerun count | +| Dilution | decimal | Dilution factor | +| CreateDate | datetime | UTC+0 | + +### patresflag +| Column | Type | Description | +|--------|------|-------------| +| FlagID | int | Primary key | +| ResultID | int | Foreign key to patres | +| FlagType | string | Flag type (H, L, A, etc.) | +| FlagDescription | string | Flag description | +| CreateDate | datetime | UTC+0 | + +### resultdistribution +| Column | Type | Description | +|--------|------|-------------| +| DistributionID | int | Primary key | +| ResultID | int | Foreign key to patres | +| RecipientType | string | Recipient type | +| RecipientID | int | Recipient ID | +| DistributionDate | datetime | Distribution datetime | +| DistributionMethod | string | Distribution method | +| Status | string | Distribution status | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 14: Value Set + +### valueset +| Column | Type | Description | +|--------|------|-------------| +| ValueSetID | int | Primary key | +| ValueSetName | string | Value set name | +| ValueSetCode | string | Value set code | +| Description | string | Description | +| CodingSystem | string | Coding system | +| CreateDate | datetime | UTC+0 | + +### valuesetmember +| Column | Type | Description | +|--------|------|-------------| +| MemberID | int | Primary key | +| ValueSetID | int | Foreign key to valueset | +| MemberCode | string | Member code | +| MemberValue | string | Member value | +| DisplayOrder | int | Display order | +| Active | boolean | Is active | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 15: Reagent & Inventory + +### reagent +| Column | Type | Description | +|--------|------|-------------| +| ReagentID | int | Primary key | +| ReagentName | string | Reagent name | +| Manufacturer | string | Manufacturer | +| CatalogNumber | string | Catalog number | +| LotNumber | string | Lot number | +| ExpiryDate | datetime | Expiry date | +| TestID | int | Foreign key to testdef | +| InstrumentID | int | Foreign key to instrument | +| CreateDate | datetime | UTC+0 | + +### reagentusage +| Column | Type | Description | +|--------|------|-------------| +| UsageID | int | Primary key | +| ReagentID | int | Foreign key to reagent | +| TestID | int | Foreign key to testdef | +| UsageDate | datetime | Usage datetime | +| QuantityUsed | decimal | Quantity used | +| PersonnelID | int | Personnel using reagent | +| OrderID | string | Related order ID | +| SID | string | Related specimen ID | +| CreateDate | datetime | UTC+0 | + +### productcatalog +| Column | Type | Description | +|--------|------|-------------| +| ProductID | int | Primary key | +| ProductName | string | Product name | +| ProductCode | string | Product code | +| Category | string | Product category | +| Manufacturer | string | Manufacturer | +| SMCRMRef | string | Reference to SMCRM | +| CreateDate | datetime | UTC+0 | + +### product +| Column | Type | Description | +|--------|------|-------------| +| ProductID | int | Primary key | +| CatalogID | int | Foreign key to productcatalog | +| SiteID | int | Foreign key to site | +| LotNumber | string | Lot number | +| ExpiryDate | datetime | Expiry date | +| Quantity | int | Quantity on hand | +| ReorderLevel | int | Reorder level | +| LocationID | int | Storage location | +| CreateDate | datetime | UTC+0 | + +### inventorytransaction +| Column | Type | Description | +|--------|------|-------------| +| TransactionID | int | Primary key | +| ProductID | int | Foreign key to product | +| TransactionType | string | Transaction type (receipt, use, adjust) | +| Quantity | int | Transaction quantity | +| TransactionDate | datetime | Transaction datetime | +| PersonnelID | int | Personnel | +| ReferenceID | string | Reference ID | +| Notes | string | Transaction notes | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 16: Equipment Management + +### equipment +| Column | Type | Description | +|--------|------|-------------| +| EquipmentID | int | Primary key | +| EquipmentName | string | Equipment name | +| EquipmentType | string | Equipment type (IVD, non-IVD) | +| Manufacturer | string | Manufacturer | +| Model | string | Model number | +| SerialNumber | string | Serial number | +| SiteID | int | Foreign key to site | +| LocationID | int | Foreign key to location | +| Status | string | Equipment status | +| InstallDate | datetime | Installation date | +| DecommissionDate | datetime | Decommission date | +| CreateDate | datetime | UTC+0 | + +### equipmentmaintenance +| Column | Type | Description | +|--------|------|-------------| +| MaintenanceID | int | Primary key | +| EquipmentID | int | Foreign key to equipment | +| MaintenanceType | string | Maintenance type | +| MaintenanceDate | datetime | Maintenance datetime | +| Description | string | Maintenance description | +| PerformedBy | string | Performed by | +| NextMaintenanceDate | datetime | Next maintenance date | +| CreateDate | datetime | UTC+0 | + +### equipmentactivity +| Column | Type | Description | +|--------|------|-------------| +| ActivityID | int | Primary key | +| EquipmentID | int | Foreign key to equipment | +| ActivityType | string | Activity type | +| ActivityDate | datetime | Activity datetime | +| ActivityResult | string | Activity result | +| PersonnelID | int | Personnel | +| Notes | string | Activity notes | +| CreateDate | datetime | UTC+0 | + +### equipmenttestcount +| Column | Type | Description | +|--------|------|-------------| +| ID | int | Primary key | +| EquipmentID | int | Foreign key to equipment | +| TestDate | datetime | Test date | +| TestType | string | Test type (calibration, QC, patient, other) | +| TestCount | int | Number of tests | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 17: Doctor & Contact + +### doctor +| Column | Type | Description | +|--------|------|-------------| +| DoctorID | int | Primary key | +| DoctorName | string | Doctor name | +| DoctorCode | string | Doctor code | +| Specialty | string | Specialty | +| SIP | string | SIP number | +| PracticeLocation | string | Practice location | +| ContactID | int | Foreign key to contact | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### contact +| Column | Type | Description | +|--------|------|-------------| +| ContactID | int | Primary key | +| ContactName | string | Contact name | +| ContactType | string | Contact type (person, organization) | +| Phone | string | Phone | +| Email | string | Email | +| Address | string | Address | +| SMCRMRef | string | Reference to SMCRM | +| CreateDate | datetime | UTC+0 | + +### contactdetail +| Column | Type | Description | +|--------|------|-------------| +| DetailID | int | Primary key | +| ContactID | int | Foreign key to contact | +| DetailType | string | Detail type | +| DetailValue | string | Detail value | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 18: Coding System + +### codingsystem +| Column | Type | Description | +|--------|------|-------------| +| SystemID | int | Primary key | +| SystemName | string | System name | +| SystemCode | string | System code | +| Description | string | Description | +| URL | string | System URL | +| CreateDate | datetime | UTC+0 | + +### codemapping +| Column | Type | Description | +|--------|------|-------------| +| MappingID | int | Primary key | +| SourceSystem | string | Source coding system | +| SourceCode | string | Source code | +| TargetSystem | string | Target coding system | +| TargetCode | string | Target code | +| EntityType | string | Entity type (test, specimen, etc.) | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 19: Audit + +### auditlog +| Column | Type | Description | +|--------|------|-------------| +| AuditID | int | Primary key | +| UserID | int | User ID | +| Action | string | Action performed | +| EntityType | string | Entity type | +| EntityID | string | Entity ID | +| OldValue | string | Old value | +| NewValue | string | New value | +| IPAddress | string | IP address | +| Timestamp | datetime | UTC+0 | +| CreateDate | datetime | UTC+0 | + +### auditarchive +| Column | Type | Description | +|--------|------|-------------| +| ArchiveID | int | Primary key | +| AuditID | int | Foreign key to auditlog | +| ArchiveDate | datetime | Archive date | +| ArchiveLocation | string | Archive location | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 20: User & Authentication + +### user +| Column | Type | Description | +|--------|------|-------------| +| UserID | int | Primary key | +| Username | string | Username | +| PasswordHash | string | Password hash | +| PersonnelID | int | Foreign key to personnel | +| Role | string | User role | +| Status | string | User status | +| LastLogin | datetime | Last login datetime | +| CreateDate | datetime | UTC+0 | + +### usersession +| Column | Type | Description | +|--------|------|-------------| +| SessionID | int | Primary key | +| UserID | int | Foreign key to user | +| SessionToken | string | Session token | +| ExpiryDate | datetime | Session expiry | +| IPAddress | string | IP address | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 21: Visualization & Reporting + +### reporttemplate +| Column | Type | Description | +|--------|------|-------------| +| TemplateID | int | Primary key | +| TemplateName | string | Template name | +| TemplateType | string | Template type | +| DisciplineID | int | Foreign key to discipline | +| TemplateConfig | json | Template configuration | +| CreateDate | datetime | UTC+0 | +| EndDate | datetime | UTC+0 | + +### reportoutput +| Column | Type | Description | +|--------|------|-------------| +| OutputID | int | Primary key | +| TemplateID | int | Foreign key to reporttemplate | +| OrderID | string | Foreign key to testorder | +| OutputFormat | string | Output format | +| OutputData | blob | Output data | +| GeneratedDate | datetime | Generation datetime | +| PersonnelID | int | Generating personnel | +| CreateDate | datetime | UTC+0 | + +### visualizationconfig +| Column | Type | Description | +|--------|------|-------------| +| ConfigID | int | Primary key | +| ConfigName | string | Config name | +| VisualizationType | string | Type (Levey-Jennings, etc.) | +| ConfigData | json | Configuration data | +| CreateDate | datetime | UTC+0 | + +--- + +## Table 22: Host System Integration + +### hostsystem +| Column | Type | Description | +|--------|------|-------------| +| HostID | int | Primary key | +| HostName | string | Host system name | +| HostType | string | Host type (HIS, EMR, etc.) | +| ConnectionString | string | Database connection string | +| Protocol | string | Communication protocol | +| Status | string | Connection status | +| LastSync | datetime | Last synchronization | +| CreateDate | datetime | UTC+0 | + +### hosttestmapping +| Column | Type | Description | +|--------|------|-------------| +| MappingID | int | Primary key | +| HostID | int | Foreign key to hostsystem | +| HostTestCode | string | Host test code | +| LocalTestID | int | Foreign key to testdef | +| CreateDate | datetime | UTC+0 | + +### hostsynclog +| Column | Type | Description | +|--------|------|-------------| +| LogID | int | Primary key | +| HostID | int | Foreign key to hostsystem | +| SyncDate | datetime | Sync datetime | +| RecordsProcessed | int | Records processed | +| Errors | int | Error count | +| Status | string | Sync status | +| Details | string | Sync details | +| CreateDate | datetime | UTC+0 | + +--- + +## Entity Relationships Summary + +### Primary Relationships +1. **account → site** (one-to-many) +2. **site → location** (one-to-many) +3. **site → personnel** (one-to-many) +4. **site → equipment** (one-to-many) +5. **site → patient** (one-to-many) +6. **department → discipline** (many-to-many via junction table) +7. **workstation → site** (many-to-one) +8. **instrument → workstation** (many-to-one) +9. **instrument → site** (many-to-one) +10. **patient → patientvisit** (one-to-many) +11. **patientvisit → testorder** (one-to-many) +12. **testorder → specimen** (one-to-many) +13. **specimen → specimencollection** (one-to-many) +14. **specimen → patres** (one-to-many) +15. **testdef → patres** (one-to-many) +16. **testdef → calibration** (one-to-many) +17. **testdef → qcresult** (one-to-many) +18. **instrument → calibration** (one-to-many) +19. **instrument → qcresult** (one-to-many) +20. **valueset → valuesetmember** (one-to-many) + +### Key Identifiers +- **OrderID**: LLYYMMDDXXXXX (13 characters, special format - remains string) +- **SID**: OrderID + SSS + C (17 characters, special format - remains string) +- **InternalPID**: Auto-increment internal patient identifier (int) +- **SiteID**: System-assigned site code (int) +- **AccountID**: System-assigned account identifier (int) +- **All other IDs**: Auto-increment integers (int) + +--- + +## Notes for Figma Import + +### Recommended Plugins +1. **Database Designer** - Direct import from structured format +2. **ERD (Entity Relationship Diagram)** - Visual ERD creation +3. **DrawSQL Import** - Import table definitions + +### Import Format +Most Figma ERD plugins accept: +- SQL CREATE TABLE statements +- JSON format with tables and columns +- CSV format (table_name, column_name, data_type, description) + +### Relationships to Define +1. Foreign key relationships +2. Cardinality (one-to-many, many-to-many) +3. Identifying vs non-identifying relationships +4. Optional vs mandatory participation + +--- + +*Generated from prj_3c.md documentation* +*For CLQMS Backend - CodeIgniter 4 Application* diff --git a/docs/clqms_database.dbdiagram b/docs/clqms_database.dbdiagram new file mode 100644 index 0000000..fe9bcab --- /dev/null +++ b/docs/clqms_database.dbdiagram @@ -0,0 +1,1914 @@ +{ + "version": "1.0.0", + "darkMode": true, + "gridEnabling": false, + "detailLevel": "All", + "tablePositions": [ + { + "name": "account", + "schemaName": "public", + "x": 0, + "y": 50 + }, + { + "name": "site", + "schemaName": "public", + "x": 307.74462890625, + "y": 50 + }, + { + "name": "discipline", + "schemaName": "public", + "x": 647.28466796875, + "y": 50 + }, + { + "name": "department", + "schemaName": "public", + "x": 947.24072265625, + "y": 50 + }, + { + "name": "workstation", + "schemaName": "public", + "x": 1263.6689453125, + "y": 50 + }, + { + "name": "instrument", + "schemaName": "public", + "x": 1588.75537109375, + "y": 50 + }, + { + "name": "personnel", + "schemaName": "public", + "x": 1906.2373046875, + "y": 50 + }, + { + "name": "personneldocument", + "schemaName": "public", + "x": 0, + "y": 292 + }, + { + "name": "personnelaccess", + "schemaName": "public", + "x": 307.74462890625, + "y": 324 + }, + { + "name": "location", + "schemaName": "public", + "x": 647.28466796875, + "y": 260 + }, + { + "name": "locationaddress", + "schemaName": "public", + "x": 947.24072265625, + "y": 292 + }, + { + "name": "patient", + "schemaName": "public", + "x": 1263.6689453125, + "y": 356 + }, + { + "name": "patientcontact", + "schemaName": "public", + "x": 1588.75537109375, + "y": 388 + }, + { + "name": "patientinsurance", + "schemaName": "public", + "x": 1906.2373046875, + "y": 324 + }, + { + "name": "patientvisit", + "schemaName": "public", + "x": 0, + "y": 566 + }, + { + "name": "admission", + "schemaName": "public", + "x": 307.74462890625, + "y": 566 + }, + { + "name": "admissionlocation", + "schemaName": "public", + "x": 647.28466796875, + "y": 566 + }, + { + "name": "testorder", + "schemaName": "public", + "x": 947.24072265625, + "y": 598 + }, + { + "name": "testorderdetail", + "schemaName": "public", + "x": 1263.6689453125, + "y": 822 + }, + { + "name": "specimen", + "schemaName": "public", + "x": 1588.75537109375, + "y": 630 + }, + { + "name": "specimencollection", + "schemaName": "public", + "x": 1906.2373046875, + "y": 662 + }, + { + "name": "specimentransport", + "schemaName": "public", + "x": 0, + "y": 904 + }, + { + "name": "specimenstorage", + "schemaName": "public", + "x": 307.74462890625, + "y": 1064 + }, + { + "name": "testdef", + "schemaName": "public", + "x": 647.28466796875, + "y": 808 + }, + { + "name": "testdefsite", + "schemaName": "public", + "x": 947.24072265625, + "y": 1032 + }, + { + "name": "testdeftech", + "schemaName": "public", + "x": 1263.6689453125, + "y": 1096 + }, + { + "name": "calculatedtest", + "schemaName": "public", + "x": 1588.75537109375, + "y": 1256 + }, + { + "name": "grouptest", + "schemaName": "public", + "x": 1906.2373046875, + "y": 1096 + }, + { + "name": "grouptestmember", + "schemaName": "public", + "x": 0, + "y": 1306 + }, + { + "name": "panel", + "schemaName": "public", + "x": 307.74462890625, + "y": 1402 + }, + { + "name": "panelmember", + "schemaName": "public", + "x": 647.28466796875, + "y": 1306 + }, + { + "name": "referencerangenumeric", + "schemaName": "public", + "x": 947.24072265625, + "y": 1402 + }, + { + "name": "referencerangethreshold", + "schemaName": "public", + "x": 1263.6689453125, + "y": 1402 + }, + { + "name": "referencerangetext", + "schemaName": "public", + "x": 1588.75537109375, + "y": 1594 + }, + { + "name": "calibrator", + "schemaName": "public", + "x": 1906.2373046875, + "y": 1306 + }, + { + "name": "calibration", + "schemaName": "public", + "x": 0, + "y": 1548 + }, + { + "name": "calparinst", + "schemaName": "public", + "x": 307.74462890625, + "y": 1708 + }, + { + "name": "qcmaterial", + "schemaName": "public", + "x": 647.28466796875, + "y": 1548 + }, + { + "name": "qcresult", + "schemaName": "public", + "x": 947.24072265625, + "y": 1900 + }, + { + "name": "qcstatistic", + "schemaName": "public", + "x": 1263.6689453125, + "y": 1932 + }, + { + "name": "patres", + "schemaName": "public", + "x": 1588.75537109375, + "y": 2028 + }, + { + "name": "patrestech", + "schemaName": "public", + "x": 1906.2373046875, + "y": 1612 + }, + { + "name": "patresflag", + "schemaName": "public", + "x": 0, + "y": 2046 + }, + { + "name": "resultdistribution", + "schemaName": "public", + "x": 307.74462890625, + "y": 2142 + }, + { + "name": "valuesetmember", + "schemaName": "public", + "x": 647.28466796875, + "y": 1982 + }, + { + "name": "reagent", + "schemaName": "public", + "x": 947.24072265625, + "y": 2494 + }, + { + "name": "reagentusage", + "schemaName": "public", + "x": 1263.6689453125, + "y": 2366 + }, + { + "name": "product", + "schemaName": "public", + "x": 1588.75537109375, + "y": 2558 + }, + { + "name": "inventorytransaction", + "schemaName": "public", + "x": 1906.2373046875, + "y": 1950 + }, + { + "name": "equipment", + "schemaName": "public", + "x": 0, + "y": 2288 + }, + { + "name": "equipmentmaintenance", + "schemaName": "public", + "x": 307.74462890625, + "y": 2480 + }, + { + "name": "equipmentactivity", + "schemaName": "public", + "x": 647.28466796875, + "y": 2288 + }, + { + "name": "equipmenttestcount", + "schemaName": "public", + "x": 947.24072265625, + "y": 2864 + }, + { + "name": "doctor", + "schemaName": "public", + "x": 1263.6689453125, + "y": 2736 + }, + { + "name": "contactdetail", + "schemaName": "public", + "x": 1588.75537109375, + "y": 2928 + }, + { + "name": "auditarchive", + "schemaName": "public", + "x": 1906.2373046875, + "y": 2320 + }, + { + "name": "user", + "schemaName": "public", + "x": 0, + "y": 2754 + }, + { + "name": "usersession", + "schemaName": "public", + "x": 307.74462890625, + "y": 2818 + }, + { + "name": "reporttemplate", + "schemaName": "public", + "x": 647.28466796875, + "y": 2626 + }, + { + "name": "reportoutput", + "schemaName": "public", + "x": 947.24072265625, + "y": 3138 + }, + { + "name": "hosttestmapping", + "schemaName": "public", + "x": 1263.6689453125, + "y": 3106 + }, + { + "name": "hostsynclog", + "schemaName": "public", + "x": 1588.75537109375, + "y": 3170 + } + ], + "tableGroupCollapseStates": [], + "stickyNoteLayouts": [], + "referencePaths": [ + { + "firstFieldNames": [ + "ParentAccountID" + ], + "firstTableName": "account", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "AccountID" + ], + "secondTableName": "account", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "AccountID" + ], + "firstTableName": "site", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "AccountID" + ], + "secondTableName": "account", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "DisciplineID" + ], + "firstTableName": "department", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "DisciplineID" + ], + "secondTableName": "discipline", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "workstation", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "DepartmentID" + ], + "firstTableName": "workstation", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "DepartmentID" + ], + "secondTableName": "department", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "instrument", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "WorkstationID" + ], + "firstTableName": "instrument", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "WorkstationID" + ], + "secondTableName": "workstation", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "personnel", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PersonnelID" + ], + "firstTableName": "personneldocument", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PersonnelID" + ], + "secondTableName": "personnel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PersonnelID" + ], + "firstTableName": "personnelaccess", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PersonnelID" + ], + "secondTableName": "personnel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "location", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "ParentLocationID" + ], + "firstTableName": "location", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "LocationID" + ], + "secondTableName": "location", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "LocationID" + ], + "firstTableName": "locationaddress", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "LocationID" + ], + "secondTableName": "location", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "patient", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "InternalPID" + ], + "firstTableName": "patientcontact", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "InternalPID" + ], + "secondTableName": "patient", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "InternalPID" + ], + "firstTableName": "patientinsurance", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "InternalPID" + ], + "secondTableName": "patient", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "InternalPID" + ], + "firstTableName": "patientvisit", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "InternalPID" + ], + "secondTableName": "patient", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "patientvisit", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "VisitID" + ], + "firstTableName": "admission", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "VisitID" + ], + "secondTableName": "patientvisit", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PatientID" + ], + "firstTableName": "admission", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PatientID" + ], + "secondTableName": "patient", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "admission", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "AdmissionID" + ], + "firstTableName": "admissionlocation", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "AdmissionID" + ], + "secondTableName": "admission", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "LocationID" + ], + "firstTableName": "admissionlocation", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "LocationID" + ], + "secondTableName": "location", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "testorder", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PatientID" + ], + "firstTableName": "testorder", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PatientID" + ], + "secondTableName": "patient", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "VisitID" + ], + "firstTableName": "testorder", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "VisitID" + ], + "secondTableName": "patientvisit", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "ProductionSiteID" + ], + "firstTableName": "testorder", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "OrderID" + ], + "firstTableName": "testorderdetail", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "OrderID" + ], + "secondTableName": "testorder", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "OrderID" + ], + "firstTableName": "specimen", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "OrderID" + ], + "secondTableName": "testorder", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SID" + ], + "firstTableName": "specimencollection", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SID" + ], + "secondTableName": "specimen", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "LocationID" + ], + "firstTableName": "specimencollection", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "LocationID" + ], + "secondTableName": "location", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "EquipmentID" + ], + "firstTableName": "specimencollection", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "InstrumentID" + ], + "secondTableName": "instrument", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PersonnelID" + ], + "firstTableName": "specimencollection", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PersonnelID" + ], + "secondTableName": "personnel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SID" + ], + "firstTableName": "specimentransport", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SID" + ], + "secondTableName": "specimen", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SenderID" + ], + "firstTableName": "specimentransport", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PersonnelID" + ], + "secondTableName": "personnel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "ReceiverID" + ], + "firstTableName": "specimentransport", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PersonnelID" + ], + "secondTableName": "personnel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SID" + ], + "firstTableName": "specimenstorage", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SID" + ], + "secondTableName": "specimen", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "LocationID" + ], + "firstTableName": "specimenstorage", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "LocationID" + ], + "secondTableName": "location", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "DisciplineID" + ], + "firstTableName": "testdef", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "DisciplineID" + ], + "secondTableName": "discipline", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "testdefsite", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "testdefsite", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "WorkstationID" + ], + "firstTableName": "testdefsite", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "WorkstationID" + ], + "secondTableName": "workstation", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "InstrumentID" + ], + "firstTableName": "testdefsite", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "InstrumentID" + ], + "secondTableName": "instrument", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "testdeftech", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "InstrumentID" + ], + "firstTableName": "testdeftech", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "InstrumentID" + ], + "secondTableName": "instrument", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "calculatedtest", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "GroupTestID" + ], + "firstTableName": "grouptestmember", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "GroupTestID" + ], + "secondTableName": "grouptest", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "grouptestmember", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "ParentPanelID" + ], + "firstTableName": "panel", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PanelID" + ], + "secondTableName": "panel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "DisciplineID" + ], + "firstTableName": "panel", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "DisciplineID" + ], + "secondTableName": "discipline", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PanelID" + ], + "firstTableName": "panelmember", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PanelID" + ], + "secondTableName": "panel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "panelmember", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "referencerangenumeric", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "referencerangenumeric", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "referencerangethreshold", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "referencerangethreshold", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "referencerangetext", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "referencerangetext", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "calibrator", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "InstrumentID" + ], + "firstTableName": "calibration", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "InstrumentID" + ], + "secondTableName": "instrument", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "calibration", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "CalibratorID" + ], + "firstTableName": "calibration", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "CalibratorID" + ], + "secondTableName": "calibrator", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PersonnelID" + ], + "firstTableName": "calibration", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PersonnelID" + ], + "secondTableName": "personnel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "EquipmentID" + ], + "firstTableName": "calparinst", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "InstrumentID" + ], + "secondTableName": "instrument", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "qcmaterial", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "InstrumentID" + ], + "firstTableName": "qcresult", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "InstrumentID" + ], + "secondTableName": "instrument", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "qcresult", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "QCMaterialID" + ], + "firstTableName": "qcresult", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "QCMaterialID" + ], + "secondTableName": "qcmaterial", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PersonnelID" + ], + "firstTableName": "qcresult", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PersonnelID" + ], + "secondTableName": "personnel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "InstrumentID" + ], + "firstTableName": "qcstatistic", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "InstrumentID" + ], + "secondTableName": "instrument", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "qcstatistic", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "QCMaterialID" + ], + "firstTableName": "qcstatistic", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "QCMaterialID" + ], + "secondTableName": "qcmaterial", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SID" + ], + "firstTableName": "patres", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SID" + ], + "secondTableName": "specimen", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "patres", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "OrderID" + ], + "firstTableName": "patres", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "OrderID" + ], + "secondTableName": "testorder", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PersonnelID" + ], + "firstTableName": "patres", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PersonnelID" + ], + "secondTableName": "personnel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "ResultID" + ], + "firstTableName": "patrestech", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "ResultID" + ], + "secondTableName": "patres", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "InstrumentID" + ], + "firstTableName": "patrestech", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "InstrumentID" + ], + "secondTableName": "instrument", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "ResultID" + ], + "firstTableName": "patresflag", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "ResultID" + ], + "secondTableName": "patres", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "ResultID" + ], + "firstTableName": "resultdistribution", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "ResultID" + ], + "secondTableName": "patres", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "reagent", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "InstrumentID" + ], + "firstTableName": "reagent", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "InstrumentID" + ], + "secondTableName": "instrument", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "ReagentID" + ], + "firstTableName": "reagentusage", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "ReagentID" + ], + "secondTableName": "reagent", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TestID" + ], + "firstTableName": "reagentusage", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PersonnelID" + ], + "firstTableName": "reagentusage", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PersonnelID" + ], + "secondTableName": "personnel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "product", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "LocationID" + ], + "firstTableName": "product", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "LocationID" + ], + "secondTableName": "location", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "ProductID" + ], + "firstTableName": "inventorytransaction", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "ProductID" + ], + "secondTableName": "product", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PersonnelID" + ], + "firstTableName": "inventorytransaction", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PersonnelID" + ], + "secondTableName": "personnel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "SiteID" + ], + "firstTableName": "equipment", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "SiteID" + ], + "secondTableName": "site", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "LocationID" + ], + "firstTableName": "equipment", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "LocationID" + ], + "secondTableName": "location", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "EquipmentID" + ], + "firstTableName": "equipmentmaintenance", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "EquipmentID" + ], + "secondTableName": "equipment", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "EquipmentID" + ], + "firstTableName": "equipmentactivity", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "EquipmentID" + ], + "secondTableName": "equipment", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PersonnelID" + ], + "firstTableName": "equipmentactivity", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PersonnelID" + ], + "secondTableName": "personnel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "EquipmentID" + ], + "firstTableName": "equipmenttestcount", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "EquipmentID" + ], + "secondTableName": "equipment", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PersonnelID" + ], + "firstTableName": "user", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PersonnelID" + ], + "secondTableName": "personnel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "UserID" + ], + "firstTableName": "usersession", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "UserID" + ], + "secondTableName": "user", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "DisciplineID" + ], + "firstTableName": "reporttemplate", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "DisciplineID" + ], + "secondTableName": "discipline", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "TemplateID" + ], + "firstTableName": "reportoutput", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TemplateID" + ], + "secondTableName": "reporttemplate", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "OrderID" + ], + "firstTableName": "reportoutput", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "OrderID" + ], + "secondTableName": "testorder", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "PersonnelID" + ], + "firstTableName": "reportoutput", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "PersonnelID" + ], + "secondTableName": "personnel", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + }, + { + "firstFieldNames": [ + "LocalTestID" + ], + "firstTableName": "hosttestmapping", + "firstSchemaName": "public", + "firstRelation": "*", + "secondFieldNames": [ + "TestID" + ], + "secondTableName": "testdef", + "secondSchemaName": "public", + "secondRelation": "1", + "checkPoints": [] + } + ] +} \ No newline at end of file diff --git a/docs/clqms_database.dbml b/docs/clqms_database.dbml new file mode 100644 index 0000000..e4fe546 --- /dev/null +++ b/docs/clqms_database.dbml @@ -0,0 +1,854 @@ +// CLQMS Database Schema +// Generated from ERD_EXTRACT.md +// Database Markup Language (DBML) for dbdiagram.io and other tools + +// ============================================ +// TABLE 1: Organization Structure +// ============================================ + +Table account { + AccountID int [pk] + AccountName varchar(255) + ParentAccountID int + CreateDate datetime + EndDate datetime +} + +Table site { + SiteID int [pk] + AccountID int + SiteName varchar(255) + Location varchar(255) + CreateDate datetime + EndDate datetime +} + +Table discipline { + DisciplineID int [pk] + DisciplineName varchar(255) + CreateDate datetime + EndDate datetime +} + +Table department { + DepartmentID int [pk] + DepartmentName varchar(255) + DisciplineID int + CreateDate datetime + EndDate datetime +} + +Table workstation { + WorkstationID int [pk] + SiteID int + DepartmentID int + WorkstationName varchar(255) + LocalDB boolean + CreateDate datetime + EndDate datetime +} + +Table instrument { + InstrumentID int [pk] + SiteID int + WorkstationID int + InstrumentAlias varchar(255) + InstrumentName varchar(255) + InstrumentType varchar(255) + CreateDate datetime + EndDate datetime +} + +Table personnel { + PersonnelID int [pk] + SiteID int + PersonnelName varchar(255) + Position varchar(255) + CreateDate datetime + EndDate datetime +} + +Table personneldocument { + DocID int [pk] + PersonnelID int + DocType varchar(255) + DocFile blob + ExpiryDate datetime + CreateDate datetime +} + +Table personnelaccess { + AccessID int [pk] + PersonnelID int + Role varchar(255) + Permissions text + CreateDate datetime +} + +Table location { + LocationID int [pk] + SiteID int + ParentLocationID int + LocationTypeID int + LocationName varchar(255) + CreateDate datetime + EndDate datetime +} + +Table locationaddress { + AddressID int [pk] + LocationID int + AddressLine1 varchar(255) + AddressLine2 varchar(255) + City varchar(100) + PostalCode varchar(20) + CreateDate datetime +} + +Table patient { + PatientID int [pk] + SiteID int + InternalPID int + FirstName varchar(255) + LastName varchar(255) + DateOfBirth datetime + Sex varchar(10) + Race varchar(50) + Ethnicity varchar(50) + Religion varchar(50) + CreateDate datetime + DelDate datetime +} + +Table patientcontact { + ContactID int [pk] + InternalPID int + ContactType varchar(50) + ContactValue varchar(255) + CreateDate datetime +} + +Table patientinsurance { + InsuranceID int [pk] + InternalPID int + InsuranceProvider varchar(255) + PolicyNumber varchar(100) + GroupNumber varchar(100) + EffectiveDate datetime + ExpiryDate datetime + CreateDate datetime +} + +Table patientvisit { + VisitID int [pk] + InternalPID int + SiteID int + VisitClass varchar(50) + VisitType varchar(50) + VisitDate datetime + DischargeDate datetime + CreateDate datetime +} + +Table admission { + AdmissionID int [pk] + VisitID int + PatientID int + SiteID int + AdmissionDate datetime + DischargeDate datetime + ADTCode varchar(50) + ReferringParty varchar(255) + BillingAccount varchar(255) + AttendingDoctor varchar(255) + ReferringDoctor varchar(255) + VitalSigns text + CreateDate datetime +} + +Table admissionlocation { + ID int [pk] + AdmissionID int + LocationID int + TransferDate datetime + CreateDate datetime +} + +Table testorder { + OrderID varchar(13) [pk] + SiteID int + PatientID int + VisitID int + OrderDate datetime + Urgency varchar(50) + Status varchar(50) + OrderingProvider varchar(255) + ProductionSiteID int + CreateDate datetime + EndDate datetime +} + +Table testorderdetail { + OrderDetailID int [pk] + OrderID varchar(13) + TestID int + Priority int + Status varchar(50) + CreateDate datetime +} + +Table specimen { + SID varchar(17) [pk] + OrderID varchar(13) + SpecimenDefID int + ParentSID varchar(17) + SpecimenType varchar(50) + SpecimenRole varchar(50) + CollectionDate datetime + CollectionSite int + CollectedBy int + ContainerType varchar(50) + Additive varchar(50) + CollectionMethod varchar(50) + BodySite varchar(50) + SpecimenCondition varchar(50) + Status varchar(50) + CreateDate datetime + EndDate datetime +} + +Table specimencollection { + ID int [pk] + SID varchar(17) + Activity varchar(50) + ActivityName varchar(100) + ActRes varchar(50) + LocationID int + EquipmentID int + PersonnelID int + ActivityDate datetime + Notes text + CreateDate datetime +} + +Table specimentransport { + TransportID int [pk] + SID varchar(17) + SenderID int + ReceiverID int + TransportDate datetime + Condition text + PackagingID varchar(50) + FromLocation int + ToLocation int + CreateDate datetime +} + +Table specimenstorage { + StorageID int [pk] + SID varchar(17) + LocationID int + StorageTemperature decimal(10,2) + StorageDate datetime + ThawCount int + ExpiryDate datetime + CreateDate datetime +} + +Table testdef { + TestID int [pk] + TestName varchar(255) + TestCode varchar(50) + LOINCCode varchar(50) + TestType varchar(50) + DisciplineID int + SpecimenTypeID int + ContainerTypeID int + ResultType varchar(50) + ResultUnit varchar(50) + Methodology varchar(255) + CreateDate datetime + EndDate datetime +} + +Table testdefsite { + ID int [pk] + TestID int + SiteID int + TestNameLocal varchar(255) + TestCodeLocal varchar(50) + WorkstationID int + InstrumentID int + Active boolean + CreateDate datetime +} + +Table testdeftech { + ID int [pk] + TestID int + InstrumentID int + InstrumentTestCode varchar(50) + TestMapping varchar(255) + Active boolean + CreateDate datetime +} + +Table calculatedtest { + CalculatedTestID int [pk] + TestID int + Formula text + ParamTestID1 int + ParamTestID2 int + ParamTestID3 int + ParamTestID4 int + CreateDate datetime +} + +Table grouptest { + GroupTestID int [pk] + GroupTestName varchar(255) + GroupTestType varchar(50) + CreateDate datetime +} + +Table grouptestmember { + ID int [pk] + GroupTestID int + TestID int + Sequence int + CreateDate datetime +} + +Table panel { + PanelID int [pk] + PanelName varchar(255) + PanelType varchar(50) + ParentPanelID int + DisciplineID int + CreateDate datetime + EndDate datetime +} + +Table panelmember { + ID int [pk] + PanelID int + TestID int + Sequence int + CreateDate datetime +} + +Table referencerangenumeric { + RefRangeID int [pk] + TestID int + AgeFrom int + AgeTo int + Sex varchar(10) + LowValue decimal(10,2) + HighValue decimal(10,2) + Unit varchar(20) + SpecimenTypeID int + SiteID int + EffectiveDate datetime + ExpiryDate datetime + CreateDate datetime +} + +Table referencerangethreshold { + RefRangeID int [pk] + TestID int + AgeFrom int + AgeTo int + Sex varchar(10) + CutOffLow decimal(10,2) + CutOffHigh decimal(10,2) + GrayZoneLow decimal(10,2) + GrayZoneHigh decimal(10,2) + SpecimenTypeID int + SiteID int + EffectiveDate datetime + ExpiryDate datetime + CreateDate datetime +} + +Table referencerangetext { + RefRangeID int [pk] + TestID int + AgeFrom int + AgeTo int + Sex varchar(10) + TextValue text + SpecimenTypeID int + SiteID int + EffectiveDate datetime + ExpiryDate datetime + CreateDate datetime +} + +Table calibrator { + CalibratorID int [pk] + CalibratorName varchar(255) + Manufacturer varchar(255) + LotNumber varchar(50) + ExpiryDate datetime + TestID int + CreateDate datetime +} + +Table calibration { + CalibrationID int [pk] + InstrumentID int + TestID int + CalibratorID int + Level int + CalibrationDate datetime + Factor decimal(10,4) + Absorbance decimal(10,4) + TargetValue decimal(10,4) + TargetUnit varchar(20) + PersonnelID int + Status varchar(50) + CreateDate datetime +} + +Table calparinst { + CalParInstID int [pk] + EquipmentID int + Calibrator varchar(255) + LotNo varchar(50) + ExpiryDate datetime + TestInstID1 int + SampleType varchar(50) + Level int + Concentration decimal(10,4) + CalUnit varchar(20) + CreateDate datetime +} + +Table qcmaterial { + QCMaterialID int [pk] + MaterialName varchar(255) + Manufacturer varchar(255) + LotNumber varchar(50) + ExpiryDate datetime + Level int + TestID int + TargetMean decimal(10,4) + TargetSD decimal(10,4) + TargetCV decimal(10,4) + CreateDate datetime +} + +Table qcresult { + QCResultID int [pk] + InstrumentID int + TestID int + QCMaterialID int + Level int + QCDate datetime + ResultValue decimal(10,4) + Mean decimal(10,4) + SD decimal(10,4) + CV decimal(10,4) + Sigma decimal(10,4) + ZScore decimal(10,4) + Flag varchar(10) + PersonnelID int + Status varchar(50) + CreateDate datetime +} + +Table qcstatistic { + StatisticID int [pk] + InstrumentID int + TestID int + QCMaterialID int + Level int + StatisticDate datetime + Mean decimal(10,4) + SD decimal(10,4) + CV decimal(10,4) + SampleSize int + CreateDate datetime +} + +Table patres { + ResultID int [pk] + SID varchar(17) + TestID int + OrderID varchar(13) + ResultValue varchar(100) + ResultNumeric decimal(15,5) + ResultText text + ResultUnit varchar(20) + ResultStatus varchar(50) + PersonnelID int + VerificationDate datetime + VerificationPersonnel int + CreateDate datetime + EndDate datetime +} + +Table patrestech { + TechResultID int [pk] + ResultID int + InstrumentID int + RawResult text + ResultDate datetime + RerunCount int + Dilution decimal(10,4) + CreateDate datetime +} + +Table patresflag { + FlagID int [pk] + ResultID int + FlagType varchar(10) + FlagDescription varchar(255) + CreateDate datetime +} + +Table resultdistribution { + DistributionID int [pk] + ResultID int + RecipientType varchar(50) + RecipientID int + DistributionDate datetime + DistributionMethod varchar(50) + Status varchar(50) + CreateDate datetime +} + +Table valuesetmember { + MemberID int [pk] + ValueSetID int + MemberCode varchar(50) + MemberValue varchar(255) + DisplayOrder int + Active boolean + CreateDate datetime +} + +Table reagent { + ReagentID int [pk] + ReagentName varchar(255) + Manufacturer varchar(255) + CatalogNumber varchar(100) + LotNumber varchar(50) + ExpiryDate datetime + TestID int + InstrumentID int + CreateDate datetime +} + +Table reagentusage { + UsageID int [pk] + ReagentID int + TestID int + UsageDate datetime + QuantityUsed decimal(10,2) + PersonnelID int + OrderID varchar(13) + SID varchar(17) + CreateDate datetime +} + +Table product { + ProductID int [pk] + CatalogID int + SiteID int + LotNumber varchar(50) + ExpiryDate datetime + Quantity int + ReorderLevel int + LocationID int + CreateDate datetime +} + +Table inventorytransaction { + TransactionID int [pk] + ProductID int + TransactionType varchar(50) + Quantity int + TransactionDate datetime + PersonnelID int + ReferenceID varchar(100) + Notes text + CreateDate datetime +} + +Table equipment { + EquipmentID int [pk] + EquipmentName varchar(255) + EquipmentType varchar(50) + Manufacturer varchar(255) + Model varchar(100) + SerialNumber varchar(100) + SiteID int + LocationID int + Status varchar(50) + InstallDate datetime + DecommissionDate datetime + CreateDate datetime +} + +Table equipmentmaintenance { + MaintenanceID int [pk] + EquipmentID int + MaintenanceType varchar(100) + MaintenanceDate datetime + Description text + PerformedBy varchar(255) + NextMaintenanceDate datetime + CreateDate datetime +} + +Table equipmentactivity { + ActivityID int [pk] + EquipmentID int + ActivityType varchar(100) + ActivityDate datetime + ActivityResult varchar(50) + PersonnelID int + Notes text + CreateDate datetime +} + +Table equipmenttestcount { + ID int [pk] + EquipmentID int + TestDate datetime + TestType varchar(50) + TestCount int + CreateDate datetime +} + +Table doctor { + DoctorID int [pk] + DoctorName varchar(255) + DoctorCode varchar(50) + Specialty varchar(100) + SIP varchar(50) + PracticeLocation varchar(255) + ContactID int + CreateDate datetime + EndDate datetime +} + +Table contactdetail { + DetailID int [pk] + ContactID int + DetailType varchar(50) + DetailValue varchar(255) + CreateDate datetime +} + +Table auditarchive { + ArchiveID int [pk] + AuditID int + ArchiveDate datetime + ArchiveLocation varchar(255) + CreateDate datetime +} + +Table user { + UserID int [pk] + Username varchar(100) + PasswordHash varchar(255) + PersonnelID int + Role varchar(50) + Status varchar(20) + LastLogin datetime + CreateDate datetime +} + +Table usersession { + SessionID int [pk] + UserID int + SessionToken varchar(255) + ExpiryDate datetime + IPAddress varchar(50) + CreateDate datetime +} + +Table reporttemplate { + TemplateID int [pk] + TemplateName varchar(255) + TemplateType varchar(50) + DisciplineID int + TemplateConfig text + CreateDate datetime + EndDate datetime +} + +Table reportoutput { + OutputID int [pk] + TemplateID int + OrderID varchar(13) + OutputFormat varchar(50) + OutputData blob + GeneratedDate datetime + PersonnelID int + CreateDate datetime +} + +Table hosttestmapping { + MappingID int [pk] + HostID int + HostTestCode varchar(50) + LocalTestID int + CreateDate datetime +} + +Table hostsynclog { + LogID int [pk] + HostID int + SyncDate datetime + RecordsProcessed int + Errors int + Status varchar(20) + Details text + CreateDate datetime +} + +// ============================================ +// RELATIONSHIPS +// ============================================ + +// Organization Structure +Ref: account.ParentAccountID > account.AccountID [delete: cascade] +Ref: site.AccountID > account.AccountID +Ref: department.DisciplineID > discipline.DisciplineID +Ref: workstation.SiteID > site.SiteID +Ref: workstation.DepartmentID > department.DepartmentID +Ref: instrument.SiteID > site.SiteID +Ref: instrument.WorkstationID > workstation.WorkstationID + +// Personnel +Ref: personnel.SiteID > site.SiteID +Ref: personneldocument.PersonnelID > personnel.PersonnelID +Ref: personnelaccess.PersonnelID > personnel.PersonnelID + +// Location Management +Ref: location.SiteID > site.SiteID +Ref: location.ParentLocationID > location.LocationID +Ref: locationaddress.LocationID > location.LocationID + +// Patient Registration +Ref: patient.SiteID > site.SiteID +Ref: patientcontact.InternalPID > patient.InternalPID +Ref: patientinsurance.InternalPID > patient.InternalPID +Ref: patientvisit.InternalPID > patient.InternalPID +Ref: patientvisit.SiteID > site.SiteID + +// Patient Admission +Ref: admission.VisitID > patientvisit.VisitID +Ref: admission.PatientID > patient.PatientID +Ref: admission.SiteID > site.SiteID +Ref: admissionlocation.AdmissionID > admission.AdmissionID +Ref: admissionlocation.LocationID > location.LocationID + +// Test Ordering +Ref: testorder.SiteID > site.SiteID +Ref: testorder.PatientID > patient.PatientID +Ref: testorder.VisitID > patientvisit.VisitID +Ref: testorder.ProductionSiteID > site.SiteID +Ref: testorderdetail.OrderID > testorder.OrderID + +// Specimen Management +Ref: specimen.OrderID > testorder.OrderID +Ref: specimencollection.SID > specimen.SID +Ref: specimencollection.LocationID > location.LocationID +Ref: specimencollection.EquipmentID > instrument.InstrumentID +Ref: specimencollection.PersonnelID > personnel.PersonnelID +Ref: specimentransport.SID > specimen.SID +Ref: specimentransport.SenderID > personnel.PersonnelID +Ref: specimentransport.ReceiverID > personnel.PersonnelID +Ref: specimenstorage.SID > specimen.SID +Ref: specimenstorage.LocationID > location.LocationID + +// Test Management +Ref: testdef.DisciplineID > discipline.DisciplineID +Ref: testdefsite.TestID > testdef.TestID +Ref: testdefsite.SiteID > site.SiteID +Ref: testdefsite.WorkstationID > workstation.WorkstationID +Ref: testdefsite.InstrumentID > instrument.InstrumentID +Ref: testdeftech.TestID > testdef.TestID +Ref: testdeftech.InstrumentID > instrument.InstrumentID +Ref: calculatedtest.TestID > testdef.TestID +Ref: grouptestmember.GroupTestID > grouptest.GroupTestID +Ref: grouptestmember.TestID > testdef.TestID +Ref: panel.ParentPanelID > panel.PanelID +Ref: panel.DisciplineID > discipline.DisciplineID +Ref: panelmember.PanelID > panel.PanelID +Ref: panelmember.TestID > testdef.TestID + +// Reference Range +Ref: referencerangenumeric.TestID > testdef.TestID +Ref: referencerangenumeric.SiteID > site.SiteID +Ref: referencerangethreshold.TestID > testdef.TestID +Ref: referencerangethreshold.SiteID > site.SiteID +Ref: referencerangetext.TestID > testdef.TestID +Ref: referencerangetext.SiteID > site.SiteID + +// Calibration +Ref: calibrator.TestID > testdef.TestID +Ref: calibration.InstrumentID > instrument.InstrumentID +Ref: calibration.TestID > testdef.TestID +Ref: calibration.CalibratorID > calibrator.CalibratorID +Ref: calibration.PersonnelID > personnel.PersonnelID +Ref: calparinst.EquipmentID > instrument.InstrumentID + +// Quality Control +Ref: qcmaterial.TestID > testdef.TestID +Ref: qcresult.InstrumentID > instrument.InstrumentID +Ref: qcresult.TestID > testdef.TestID +Ref: qcresult.QCMaterialID > qcmaterial.QCMaterialID +Ref: qcresult.PersonnelID > personnel.PersonnelID +Ref: qcstatistic.InstrumentID > instrument.InstrumentID +Ref: qcstatistic.TestID > testdef.TestID +Ref: qcstatistic.QCMaterialID > qcmaterial.QCMaterialID + +// Test Results +Ref: patres.SID > specimen.SID +Ref: patres.TestID > testdef.TestID +Ref: patres.OrderID > testorder.OrderID +Ref: patres.PersonnelID > personnel.PersonnelID +Ref: patrestech.ResultID > patres.ResultID +Ref: patrestech.InstrumentID > instrument.InstrumentID +Ref: patresflag.ResultID > patres.ResultID +Ref: resultdistribution.ResultID > patres.ResultID + +// Reagent & Inventory +Ref: reagent.TestID > testdef.TestID +Ref: reagent.InstrumentID > instrument.InstrumentID +Ref: reagentusage.ReagentID > reagent.ReagentID +Ref: reagentusage.TestID > testdef.TestID +Ref: reagentusage.PersonnelID > personnel.PersonnelID + +Ref: product.SiteID > site.SiteID +Ref: product.LocationID > location.LocationID +Ref: inventorytransaction.ProductID > product.ProductID +Ref: inventorytransaction.PersonnelID > personnel.PersonnelID + +// Equipment Management +Ref: equipment.SiteID > site.SiteID +Ref: equipment.LocationID > location.LocationID +Ref: equipmentmaintenance.EquipmentID > equipment.EquipmentID +Ref: equipmentactivity.EquipmentID > equipment.EquipmentID +Ref: equipmentactivity.PersonnelID > personnel.PersonnelID +Ref: equipmenttestcount.EquipmentID > equipment.EquipmentID + + +// User & Authentication +Ref: user.PersonnelID > personnel.PersonnelID +Ref: usersession.UserID > user.UserID + +// Visualization & Reporting +Ref: reporttemplate.DisciplineID > discipline.DisciplineID +Ref: reportoutput.TemplateID > reporttemplate.TemplateID +Ref: reportoutput.OrderID > testorder.OrderID +Ref: reportoutput.PersonnelID > personnel.PersonnelID + +// Host System Integration +Ref: hosttestmapping.LocalTestID > testdef.TestID + diff --git a/docs/openapi.yaml b/docs/openapi.yaml new file mode 100644 index 0000000..9000ef3 --- /dev/null +++ b/docs/openapi.yaml @@ -0,0 +1,3287 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "CLQMS API", + "description": "Clinical Laboratory Quality Management System REST API", + "version": "1.0.0", + "contact": { + "name": "CLQMS Development Team" + } + }, + "servers": [ + { + "url": "http://localhost/clqms01/", + "description": "Development server" + } + ], + "components": { + "securitySchemes": { + "jwtAuth": { + "type": "apiKey", + "in": "cookie", + "name": "token", + "description": "JWT token stored in HTTP-only cookie" + } + }, + "schemas": { + "ApiResponse": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["success", "failed"], + "description": "Response status" + }, + "message": { + "type": "string", + "description": "Response message" + }, + "data": { + "type": "object", + "description": "Response data payload" + } + } + }, + "Patient": { + "type": "object", + "properties": { + "InternalPID": { + "type": "integer", + "description": "Internal patient ID" + }, + "PatientID": { + "type": "string", + "maxLength": 30, + "description": "Patient identifier" + }, + "AlternatePID": { + "type": "string", + "maxLength": 30, + "description": "Alternate patient ID" + }, + "Prefix": { + "type": "string", + "maxLength": 10, + "description": "Name prefix" + }, + "NameFirst": { + "type": "string", + "minLength": 1, + "maxLength": 60, + "description": "First name" + }, + "NameMiddle": { + "type": "string", + "minLength": 1, + "maxLength": 60, + "description": "Middle name" + }, + "NameLast": { + "type": "string", + "minLength": 1, + "maxLength": 60, + "description": "Last name" + }, + "NameMaiden": { + "type": "string", + "minLength": 1, + "maxLength": 60, + "description": "Maiden name" + }, + "Suffix": { + "type": "string", + "maxLength": 10, + "description": "Name suffix" + }, + "Sex": { + "type": "string", + "description": "Gender (M/F)" + }, + "Birthdate": { + "type": "string", + "format": "date", + "description": "Date of birth" + }, + "PlaceOfBirth": { + "type": "string", + "maxLength": 100, + "description": "Place of birth" + }, + "Street_1": { + "type": "string", + "maxLength": 255, + "description": "Address line 1" + }, + "Street_2": { + "type": "string", + "maxLength": 255, + "description": "Address line 2" + }, + "Street_3": { + "type": "string", + "maxLength": 255, + "description": "Address line 3" + }, + "City": { + "type": "string", + "description": "City" + }, + "Province": { + "type": "string", + "description": "Province/State" + }, + "ZIP": { + "type": "string", + "maxLength": 10, + "description": "Postal code" + }, + "EmailAddress1": { + "type": "string", + "format": "email", + "maxLength": 100, + "description": "Primary email" + }, + "EmailAddress2": { + "type": "string", + "format": "email", + "maxLength": 100, + "description": "Secondary email" + }, + "Phone": { + "type": "string", + "pattern": "^\\+?[0-9]{8,15}$", + "description": "Phone number" + }, + "MobilePhone": { + "type": "string", + "pattern": "^\\+?[0-9]{8,15}$", + "description": "Mobile phone number" + }, + "PatIdt": { + "$ref": "#/components/schemas/PatientIdentifier" + }, + "PatAtt": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PatientAttribute" + }, + "description": "Patient attributes/addresses" + } + } + }, + "PatientIdentifier": { + "type": "object", + "properties": { + "IdentifierType": { + "type": "string", + "description": "Identifier type (KTP, PASS, SSN, SIM, KTAS)" + }, + "Identifier": { + "type": "string", + "maxLength": 255, + "description": "Identifier value" + } + } + }, + "PatientAttribute": { + "type": "object", + "properties": { + "Address": { + "type": "string", + "description": "Patient address" + } + } + }, + "PatVisit": { + "type": "object", + "properties": { + "PatVisitID": { + "type": "integer", + "description": "Patient visit ID" + }, + "InternalPID": { + "type": "integer", + "description": "Internal patient ID" + }, + "VisitDate": { + "type": "string", + "format": "date-time", + "description": "Visit date/time" + }, + "VisitType": { + "type": "string", + "description": "Type of visit" + }, + "DepartmentID": { + "type": "integer", + "description": "Department ID" + }, + "ProviderID": { + "type": "integer", + "description": "Provider/Doctor ID" + }, + "VisitStatus": { + "type": "string", + "description": "Visit status" + } + } + }, + "OrderTest": { + "type": "object", + "properties": { + "OrderID": { + "type": "integer", + "description": "Order ID" + }, + "InternalPID": { + "type": "integer", + "description": "Patient ID" + }, + "PatVisitID": { + "type": "integer", + "description": "Visit ID" + }, + "OrderDateTime": { + "type": "string", + "format": "date-time", + "description": "Order date/time" + }, + "Priority": { + "type": "string", + "description": "Order priority" + }, + "OrderStatus": { + "type": "string", + "enum": ["ORD", "SCH", "ANA", "VER", "REV", "REP"], + "description": "Order status" + }, + "OrderingProvider": { + "type": "string", + "description": "Ordering provider" + }, + "DepartmentID": { + "type": "integer", + "description": "Department ID" + }, + "WorkstationID": { + "type": "integer", + "description": "Workstation ID" + }, + "Tests": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrderTestItem" + } + } + } + }, + "OrderTestItem": { + "type": "object", + "properties": { + "TestID": { + "type": "integer", + "description": "Test ID" + }, + "TestCode": { + "type": "string", + "description": "Test code" + }, + "TestName": { + "type": "string", + "description": "Test name" + } + } + }, + "Specimen": { + "type": "object", + "properties": { + "SID": { + "type": "integer", + "description": "Specimen ID" + }, + "OrderID": { + "type": "integer", + "description": "Order ID" + }, + "InternalPID": { + "type": "integer", + "description": "Patient ID" + }, + "SpecimenType": { + "type": "string", + "description": "Specimen type" + }, + "ContainerCode": { + "type": "string", + "description": "Container code" + }, + "CollectionDateTime": { + "type": "string", + "format": "date-time", + "description": "Collection date/time" + }, + "ReceivedDateTime": { + "type": "string", + "format": "date-time", + "description": "Received date/time" + }, + "Status": { + "type": "string", + "description": "Specimen status" + } + } + }, + "TestDefinition": { + "type": "object", + "properties": { + "TestID": { + "type": "integer", + "description": "Test ID" + }, + "TestCode": { + "type": "string", + "description": "Test code" + }, + "TestName": { + "type": "string", + "description": "Test name" + }, + "SpecimenType": { + "type": "string", + "description": "Required specimen type" + }, + "DepartmentID": { + "type": "integer", + "description": "Department ID" + }, + "Category": { + "type": "string", + "description": "Test category" + } + } + }, + "ValueSet": { + "type": "object", + "properties": { + "ValueSetID": { + "type": "integer", + "description": "Value set ID" + }, + "ValueSetKey": { + "type": "string", + "description": "Value set key" + }, + "Name": { + "type": "string", + "description": "Value set name" + }, + "Description": { + "type": "string", + "description": "Value set description" + }, + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ValueSetItem" + } + } + } + }, + "ValueSetItem": { + "type": "object", + "properties": { + "ItemID": { + "type": "integer", + "description": "Item ID" + }, + "Value": { + "type": "string", + "description": "Item value/code" + }, + "Label": { + "type": "string", + "description": "Item display label" + }, + "Sequence": { + "type": "integer", + "description": "Display order" + } + } + }, + "ValueSetDef": { + "type": "object", + "properties": { + "VSetDefID": { + "type": "integer", + "description": "Value set definition ID" + }, + "ValueSetKey": { + "type": "string", + "description": "Value set key" + }, + "Name": { + "type": "string", + "description": "Definition name" + } + } + }, + "Location": { + "type": "object", + "properties": { + "LocationID": { + "type": "integer", + "description": "Location ID" + }, + "Code": { + "type": "string", + "description": "Location code" + }, + "Name": { + "type": "string", + "description": "Location name" + }, + "Type": { + "type": "string", + "description": "Location type" + }, + "ParentID": { + "type": "integer", + "description": "Parent location ID" + } + } + }, + "Contact": { + "type": "object", + "properties": { + "ContactID": { + "type": "integer", + "description": "Contact ID" + }, + "Name": { + "type": "string", + "description": "Contact name" + }, + "Type": { + "type": "string", + "description": "Contact type" + }, + "Phone": { + "type": "string", + "description": "Phone number" + }, + "Email": { + "type": "string", + "format": "email", + "description": "Email address" + } + } + }, + "Organization": { + "type": "object", + "properties": { + "AccountID": { + "type": "integer", + "description": "Account ID" + }, + "AccountCode": { + "type": "string", + "description": "Account code" + }, + "AccountName": { + "type": "string", + "description": "Account name" + } + } + }, + "Site": { + "type": "object", + "properties": { + "SiteID": { + "type": "integer", + "description": "Site ID" + }, + "SiteCode": { + "type": "string", + "description": "Site code" + }, + "SiteName": { + "type": "string", + "description": "Site name" + }, + "AccountID": { + "type": "integer", + "description": "Account ID" + } + } + }, + "Department": { + "type": "object", + "properties": { + "DepartmentID": { + "type": "integer", + "description": "Department ID" + }, + "DepartmentCode": { + "type": "string", + "description": "Department code" + }, + "DepartmentName": { + "type": "string", + "description": "Department name" + }, + "SiteID": { + "type": "integer", + "description": "Site ID" + } + } + }, + "Discipline": { + "type": "object", + "properties": { + "DisciplineID": { + "type": "integer", + "description": "Discipline ID" + }, + "DisciplineCode": { + "type": "string", + "description": "Discipline code" + }, + "DisciplineName": { + "type": "string", + "description": "Discipline name" + } + } + }, + "Workstation": { + "type": "object", + "properties": { + "WorkstationID": { + "type": "integer", + "description": "Workstation ID" + }, + "WorkstationCode": { + "type": "string", + "description": "Workstation code" + }, + "WorkstationName": { + "type": "string", + "description": "Workstation name" + }, + "DepartmentID": { + "type": "integer", + "description": "Department ID" + } + } + }, + "AreaGeo": { + "type": "object", + "properties": { + "AreaGeoID": { + "type": "integer", + "description": "Area ID" + }, + "ParentID": { + "type": "integer", + "description": "Parent area ID" + }, + "AreaName": { + "type": "string", + "description": "Area name" + }, + "Level": { + "type": "integer", + "description": "Geographic level" + } + } + }, + "SpecimenContainerDef": { + "type": "object", + "properties": { + "ContainerDefID": { + "type": "integer", + "description": "Container definition ID" + }, + "ContainerCode": { + "type": "string", + "description": "Container code" + }, + "ContainerName": { + "type": "string", + "description": "Container name" + }, + "Volume": { + "type": "string", + "description": "Required volume" + }, + "SpecimenType": { + "type": "string", + "description": "Specimen type" + } + } + }, + "SpecimenPrep": { + "type": "object", + "properties": { + "PrepID": { + "type": "integer", + "description": "Preparation ID" + }, + "PrepCode": { + "type": "string", + "description": "Preparation code" + }, + "PrepName": { + "type": "string", + "description": "Preparation name" + } + } + }, + "SpecimenStatus": { + "type": "object", + "properties": { + "StatusID": { + "type": "integer", + "description": "Status ID" + }, + "StatusCode": { + "type": "string", + "description": "Status code" + }, + "StatusName": { + "type": "string", + "description": "Status name" + } + } + }, + "Counter": { + "type": "object", + "properties": { + "CounterID": { + "type": "integer", + "description": "Counter ID" + }, + "CounterName": { + "type": "string", + "description": "Counter name" + }, + "CounterValue": { + "type": "integer", + "description": "Current counter value" + }, + "CounterPrefix": { + "type": "string", + "description": "Counter prefix" + }, + "CounterSuffix": { + "type": "string", + "description": "Counter suffix" + } + } + }, + "Error": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["failed"], + "description": "Error status" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "LoginRequest": { + "type": "object", + "required": ["username", "password"], + "properties": { + "username": { + "type": "string", + "description": "Username" + }, + "password": { + "type": "string", + "format": "password", + "description": "Password" + } + } + }, + "LoginResponse": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["success"] + }, + "code": { + "type": "integer", + "description": "HTTP status code" + }, + "message": { + "type": "string", + "description": "Response message" + } + } + } + } + }, + "security": [ + { + "jwtAuth": [] + } + ], + "paths": { + "/v2/auth/login": { + "post": { + "tags": ["Authentication"], + "summary": "User login", + "description": "Authenticate user and receive JWT token in HTTP-only cookie", + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/LoginRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Login successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginResponse" + } + } + } + }, + "401": { + "description": "Invalid credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v2/auth/logout": { + "post": { + "tags": ["Authentication"], + "summary": "User logout", + "description": "Clear JWT token cookie", + "responses": { + "200": { + "description": "Logout successful" + } + } + } + }, + "/v2/auth/check": { + "get": { + "tags": ["Authentication"], + "summary": "Check authentication status", + "description": "Verify if JWT token is valid", + "responses": { + "200": { + "description": "Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResponse" + } + } + } + }, + "401": { + "description": "Not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/api/auth/login": { + "post": { + "tags": ["Authentication"], + "summary": "User login (legacy)", + "description": "Authenticate user and receive JWT token in HTTP-only cookie", + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/LoginRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Login successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginResponse" + } + } + } + }, + "401": { + "description": "Invalid credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/api/auth/register": { + "post": { + "tags": ["Authentication"], + "summary": "Register new user", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["username", "password"], + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string", + "format": "password" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "User created successfully" + }, + "409": { + "description": "Username already exists" + } + } + } + }, + "/api/patient": { + "get": { + "tags": ["Patient"], + "summary": "List patients", + "description": "Get list of patients with optional filtering", + "parameters": [ + { + "name": "InternalPID", + "in": "query", + "schema": { + "type": "integer" + } + }, + { + "name": "PatientID", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "Name", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "Birthdate", + "in": "query", + "schema": { + "type": "string", + "format": "date" + } + } + ], + "responses": { + "200": { + "description": "List of patients", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResponse" + } + } + } + } + } + }, + "post": { + "tags": ["Patient"], + "summary": "Create patient", + "description": "Create a new patient record", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Patient" + } + } + } + }, + "responses": { + "201": { + "description": "Patient created successfully" + }, + "400": { + "description": "Validation error" + } + } + }, + "patch": { + "tags": ["Patient"], + "summary": "Update patient", + "description": "Update an existing patient record", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Patient" + } + } + } + }, + "responses": { + "200": { + "description": "Patient updated successfully" + }, + "400": { + "description": "Validation error" + } + } + }, + "delete": { + "tags": ["Patient"], + "summary": "Delete patient (soft delete)", + "description": "Soft delete a patient record", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["InternalPID"], + "properties": { + "InternalPID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Patient deleted successfully" + }, + "400": { + "description": "Invalid patient ID" + }, + "404": { + "description": "Patient not found" + } + } + } + }, + "/api/patient/{InternalPID}": { + "get": { + "tags": ["Patient"], + "summary": "Get patient by ID", + "parameters": [ + { + "name": "InternalPID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Patient details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResponse" + } + } + } + } + } + } + }, + "/api/patient/check": { + "get": { + "tags": ["Patient"], + "summary": "Check patient existence", + "parameters": [ + { + "name": "PatientID", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "EmailAddress1", + "in": "query", + "schema": { + "type": "string", + "format": "email" + } + } + ], + "responses": { + "200": { + "description": "Check result", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "message": { + "type": "string" + }, + "data": { + "type": "boolean", + "description": "true if not exists (available), false if exists" + } + } + } + } + } + }, + "400": { + "description": "Missing required parameter" + } + } + } + }, + "/api/patvisit": { + "get": { + "tags": ["Patient Visit"], + "summary": "List patient visits", + "responses": { + "200": { + "description": "List of visits" + } + } + }, + "post": { + "tags": ["Patient Visit"], + "summary": "Create patient visit", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatVisit" + } + } + } + }, + "responses": { + "201": { + "description": "Visit created successfully" + } + } + }, + "patch": { + "tags": ["Patient Visit"], + "summary": "Update patient visit", + "responses": { + "200": { + "description": "Visit updated successfully" + } + } + }, + "delete": { + "tags": ["Patient Visit"], + "summary": "Delete patient visit (soft delete)", + "responses": { + "200": { + "description": "Visit deleted successfully" + } + } + } + }, + "/api/patvisit/patient/{InternalPID}": { + "get": { + "tags": ["Patient Visit"], + "summary": "Get visits by patient", + "parameters": [ + { + "name": "InternalPID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "List of patient visits" + } + } + } + }, + "/api/patvisit/{PatVisitID}": { + "get": { + "tags": ["Patient Visit"], + "summary": "Get visit by ID", + "parameters": [ + { + "name": "PatVisitID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Visit details" + } + } + } + }, + "/api/ordertest": { + "get": { + "tags": ["Order Test"], + "summary": "List test orders", + "parameters": [ + { + "name": "InternalPID", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Filter by patient ID" + } + ], + "responses": { + "200": { + "description": "List of orders" + } + } + }, + "post": { + "tags": ["Order Test"], + "summary": "Create test order", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["InternalPID"], + "properties": { + "InternalPID": { + "type": "integer", + "description": "Patient ID" + }, + "PatVisitID": { + "type": "integer", + "description": "Visit ID (optional)" + }, + "Priority": { + "type": "string", + "description": "Order priority" + }, + "Tests": { + "type": "array", + "items": { + "type": "integer", + "description": "Test IDs" + } + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Order created successfully" + }, + "400": { + "description": "Validation error" + } + } + }, + "patch": { + "tags": ["Order Test"], + "summary": "Update test order", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "OrderID": { + "type": "integer" + }, + "Priority": { + "type": "string" + }, + "OrderStatus": { + "type": "string" + }, + "OrderingProvider": { + "type": "string" + }, + "DepartmentID": { + "type": "integer" + }, + "WorkstationID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Order updated successfully" + } + } + }, + "delete": { + "tags": ["Order Test"], + "summary": "Delete test order (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["OrderID"], + "properties": { + "OrderID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Order deleted successfully" + } + } + } + }, + "/api/ordertest/{OrderID}": { + "get": { + "tags": ["Order Test"], + "summary": "Get order by ID", + "parameters": [ + { + "name": "OrderID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Order details" + } + } + } + }, + "/api/ordertest/status": { + "post": { + "tags": ["Order Test"], + "summary": "Update order status", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["OrderID", "OrderStatus"], + "properties": { + "OrderID": { + "type": "integer" + }, + "OrderStatus": { + "type": "string", + "enum": ["ORD", "SCH", "ANA", "VER", "REV", "REP"], + "description": "Order status code" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Status updated successfully" + }, + "400": { + "description": "Invalid status" + } + } + } + }, + "/api/specimen": { + "get": { + "tags": ["Specimen"], + "summary": "List specimens", + "responses": { + "200": { + "description": "List of specimens" + } + } + }, + "post": { + "tags": ["Specimen"], + "summary": "Create specimen", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Specimen" + } + } + } + }, + "responses": { + "201": { + "description": "Specimen created successfully" + } + } + }, + "patch": { + "tags": ["Specimen"], + "summary": "Update specimen", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Specimen" + } + } + } + }, + "responses": { + "200": { + "description": "Specimen updated successfully" + } + } + } + }, + "/api/specimen/{SID}": { + "get": { + "tags": ["Specimen"], + "summary": "Get specimen by ID", + "parameters": [ + { + "name": "SID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Specimen details" + } + } + } + }, + "/api/specimen/container": { + "get": { + "tags": ["Specimen"], + "summary": "List container definitions", + "responses": { + "200": { + "description": "List of containers" + } + } + }, + "post": { + "tags": ["Specimen"], + "summary": "Create container definition", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpecimenContainerDef" + } + } + } + }, + "responses": { + "201": { + "description": "Container created successfully" + } + } + }, + "patch": { + "tags": ["Specimen"], + "summary": "Update container definition", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpecimenContainerDef" + } + } + } + }, + "responses": { + "200": { + "description": "Container updated successfully" + } + } + } + }, + "/api/specimen/container/{ContainerDefID}": { + "get": { + "tags": ["Specimen"], + "summary": "Get container definition by ID", + "parameters": [ + { + "name": "ContainerDefID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Container details" + } + } + } + }, + "/api/specimen/prep": { + "get": { + "tags": ["Specimen"], + "summary": "List specimen preparations", + "responses": { + "200": { + "description": "List of preparations" + } + } + }, + "post": { + "tags": ["Specimen"], + "summary": "Create specimen preparation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpecimenPrep" + } + } + } + }, + "responses": { + "201": { + "description": "Preparation created successfully" + } + } + }, + "patch": { + "tags": ["Specimen"], + "summary": "Update specimen preparation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpecimenPrep" + } + } + } + }, + "responses": { + "200": { + "description": "Preparation updated successfully" + } + } + } + }, + "/api/specimen/status": { + "get": { + "tags": ["Specimen"], + "summary": "List specimen statuses", + "responses": { + "200": { + "description": "List of statuses" + } + } + }, + "post": { + "tags": ["Specimen"], + "summary": "Create specimen status", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpecimenStatus" + } + } + } + }, + "responses": { + "201": { + "description": "Status created successfully" + } + } + }, + "patch": { + "tags": ["Specimen"], + "summary": "Update specimen status", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpecimenStatus" + } + } + } + }, + "responses": { + "200": { + "description": "Status updated successfully" + } + } + } + }, + "/api/specimen/collection": { + "get": { + "tags": ["Specimen"], + "summary": "List specimen collections", + "responses": { + "200": { + "description": "List of collections" + } + } + }, + "post": { + "tags": ["Specimen"], + "summary": "Create specimen collection", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Collection created successfully" + } + } + }, + "patch": { + "tags": ["Specimen"], + "summary": "Update specimen collection", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Collection updated successfully" + } + } + } + }, + "/api/tests": { + "get": { + "tags": ["Tests"], + "summary": "List test definitions", + "responses": { + "200": { + "description": "List of tests" + } + } + }, + "post": { + "tags": ["Tests"], + "summary": "Create test definition", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestDefinition" + } + } + } + }, + "responses": { + "201": { + "description": "Test created successfully" + } + } + }, + "patch": { + "tags": ["Tests"], + "summary": "Update test definition", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestDefinition" + } + } + } + }, + "responses": { + "200": { + "description": "Test updated successfully" + } + } + } + }, + "/api/tests/{TestID}": { + "get": { + "tags": ["Tests"], + "summary": "Get test definition by ID", + "parameters": [ + { + "name": "TestID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Test details" + } + } + } + }, + "/api/location": { + "get": { + "tags": ["Location"], + "summary": "List locations", + "responses": { + "200": { + "description": "List of locations" + } + } + }, + "post": { + "tags": ["Location"], + "summary": "Create location", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Location" + } + } + } + }, + "responses": { + "201": { + "description": "Location created successfully" + } + } + }, + "patch": { + "tags": ["Location"], + "summary": "Update location", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Location" + } + } + } + }, + "responses": { + "200": { + "description": "Location updated successfully" + } + } + }, + "delete": { + "tags": ["Location"], + "summary": "Delete location (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["LocationID"], + "properties": { + "LocationID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Location deleted successfully" + } + } + } + }, + "/api/location/{LocationID}": { + "get": { + "tags": ["Location"], + "summary": "Get location by ID", + "parameters": [ + { + "name": "LocationID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Location details" + } + } + } + }, + "/api/contact": { + "get": { + "tags": ["Contact"], + "summary": "List contacts", + "responses": { + "200": { + "description": "List of contacts" + } + } + }, + "post": { + "tags": ["Contact"], + "summary": "Create contact", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contact" + } + } + } + }, + "responses": { + "201": { + "description": "Contact created successfully" + } + } + }, + "patch": { + "tags": ["Contact"], + "summary": "Update contact", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contact" + } + } + } + }, + "responses": { + "200": { + "description": "Contact updated successfully" + } + } + }, + "delete": { + "tags": ["Contact"], + "summary": "Delete contact (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["ContactID"], + "properties": { + "ContactID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Contact deleted successfully" + } + } + } + }, + "/api/contact/{ContactID}": { + "get": { + "tags": ["Contact"], + "summary": "Get contact by ID", + "parameters": [ + { + "name": "ContactID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Contact details" + } + } + } + }, + "/api/occupation": { + "get": { + "tags": ["Contact"], + "summary": "List occupations", + "responses": { + "200": { + "description": "List of occupations" + } + } + }, + "post": { + "tags": ["Contact"], + "summary": "Create occupation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "OccupationCode": { + "type": "string" + }, + "OccupationName": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Occupation created successfully" + } + } + }, + "patch": { + "tags": ["Contact"], + "summary": "Update occupation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "OccupationID": { + "type": "integer" + }, + "OccupationCode": { + "type": "string" + }, + "OccupationName": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Occupation updated successfully" + } + } + } + }, + "/api/occupation/{OccupationID}": { + "get": { + "tags": ["Contact"], + "summary": "Get occupation by ID", + "parameters": [ + { + "name": "OccupationID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Occupation details" + } + } + } + }, + "/api/medicalspecialty": { + "get": { + "tags": ["Contact"], + "summary": "List medical specialties", + "responses": { + "200": { + "description": "List of specialties" + } + } + }, + "post": { + "tags": ["Contact"], + "summary": "Create medical specialty", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "SpecialtyCode": { + "type": "string" + }, + "SpecialtyName": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Specialty created successfully" + } + } + }, + "patch": { + "tags": ["Contact"], + "summary": "Update medical specialty", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "SpecialtyID": { + "type": "integer" + }, + "SpecialtyCode": { + "type": "string" + }, + "SpecialtyName": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Specialty updated successfully" + } + } + } + }, + "/api/medicalspecialty/{SpecialtyID}": { + "get": { + "tags": ["Contact"], + "summary": "Get medical specialty by ID", + "parameters": [ + { + "name": "SpecialtyID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Specialty details" + } + } + } + }, + "/api/organization/account": { + "get": { + "tags": ["Organization"], + "summary": "List accounts", + "responses": { + "200": { + "description": "List of accounts" + } + } + }, + "post": { + "tags": ["Organization"], + "summary": "Create account", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "responses": { + "201": { + "description": "Account created successfully" + } + } + }, + "patch": { + "tags": ["Organization"], + "summary": "Update account", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "responses": { + "200": { + "description": "Account updated successfully" + } + } + }, + "delete": { + "tags": ["Organization"], + "summary": "Delete account (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["AccountID"], + "properties": { + "AccountID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Account deleted successfully" + } + } + } + }, + "/api/organization/account/{AccountID}": { + "get": { + "tags": ["Organization"], + "summary": "Get account by ID", + "parameters": [ + { + "name": "AccountID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Account details" + } + } + } + }, + "/api/organization/site": { + "get": { + "tags": ["Organization"], + "summary": "List sites", + "responses": { + "200": { + "description": "List of sites" + } + } + }, + "post": { + "tags": ["Organization"], + "summary": "Create site", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Site" + } + } + } + }, + "responses": { + "201": { + "description": "Site created successfully" + } + } + }, + "patch": { + "tags": ["Organization"], + "summary": "Update site", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Site" + } + } + } + }, + "responses": { + "200": { + "description": "Site updated successfully" + } + } + }, + "delete": { + "tags": ["Organization"], + "summary": "Delete site (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["SiteID"], + "properties": { + "SiteID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Site deleted successfully" + } + } + } + }, + "/api/organization/site/{SiteID}": { + "get": { + "tags": ["Organization"], + "summary": "Get site by ID", + "parameters": [ + { + "name": "SiteID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Site details" + } + } + } + }, + "/api/organization/discipline": { + "get": { + "tags": ["Organization"], + "summary": "List disciplines", + "responses": { + "200": { + "description": "List of disciplines" + } + } + }, + "post": { + "tags": ["Organization"], + "summary": "Create discipline", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Discipline" + } + } + } + }, + "responses": { + "201": { + "description": "Discipline created successfully" + } + } + }, + "patch": { + "tags": ["Organization"], + "summary": "Update discipline", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Discipline" + } + } + } + }, + "responses": { + "200": { + "description": "Discipline updated successfully" + } + } + }, + "delete": { + "tags": ["Organization"], + "summary": "Delete discipline (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["DisciplineID"], + "properties": { + "DisciplineID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Discipline deleted successfully" + } + } + } + }, + "/api/organization/discipline/{DisciplineID}": { + "get": { + "tags": ["Organization"], + "summary": "Get discipline by ID", + "parameters": [ + { + "name": "DisciplineID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Discipline details" + } + } + } + }, + "/api/organization/department": { + "get": { + "tags": ["Organization"], + "summary": "List departments", + "responses": { + "200": { + "description": "List of departments" + } + } + }, + "post": { + "tags": ["Organization"], + "summary": "Create department", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Department" + } + } + } + }, + "responses": { + "201": { + "description": "Department created successfully" + } + } + }, + "patch": { + "tags": ["Organization"], + "summary": "Update department", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Department" + } + } + } + }, + "responses": { + "200": { + "description": "Department updated successfully" + } + } + }, + "delete": { + "tags": ["Organization"], + "summary": "Delete department (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["DepartmentID"], + "properties": { + "DepartmentID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Department deleted successfully" + } + } + } + }, + "/api/organization/department/{DepartmentID}": { + "get": { + "tags": ["Organization"], + "summary": "Get department by ID", + "parameters": [ + { + "name": "DepartmentID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Department details" + } + } + } + }, + "/api/organization/workstation": { + "get": { + "tags": ["Organization"], + "summary": "List workstations", + "responses": { + "200": { + "description": "List of workstations" + } + } + }, + "post": { + "tags": ["Organization"], + "summary": "Create workstation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workstation" + } + } + } + }, + "responses": { + "201": { + "description": "Workstation created successfully" + } + } + }, + "patch": { + "tags": ["Organization"], + "summary": "Update workstation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workstation" + } + } + } + }, + "responses": { + "200": { + "description": "Workstation updated successfully" + } + } + }, + "delete": { + "tags": ["Organization"], + "summary": "Delete workstation (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["WorkstationID"], + "properties": { + "WorkstationID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Workstation deleted successfully" + } + } + } + }, + "/api/organization/workstation/{WorkstationID}": { + "get": { + "tags": ["Organization"], + "summary": "Get workstation by ID", + "parameters": [ + { + "name": "WorkstationID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Workstation details" + } + } + } + }, + "/api/valueset": { + "get": { + "tags": ["Value Set"], + "summary": "List value sets", + "parameters": [ + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by value set key" + } + ], + "responses": { + "200": { + "description": "List of value sets" + } + } + }, + "post": { + "tags": ["Value Set"], + "summary": "Refresh value sets", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Value set key to refresh" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Value sets refreshed" + } + } + } + }, + "/api/valueset/{key}": { + "get": { + "tags": ["Value Set"], + "summary": "Get value set by key", + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Value set details" + } + } + } + }, + "/api/valueset/items": { + "get": { + "tags": ["Value Set"], + "summary": "List value set items", + "parameters": [ + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by value set key" + } + ], + "responses": { + "200": { + "description": "List of value set items" + } + } + }, + "post": { + "tags": ["Value Set"], + "summary": "Create value set item", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ValueSetID": { + "type": "integer" + }, + "Value": { + "type": "string" + }, + "Label": { + "type": "string" + }, + "Sequence": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Item created successfully" + } + } + } + }, + "/api/valueset/items/{ItemID}": { + "get": { + "tags": ["Value Set"], + "summary": "Get value set item by ID", + "parameters": [ + { + "name": "ItemID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Item details" + } + } + }, + "put": { + "tags": ["Value Set"], + "summary": "Update value set item", + "parameters": [ + { + "name": "ItemID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "Value": { + "type": "string" + }, + "Label": { + "type": "string" + }, + "Sequence": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Item updated successfully" + } + } + }, + "delete": { + "tags": ["Value Set"], + "summary": "Delete value set item", + "parameters": [ + { + "name": "ItemID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Item deleted successfully" + } + } + } + }, + "/api/result/valueset": { + "get": { + "tags": ["Result Value Set"], + "summary": "List result value sets", + "description": "CRUD operations for result value sets", + "responses": { + "200": { + "description": "List of result value sets" + } + } + }, + "post": { + "tags": ["Result Value Set"], + "summary": "Create result value set", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValueSet" + } + } + } + }, + "responses": { + "201": { + "description": "Value set created successfully" + } + } + } + }, + "/api/result/valueset/{ValueSetID}": { + "get": { + "tags": ["Result Value Set"], + "summary": "Get result value set by ID", + "parameters": [ + { + "name": "ValueSetID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Value set details" + } + } + }, + "put": { + "tags": ["Result Value Set"], + "summary": "Update result value set", + "parameters": [ + { + "name": "ValueSetID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValueSet" + } + } + } + }, + "responses": { + "200": { + "description": "Value set updated successfully" + } + } + }, + "delete": { + "tags": ["Result Value Set"], + "summary": "Delete result value set", + "parameters": [ + { + "name": "ValueSetID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Value set deleted successfully" + } + } + } + }, + "/api/result/valuesetdef": { + "get": { + "tags": ["Result Value Set Definition"], + "summary": "List value set definitions", + "description": "CRUD operations for value set definitions", + "responses": { + "200": { + "description": "List of value set definitions" + } + } + }, + "post": { + "tags": ["Result Value Set Definition"], + "summary": "Create value set definition", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValueSetDef" + } + } + } + }, + "responses": { + "201": { + "description": "Definition created successfully" + } + } + } + }, + "/api/result/valuesetdef/{VSetDefID}": { + "get": { + "tags": ["Result Value Set Definition"], + "summary": "Get value set definition by ID", + "parameters": [ + { + "name": "VSetDefID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Definition details" + } + } + }, + "put": { + "tags": ["Result Value Set Definition"], + "summary": "Update value set definition", + "parameters": [ + { + "name": "VSetDefID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValueSetDef" + } + } + } + }, + "responses": { + "200": { + "description": "Definition updated successfully" + } + } + }, + "delete": { + "tags": ["Result Value Set Definition"], + "summary": "Delete value set definition", + "parameters": [ + { + "name": "VSetDefID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Definition deleted successfully" + } + } + } + }, + "/api/counter": { + "get": { + "tags": ["Counter"], + "summary": "List counters", + "responses": { + "200": { + "description": "List of counters" + } + } + }, + "post": { + "tags": ["Counter"], + "summary": "Create counter", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Counter" + } + } + } + }, + "responses": { + "201": { + "description": "Counter created successfully" + } + } + }, + "patch": { + "tags": ["Counter"], + "summary": "Update counter", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Counter" + } + } + } + }, + "responses": { + "200": { + "description": "Counter updated successfully" + } + } + }, + "delete": { + "tags": ["Counter"], + "summary": "Delete counter (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["CounterID"], + "properties": { + "CounterID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Counter deleted successfully" + } + } + } + }, + "/api/counter/{CounterID}": { + "get": { + "tags": ["Counter"], + "summary": "Get counter by ID", + "parameters": [ + { + "name": "CounterID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Counter details" + } + } + } + }, + "/api/areageo": { + "get": { + "tags": ["Area Geo"], + "summary": "List geographic areas", + "responses": { + "200": { + "description": "List of geographic areas" + } + } + } + }, + "/api/areageo/provinces": { + "get": { + "tags": ["Area Geo"], + "summary": "List provinces", + "responses": { + "200": { + "description": "List of provinces" + } + } + } + }, + "/api/areageo/cities": { + "get": { + "tags": ["Area Geo"], + "summary": "List cities", + "parameters": [ + { + "name": "province_id", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Filter by province ID" + } + ], + "responses": { + "200": { + "description": "List of cities" + } + } + } + }, + "/api/demo/order": { + "post": { + "tags": ["Demo"], + "summary": "Create demo order", + "description": "Create a demo test order (no auth required)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Demo order created" + } + } + } + }, + "/api/demo/orders": { + "get": { + "tags": ["Demo"], + "summary": "List demo orders", + "description": "List demo test orders (no auth required)", + "responses": { + "200": { + "description": "List of demo orders" + } + } + } + }, + "/api/edge/results": { + "post": { + "tags": ["Edge"], + "summary": "Receive instrument results", + "description": "Receive test results from tiny-edge middleware (no auth required)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Results received" + } + } + } + }, + "/api/edge/orders": { + "get": { + "tags": ["Edge"], + "summary": "Get orders for edge", + "description": "Get orders for instrument integration (no auth required)", + "responses": { + "200": { + "description": "Orders for edge" + } + } + } + }, + "/api/edge/orders/{OrderID}/ack": { + "post": { + "tags": ["Edge"], + "summary": "Acknowledge order", + "description": "Acknowledge order receipt by edge (no auth required)", + "parameters": [ + { + "name": "OrderID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Order acknowledged" + } + } + } + }, + "/api/edge/status": { + "post": { + "tags": ["Edge"], + "summary": "Receive instrument status", + "description": "Receive status updates from instruments (no auth required)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Status received" + } + } + } + } + }, + "tags": [ + { + "name": "Authentication", + "description": "User authentication endpoints" + }, + { + "name": "Patient", + "description": "Patient management endpoints" + }, + { + "name": "Patient Visit", + "description": "Patient visit management endpoints" + }, + { + "name": "Order Test", + "description": "Test order management endpoints" + }, + { + "name": "Specimen", + "description": "Specimen management endpoints" + }, + { + "name": "Tests", + "description": "Test definition endpoints" + }, + { + "name": "Location", + "description": "Location management endpoints" + }, + { + "name": "Contact", + "description": "Contact management endpoints" + }, + { + "name": "Organization", + "description": "Organization management endpoints" + }, + { + "name": "Value Set", + "description": "Value set library endpoints" + }, + { + "name": "Result Value Set", + "description": "Result-specific value set CRUD endpoints" + }, + { + "name": "Result Value Set Definition", + "description": "Value set definition CRUD endpoints" + }, + { + "name": "Counter", + "description": "Counter management endpoints" + }, + { + "name": "Area Geo", + "description": "Geographic area endpoints" + }, + { + "name": "Demo", + "description": "Demo/test endpoints (no auth)" + }, + { + "name": "Edge", + "description": "Instrument integration endpoints (no auth)" + } + ] +} diff --git a/docs/prj_clinical laboratory quality management system_3a.md b/docs/prj_clinical laboratory quality management system_3a.md deleted file mode 100644 index 2df497e..0000000 --- a/docs/prj_clinical laboratory quality management system_3a.md +++ /dev/null @@ -1,23078 +0,0 @@ -![](media/image2.jpeg){width="2.0in" height="0.6194444444444445in"} - -**Perjanjian kerahasiaan**: - -Dokumen ini adalah karya yang tidak dipublikasikan yang berisi informasi -hak milik yang merupakan rahasia dagang berharga dari PT Sumbermitra -Agungjaya, dilindungi oleh undang-undang hak cipta dan sangat rahasia. -Dokumen ini, informasi dalam dokumen ini, dan semua haknya adalah milik -tunggal dan eksklusif PT Sumbermitra Agungjaya dan dimaksudkan -semata-mata untuk digunakan oleh karyawan PT Sumbermitra Agungjaya, dan -tidak boleh disalin, digunakan atau diungkapkan kepada siapa pun, secara -keseluruhan atau sebagian, tanpa izin tertulis dari PT Sumbermitra -Agungjaya. - -| **Software Identity** | | -|-----------------------|---------------------------| -| Number | | -| Name | | -| Domain of use | Choose an item. | -| Domain of execution | Choose an item. | -| | | -| **Programmer** | | -| Analyst | \<\> | -| Front end (UI/UX) | \<\> | -| Back end | \<\> | -| Testing & validation | \<\> | -| Documentation | \ | -| | | - -Table 1 Activities di Laboratorium Klinik - -# Contents - -1\. Contents 2 - -2\. Pendahuluan 6 - -3\. Konsensus dan Konsep 6 - -4\. Requirements 7 - -4.1. Deskripsi Umum 7 - -4.1.1. Organization 7 - -4.1.2. Personnel 7 - -4.1.3. Equipment 7 - -4.1.4. Purchasing & Inventory 8 - -4.1.5. Process Control 8 - -4.1.6. Information Management 8 - -4.1.7. Documents & Records 9 - -4.1.8. Customer Service 9 - -4.2. Features 10 - -4.2.1. Functional Requirement 10 - -4.2.2. Non-Functional Requirements 25 - -4.3. Model Use Case 26 - -4.3.1. CLQMS -- SMCRM Integration 26 - -4.3.2. Definisi Actor 26 - -5\. Detail Teknis dan Implementasi 27 - -5.1. Hardware 27 - -5.1.1. Virtual Private Server (VPS) 27 - -5.1.2. Local/Site Server 27 - -5.1.3. Client PC 27 - -5.2. Software 27 - -5.3. Language 27 - -5.4. Framework 27 - -5.4.1. Back End 27 - -5.4.2. Front End 27 - -5.4.3. UI/UX 27 - -5.5. Network Architecture 28 - -5.6. Database 29 - -5.6.1. Vendor 29 - -5.6.2. Product 29 - -5.6.3. Organization Structure 33 - -5.6.4. Host Systems 35 - -5.6.5. Coding System 35 - -5.6.6. Doctor 36 - -5.6.7. Location 38 - -5.6.8. Patient Registration 40 - -5.6.9. Patient Admission 45 - -5.6.10. Test Ordering 48 - -5.6.11. Specimen 52 - -5.6.12. Equipment Management 60 - -5.6.13. Test Management 63 - -5.6.14. ReferenceRangeNumeric 69 - -5.6.15. ReferenceRangeThreshold 69 - -5.6.16. Value Set 70 - -5.6.17. Reagent 70 - -5.6.18. Calibration 71 - -5.6.19. Quality Control (QC) 75 - -5.6.20. Results 78 - -5.6.21. Result Distribution 80 - -5.6.22. Visualization 81 - -5.6.23. Audit 82 - -5.6.24. Relational Diagram 83 - -5.7. Antarmuka 83 - -5.7.1. Access Page 83 - -6\. Versioning 83 - -7\. Definisi -- definisi 84 - -8\. Referensi 84 - -9\. Lampiran 85 - -9.1. Lampiran 1: *Database Connection Requirement* 85 - -9.1.1. Architecture 85 - -9.1.2. Data scope 85 - -9.2. Lampiran 2: TMS-30i 87 - -9.2.1. Calibration Results SQL Scripts and Data Mapping 87 - -9.2.2. QC Results SQL Scripts and Data Mapping 89 - -9.2.3. Patient Results SQL Scripts and Data Mapping 90 - -9.2.4. Calibration Factor 92 - -9.2.5. Flags 93 - -9.3. Lampiran 3: TMS-24i 95 - -9.3.1. Calibration Results SQL Scripts and Data Mapping 95 - -9.3.2. QC Results SQL Scripts and Data Mapping 96 - -9.3.3. Patient Results SQL Scripts and Data Mapping 97 - -9.4. Lampiran 4: File-based Integration 98 - -9.5. Lampiran 5: File-based Integration SES 99 - -9.6. Lampiran 6: SES Screens 103 - -9.7. Lampiran 7: Clinical Laboratory Activity 0 - -9.8. Lampiran 8: Versions 0 - -9.9. Lampiran 9: Patient 2 - -9.9.1. Race, Ethnic, Religion 2 - -9.9.2. Country 1 - -9.9.3. Patient Visit Class 2 - -9.9.4. Patient Service Class 2 - -9.9.5. Admission -- Discharge -- Transfer Code 2 - -9.10. Lampiran 10: Cumulative View 0 - -9.11. Lampiran 11: Test Ordering 0 - -9.11.1. Test Order Urgency 0 - -9.11.2. Test Order Status 0 - -9.11.3. Result Status 0 - -9.11.4. Diagnostic Report Status 0 - -9.12. Lampiran 12: Specimen 2 - -9.12.1. Container Type 2 - -9.12.2. Additive 4 - -9.12.3. Specimen Type 5 - -9.12.4. Specimen Type (Environmental) 7 - -9.12.5. Specimen Component 7 - -9.12.6. Collection Method 7 - -9.12.7. Body Site 7 - -9.12.8. Source 8 - -9.12.9. Specimen Role 8 - -9.12.10. Specimen Condition 8 - -9.13. Lampiran 13: Location 10 - -9.13.1. Location Type 10 - -9.14. Lampiran 14: Value set 11 - -9.14.1. Value Set 11 - -9.14.2. Value set Field (Table 67. codedtxtfld) 15 - -9.15. Lampiran 3: Struktur Menu 16 - -10\. Referensi 17 - -11\. Riwayat Perubahan 0 - -12\. Distribusi 0 - -# Pendahuluan - -*Market segment* Perusahaan adalah *middle-high*. Hal ini tercermin dari -*product* yang dipasarkan dan *customer* yang hingga kini dikelola oleh -Perusahaan. *Customer* di kelas ini memperhatikan kualitas dan -memerlukan nilai tambah, berupa berbagai layanan dan salah satunya dalam -bentuk piranti lunak (*software*). Oleh sebab itu diperlukan -pengembangan *software* yang sesuai dengan *market segment* tersebut, -yaitu yang terkait dengan pengelolaan kualitas (*quality management*) -laboratorium. Menurut WHO[^1], *Quality Management* suatu laboratorium -klinik meliputi elemen-elemen sbb.: - - - ---- - - - - - - - - -
    -

    Table 2 Specimen status

    -
      -
    1. Organization

    2. -
    3. Personnel

    4. -
    5. Equipment

    6. -
    7. Purchasing & inventory

    8. -
    9. Process control

    10. -
    11. -
    12. -
    13. Information management

    14. -
      -
    1. Documents and records

    2. -
    3. Occurrence (non-conformity) management

    4. -
    5. Assessment

    6. -
    7. Process improvement

    8. -
    9. Customer service

    10. -
    11. Facility and safety

    12. -
    - -Table 2 Specimen status - -- -- -- -- -- -- -- -- -- -- -- - -Masih terkait erat dengan elemen kualitas, untuk mengelola *quality -management*, diperlukan *software* yang: - -1. *robust*, tidak mudah mengalami kerusakan. - -2. *secure*, aman terhadap ancaman *cybersecurity*. - -3. memperhatikan dan mampu mewujudkan *patient safety*, - -4. ***scalable***, bisa mengelola beban operasional ringan hingga - berat. - -5. ***future proof***, mengantisipasi kebutuhan di masa depan. - -6. ***compliance*** dengan regulasi yang berlaku dan/atau *standard* - yang digunakan. - -7. ***interoperability***, bisa diintegrasikan dengan berbagai - aplikasi. - -# Konsensus dan Konsep - -Konsensus dalam dokumen ini adalah sebagai berikut: - -1. Data/informasi sensitive terkait privacy ditulis dengan font **bold - berwarna merah** dan berarti encrypted. - -2. Istilah **Site(s)** digunakan untuk lokasi geografis yang bersifat - *fixed* dan bisa ditandai dengan *geolocation*. Site adalah - *container* dari Location. - -3. Istilah **Location** diigunakan untuk ruang di dalam *site* - (*facility*, *building*, *floor*, *point of care*, *room*, *bed*) - atau, *mobile*, *remote*, dll - -4. Istilah **Counter** digunakan untuk tempat penyimpanan barang. - -5. Semua data *date time* disimpan dalam **UTC+0**, untuk menghindari - masalah zona waktu dan memudahkan sortir. Kecuali pada Date of Birth - dan Time of Death, keduanya disimpan apa adanya. - -6. ***CreateDate***. nilai waktu yang diisikan ke *field database*, - menandai waktu *record* tersebut dibuat - -7. ***EndDate***: nilai waktu yang diisikan ke *field database*, - menandai *record* tersebut tidak digunakan. - - a. pada *master* *data tables*, berarti *record* tersebut sudah - tidak berlaku lagi saat ini tetapi mungkin masih relevan dengan - *past data*. Misalnya pada perubahan nilai rujukan, dimana nilai - rujukan lama *closed* tetapi dipertahankan di dalam *database* - karena berelasi dengan hasil test yang sudah dikerjakan. - - b. pada *transaction tables*, berarti *record* tersebut sudah - *closed* statusnya, tidak bisa/boleh diubah lagi dan menunggu - waktu *archival*. - -8. ~~***CloseDate***.~~ ~~nilai waktu yang diisikan ke *field - database*, menandai *record* tersebut sudah tidak bisa diubah~~ - ~~lagi. Diterapkan pada *transaction tables*~~ - -9. ***ArchiveDate***: nilai waktu yang diisikan ke *field database*, - menandai *record* tersebut sudah masuk ke *data warehouse* sehingga - tidak boleh diubah lagi untuk mempertahankan konsistensi. Diterapkan - pada *transaction tables*. - -10. ***DelDate***. nilai waktu yang diisikan ke *field database*, - menandai *record* tersebut sudah dihapus. Diterapkan pada - *transaction tables*, khususnya yang memuat data Pribadi pasien. - -Gambar 1 Siklus data transaksi - -# Requirements - -## Deskripsi Umum - -Aplikasi terintegrasi dengan CRM melalui database. - -Aplikasi berfungsi mengelola kualitas laboratorium klinik yang terdiri -dari: - -### Organization - -Fungsi organisasi meliputi: - -1. Pengelolaan single/multi organization, single/multiple laboratory - sites, single/multiple laboratories. Pengelolaan diturunkan dari CRM - yaitu Account (parent/child) dan Sites. - -2. Pengelolaan struktur organisasi - -### Personnel - -Pengelolaan personnel, meliputi: - -1. Daftar personnel berikut jabatannya dalam laboratorium - -2. Mutasi personnel - -3. Hak akses personnel - -4. Pengelolaan akun. - -5. Dokumen terkait, terutama sertifikat pelatihan - -### Equipment - -*Equipment* secara umum adalah: - -- semua alat IVD yang berada di dalam laboratorium atau di luar, - misalnya *point of care* *testing* (POCT) *instruments*. - -- termasuk UPS, AVR, *printer*, PC, *water treatment plant* dan semua - piranti pendukung *equipment* - -- termasuk PC, UPS, AVR, *printer*, *network switch*, *server, mobile - device* yang digunakan untuk operasional laboratorium (LIS, HIS, dll) - -- *wearables* yang mengumpulkan data pasien (*non-disposable*, - *disposable*, *semi-disposable*) - -- *modalities* (*imaging instruments*) - -*Equipment* bisa merupakan asset laboratorium atau pihak lain, yang -dipinjamkan/disewakan/KSO dengan laboratorium. - -Pengelolaan *equipment*, meliputi: - -1. Pencatatan *activities* dari mulai instalasi hingga - *decommissioning* (akhir penggunaan) - -2. Pencatatan *maintenance activity* dan *maintenance scheduling*. - -3. Usia pakai dan perawatan. Salah satu indikator untuk IVD *equipment* - adalah total jumlah tes yang dihasilkannya -- **total produksi - tes**, yang terdiri dari tes untuk: - - a. kalibrasi test/alat berikut perulangannya - - b. *Quality Control* (QC) berikut perulangannya - - c. pasien berikut perulangannya - - d. tes yang diproduksi untuk tujuan lainnya (external quality - assurance, dll) - -4. komunikasi CLQMS dengan IVD *equipment*: - - a. *serial communication* via RS-232 - - b. TCP/IP - - c. HL7 atau ASTM *based protocol* - - d. *uni-directional* atau *bi-directional* (*query*, *non-query*) - -5. identifikasi jenis dan jumlah tes yang dilakukan setiap IVD - *equipment*. - -Prinsip komunikasi CLQMS - IVD equipment: - -- setiap IVD *equipment* di-*assign* dan *connected* ke *workstation*, - baik secara langsung (RS-232, TCP/IP melalui *network* *card* pada - *workstation*) ataupun tidak langsung (IVD *instrument* tersambung ke - *network switch*) - -- *workstation* yang mendapat *assignment* tersebut memiliki *local - database* untuk mengantisipasi terputusnya *network connection* dengan - *server*. - -- *local database* adalah replikasi sebagian atau keseluruhan data dari - server. - -- 1 *workstation* bisa mengelola lebih dari 1 IVD *equipment*. - -- *workstation* bertanggung jawab penuh atas komunikasi dengan IVD - *equipment* (*interfacing*) - - - - - - - - - - - - -- *workstation* mengelola distribusi pekerjaan ke berbagai IVD - *equipment* dengan memanfaatkan data yang ada. - -- suatu *workstation* bisa diakses dari PC lain dengan menggunakan - aplikasi yang sama. - -### Purchasing & Inventory {#purchasing-inventory} - -Fungsi purchasing dan inventory meliputi pengelolaan: - -1. *Product catalogue* dan product yang digunakan di laboratorium - -2. Penyusunan daftar item yang perlu diadakan - -3. Penerimaan barang - -4. Pencatatan penggunaan barang. Terutama adalah penggunaan barang - > habis pakai hingga menjadi test. - -### Process Control - -Sistem mampu mengakomodasi berbagai proses, oleh karenanya perlu -user-defined ***case type*** dan ***business*** ***function***. *Case -type* dan *business* *function* bisa *cascade* (*parent - child*). - -Secara umum, proses di dalam laboratorium klinik terdiri dari -pre-analitik, analitik dan pasca-analitik. Tetapi tidak semua perlu -dilakukan, misalnya: - -- Pasien *check-up* tidak memerlukan *admission*. - -- *External* *QC* tidak memerlukan patient *registration*, *admission* - karena pada dasarnya bukan manusia. - -### Information Management - -Berikut adalah elemen pengelolaan informasi: - -Secara umum, system harus mampu menjaga *data integrity*[^2]. - -#### Unique identifiers for patients and samples - -> Patient -> -> Samples - -#### Standardized Test Order Form - -> \ - -#### Logs and Worksheets - -> \ - -#### Checking Processes to Assure Accuracy of Data Recording & Transmission {#checking-processes-to-assure-accuracy-of-data-recording-transmission} - -> \ - -#### Protection Against Lost of Data - -> \ - -### Documents & Records {#documents-records} - -Dokumen bisa berupa SOP, forms dll - -### Customer Service - -Pelanggan laboratorium adalah: - -1. Pasien - -2. Dokter - -3. Fasilitas pelayanan Kesehatan (klinik, laboratorium, rumah sakit, - dll) - -4. Perusahaan - -5. Perusahaan asuransi - - - -1. Inventory - -| NO | Menu | -|-----|-------------| -| 1 | Homepage | -| | Deskripsi : | -| | Gambar : | -| 2 | Menu 1 | -| | Deskripsi : | -| | Gambar | -| 3 | Menu 2 | -| | Deskripsi : | -| | Gambar | -| 4 | Menu 3 | -| | Deskripsi : | -| | Gambar | - -Table 3 Test Life Cycle - -## Features - -Fitur fungsional mengacu pada penggunaan praktis, tujuan, atau kemampuan -sistem, dengan fokus pada bagaimana sistem tersebut melakukan tugasnya -secara efektif. - -Fitur non-fungsional, menggambarkan bagaimana suatu sistem harus -bekerja, bukan apa yang dilakukannya. - -### Functional Requirement - -> Sistem mampu mengelola proses-proses di dalam laboratorium yang -> meliputi proses utama dan pendukungnya. Proses utama, misalnya dari -> *Patient Registration* *to Reporting* yang terdiri dari *activities* -> seperti pada table di bawah ini - - - --- - - - - - - - -
    -

    Table 4 Test activity & status

    -

    Figure 1 Activities pada Proses Pendukung

    -

    Figure 2 Activities pada Proses Utama

    -

    Figure 3 Activities pada Proses Pendukung

    - -Table 4 Test activity & status - -> Sistem terintegrasi dengan SMCRM untuk memudahkan *data update* dan -> efisiensi operasional terutama *support*. - -#### SMCRM Integration - -> Aplikasi terintegrasi dengan SMCRM untuk tujuan: - -- *seamless data update*. Misalnya identitas *site*, *equipment*, - *contact* dll. - -- *seamless* *support*. Misalnya *service request* dari laboratorium ke - SUMMIT, catatan *maintenance* dan *service* *equipment*, dll. - -> Integrasi memperhatikan hal-hal sebagai berikut: - -- ***bi-directional communication***. Artinya data bisa berasal dari - kedua belah pihak (CLQMS, SMCRM) dan dicerminkan ke *counterpart - system*. - -- ***secure communication***. Komunikasi antara kedua sistem harus - *secured*. - -- ***interdependence***. Untuk memastikan kelancaran operasional - masing-masing sistem dan terputusnya hubungan keduanya maka - masing-masing harus bisa beroperasi *stand-alone*. - -> Integrasi dilakukan dengan: - -1. mereplikasikan beberapa *tables* dari satu aplikasi ke aplikasi - lainnya: - - a. **Account**. Merepresentasikan organisasi -- Perusahaan swasta, - BUMN, single lab, chain labs, dll. Data account diambil dari - aplikasi CRM - - b. **Sites** - - c. **Contact** **& ContactDetail** - - d. **ProductCatalog & Product** - -2. tidak semua *record* dari SMCRM direplikasikan ke CLQMS, hanya yang - terkait dengan Account dan Site CLQMS tersebut. - -3. mekanisme replikasi: - - a. Account dan Site harus terdaftar terlebih dahulu di SMCRM. - - b. Instalasi CLQMS dilakukan di site, salah satu bagian penting - adalah setting Account dan Site dan *establish secure - connection* dengan SMCRM. - - c. Contact dan ContactDetail bisa dipilih, mana saja yang akan - direplikasikan ke CLQMS. - -4. mengantisipasi perbedaan *database management system* dan *data - type* yang digunakan di kedua aplikasi. - -#### - -#### - -#### - -#### Multi Organization Management - -> Aplikasi mampu mengelola *multiple accounts*, *sites*, *disciplines*, -> *departments*, *workstations*, *instruments* - -- **Account**. Merepresentasikan organisasi -- Perusahaan swasta, BUMN, - single lab, chain labs, dll. Data account diambil dari aplikasi CRM - -- **Sites**. Berisi definisi lokasi geografis yang bersifat *fixed* - (yaitu *laboratory site*) dan diambil dari aplikasi CRM. - -- **Discipline**. Bidang keahlian khusus dan bidang ilmiah dalam - kedokteran laboratorium, yang meliputi bidang-bidang seperti - mikrobiologi, hematologi, imunologi, kimia klinik, biologi molekuler, - histologi, sitologi, dll. Discipline secara konket bisa berupa - pembagian ruangan untuk Biologi Molekuler, Histologi & Sitologi, dll. - -- **Department**. Adalah bagian / unit dalam suatu laboratorium klinik, - disusun/dibentuk sedemikian rupa untuk meng-optimalkan sumber daya dan - *workflow*. Kemungkinannya: - - - satu *department* khusus untuk satu *discipline* (misal: Hematology - department). - - - atau suatu laboratorium yang besar bisa menyatukan beberapa - *discipline* menjadi satu *department* untuk efisiensi (missal: - \"*Blood Sciences*\" *department* meliputi Kimia Klinik, Hematologi - dan Transfusi). - - - relasi *discipline* -- *department* adalah *many to many*. - - - *departments* juga digunakan untuk mengelompokkan fungsi-fungsi - tertentu, seperti pengujian diagnostik atau proses laboratorium - tertentu. - -- [Workstation](\l). Tempat bekerja di dalam laboratorium klinik. - Biasanya spesifik untuk satu hal tertentu. Misalnya *routine - hematology*, *coagulation*, dll. - - - Satu *workstation* adalah satu unit PC *client* (termasuk area[^3] - di sekitarnya). Satu *department* bisa memiliki lebih dari satu - *workstation*. - - - *workstation* digunakan untuk: - - - interaksi *user* dengan aplikasi (input data, *query results*, - *generate reports*, dll). - - - *instrument* *interfacing / instrument interface server*. Satu - *workstation* bisa terhubung dengan beberapa *instrument* dengan - fungsi *interfacing* sbb: - - - menerima *query message* dari *IVD equipment* - - - mengirim *order message* ke *IVD equipment* - - - menerima *result message* dari *IVD equipment* - - - mengirim *update* & *rerun message* ke *IVD equipment* - - - *test mapping* termasuk *many to one* (glukosa sewaktu, 2h pp, - puasa, dll) - - - *real-time overview/dashboard* - - - bagian dari mekanisme *instruments load balancing* dan *fail-over* - - - bagian dari mekanisme distribusi test (otomatis dan manual) dan - pengaturan beban kerja. - - - berfungsi proteksi, mencegah: - - - salah run specimen - - - salah run test (melalui *test mapping*) - - - *workstation* memiliki *local database* yang bisa menampung data - hasil dari instruments. Jika *workstation* terputus/diputus dari - jaringan, maka *locally* masih bisa berfungsi terbatas untuk: - - - menerima specimen - - - merespon *query* dari *instrument* - - - menampung hasil pasien/QC - - - melakukan *rerun*/ *rerun* dengan dilusi - - - validasi hasil pasien dan/atau QC - - - suatu *workstation* yang merepresentasikan lokasi fisik, bisa - diakses dan digunakan dari tempat lain (*virtual*) - - - *rerun* bisa dilakukan di *instrument* manapun yang mengerjakan test - yang sama, terlepas dari di mana *instrument* tersebut di-*assign*. - - - - -- **Instrument**. Adalah IVD *instrument* yang digunakan untuk - menghasilkan berbagai pengukuran diagnostic. - -- - -Gambar . Generic organization structure - -#### Multiple Coding System - -> Aplikasi mampu menggunakan berbagai *coding system*, misalnya: - -- LOINC - -- ICD10 - -- CPT4 - -- SNOMED - -#### Location Management - -Gambar 3. Hirarki Site - Location - -> *Location management*[^4] terhubung dan merupakan kelanjutan dari -> *site management* pada crm, meliputi: - -- **Location type**. Yaitu definisi jenis Lokasi. Misalnya: *floor*, - *point of care*, *room*, *bed*, *mobile*, *remote*, dll - -- **Location**. - - - Yaitu definisi lokasi dalam setiap site. Misalnya, ruangan di - Instalasi Rawat Inap, dll. Rawat Inap adalah Facility unit - - - *Cascade*[^5] dimungkinkan, misalnya Bed1, Bed2 berada dalam ruang - "VIP-A". Keduanya terdefinisi dalam table Location. - - - - - - Termasuk pengelolaan *remote location*, misalnya *sampling station*, - *sampling site* Medical Checkup, Home Service, dll. - -| | | -|-----|-----| -| | | -| | | -| | | - -Table 5 Definisi jenis test - -- **Location address**. Yaitu data alamat dari lokasi, terutama *remote - location*. Data ini penting untuk pengambilan sample di luar - fasyankes. Misalnya pada Home Service. - -#### Equipment & Device Management {#equipment-device-management} - -> Fungsi-fungsi *Equipment Management* yaitu: - -- - -#### Patient Registration {#patient-registration} - -> *Patient Registration* bertujuan untuk mengumpulkan informasi -> demografis, medis, dan asuransi yang digunakan. Data ini digunakan -> untuk membuat catatan pasien dan menghubungkannya dengan layanan -> fasyankes. -> -> *Common process*: pengisian formulir, memberikan identifikasi, dan -> mendapatkan persetujuan untuk pengobatan dan *informed consent*[^6]. -> -> Elemen kunci: detail pribadi, informasi asuransi, informasi kontak, -> riwayat kesehatan, dan formulir persetujuan. -> -> Aplikasi mampu: - -- mengelola data pasien per site - -- menghubungkan (*link*)/mengurai(*unlink*) data pasien yang sama dari - > site yang sama maupun berbeda - -- mengidentifikasi kunjungan pasien per site - -- mengidentifikasi/mengelola perpindahan pasien dari satu lokasi ke - > lokasi lain baik di site yang sama maupun berbeda. - -- mengelola *non-patient entity*. Misalnya *external quality control*, - > *blood bag*, dll. - -#### Patient Admission - -> Admission adalah proses pendaftaran *visit* pasien secara formal. - -- Setiap kali visit, pasien mendapat nomor visit/admisi. - -- Merupakan proses awal *Revenue Cycle Management* (RCM) - -- Data yang terlibat dalam proses registrasi: - - - Pihak yang mengirimkan pasien (pasien, asuransi, perusahaan, dll) - - - Pihak yang menanggung biaya pemeriksaan (pasien, asuransi, - Perusahaan, dll) -- *billing account*. - - - Tarif yang dikenakan - - - Pihak yang akan menerima hasil pasien - - - Data-data pendukung: detak jantung, tekanan darah, berat dan tinggi - badan, pemeriksaan awal lainnya. - -#### Test Ordering Management - -> Pengelolaan *test ordering*: - -- **Test Ordering**, yaitu *activity* membuat *order* test pertama kali. - - - dapat dilakukan di: - - - dalam *site* yang sama - - - *site* yang berbeda - - - *mobile location* (misalnya *on-site* MCU) - - - *remote location* - lokasi di luar *site* (misalnya praktek - dokter, klinik, dll) - - - dalam lingkungan *multi-sites*, *test ordering* bisa dibuat di suatu - *site* (*source*) dan dikerjakan di *site* lain (*production*) - - - Ragam test ordering bersarkan subyeknya (pihak/entitas yang - diperiksa): - - - pasien fasyankes itu sendiri - - - pasien dari fasyankes lain (rujukan fasyankes lain) - - - non-patient, misalnya: *external quality control (EQC)*, *blood - bag*, dll - - - *Activity* ini memicu *specimen* *records* *generation*. - - - jika *Calculated Test* (formula) dipilih, maka input parameternya - otomatis terpilih. - -- **Order status**, yaitu perjalanan *order* dari mulai dibuat hingga - > selesai (table status dan kondisinya) - - - -- **Manual**, yaitu melalui ekstraksi database, csv file atau text file. - -> Setiap *test order* memiliki identitas unik berupa **Order ID** -> sepanjang 13 karakter, dengan ketentuan sebagai berikut: -> -> **LLYYMMDDXXXXX** -> -> dimana: - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 6 Definisi jenis hasil test

    -
    KomponenTipe data & rangeArti & ketentuan
    LLAlphanumeric (00 – Z9)
      -
    • kode site asal (source),

    • -
    • System assigned, tidak bisa diubah -user

    • -
    YYNumeric (00 – 99)
      -
    • Tahun (‘25’ dari 2025).

    • -
    • Otomatis, mengikuti current date, disesuaikan untuk -future order.

    • -
    MMNumeric (01 – 12)
      -
    • Bulan.

    • -
    • Otomatis, mengikuti current date, disesuaikan untuk -future order

    • -
    DDNumeric (01 – 31)
      -
    • Tanggal dalam satu bulan.

    • -
    • Otomatis mengikuti current date, disesuaikan untuk -future order.

    • -
    XXXXXNumeric (00001 – 99999)
      -
    • nomor urut per site

    • -
    • bisa di-reset setiap hari atau setiap bulan.

    • -
    • Otomatis, mengikuti counter.

    • -
    - -Table 6 Definisi jenis hasil test - -> *Rules* dalam *test ordering*: - -1. *default test ordering* adalah untuk *current date* (saat ini) - -2. dimungkinkan untuk melakukan *future order*. Komponen YY, MM dan DD - (serta XXXXX) disesuiakan dengan tanggal dimana *test order* - tersebut akan (menjadi beban [^7]kerja yang) dikerjakan. - -3. tidak bisa *back date*. - -#### - -#### Specimen Management - -> *Specimen management* meliputi *activities*: - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 7 Definisi jenis nilai rujukan

    -
    ActivitiesTasksNotes
    Collection
      -
    • phlebotomy/pengumpulan specimen.

    • -
    • print collection labels dan -labeling.

    • -
    • scan setiap collection labels untuk -mencatat penerima, tube/container yang diterima dan -waktu penerimaan.

    • -
    • scan collection labels juga berarti -pencatatan consumables (tube, needle, -wing needle, urine container, dll)

    • -
    • catat data tambahan1: detak jantung, tekanan -darah, berat dan tinggi badan, pemeriksaan awal lainnya.

    • -
      -
    • Catatan specimen collection date-time -menandai dimulai-nya clotting-time2, bisa digunakan untuk menentukan -waktu yang tepat untuk sentrifugasi

    • -
    • specimen rujukan tidak melalui collection -activity.

    • -
    • diijinkan untuk ganti SpecDefID, yang berarti mengganti SID dan -pencetakan label baru

    • -
    Transport
      -
    • packing specimen ke dalam kemasan -sekunder/tertier

    • -
    • cetak packing labels dan -labeling kemasan specimen.

    • -
    • kirim specimen dari collection point ke -reception point.

    • -
    Reception
      -
    • scan setiap collection labels untuk -mencatat penerima, tube/container yang diterima dan -waktu penerimaan.

    • -
      -
    • diijinkan untuk ganti SpecDefID, yang berarti mengganti SID dan -pencetakan label baru

    • -
    Preparation
      -
    • centrifuge

    • -
    • aliquot

    • -
    • cetak additional collection labels untuk -aliquot

    • -
    • pre-treatment (tambahan additive dll)

    • -
    - - -Table 7 Definisi jenis nilai rujukan - -> *Primary Specimen & Secondary Specimen* -> -> ***Primary specimen*** adalah *specimen* yang diambil langsung dari -> pasien, dalam pencatatannya tidak memiliki *parent*. Wadah *primary -> specimen* disebut ***primary container*** (termasuk di dalamnya -> *primary* *tube*) -> -> ***Secondary*** ***specimen*** adalah *specimen* turunan dari *primary -> specimen*, sehingga memiliki *parent* dalam *record*-nya. *Secondary -> specimen* ditempatkan dalam *secondary container* (termasuk di -> dalamnya, *secondary tube*) -> -> Hal-hal yang termasuk *specimen management*: - -- multiple identical specimen, yaitu pengelolaan beberapa specimen - (container) identik. Glukosa puasa, 2Hr PP, dll - -- [Specimen type](\l). Yaitu definisi material yang akan diperiksa - (*specimen*), sesuai *coding* *system*-nya masing-masing dan berkaitan - dengan *specimen role*. - -- **Specimen additives**. Yaitu definisi bahan *additive* *specimen*. - -- **Specimen collection method**. Yaitu prosedur atau proses untuk - mendapatkan *specimen*. - -- **Specimen source site**. Menentukan sumber *specimen*. Misalnya, jika - biopsi hati diperoleh melalui jarum perkutan, sumbernya adalah 'hati'. - -- Specimen collection site - -- **Specimen role**. Tidak semua *specimen* berasal dari pasien. Bisa - saja berupa *E*QC *materials*, *blood bag sample*, *internal QC - materials*, dll. - -- **Specimen identification**. Meliputi: - - - definisi specimen (nama, kode), data container yang digunakan tiap - specimen - - - relasi specimen dengan tes dan test order. - - - setiap specimen termasuk *aliquot* memiliki identitasnya sendiri - yang disebut *Sample ID* (**SID**). SID sama dengan *tube number* - atau *container number*. Selanjutnya dalam dokumen ini menggunakan - SID. - - - *interfacing* dengan piranti-piranti pencetak label. - -- **Specimen** **Status**. Yaitu *activities* specimen di tahapan - pra-analitik, analitik dan pasca analitik. (tabel specimen status dan - kondisinya).. - -| **SiteID** | **LocationID** | **EquipmentID** | **Activity** | **ActivityName** | **ActRes** | **Specimen Status** | **Keterangan** | -|------------|----------------|-----------------|--------------|------------------|------------|-----------------------|----------------------------| -| HospA | IRNA_A | | AS001 | Collection | | To be collected | | -| HospA | IRNA_A | | AS001 | Collection | Failed | Collection failed | diambil | -| HospA | IRNA_A | | AS001 | Collection | Success | Collected | diambil kedua kalinya. | -| HospA | | | AS002 | Transport | | In-transport | | -| HospA | | | AS002 | Transport | Failed | Transport failed | | -| HospA | | | AS002 | Transport | Success | Arrived | Tiba di lab | -| Lab | | | AS003 | Reception | Failed | Rejected | diterima di Lab | -| Lab | | | AS003 | Reception | Success | Received | | -| Lab | | | AS004 | Preparation | | Pre-analytical | Sentrifugasi | -| Lab | | | AS004 | Preparation | Failed | Pre-analytical failed | | -| Lab | | | AS004 | Preparation | Success | Pre-analytical | Serum/plasma ready | -| Lab | | | AS004 | Preparation | | Pre-analytical | Aliquoting | -| Lab | | | AS004 | Preparation | Failed | Pre-analytical failed | | -| Lab | | | AS004 | Preparation | Success | Pre-analytical | *Secondary tube ready* | -| | | | AS005 | Dispatching | | In-transport | dikirim ke lab rujukan | -| | | | AS005 | Dispatching | Failed | Transport failed | dikirim ke lab rujukan | -| | | | AS005 | Dispatching | Success | In-transport | dikirim ke lab rujukan | -| LabRujukan | | | AS003 | Reception | | In-transport | | -| LabRujukan | | | AS003 | Reception | Failed | Rejected | | -| LabRujukan | | | AS003 | Reception | Success | Received | diterima di lab rujukan | -| LabRujukan | | Instrument[^8] | AS003 | Reception | | To be analyze | | -| LabRujukan | | Instrument^5^ | AS003 | Reception | Failed | Analytical failed | | -| LabRujukan | | Instrument^5^ | AS003 | Reception | Success | Analytical | diterima di Instrument[^9] | -| Lab | Ref_1[^10] | | AS003 | Reception | | To be stored | | -| Lab | Ref_1 | | AS003 | Reception | Failed | Store failed | | -| Lab | Ref_1 | | AS003 | Reception | Success | Stored | disimpan di refrigerator | -| | Tungku_1 | | AS003 | Reception | | To be destroyed | Akan dimusnahkan | -| | Tungku_1 | | AS003 | Reception | Failed | Failed to destroy | Gagal dimusnahkan | -| | Tungku_1 | | AS003 | Reception | Success | Destroyed | Sudah dimusnahkan | - -Table 8 productcatalogext - -- **Specimen** **transport.** Merupakan fungsi memindahkan/mengirimkan - specimen dari satu tempat ke tempat lain, baik di dalam fasyankes - maupun keluar (*site* *to* *site* lain -- rujukan). Termasuk di - dalamnya, fungsi-fungsi: - - - *pakcage identification* - - - identitas pengirim dan penerima - - - pencatatan waktu dan lokasi serah terima - - - pencatatan kondisi specimen selama transport (suhu, dll) - -- **Specimen Preparation**. Yaitu persiapan specimen (pra-analitik) - untuk dianalisis. Termasuk diantaranya sentrifugasi, penambahan - aditive, *pretreatment* untuk memisahkan *supernatant*, dll - -- **Specimen storage.** Yaitu penyimpanan specimen pra-analitik (untuk - kepentingan *pooling*, *scheduling*) dan pasca analitik (*sample - retention*). termasuk: - - - suhu penyimpanan mempengaruhi *long/short term storage* - - - jumlah *thawing*/*fresh-thaw cycles*. - -> **SID** sepanjang 17 karakter dengan ketetuan sebagai berikut: -> -> **\SSSC atau** **LLYYMMDDXXXXXSSSC** -> -> dimana: - -| **Komponen** | **Tipe data & range** | **Arti & ketentuan** | -|-------------------|-----------------------|--------------------------------------| -| **LLYYMMDDXXXXX** | | Order ID | -| **SSS** | Numeric, (001 -- 999) | *container code* | -| **C** | Numeric, (0-9) | *count*, menandakan *container* ke-C | - -Table 9 unitgroupext - -- - -> SID berlaku di semua *sites* dalam lingkungan *muti-sites*. SID dari -> *source site* digunakan untuk memproses *specimen* di *production -> site*. - -#### - -#### - -#### Test Result Management - -> System mampu mengelola hasil-hasil test, meliputi: - -- hasil kalibrasi, QC, pasien - -- data-data penunjang lainnya. - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 10 productext

    -
    Life Cycle ActivityISO 15189 ClauseTask Includes
    1. Test Ordering

    5.4.3

    -

    Order Form

      -
    • Initiated by a clinician or system. Result of Test Ordering -activity.

    • -
    • Includes patient ID, specimen type, test type, urgency, and -clinical notes

    • -
    • May be electronic (HL7 ServiceRequest) or paper-based

    • -
    Specimen Receptionin the lab
    2. Test Scheduling

    5.4.4

    -

    Specimen Collection

      -
    • Assigns time slot, lab section, and priority. Tests are assigned -to workstation.

    • -
    • May batch similar tests for efficiency

    • -
    • Links to specimen availability and equipment readiness;

    • -
    3. Test Preparation

    5.4.5

    -

    Pre-analytical Process

      -
    • Includes reagent setup, calibration, and control checks

    • -
    • Verifies specimen integrity and compatibility

    • -
    • Logs technician identity and pre-analytical conditions

    • -
    4. Test Execution (analytical)

    5.5

    -

    Analytical Phase

      -
    • Actual analytical procedure (e.g., PCR, ELISA, -hematology)

    • -
    • Performed manually or via automated analyzers

    • -
    • Captures raw data, flags, and instrument logs

    • -
    - - ----- - - - - - - - - - - - - - - -
    -

    Table 11. productuse

    -
    UniDirectional2Directional Push2Directional Query

    Specimen in

    -

    User input data

    -

    Analyse

    Data tx to inst.

    -

    Specimen in

    -

    Analyse

    Specimen in

    -

    Query

    -

    Data tx to inst

    -

    Analyse

    5. Quality Control

    5.6

    -

    Quality Assurance

      -
    • Runs internal and external controls

    • -
    • Validates test performance (e.g., sensitivity, -specificity)

    • -
    • May trigger repeat testing if control fails

    • -
    6. Result Interpretation

    5.7

    -

    Result Review

      -
    • Converts raw data into clinical meaning

    • -
    • May involve reference ranges, algorithms, or scoring -systems

    • -
    • Reviewed by lab personnel or -auto-validated

    • -
    7. Result Reporting

    5.8

    -

    Reporting of Results

      -
    • Transmitted to HIS, LIS, or EHR

    • -
    • Includes test name, result, units, reference range, and -interpretation

    • -
    • May be mapped to HL7 FHIR Observation or -DiagnosticReport

    • -
    • pelaporan nilai kritis

    • -
    8. Result Verification

    5.9

    -

    Verification

      -
    • Reviewed and signed off by authorized -personnel

    • -
    • May include second-level review for critical -values

    • -
    • Logged for audit and compliance

    • -
    9. Clinical Correlation

    5.10

    -

    Clinical Advice

      -
    • Clinician reviews results in context of patient history

    • -
    • May trigger follow-up tests, treatment, or consultation

    • -
    10. Archiving

    5.11

    -

    Record Retention

      -
    • Test data stored for legal, research, or quality -purposes

    • -
    -
      -
    • Duration depends on jurisdiction and test type

    • -
    11. Audit & Traceability

    4.14

    -

    Traceability

      -
    • Every step logged: who did what, when, and how

    • -
    • Supports ISO 13485, ISO 15189, and CAP standards

    • -
    - -Table 10 productext - -| **TestActivity** | **ActRes** | **TestStatus** | -|------------------------------------------------|------------|-------------------------| -| ORD (Test Ordering) | \ | Future test order | -| ORD (Test Ordering) | Success | Test ordered | -| ORD (Test Ordering) | Failed | Test ordering failed | -| SCH (Scheduling) | \ | Waiting to be scheduled | -| SCH (Scheduling) | Success | Test is scheduled | -| SCH (Scheduling) | Failed | Schedule failed | -| ANA (Analyse) | \ | Waiting to be analyse | -| ANA (Analyse) | Success | Analysed | -| ANA (Analyse) | Failed | Analysis failed | -| VER (Result Verification/Technical Validation) | \ | Waiting to be verified | -| VER (Result Verification/Technical Validation) | Success | Verified | -| VER (Result Verification/Technical Validation) | Failed | Verification failed | -| REV (Clinical Review/Clinical Validation) | \ | Waiting to be reviewed | -| REV (Clinical Review/Clinical Validation) | Success | Reviewed | -| REV (Clinical Review/Clinical Validation) | Failed | Review failed | -| REP (Reporting) | \ | Waiting to be reported | -| REP (Reporting) | Success | Reported | -| REP (Reporting) | Failed | Reporting failed | - -Table 12. AreaGeo - - - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 13. AreaDef

    -
    Definisi Jenis TestDescription
    -

    Inventory1

    -
    -

    Specimen

    -
    -

    Display2

    -
    TestAtomic test, yaitu tes yang dikerjakan oleh fasyankes.YaYaYa
    ParameterTambahan data yang bisa saja menjadi faktor dalam Calculated -Test. Bisa diisi di luar Result Entry session.TidakTidakYa
    Calculated TestHasil perhitungan satu atau lebih Test atau Parameter.TidakTidakYa
    ProfileGrouping. Terdiri dari beberapa test yang dikerjakan -menggunakan specimen yang sama. Misalnya: Lipid Profile, -Electrolyte, dllTidak3Tidak4Tidak
    Functional ProcedureGrouping. Terdiri dari beberapa pengukuran yang terkait -satu sama lain. Biasanya dilakukan di waktu /menggunakan specimen yang -berbeda Misalnya: Glucose Tolerance Test, Creatinine Clearance, dllTidak13Tidak14Tidak
    SupersetGrouping. Terdiri dari beberapa test/parameter terlepas -dari ikatan specimen. Misalnya paket MCU, Panel Rutin (CBC, UA, -electrolytes), dllTidak13Tidak14Tidak
    TitleJudul. Misalnya: Fungsi Hati, Fungsi Ginjal, dllTidakTidakYa
    - - -Table 13. AreaDef - -> *Profile*, *Functional* *Procedure* dan *Superset* dijadikan satu -> jenis yaitu ***Group Test*** - -| **Definisi** **Jenis** **Hasil** **Test** | **Description** | -|-------------------------------------------|--------------------------------------------------------------------------------------------------------| -| *Numeric* | Hasil berupa angka (*numeric*) tunggal. | -| *Range* | Hasil berupa rentang angka (*numeric range*). Misalnya hasil Eritrosit Sedimen Urin adalah 0 -- 1 /LPB | -| *Text* | Hasil berupa teks bebas. | -| *Value set* | Hasil teks tertentu yang telah didefinisikan dalam *Value Set*. | - -Table 14. AreaDet - -| **Definisi Jenis** **Nilai Rujukan** | **Description** | -|--------------------------------------|---------------------------------------------------------------------| -| *Range* | Nilai rujukan berupa *range* | -| *Threshold* | Nilai rujukan berupa *cut-off* dan *grayzone*. | -| *Value Set* | Nilai rujukan berupa *text*. Flag bisa ditampilkan jika tidak sama, | -| *Text* | Nilai rujukan berupa *text*, lebih untuk deskripsi. | - -Table 15. GeoLocationFix - -> Test Result Management meliputi fungsi-fungsi sebagai berikut: - -- **Test Library**. Yaitu definisi test berikut nilai rujukannya sesuai - usia, gender dan jenis sample pasien. Termasuk: - - - relasi test dengan jenis *specimen* dan *specimen container*. - - - Sinkronisasi test baru dengan *host*. - - - relasi dengan *discipline* untuk pengelompokan secara keilmuan - - - relasi dengan *workstation* untuk ditribusi pekerjaan - -- **Test Production**, termasuk di dalamnya: - - - distribusi produksi test baik *intra site* (dalam site yang sama), - *inter sites* (antar site yang berbeda) maupun merujuk ke - laboratorium di luar. - - - distribusi produksi *intra site* termasuk distribusi produksi test - ke: - - - *department* - - - *workstation* - - - *instrument*/*equipment* - - - *Test Referring*. Yaitu pengelolaan test rujukan baik di dalam - *system* yang sama (*multi sites*) maupun berbeda (dengan mengirim - hasil antar laboratorium). - -- **Result acquisition**. Termasuk: - - - penerimaan hasil dari instrument - - - penerimaan hasil memicu rerun - - - rerun manual - -- **Test Production Analysis**. Monitoring jumlah tes yang diproduksi - setiap instrument/site atau keseluruhan. Analisis produksi test dengan - bahan yang digunakan (kesesuaian jumlah tes dengan reagen). - -- **Reagent identification & inventory**. Identifikasi unik reagen untuk - *traceability* dan memudahkan analisis. Pencatatan dan pelaporan - penggunaan barang habis pakai yang digunakan dalam produksi test - -- **Test Results Archive**. Adalah akumulasi dari semua tes yang - dikerjakan di sites, meliputi kalibrasi, kontrol, hasil pasien - (anonym). Bertujuan untuk analisis statistik dan system monitoring. - -> Konsep pengelolaan hasil tes adalah sbb: -> -> ![](media/image3.png){width="5.124359142607174in" -> height="2.7564260717410325in"} - -Gambar Mapping & transmission - -> ![](media/image4.png){width="5.5in" height="2.2in"} - -Gambar Multiple sites connection to server - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 16. GeoLocationDyn

    -
    Server (on premise/cloud)ReplikasiWorkstation (on premise)

    patient

    -

    patcom

    -

    patdiag

    order

    -

    ordercom

    specimens

    -

    specimencollection

    testdefsite

    -

    testdeftech

    patres

    -

    patresflag

    -

    patrestech

    - -Table 16. GeoLocationDyn - -- Kode test dari instrument dipetakan ke LQMS. Relasi instrument -- LQMS - bisa one to many, misalnya pada tes glukosa. - -- Kode test dari LQMS dipetakan ke database di server SUMMIT - -- Hasil tes yang meliputi kalibrasi, QC dan hasil pasien, dikirimkan - instrument ke LQMS melalui koneksi LAN/RS232 menggunakan protocol - HL7/ASTM/db connection, secara real-time. - -- Hasil tes di LQMS di-replikasi ke server SUMMIT melalui secured VPN. - Replikasi dilakukan secara batch. - -#### Result Reporting - -> Pelaporan hasil pasien yang utama adalah *result report*, menggunakan -> struktur yang terdiri dari: - -- **Header** / Administrative Data, terdiri dari: - - - *Patient identifiers* (nama, PID, DOB, sex, dll) - - - *Encounter details* (Visit ID, *admission*/*discharge* *dates*) - - - *Ordering provider* (*referring*/*attending doctor*, dll) - - - *Report identifiers* (Order ID, dll) - - - Date/time of specimen collection, receipt, and result release - - - -- **Specimen Information** - - - Specimen type (blood, urine, stool, tissue, etc.) - - - Collection method (venipuncture, biopsy, swab) - - - Specimen ID/barcode - - - Condition/quality notes (hemolyzed, insufficient volume) - - - -- **Test** / Observation Results. Each test result is structured with: - - - Test code (LOINC or local code) - - - Test name (e.g., Glucose, HbA1c, LDL) - - - Result value (numeric, qualitative, or textual) - - - Units (UCUM standard, e.g., mg/dL, mmol/L) - - - Reference range (normal values by age/sex) - - - Interpretive flags (H = high, L = low, A = abnormal) - - - Methodology (e.g., ELISA, PCR, ISE) - - - Performing lab (location, CLIA/ISO accreditation) - - - -- **Interpretation** / Narrative - - - Pathologist or clinician comments - - - Clinical correlation (e.g., "Suggestive of iron deficiency anemia") - - - Recommendations (follow-up tests, repeat sampling) - - - -- **Authentication** - - - Authorized sign‑off (lab director, pathologist, or attending - physician) - - - Digital signature or electronic validation - - - Date/time of report finalization - -> Tampilan test diatur menggunakan struktur discipline -- panel[^11]. -> Panel bisa bersifat *nested*, dengan relasi *parent*/*child*. -> -> **[Fixed Panels & Flexible Panels]{.smallcaps}** -> -> ***Fixed Panels***, adalah panel baku yang berlaku di kebanyakan -> laboratorium. Misalnya: Darah Lengkap, Fungsi Ginjal, Fungsi Hati, -> Urin Rutin, Hemostasis, dll. -> -> ***Flexible Panels*,** adalah panel yang dibuat laboratorium atau -> klinisi untuk tujuan tertentu. Misalnya: Pre‑op Panel, terdiri dari -> Darah Lengkap + Koagulasi + Elektrolit. *Flexible Panels* dikelola -> dengan GRP. -> -> Pengaturan: - -- *Fixed Panels* dan *Flexible Panels* berupa definisi di table fixpanel - dan namanya tercetak di *report*, di atas semua tes yang menjadi - bagian dari keduanya. - -- pada *nested panels*, *parent panel* ditampilkan/dicetak di atas - *child panel*. - -#### Calibration Management - -> Pengelolaan kalibrasi meliputi: - -1. **Calibrator identification**. Identifikasi unik bahan calibrator - untuk *traceability* dan memudahkan analisis. - -2. **Calibration Process**. Aplikasi mengelola tahapan proses kalibrasi - sebagai salah satu Tindakan quality management: - - - Pencatatan penerimaan bahan kalibrator di site (lihat Inventory - > Management). - - - Persiapan bahan: pengenceran, aliquoting, pencatatan tanggal buka - > vial. - - - Tindakan kalibrasi: jenis test yang dikalibrasi, pencatatan hasil - -3. **Multi-Calibrator, Multi-Level**. Aplikasi mampu mengelola - hasil-hasil kalibrasi (*factor*, *absorbance*) lebih dari satu - bahan/merek/nama dan berbagai level. Termasuk perubahan no lot dan - nilai target masing-masing kalibrator untuk tiap test. - -4. **Calibration parameter check**. Fungsi ini membandingkan parameter - kalibrasi yang di-*set* di instrument (Table 61 calparinst) dengan - yang tercantum di kit inserts (Table 59 caldef). Jika ditemukan - *discrepancy*, maka otomatis akan ada flag "Require manual - validation". - -| **caldef fields** | **calparinst fields** | -|-------------------|-----------------------------------------| -| Calibrator | Calibrator | -| LotNumber | LotNo | -| ExpiryDate | ExpiryDate | -| Reagent | TestInstID1 Reagent (Table 52. testdef) | -| SpcTypeID | SampleType | -| Level | Level | -| Value | Concentration | -| Unit | CalUnit | -| InstrumentAlias | EquipmentID InstrumentAlias | -| | | - -Table 19. discipline - -5. **Calibration result check**. Fungsi ini membandingkan hasil - kalibrasi dengan nilai target yang tercantum di kit inserts dengan - nilai target yang di-*setting* di setiap instrument. Jika ditemukan - *discrepancy*, maka otomatis akan ada flag - -6. **Cumulative View**. Adalah fungsi untuk: - - - Menampilkan factor kalibrasi setiap test berdasarkan urutan waktu. - - - Membandingkan factor kalibrasi setiap test berdasarkan urutan - > waktu, dari beberapa instrument sejenis. - -7. **Statistical Analysis**. Yaitu menghitung dan menampilkan - ukuran-ukuran statistik (mean, SD, CV dan Standard Deviation - Interval (SDI)) dari variable factor kalibrasi: - - - Menghitung dan menampilkan ukuran-ukuran statistic per test dari - > suatu instrument - - - Flagging untuk factor yang melewati x% dari mean. - - - Menghitung dan menampilkan ukuran-ukuran statistic per test dari - > beberapa instrument sejenis dan menggunakan kalibrator yang - > sama. - -8. **Kit inserts repository**. Kit inserts bisa diupload ke server - pusat sebagai lampiran dan berfungsi sebagai underlying data bagi - fungsi Calibrator check. - -#### Quality Control Management {#quality-control-management} - -> Pengelolaan Quality Control (QC) meliputi: - -1. **QC identification**. Identifikasi unik bahan QC untuk - > *traceability* dan memudahkan analisis. - -2. **Quality Control Process**. Aplikasi mengelola tahapan proses QC - sebagai salah satu tindakan quality management: - - - Pencatatan penerimaan bahan QC di site (lihat Inventory - > Management). - - - Persiapan bahan: pengenceran, aliquoting, pencatatan tanggal buka - > vial. - - - Tindakan QC: jenis test, level, pencatatan hasil - - - Validasi - -3. **Multi-Control, Multi-Level**. Aplikasi mampu mengelola hasil-hasil - > QC lebih dari satu bahan/merek/nama dan berbagai level control. - > Termasuk mengelola nilai target masing-masing control untuk tiap - > test. - -4. **Pengelolaan Perubahan nomor Lot. QC**. Aplikasi mampu mengelola - > perubahan nomor lot control termasuk menyesuaikan tampilan layar - > dan cetakannya. - -5. **Levey-Jennings Chart**. Aplikasi mampu menampilkan hasil-hasil - > control dalam grafik Levey-Jennings dengan parameter statistic - > masing-masing (Mean, 1SD, 2SD): - -- 1 level control dari satu laboratorium - -- multi-level control dari satu laboratorium - -- 1 level control dari user selected laboratoium (beberapa instrument) - -- Multi-level control dari user selected labratorium (beberapa - > instrument) - -- Flagging jika suatu nilai berada di luar batas statistik - -6. **Six-Sigma**. Aplikasi mampu menghitung Sigma score masing-masing - > test dan tersedia pilihan *True* *Value*: - - - User-defined (misalnya menggunakan external QC) - - - Rerata QC harian - -7. **Z-Score** berdasarkan method, instrument, peer. - -8. **QC check**. Fungsi *QC check* membandingkan nilai target yang - tercantum di kit inserts dengan nilai target yang di-*setting* di - setiap instrument. Jika ditemukan *discrepancy*, maka otomatis akan - ada flag. - -9. **QC validation**. Jika hasil QC di dalam batas 2SD maka otomatis - tervalidasi, sebaliknya akan memicu alert dan memerlukan validasi - manual. - -10. **Kit inserts repository**. Kit inserts bisa diupload ke server - > pusat sebagai lampiran dan berfungsi sebagai *underlying* *data* - > bagi fungsi Calibrator check. - -#### Analisis Statistik per Site/Instrument - -#### Automatic Data Retrieval {#automatic-data-retrieval} - -> Aplikasi terhubung online (real time/batch processing) dengan -> instrument-instrument laboratorium atau entitas lain melalui -> mekanisme: - -- instrument interfacing berbasis ASTM/HL7 - -- database connection (Lampiran 1) - -- file-based integration (Lampiran 2) - -> Aplikasi mampu menerima data-data berikut dari: - -- absorban kalibrasi termasuk perulangannya - -- hasil control termasuk perulangannya - -- data sample (nomor sample, jenis sample) - -- hasil pasien termasuk perulangannya - -- waktu pengerjaan semua aktivitas di atas - -#### - -#### - -#### - -#### - -#### - -#### - -#### - -#### - -#### - -#### - -#### - -#### - -#### - -#### - -#### - -#### - -#### Medical Coding - -> Aplikasi mampu menggunakan berbagai macam coding system (LOINC, -> SNOMED, dll). - -#### Billing/Collection - -> Aplikasi mampu mengelola billing atas layanan yang dilakukan, antara -> lain: - -1. ***multiple*** ***tariff***, yaitu kemampuan untuk membedakan harga - untuk setiap kelas layanan. - -2. ***multiple component***, yaitu kemampuan untuk mendefinisikan - komponen penyusun harga. - -3. ***effective date time***, yaitu *setting* waktu dimana harga mulai - berlaku. - -#### - -#### Data Acquisition {#data-acquisition} - -> Aplikasi mampu melakukan akuisisi data secara: - -- **On-line**, yaitu melalui *instrument connection*. Agar fungsi ini - > berjalan, dibutuhkan: - - - **Instrument library**. Aplikasi menyimpan data instrument yang - > digunakan site. - - - **Multi-protocol**. Aplikasi mampu berkomunikasi dengan instrument - > menggunakan berbagai macam protocol (ASTM, HL7). - - - **Secure connection**. Koneksi dengan instrument dilakukan melalui - > sambungan yang aman. - - - -- **Manual**, yaitu melalui ekstraksi database, csv file atau text file. - -#### Inventory Management {#inventory-management} - -> Aplikasi mempunyai fungsi-fungsi sebagai berikut: - -- **Catalog**. Aplikasi menyimpan data barang dan jasa yang dipasarkan - > Perusahaan dan berbagai perusahaan diagnostic lainnya. Termasuk - > fungsi: - - - Sorting barang/jasa berdasarkan vendor, jenis barang/jasa - - - Pencarian barang/jasa tertentu. - - - Meyimpan dan menampilkan gambar barang - -- **In-instrument consumables identification**. Aplikasi mampu - > mengidentifikasi identitas kalibrator, control, reagen dan - > consumables yang terpasang di instrument - -- **Procurement**. Site bisa menggunakan aplikasi untuk menyusun rencana - > pembelian barang dan jasa yang dibutuhkan. - -- **Penerimaan dan penyimpanan barang**. Aplikasi mengelola proses - > penerimaan barang di *site* melalui mekanisme transaksi *inventory*. - > Pada saat penerimaan, *user* mencatat: - - - Identitas barang, jumlah, no. lot, expiry date - - - Identitas penerima - - - Waktu penerimaan barang - - - Tempat penyimpanan barang - -- **Pencatatan**. Pencatatan penggunaan barang habis pakai di-*trigger* - > oleh *activity* yang dilakukan pada *object*. Misalnya: - -| **Activity** | **Obyek** | **Representasi Obyek** | -|--------------|--------------|------------------------| -| Collection | Specimen | SID | -| Execution | Test_QC | TestCode | -| Execution | Test_patient | TestCode | - -Table 20 department - -- **Monitoring**. Aplikasi bisa digunakan untuk: - - - menampilkan barang di tempat penyimpanan (*counter*[^12]) dalam - > berbagai tingkat satuan (pack- pcs, kit-vial-test, dll). Aplikasi - > hanya menampilkan counter dari site dimana user melakukan log in. - - - memantau jumlah dan *expiry date* barang di inventory tiap site - - - menampilkan/memberi peringatan jika ada barang yang telah berada di - > bawah minimum stok, dll. - -- **Karantina dan pemusnahan barang**. - -- **Analysis**. Aplikasi bisa digunakan untuk melakukan analisis - > efisiensi. - -#### - -#### - -#### Error Management {#error-management} - -> Aplikasi mempunyai fungsi-fungsi pencatatan (log) dan tindakan -> otomatis jika terjadi error. Pencatatan dilakukan dengan menerapkan -> **prinsip** **audit**, yaitu mencatat (*to log*): - -- data yang diubah (**what**), sehingga perlu pencatatan detail: - - - operasi/*activity* yang dilakukan - - - nama table - - - nama field - - - previous value - -- kapan terjadinya operasi/*activity* (**when**) - -- siapa yang melakukan operasi/*activity* (**who**) - -- bagaimana operasi/*activity* dilakukan (**how**) yaitu dengan mencatat - > applicationID, halaman web, *session*, *event*, mekanisme (manual - > atau perulangan dari instrument -- *duplo*) *system identification*. - -- dari lokasi mana operasi/*activity* dilakukan (**where**), yaitu site, - > *workstation*, pc dimana operasi/*activity* dilakukan (termasuk - > informasi lokasi) *access location*. - -- alasan operasi/*activity* (**why**), diinput oleh user yang melakukan - > operasi/*activity* - -> Jenis-jenis log yang digunakan dalam audit trail adalah: - -1. ***data log***, yaitu *log of events* (catatan kejadian) terkait - > data. Antara lain: - - a. operasi data demografi pasien, *visit*, *test ordering*, - > *samples*, hasil dan semua yang terkait dengan pasien - - b. operasi data *user* - - c. operasi data *master* (tests, location, doctors, dll) - - d. *data archiving activity* - - e. kegagalan (*transaction errors*), misalnya kegagalan *posting* - > *database*, dll - -2. ***service log***, yaitu catatan kejadian terkait *services* [^13]. - > Antara lain: - - a. komunikasi: *host communication*, *instrument communication*, - > dll - - b. *resource access*: database access/backup/restore, network - > access, internet access, (IP address & port), dll. - - c. manual/automatic *printing* (*service class*) - - d. manual/automatic *messaging* - - e. kegagalan (*system error*) - -3. ***security log***, yaitu catatan kejadian terkait pengaturan akses, - > hal-hal terkait lintas boundary: - - a. user logins and logouts (*security class*) - - b. accessing sensitive files/folders - - c. network share access attempts - - d. perubahan system security settings - - e. percobaan input password yang gagal - - f. install/uninstall aplikasi - - g. system shutdown/restart events - - h. perubahan user access (*disabled*, perubahan *access rights*, - > dll) - - i. kegagalan (*security error*) - -4. **error log**, yaitu catatan kejadian error. Error log ada untuk - > setiap entity, misalnya: - - a. instrument error log - - b. integration error log - - c. dll - -#### Archiving {#archiving} - -> **Operational system**[^14] adalah sistem yang beroperasi rutin, -> digunakan memproses pekerjaan sehari-hari. -> -> **Datawarehouse** [^15]adalah sistem yang digunakan untuk *reporting* -> dan *data analysis*. -> -> Konsep fungsi archiving - -- *Archiving* berarti memindahkan data dari operational system ke *data - > warehouse*. - -- Obyek *archive* adalah hospitalization record berikut detail - > record-nya (test order) dan merupakan data yang valid/benar. Bukan - > test order yang tidak ada hasilnya atau tidak selesai/lengkap. perlu - > kriteria data yang layak untuk archive. - -- *Archive* bisa dilakukan secara otomatis atau manual. - -- Struktur table pada *datawarehouse* berbeda dari operational system - > dan menitikberatkan pada efisiensi, efektifitas dan kemudahan - > *reporting* dan *analysis*. - -- Data yang sudah di-*archive* tidak bisa/boleh di-edit lagi atau - > dihapus. - -### Non-Functional Requirements[^16] - -> Realisasi *non-functional requirement* tidak terbatas pada satu bagian -> sistem saja. - -- *Flexible*: - - - *Multi-platform*: bisa dijalankan di MS Windows maupun Linux - - - bisa di-install *on-premise* maupun *on-cloud*. - -- *Cost effective and efficient*: - - - bisa dijalankan di *hardware* dengan harga ekonomis. - - - *quick implementation*. - - - *Intuitif*, mudah digunakan dan hanya memerlukan pelatihan singkat - bagi penggunanya. - -- - -- *Scalable*: - - - mampu melayani x visit pada saat yang sama, dengan performa terjaga - - - The landing page supporting 5,000 users per hour must provide 6 - second or less response time in a Chrome desktop browser, including - the rendering of text and images and over an LTE connection. - -- *Interoperability* - - - support international standard protocols (HL7, FHIR, ASTM) - - - bisa di-integrasikan dengan SUMMIT CRM - -- memiliki *user interface* yang menarik dan mudah dipahami (menampilkan - > grafik *Levey-Jennings* dll). - -- - -- *Secure*: - - - *user login* - - - *anonymous patient data*, etc.) - - - *encrypted sensitive data* (*password*, *patient identification*, - dll). - - - - -## Model Use Case - -Model use case Utama terdiri dari 2, yaitu: - -1. CLQMS -- SMCRM Integration - -2. CLQMS - -### CLQMS -- SMCRM Integration {#clqms-smcrm-integration} - -> Berikut adalah penjabaran *use case* CLQMS -- SMCRM Integration: - -#### Diagram Use Case -- Equipment Installation to Decommissioning {#diagram-use-case-equipment-installation-to-decommissioning} - - - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 21 workstation

    -
    ActivityDescription
    Equipment Delivery
      -
    • TSS memastikan Account, Site, Equipment tercatat di SMCRM, -berikut perpindahannya dari gudang Perusahaan ke Site.

    • -
    • SMCRM mencari CLQMS dengan Account dan Site yang sama. Jika ada, -maka equipment ditambahkan ke site, sesuai apa yang -terjadi di SMCRM.

    • -
    Installation
      -
    • TSO melakukan instalasi dan mencatatkan activity di -SMCRM.

    • -
    • SMCRM replikasi activity instalasi ke CLQMS terkait, -sehingga data instalasi equipment tercatat di CLQMS. User -laboratorium bisa melihat activity dan data instalasi -equipment di CLQMS

    • -
    Installation & Calibration Certificates
      -
    • TSO membuat Installation Certificate dan Calibration Certificate -di SMCRM pasca instalasi.

    • -
    • SMCRM replikasi kedua certificates ke CLQMS sehingga -user laboratorium bisa melihat, download dan -print keduanya.

    • -
    User Training
      -
    • TSO mengakhiri instalasi dengan activity user -training dan pendampingan.

    • -
    • TSO membuat user training activity report di -SMCRM

    • -
    • SMCRM replikasi activity report ke CLQMS terkait, -sehingga data activity tersebut tercatat di CLQMS sesuai dengan -equipment. User laboratorium bisa melihat user -training activity di CLQMS

    • -
    User Training Certificates
      -
    • TSO memastikan user tercatat di CLQMS.

    • -
    • CLQMS replikasi data para user ke SMCRM (Contact & -ContactDetail).

    • -
    • TSO membuat User Training Certificate di SMCRM.

    • -
    • TSO Bersama TSM approve certificate secara -digital sehingga certificate available di -SMCRM.

    • -
    • SMCRM replikasi approved User Training Certificate ke -masing-masing user di CLQMS.

    • -
    • Masing-masing user bisa melihat User Training -Certificates-nya di CLQMS.

    • -
    Maintenance
      -
    • TSO melakukan maintenance dan mencatatkan -activity di SMCRM.

    • -
    • SMCRM replikasi maintenance activity ke CLQMS -terkait, sehingga data equipment maintenance tercatat -di CLQMS. User laboratorium bisa melihat activity yang -dilakukan atas equipment di CLQMS

    • -
    Services
      -
    • user laboratorium melaporkan incident terkait -equipment ke CLQMS

    • -
    • CLQMS push informasi tersebut ke SMCRM

    • -
    • TSO merespon incident tersebut dan melaporkan di -SMCRM.

    • -
    • SMCRM replikasi TSO ke CLQMS terkait

    • -
    • user laboratorium bisa melihat progress/penyelesaian -incident di CLQMS. Incident tercatat di -equipment yang tepat.

    • -
    Decomissioning
      -
    • TSO melakukan penarikan equipment dan mencatatkan -activity di SMCRM.

    • -
    • SMCRM replikasi activity penarikan equipment ke -CLQMS terkait, sehingga data penarikan equipment tercatat di -CLQMS. User laboratorium bisa melihat activity dan data -penarikan equipment di CLQMS. Equipment secara -otomatis disabled di CLQMS.

    • -
    - -Table 21 workstation - -- - -### Definisi Actor - -> \ - -# Detail Teknis dan Implementasi - -## Hardware - -### Virtual Private Server (VPS) - -| Minimum specification | 2 vCPU, 2 GB RAM, 1 GBps bandwidth | -|-----------------------|------------------------------------| -| VPN Server | WireGuard Server | -| Reverse Proxy | NginX | - -Table 22 Contoh definisi Account - -### Local/Site Server {#localsite-server} - -| Minimum specification | | -|----------------------------|-------------------| -| VPN Client | WireGuard | -| Web Server (local) | Apache | -| RDBMS | MariaDB | -| Backend (CodeIgniter 4) | PHP v8.2.20 | -| Frontend (SvelteKit5) | Node.js v22.17.0 | -| Dependency Management | Npm & Composer | -| Module bundler (SvelteKit) | Vite | -| Command-line interface | Git Bash/Terminal | - -Table 23 Contoh definisi Site - -### Client PC - -| Minimum specification | WLAN/Ethernet | -|-----------------------|---------------------------------------------| -| | BrowserWeb based server on premise/on cloud | -| | | - -Table 24 Contoh definisi Department - -## Software - -\ - -## Language - -\. - -## Framework - -### Back End - -Back end menggunakan: - -- FW - CI4 -- PHP - -- Websocket (Swoole, Workerman, Microsocket) - -- Webserver NGINX - -### Front End - -Front end menggunakan: - -- FW -- Svelte 5, JS - -- CSS - TailWind 4 - -- UIKit shadcn / DaisyUI - -### UI/UX - -User Interface/eXperience menggunakan: - -- Figma - -- HTML - CSS (Tailwind + DaisyUI) - -- JS - SvelteKit - -## Network Architecture - -![](media/image5.jpg){width="4.916245625546806in" -height="3.8095505249343833in"} - -Gambar . Network Architecture - instrument connections - -## Database - -Database management system menggunakan **PostgreSQL** **+ Design** -**DB**. Design tables adalah sebagai berikut: - -### Vendor - -> Tabel yang menyimpan data vendor, yaitu perusahaan/orang yang -> menyediakan barang/jasa bagi laboratorium klinik. Definisi table -> Vendor ada di project ***Customer Relationship Management* (CRM)** -> (prj_crm_origin.docx). - -### Product {#product} - -> Pengelolaan product yang digunakan di sites meliputi: - -- **ProductCatalog**. Tabel yang menyimpan data barang/jasa[^17] yang - dipasarkan oleh Perusahaan. - -- **productcatalogext**. Tabel yang menyimpan data barang/jasa yang - digunakan tiap site yang berasal dari perusahaan lain. ProductCatalog - dan productcatalogext bersifat *complementor* dan *exclusive*[^18]. - Keduanya saling melengkapi, item yang sudah ada di ProductCatalog, - tidak ada di productcatalogext. - -- **productext**. - - - tabel yang menyimpan data product yang digunakan oleh masing-masing - > sites. Produk berasal dari table ProductCatalog dan - > productcatalogext. - - - mengantisipasi kemungkinan barang/jasa yang sama tetapi dipasarkan - > oleh perusahaan yang berbeda. - - - menyimpan identitas perusahaan yang mendistribusikannya ke - > laboratorium klinik (site). - -- **productuse** berisi data setting/tetapan penggunaan product di - setiap instrument di site tertentu untuk memproduksi satu test. - - - Volume aspirasi R1, R2, R3, R4 - - - Jumlah tes/kit, jumlah tes/botol - -- - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 25 Contoh definisi Workstation

    -
    FieldTipe dataDisplayKeterangan
    CatalogExtIDnvarcharExternal Catalog IDPK
    SiteIDnvarcharSite ID

    FK dari table Site13

    -

    Tempat dimana produk berada/digunakan.

    CatalogExtNumbernvarcharExternal Catalog NumberBerisi nomor katalog produk dari berbagai perusahaan.
    ProductExtNamenvarcharExternal Product NameNama produk
    VendorIDnvarcharVendor IDFK, dari table Vendor
    TypenvarcharType
      -
    • analyzer

    • -
    • reagent

    • -
    • sparepart (Spare Part_Analyzer)

    • -
    • sparepart_o (Spare Part_Other)

    • -
    • calibrators

    • -
    • controls

    • -
    • washsol (washing solution)

    • -
    • othcons (other consumables)

    • -
    • accessories

    • -
    • license (TD, Microsoft, Symantec, dll)

    • -
    • server

    • -
    • pc

    • -
    • ups

    • -
    • avr

    • -
    • it (Isolation Transformer)

    • -
    • docprinter (Document Printer)

    • -
    • bcdprinter (Barcode Printer)

    • -
    • bcdscanner (Barcode Scanner)

    • -
    • wtrtreatment (Water Treatment)

    • -
    ManufacturernvarcharManufacturer

    Berisi Manufacturer ID. Pabrikan yang membuat produk. Misal:

    -

    Server HP ML150 dibeli di toko Columbia. Maka: Vendor: Columbia; -Manufacturer: HP. VendorID dan Manufacturer berasal dari tabel -Vendor

    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat.
    EndDateDate TimeEnd Date

    Jika EndDate terisi berarti product tersebut disabled di -semua bagian aplikasi:

    -
      -
    • Menandai record ini sudah tidak berlaku -lagi/discontinue.

    • -
    • Tidak bisa dipilih untuk berbagai setting.

    • -
    - -Table 25 Contoh definisi Workstation - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 26 HostApp

    -
    FieldTipe dataDisplayKeterangan
    UnitGroupExtIDnvarcharExternal Unit Group ID
    CatalogExtIDnvarcharExternal Catalog ID
    UnitnvarcharUnitSatuan
    QuantitynvarcharQuantityJumlah
    BaseUnitnvarcharBase UnitSatuan penyusun “Unit”
    CategorynumberCategory

    Untuk mengendalikan pemberlakuan group unit di aplikasi

    -
      -
    • 1: umum

    • -
    • 2: umum

    • -
    • 3: umum

    • -
    • 4: Technical Support Only

    • -
    • 5: Technical Support Only

    • -
    • 6: Special purpose

    • -
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat.
    EndDateDate TimeEnd Date

    Jika EndDate terisi berarti unit group tersebut disabled -di semua bagian aplikasi:

    -
      -
    • Menandai record ini sudah tidak berlaku -lagi/discontinue.

    • -
    • Tidak bisa dipilih untuk berbagai setting.

    • -
    - -Table 26 HostApp - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 27 HostComPara

    -
    FieldTipe dataDisplayKeterangan
    ProductExtIDExternal Product ID

    PK; Diawali dengan huruf ‘E’, untuk menandai product -external/bukan dari Perusahaan

    -
      -
    • Berfungsi sebagai Universal Equipment -Identification.

    • -
    • Mengantisipasi product yang tidak memiliki serial number

    • -
    ProductExtNumbernvarcharExternal Product NumberSerial number equipment dari perusahaan lain. ProductExtNumber tidak -pernah berubah
    CatalognvarcharCatalog
      -
    • Foreign Key. Jika produk berasal dari:

      -
        -
      • -

        Perusahaan, maka berisi CatalogID dari table -ProductCatalog13

        -
      • -
      • -

        vendor lain, maka berisi CatalogExtID dari Table 3 -productcatalogext.

        -
      • -
    • -
    -

    Berisi nomor katalog. Nomor katalog yang sama bisa di-distribusikan -oleh beberapa distributor.

    SiteIDnvarcharSite ID

    Foreign Key dari table Site13

    -

    Tempat dimana produk berada/digunakan.

    ServiceProvidernvarcharService ProviderForeign Key, dari table Vendor13, adalah -Perusahaan/entitas yang meberikan layanan terhadap product ybs. Misalnya -preventive maintenance.
    LocationStartDateDateLocation Start Date
      -
    • Tanggal dimana produk ditempatkan

    • -
    • dalam Berita Acara

    • -
    InstallationDateDateInstallation Date
      -
    • tanggal instalasi analyzer

    • -
    • digunakan dalam Berita Acara dan perhitungan masa -garansi

    • -
    WarrantyStartDateDateWarranty Start Date
      -
    • tanggal mulai garansi, bisa sama dengan tanggal -instalasi

    • -
    WarrantyEndDateDateWarranty End Date
      -
    • tanggal akhir garansi. Jika KSO maka sama dengan akhir masa -kontrak.

    • -
    LocationEndDateDateLocation End Date
      -
    • Tanggal dimana product ditarik/tidak ada lagi di -site/dimusnahkan

    • -
    ActiveYes/NoActive

    Yes: digunakan

    -

    No: tidak digunakan.

    OwnerOwner

    Pemilik produk, salah satu dari:

    -
      -
    • FK: VendorID dari table Vendor – CRM, jika milik -vendor.

    • -
    • FK: AccountID dari table Account – CRM, jika -milik lab ybs.

    • -
    OpenStabilityNumericOpen StabilityStabilitas product setelah dibuka. Dalam satuan hari.
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat.
    LogDateDate TimeLog DateMenandai kapan record ini mengalami perubahan status -(Location, Asset, Active, Owner).
    EndDateDate TimeEnd Date

    Jika EndDate terisi berarti product tersebut disabled di -semua bagian aplikasi:

    -
      -
    • Menandai record ini sudah tidak berlaku -lagi/discontinue.

    • -
    • Tidak bisa dipilih untuk berbagai setting.

    • -
    - -Table 27 HostComPara - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 28 codingsys

    -
    FieldTipe dataDisplayKeterangan
    ProdUsageIDnvarcharProduct Usage IDPK
    ProductExtIDnvarcharExternal Product IDForeign Key dari Table 5 productext.
    AspVolumenumericAspiration VolumeAspirated volume: volume yang di-aspirasi instrument untuk -memproduksi satu test
    NbrOfTestnumericNumber of Test

    Jumlah tes per kemasan. Untuk test berbasis

    -
      -
    • volume:

    • -
    • test:

    • -
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat.
    EndDateDate TimeEnd Date

    Jika EndDate terisi berarti product tersebut disabled di semua -bagian aplikasi:

    -
      -
    • Menandai record ini sudah tidak berlaku -lagi/discontinue.

    • -
    • Tidak bisa dipilih untuk berbagai setting.

    • -
    - -Table 28 codingsys - -### Area & GeoLocation System {#area-geolocation-system} - -> Tabel-tabel terkait pengelolaan area berikut disinkronisasi dengan -> CRM, meliputi: - -- AreaGeo, yang berisi definisi area geografis sesuai standard yang - berlaku (Kemendagri) - -- AreaDef, berisi *user defined area* (pembagian area) untuk service, - sales, dll. - -- AreaDet, berisi detail area geografis untuk masing-masing *user - defined area*. - -- GeoLocationFix, berisi geolocation untuk berbagai lokasi geografis - -- GeoLocationDyn, berisi geolocation dinamis untuk orang, device - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 29 Occupation

    -
    FieldTipe dataDisplayKeterangan
    AreaGeoIDPK
    AreaCodenvarcharArea CodeKode Kemendagri
    ClassnvarcharClass

    Value Set

    -
      -
    • PROP: Propinsi

    • -
    • KAB: Kabupaten

    • -
    • KOTA: Kota

    • -
    • Etc.

    • -
    AreaNamenvarcharArea NameNama area
    ParentParent AreaFK, self referential.
    - -Table 29 Occupation - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 30. Contact

    -
    FieldTipe dataKeterangan
    AreaIDnvarchar
    AreaTypenvarchar
      -
    • Service

    • -
    • Sales

    • -
    • Etc.

    • -
    AreaNamenvarchar
    DescriptionnvarcharPenjelasan singkat
    - -Table 30. Contact - -| **Field** | **Tipe data** | **Keterangan** | -|-----------|---------------|----------------| -| AreaID | nvarchar | | -| AreaCode | nvarchar | | - -Table 31. ContactDetail - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 32 ContactTraining

    -
    FieldTipe dataKeterangan
    GeoLocationIDnvarchar

    Format: GEFXXXXXX

    -

    XXXXXX: nomor urut (000001, 000002, dst.)

    OriginTablenvarcharNama table asal data yang diberi geotagging.
    IdentityNvarchar

    Berisi ID dari lokasi-lokasi yang diberi geotagging:

    -
      -
    • AccountID (Account table)

    • -
    • SiteID (Site table)

    • -
    • UserID (User table)

    • -
    • ContactID (Contact table)

    • -
    • dll

    • -
    GeoLocationSystemnvarchar
      -
    • Sistem/standard geolocation yang digunakan

    • -
    • Encrypted

    • -
    GeoLocationData
      -
    • Encrypted

    • -
    • (perlu dipelajari lebih lanjut format data GeoLocation -baku)

    • -
    Creatornvarchar
      -
    • UserID (dari table User)

    • -
    • ContactID (dari table Contact)

    • -
    CreateDateDate TimeMenandai kapan record ini dibuat.
    - -Table 32 ContactTraining - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 33 MedicalSpecialty

    -
    FieldTipe dataKeterangan
    GeoLocationIDnvarchar

    Format: GEDYYXXXXXX

    -

    YY: tahun

    -

    XXXXXX: nomor urut (000001, 000002, dst.)

    OriginTablenvarcharNama table asal data yang diberi geotagging.
    IdentityNvarchar

    Berisi ID dari lokasi-lokasi yang diberi geotagging:

    -
      -
    • AccountID (Account table)

    • -
    • SiteID (Site table)

    • -
    • UserID (User table)

    • -
    • ContactID (Contact table)

    • -
    • DeviceID1 (cellphone, tablet, laptop, GPS -module, dll)

    • -
    • dll

    • -
    Referencenvarchar
      -
    • terkait dengan record ID spt ActivityID, dll

    • -
    GeoLocationSystemnvarchar
      -
    • Sistem/standard geolocation yang digunakan

    • -
    • Encrypted

    • -
    GeoLocationData
      -
    • Encrypted

    • -
    • (perlu dipelajari lebih lanjut format data GeoLocation -baku)

    • -
    Creatornvarchar
      -
    • UserID (dari table User)

    • -
    • ContactID (dari table Contact)

    • -
    CreateDateDate TimeMenandai kapan record ini dibuat.
    - - -Table 33 MedicalSpecialty - -### Organization Structure - -> Struktur terdiri dari struktur universal dan sites. -> -> Data struktur disimpan dalam table-tabel sebagai berikut: - -- **Account**. Berisi definisi organisasi. Biasanya berupa Perusahaan. - Data account diambil dari aplikasi - -- **Site**. Berisi definisi *laboratory site* dan diambil dari aplikasi - CRM. Termasuk dalam definisi site: - - - hospital/laboratory *sites* dalam lingkungan *multi-sites* - - - fasyankes yang merujuk pemeriksaan (fasyankes sumber/asal). - - - fasyankes tempat laboratorium merujuk test (fasyankes produksi) - -- **discipline**. Berisi definisi *discipline* dari *clinical - laboratory*. Discipline digunakan untuk: - - - membentuk struktur organisasi untuk pembagian pengerjaan tes. - - - membentuk struktur *result report* dan *result view*. - -- **department**. Berisi definisi *department* masing-masing *site* - -- [**workstation**](#multi-organization-management). Berisi definisi - *workstation* untuk setiap *department*. - - - - -- - -> *Table* *17. Account* - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 34 location

    -
    FieldTipe dataDisplayKeterangan
    AccountIDNvarchar (4)Account ID0001 – 0050 reserved untuk SUMMIT dan cabang-cabangnya.
    ExtAcountIDAccountID dari CRM
    ParentAccountParent Account
      -
    • Nama perusahaan induk. Misalnya PT Prodia Utama.

    • -
    • ParentAccount merujuk kepada account lain dalam table yang sama -(self-referential)

    • -
    • Proteksi one way referral

    • -
    AccountNameAccount Name

    Nama account, misalnya: Prodia Kelapa Gading.

    -

    Nama yang dikenal.

    InitialInitial
    Street_1Street 1
    Street_2Street 2
    Street_3Street 3
    CityCity
    ProvinceProvince
    ZIPZIP
    CountryCountry
    AreaCodenvarcharArea CodeAreaCode dari table AreaGeo
    Email address 1Email Address 1
    Email address 2Email Address 2
    PhonePhone
    FaxFax
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat.
    EndDateDate TimeEnd Date

    Jika EndDate terisi berarti user tersebut disabled di semua -bagian aplikasi:

    -
      -
    • -

      Menandai record ini sudah tidak berlaku lagi.

      -
    • -
    • -

      Tidak bisa dipilih lagi dalam transaksi

      -
    • -
    - -Table 34 location - -> **Notes:** -> -> Account diperlukan untuk mendefinisikan business entity secara jelas -> dan turut berperan dalam agregasi hasil, terutama hasil QC. -> -> *Account* dibuat di CRM untuk memastikan *constraint*. Saat instalasi -> CLQMS *on-site*, *engineer* yang melakukan instalasi memasukkan -> *AccountID* dan semua data terkait *account* tersebut -- yang -> tersimpan di CRM -- ditarik untuk mempercepat instalasi. -> -> *Table* *18. Site* - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 35 locationaddress

    -
    FieldTipe dataDisplayKeterangan
    SiteIDintegerSite ID

    PK. Format: AccountIDXX

    -

    XX adalah nomor urut (01, 02, dst)

    SiteCodenvarchcarSite Codekode site, alphanumeric 2 characters (00 – Z9); ada 1296 -kemungkinan, termasuk 00. Constraint: unique. Hanya -untuk SiteType = PHL, GL, PL.
    SiteNamenvarchcarSite Name

    Misalnya:

    -
      -
    • Lab Utama

    • -
    • Lab Emergency

    • -
    AccountIDAccount IDDari table Account
    SiteTypenvarcharSite TypeValue Set
    ParentnvarcharParent SiteFK. Nulable. Parent SiteID.
    SiteClassnvarcharSite ClassValue Set
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat.
    EndDateDate TimeEnd Date

    Jika EndDate terisi berarti user tersebut disabled di semua -bagian aplikasi:

    -
      -
    • -

      Menandai record ini sudah tidak berlaku lagi.

      -
    • -
    • -

      Greyed di distribution list

      -
    • -
    • -

      Tidak lagi menerima kiriman email

      -
    • -
    - -Table 35 locationaddress - -> **Notes:** -> -> SiteCode diperlukan untuk: - -- penanda unik dalam lingkungan multi-sites laboratory. - -- agregasi hasil, terutama hasil QC. Tujuannya agar suatu site bisa - melakukan perbandingan hasil QC dengan site lain, baik dalam Account - yang sama maupun berbeda. - -> Oleh karena tujuan-tujuan ini, maka SiteCode hanya digunakan pada site -> yang memproduksi test, ditandai dengan **SiteType =** **PHL, GL, PL**. -> -> SiteCode dibuat di CRM untuk memastikan constraint, dengan demikian -> SiteCode di CLQMS didapat dengan 2 cara: - -- *manual*: SiteCode dibuat di CRM kemudian diketikkan di CLQMS. - -- *auto*: SiteCode dibuat di CLQMS. Saat instalasi CLQMS *on-site*, - ditampilkan pilihan *site* berdasarkan *Account* yang sudah diinput - terlebih dahulu di CLQMS. - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|----------------|---------------|-------------------|----------------------------------------------------------------------------------| -| DisciplineID | | Discipline ID | PK | -| SiteID | | Site ID | FK; Dari table Site | -| DisciplineCode | Nvarchar(7) | Discipline Code | Abbreviated text | -| DisciplineName | Nvarchar | Discipline Name | Nama jelas | -| Parent | | Parent Discipline | FK. *Nullable*. Parent DisciplineID | -| CreateDate | Date Time | Create Date | Tanggal *record* ini dibuat | -| EndDate | Date Time | End Date | Jika EndDate terisi berarti disiplin tersebut disabled di semua bagian aplikasi: | - -Table 36 patient - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|----------------|---------------|-----------------|-----------------------------------------------------------------------------------| -| DepartmentID | | Department ID | PK | -| DisciplineID | | | FK; Dari Table 7. discipline | -| SiteID | nvarchar | Site ID | FK; Dari table Site | -| DepartmentCode | nvarchar | Department Code | Abbreviated text | -| DepartmentName | nvarchar | Department Name | Nama department | -| CreateDate | Date Time | Create Date | | -| EndDate | Date Time | End Date | Jika EndDate terisi berarti department tersebut disabled di semua bagian aplikasi | - -Table 37 patcom - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 38 patatt

    -
    FieldTipe dataDisplayKeterangan
    WorkstationIDWorkstation IDPK
    DepartmentIDnvarcharFK; dari Table 8 department
    WorkstationCodeNvarcharWorkstation CodeAbbreviated text
    WorkstationNameNvarcharWorkstation NameNama workstation
    TypeTinyIntType

    ValueSet

    -
      -
    • 0: primary, default – penerima test order -utama

    • -
    • 1: secondary, optional – penerima test order -kedua.

    • -
    LinkToLink toberisi WorkstationID tujuan.
    EnableTinyIntEnable

    ValueSet

    -
      -
    • 0: disabled

    • -
    • 1: enabled

    • -
    CreateDateDate TimeCreate DateTanggal record ini dibuat
    - -Table 38 patatt - -| | | | | -|-----|-----|-----|-----| -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | - -Table 39 patidt - -> **Contoh Struktur Organisasi** - -Gambar 7 Contoh Struktur Organisasi - - - -------- - - - - - - - - - - - - - - - - - - - - -
    -

    Table 40 patrelation

    -

    Account

    -

    ID

    Parent

    -

    Account

    AccountNameInitialCityProvince
    430Sejahtera Anugrahjaya, Tbk. PT.SRAJKota TangerangBanten
    - -Table 40 patrelation - - - --------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 41 patreglog

    -

    Site

    -

    ID

    Site

    -

    Code

    SiteName

    Account

    -

    ID

    SiteTypeParent

    Site

    -

    Class

    10189Mayapada Hospital Tangerang430PHB
    165A3Lab Klinik MHTG430PHL101
    30890Mayapada Hospital Jakarta Selatan430PHB
    377A4Lab Klinik MHJS430PHL308
    - -Table 41 patreglog - - - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 42 patvisit

    -

    Department

    -

    ID

    Discipline

    -

    ID

    Site

    -

    ID

    Department

    -

    Code

    DepartmentName
      -
    1. -
    1165HRTNHematologi Rutin
      -
    1. -
    1165HKHSHematologi Khusus
      -
    1. -
    2165KKKimia Klinik
      -
    1. -
    3165IMSImunologi
      -
    1. -
    3165SRLSerologi
      -
    1. -
    4165UFUrin
    - -Table 42 patvisit - - - ------------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 43 patdiag

    -
    -

    Workstation

    -

    ID

    -
    -

    Department

    -

    ID

    -
    -

    Workstation

    -

    Code

    -
    -

    Workstation Name

    -
    -

    Type

    -
    -

    LinkTo

    -
    -

    Enable

    -
    -

    EquipmentI

    -

    D

    -
    productnumberNote
    11HAUTOHematologi Auto01627TW-13001452BC-6200
    21HBACKHematologi Backup111715DG5-27000012BC760
    33CAUTOKimia Auto0111286016850924TMS-30i
    43CBACKKimia Backup131642711771113TMS-24i
    53CMANKimia Manual01
    64IAUTOImunologi Auto01185BB1-03001085CL-900i
    74IMANImunologi Manual01
    - -Table 43 patdiag - -### Host Systems - -> Host adalah system dimana data pasien dan test order berasal atau -> system yang menjadi superordinat. Host berupa software aplikasi, -> misalnya Hospital Information System (HIS), Medical Check Up System, -> Billing System, Clinical Management System (CMS), dll. -> -> (perlu disinkronkan dengan test definition) -> -> Data host disimpan dalam table-tabel sebagai berikut: - -- **HostApp**. Berisi definisi host systems. - -- **HostComPara**. Berisi data parameter komunikasi ke Host seperti IP - address, ports, dll. - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|-------------|---------------|-----------------------|-------------------------------------------------------------------------------------------------------| -| HostAppID | Nvarchar(5) | Host Application ID | PK | -| HostAppName | nvarchar | Host Application Name | Nama host application | -| SiteID | nvarchar | | Foreign Key; Dari table Site | -| CreateDate | Date Time | Create Date | Tanggal *record* ini dibuat | -| EndDate | Date Time | End Date | Jika EndDate terisi berarti HostApp tersebut sudah tidak digunakan, disabled di semua bagian aplikasi | - -Table 44 patvisitadt - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|------------|---------------|---------------|-------------------------------------------------------------------------------------------------------| -| | | | | -| HostAppID | nvarchar(5) | | PK | -| HostIP | nvarchar(15) | Host IP | IP Address dari Host | -| HostPort | nvarchar(6) | Host Port | Port dari Host | -| HostPwd | nvarchar | Host Password | | -| CreateDate | Date Time | Create Date | Tanggal *record* ini dibuat | -| EndDate | Date Time | End Date | Jika EndDate terisi berarti HostApp tersebut sudah tidak digunakan, disabled di semua bagian aplikasi | - -Table 45 patvisitbill - -### Coding System {#coding-system} - -> Coding System dikelola menggunakan tabel-tabel sebagai berikut: - -- **codingsys**, *coding system*. Berisi definisi *coding system*. - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|--------------|---------------|------------------|---------------------------------------------------------------------------------| -| CodingSysID | | Coding System ID | PK ; | -| CodingSysAbb | nvarchar (6) | Abbreviated Text | Abbreviated text; **Constraint**: Tidak boleh ada yang sama | -| FullText | nvarchar | Full Text | Nama *coding system*. | -| Description | nvarchar | Description | Penjelasan singkat dari *coding system* | -| CreateDate | Date Time | Create Date | Tanggal *record* ini dibuat | -| EndDate | Date Time | End Date | Jika EndDate terisi berarti *record* tersebut disabled di semua bagian aplikasi | - -Table 46 patvisitlog - -### Doctor - -> Data doctor dikelola menggunakan tabel-tabel contact dari **CRM**: - -- **Occupation** - -- **Contact** - -- **ContactDetail.** Merelasikan Contact dengan Site dan merupakan - syarat login. - -- **ContactTraining** - -- **MedicalSpecialty** - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|--------------|---------------|----------------------|-------------------------------------------------------------| -| OccupationID | | Occupation ID | PK | -| OccCode | Nvarchar(5) | Occupation Code | *Abbreviated Text* (Teks singkat) | -| OccText | nvarchar | Occupation Full Text | Tampilan teks lengkap dari kelompok pekerjaan | -| Description | nvarchar | Description | Penjelasan occupation, bisa berisi role & responsibilities. | -| CreateDate | Date Time | Create Date | Menandai kapan record ini dibuat. | - -Table 47 ordertest - -| | | | | -|-----|-----|-----|-----| -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | - -Table 48 ordercom - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 49 orderatt

    -
    FieldTipe dataDisplayKeterangan
    ContactIDnvarcharContact IDPrimary Key
    NameFirstnvarcharFirst Name
    NameLastnvarcharLast Name
    TitlenvarcharTitleGelar. Misalnya: Dr. Prof, dll
    InitialnvarcharInitial
    BirthdateDateBirthdate
    Email address 1nvarcharEmail Address 1Personal email address.
    Email address 2nvarcharEmail Address 2Personal email address
    PhonenvarcharPhone
    MobilePhone_1nvarcharMobile Phone 1
    MobilePhone_2nvarcharMobile Phone 2
    SpecialtynvarcharSpecialtySpesialisasi terkait pendidikan, misal: dokter. FK, SpecialtyID dari -Table 31 MedicalSpecialty
    SubSpecialtynvarcharSub SpecialtySub spesialis/konsultan terkait pendidikan. FK, SpecialtyID dari -Table 31 MedicalSpecialty
    PasswordPasswordEncrypted
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat.
    EndDateDate TimeEnd Date

    Jika EndDate terisi berarti user tersebut disabled di semua -bagian aplikasi:

    -
      -
    • Menandai record ini sudah tidak berlaku lagi.

    • -
    • Greyed di distribution list

    • -
    • Tidak lagi menerima kiriman email

    • -
    - -Table 49 orderatt - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 50 orderststatus

    -
    FieldTipe dataDisplayKeterangan
    ContactDetIDContact Detail IDPrimary Key
    ContactIDContact IDFK; Dari table Contact
    SiteIDSite IDFK; Table 42. Site
    CodenvarcharCodeKode individu di site
    ContactEmailnvarcharEmailAlamat email Contact di Site tersebut.
    OccupationIDOccupationFK dari Table 29 Occupation
    JobTitleJob TitleJabatan Contact di Site tersebut, misalnya Penanggung Jawab -Lab.
    DepartmentDepartmentDepartment dimana Contact bekerja. Misalnya: Laboratorium, Penunjang -Medis, dll
    ContactStartDateDateContact Start DateMenandai Contact tersebut mulai bekerja di Site yang -bersangkutan.
    ContactEndDateDateContact End Date

    Menandai Contact tersebut tidak lagi bekerja di Site yang -bersangkutan.

    -

    Jika EndDate terisi berarti user tersebut disabled di semua bagian -aplikasi:

    -
      -
    • Menandai record ini sudah tidak berlaku lagi.

    • -
    • Greyed di distribution list

    • -
    -

    Tidak lagi menerima kiriman email

    - -Table 50 orderststatus - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 51 orderlog

    -
      -
    • -
    • -
    • -
    • -
    - -Table 51 orderlog - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 52 Contoh table patient

    -
    FieldTipe dataDisplayKeterangan
    CTrainingIDTraining IDPK
    ContactIDContact IDFK dari Error! Not a valid bookmark -self-reference.
    TrainingTypenvarcharTraining Type
      -
    • External training

    • -
    • Internal training

    • -
    • Seminar

    • -
    • Workshop

    • -
    TrainingTitlenvarcharTraining Title
    StartDateDate TimeStart Date
    EndDateDate TimeEnd Date
    FacilitatornvarcharFacilitatorPenyelenggara training, seminar, workshop
    CertificateLocationnvarcharCertificate LocationLokasi penyimpanan file sertifikat
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat.
    - -Table 52 Contoh table **patient** - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|---------------|---------------|----------------|----------------------------------------------------------------------| -| SpecialtyID | | Specialty ID | Primary Key | -| SpecialtyText | nvarchar | Specialty Text | Spesialisasi dokter | -| Parent | nvarchar | Parent | Parent spesialis. Sub spesialis/konsultan memiliki parent spesialis. | -| Title | nvarchar | Title | Gelar (Sp. PK, Sp.PD, Subsp.AI, dll) | -| CreateDate | Date Time | Create Date | Menandai kapan record ini dibuat. | -| EndDate | Date Time | End Date | Menandai kapan record ini berakhir. | - -Table 53 contoh table **patvisit** - -### Location - -> Data lokasi dikelola menggunakan tabel-tabel sebagai berikut: - -- **location**. Berisi definisi lokasi (*sampling station*, bed-xx, - dll). - -- - -- **locationaddress**. Berisi alamat lokasi. - -> Data-data berikut dikelola sebagai value set: - -- **locationtype**. Berisi definisi jenis lokasi (*floor*, *point of - care*, *room*, *bed*), yaitu Lokasi yang berada di dalam *site*. - -| | -|-----| -| | -| | -| | -| | -| | - -Table 54 contoh table **patvisitadt** - -- -- -- -- - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 55 contoh table ordertest

    -
    FieldTipe dataDisplayKeterangan
    LocationIDLocation IDPrimary Key
    SiteIDNvarcharFK: SiteID dari table Site – CRM. Site dimana -lokasi ini berada.
    LocCodeNvarchar(6)Location CodeAbbreviated text; Constraint: Tidak boleh ada yang -sama
    ParentParent LocationPK: LocationID yang merupakan parent dari lokasi ini.
    LocFullnvarcharLocation NameNama lengkap lokasi
    DescriptionnvarcharDescriptionDeskripsi lokasi
    LocTypenvarchar (10)Location Type

    Lihat Value Set

    -

    Lihat Table 72. valueset untuk struktur lengkap. \* -MERGEFORMAT

    ExtensionnvarcharExtensionExtension telepon
    CreateDateDate TimeCreate DateTanggal record ini dibuat
    EndDateDate TimeEnd DateJika EndDate terisi berarti record tersebut disabled di -semua bagian aplikasi
    - -Table 55 contoh table **ordertest** - -- -- - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 56 containerdef

    -
    FieldTipe dataKeterangan
    LocationIDPK, dari Table 34 location
    Street1nvarcharStreet 1Informasi jalan
    Street2nvarcharStreet 2Informasi jalan
    CitynvarcharCityKota/Kabupaten15
    ProvincenvarcharProvincePropinsi15
    PostCodenvarcharPost CodeKode pos
    GeoLocationSystemnvarcharGeo Location System
      -
    • Sistem/standard geolocation yang digunakan

    • -
    • Encrypted

    • -
    GeoLocationDataGeo Location Data
      -
    • Encrypted

    • -
    • (perlu dipelajari lebih lanjut format data GeoLocation -baku)

    • -
    PhonenvarcharPhoneTerestrial phone
    MobilenvarcharMobileMobile phone
    EmailnvarcharEmailEmail address.
    CreateDateDate TimeCreate DateTanggal record ini dibuat
    EndDateDate TimeEnd DateJika EndDate terisi berarti type tersebut disabled di semua bagian -aplikasi
    - -Table 56 containerdef - -> Table locationaddress untuk menyimpan alamat *remote location* (lokasi -> temporer yang tidak berada dalam fasyankes). - -### Patient Registration {#patient-registration-1} - -> Data pasien dikelola menggunakan tabel-tabel sebagai berikut: - -- **patient**, *patient*. Berisi data pasien. - -- **patcom**, *patient comment*. Berisi data komentar/catatan/penjelasan - tambahan atas data pasien. - -- **patatt**, *patient attachment*. Berisi data lampiran terkait pasien, - bisa berupa file gambar, text, dll. - -- - -- **patidt**, *patient identifier list*. Berisi identifikasi pasien - (NIK, Social Security Number, Passport dll), berikut masa berlakunya. - -- **patrelation**, *patient relationship*. Berisi data hubungan antar - pasien. - -- - -- **patreglog,** *patient audit* *log*. Berisi perubahan-perubahan atas - data pasien yang disimpan di table-table: - - - patient - - - patcom - - - patatt - - - patidt - - - patrelation - -> Data-data terkait pasien sebagai berikut, dikelola sebagai value set: - -- **race**. Berisi definisi ras - -- **religion**. Berisi definisi agama. - -- **ethnic**. Berisi definisi etnik. - -- **country**. Berisi definisi negara. - -> Data-data pada table terkait pasien tidak bisa di-*archive* jika masih -> memiliki test order yang aktif. - -| | -|-----| - -Table 57 contoh container definition - -> Data-data *race*, *ethnic*, *religion*, *country* bersifat umum dan -> dapat digunakan di semua *sites* dengan pengaturan: - -- *records* dengan field SiteID kosong (*null*) berlaku untuk semua - *sites* -- *default definition*. - -- jika suatu *site* tidak bisa menggunakan definisi yang sama, maka - perlu membuat *record* spesific *site* (*field* SiteID terisi). Jika - hal ini dilakukan, maka site tersebut tidak bisa lagi menggunakan - *default definition*. - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 58 spccounter

    -
    FieldTipe dataDisplayKeterangan
    InternalPIDPK ;
    PatientIDnvarcharPatient ID (PID)nomor unik identitas pasien. Constraint: Tidak -boleh ada yang sama
    AlternatePIDnvarcharAlternate PIDConstraint: Tidak boleh ada yang sama
    PrefixnvarcharPrefix“Tn”, “Ny”, dll
    NameFirstnvarcharFirst NameNama depan
    NameMiddlenvarcharMiddle NameNama Tengah
    NameMaidennvarcharMaiden NameNama sebelum menikah (Perempuan)
    NameLastnvarcharLast NameNama akhir/keluarga/marga
    SuffixnvarcharSuffixBiasanya untuk gelar
    GenderintGender

    1: female

    -

    2: male

    -

    3: unknown

    PlaceOfBirthnvarcharPlace Of BirthTempat lahir
    BirthdateDatetimeBirthdateConstraint: <= waktu input data. Disimpan ‘as is’, tidak -dikonversi ke UTC+0
    Street_1nvarcharStreet 1
    Street_2nvarcharStreet 2
    Street_3nvarcharStreet 3
    CitynvarcharCityKabupaten/Kota 1
    ProvincenvarcharProvincePropinsi15
    ZIPnvarchar(7)ZIPKode pos
    CountryintCountryValue Set. Ras pasien.
    EmailAddress1nvarcharEmail Address 1Digunakan sebagai userid
    EmailAddress2nvarcharEmail Address 2
    PhonenvarcharPhoneNomor terrestrial
    MobilePhonenvarcharMobile PhoneNomor seluler
    CustodiannvarcharCustodian IDBerisi PatientID dari orang tua (ibu) pasien
    AccountNumbernvarcharAccount NumberNomor akun unit untuk accounting system.
    RaceintRaceValue Set. Ras pasien.
    MaritalStatusintMarital Status
      -
    • A: Separated

    • -
    • D: Divorced

    • -
    • M: Married

    • -
    • S: Single

    • -
    • W: Widowed

    • -
    • B: Unmarried

    • -
    • U: Unknown

    • -
    • O: Other

    • -
    ReligionintReligionValue Set. Agama pasien.
    EthnicintEthnicValue Set. Etnis pasien.
    CitizenshipnvarcharCitizenshipKewarganegaraan
    DeathIndicatorintDeceased

    Y: death

    -

    N: life

    DeathDateTimeDatetimeTime of DeathWaktu kematian, disimpan ‘as is’, tidak dikonversi ke UTC+0.
    LinkTonvarcharLink ToFK. Berisi PatientID tujuan.
    CreateDateDate TimeCreate DateTanggal record ini dibuat. UTC+0
    DelDateDate TimeDelete DateTanggal record ini dihapus. UTC+0
    - - -Table 58 spccounter - -> Penjelasan field: - -- **LinkTo**: - - - -- hanya boleh terisi dengan PatientID yang telah ada dalam table - patient. - -- Jika terisi, berarti *record* pasien ini (*source*) dijadikan satu - dengan PatientID tujuan (*destination*). PatientID tujuan adalan - *surviving entity*. - -- beberapa pasien bisa *link* ke satu pasien. - -- ***unlink*** *source* terjadi bisa isi *field* LinkTo dikosongkan - Kembali. - -- relasi *source* dengan test order dan lain-lain tidak berubah sebelum - dan sesudah proses *link*. - -- *link* hanya satu tingkat. Pasien A **dan** B *link* ke pasien C. - **Bukan** pasien A *link* ke pasien B, kemudian pasien B *link* ke - pasien C. Oleh karena itu syarat *destination* bisa menerima *link* - adalah *field* **LinkTo** masih **kosong**. Jika user melakukan - *multi-level* *link*, aplikasi harus memberi peingatan 'multi-level - link is not allowed" dan membatalkan operasi. - - - -- **DelDate**: - - - DelDate terisi jika *record* pasien dihapus. - - - Penghapusan dilakukan dengan cara ***pseudonymity*** atas *fields* - berlatar belakang orange - - - *Pseudonymity* bersifat *reversible*. - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 59 specimens

    -
    FieldTipe dataDisplayKeterangan
    PatComIDPatient Comment IDPK
    InternalPIDFK; Table 36 patient
    CommentnvarcharCommentKomentar/informasi tambahan
    UserIDUser ID

    Identitas user yang menuliskan komentar. Berasal dari table:

    -
      -
    • CRM.User

    • -
    • CRM.Contact

    • -
    CreateDateDate TimeCreate DateTanggal record ini dibuat. UTC+0.
    DelDateDate TimeDelete DateTanggal record ini dihapus. UTC+0.
    - -Table 59 specimens - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 60 contoh transaksi specimen

    -
    FieldTipe dataDisplayKeterangan
    PatAttIDPatient Attachment IDPK
    InternalPIDFK; Table 36 patient
    AddressnvarcharAddressLokasi file lampiran.
    UserIDUser ID

    Identitas user yang menuliskan komentar. Berasal dari table:

    -
      -
    • CRM.User

    • -
    • CRM.Contact

    • -
    CreateDateDate TimeCreate DateTanggal record ini dibuat. Dikonversi ke UTC+0.
    DelDateDate TimeDelete DateTanggal record ini dihapus. Dikonversi ke UTC+0.
    - -Table 60 contoh transaksi specimen - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 61 Variasi Perjalanan Specimen

    -
    FieldTipe dataDisplayKeterangan
    PatIdtIDPatient Identifier IDPK
    InternalPIDFK; Table 36 patient
    IdentifierTypenvarchar(4)Identifier Type

    Encrypted. Jenis identifikasi. Misalnya

    -
      -
    • KTP: Kartu Tanda Penduduk

    • -
    • PASS: Passport

    • -
    • SSN: Social Security Number

    • -
    • SIM: Surat Izin Mengemudi

    • -
    • KTAS: Kartu Izin Tinggal Terbatas

    • -
    IdentifiernvarcharIdentifierEncrypted. Nomor identitas sesuai RefType
    EffectiveDateDate TimeEffective DateTanggal mulai berlakunya identifier
    ExpirationDateDate TimeExpiration DateTanggal kadaluwarsa identifier
    CreateDateDate TimeCreate DateTanggal record ini dibuat. UTC+0.
    DelDateDate TimeDeletion DateTanggal record ini dihapus. UTC+0.
    - -Table 61 Variasi Perjalanan Specimen - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|-------------|---------------|-------------|---------------------------------------------------------------------------------| -| PatRelID | | | PK | -| InternalPID | | | FK; Table 21 patient | -| | | | | -| CreateDate | Date Time | | | -| EndDate | Date Time | | Jika EndDate terisi berarti *record* tersebut disabled di semua bagian aplikasi | - -Table 62 specimenstatus - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 63 Contoh perjalanan specimen (specimen status)

    -
    FieldTipe dataKeterangan
    PatRegLogIDPatient Registration Log IDPK
    TblNamenvarcharTable NameNama table
    RecIDintRecord IDRecord ID – PK. Record dimana -operasi/activity terjadi
    FldNamenvarcharField NameNama field
    FldValuePrevnvarcharPrevious ValueField Value Previous. Nilai sebelumnya
    OperationnvarcharOperation
      -
    • create – create record

    • -
    • read – read record/field

    • -
    • update – update record/field

    • -
    • delete – delete record/field

    • -
    -

    Lihat Lampiran 14:

    SiteIDnvarcharSite IDFK dari table Site13
    UserIDUser ID

    Identitas user yang melakukan operasi/activity data. -Berasal dari table:

    -
      -
    • CRM.User

    • -
    • CRM.ContactDetail

    • -
    OriginnvarcharOrigin Table

    Table dimana UserID disimpan:

    -
      -
    • CRM.User

    • -
    • CRM.ContactDetail

    • -
    DIDTypenvarcharDID Type

    Device ID Type. Lihat Lampiran 14:

    -
      -
    • Windows: Device ID

    • -
    • Android: AAID

    • -
    • IOS: IDFA

    • -
    DIDnvarcharDIDDevice ID
    MachineIDnvarcharMachine IDIdentitas mesin 1dimana operasi/activity dilakukan – -MAC address
    SessionIDnvarcharSession IDApplication session ID
    AppIDnvarcharApplication IDApplication ID
    ProcessIDnvarcharProcess IDProcess ID
    WebPageIDnvarcharWeb Page ID
    EventIDnvarcharEvent ID
    ActivityIDnvarcharActivity IDActivity ID
    ReasonnvarcharReasonAlasan operasi/activity data
    LogDateDate TimeLog DateDate & time log data. Dikonversi ke UTC+0
    - - -Table 63 Contoh perjalanan specimen (specimen status) - -> Table patreglog berdasarkan kaidah audit di bagian 5.4.21 dan -> menyimpan audit log terkait *patient* *registration*. - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 64 specimencollection

    -
      -
    • -
    - -Table 64 specimencollection - -| | | | -|-----|-----|-----| -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | - -Table 65 specimentrans - -### Patient Admission {#patient-admission-1} - -> *Patient Admission* adalah proses formal pasien diterima di rumah -> sakit untuk perawatan atau observasi. -> -> Pengelolaan administrasi *patient* *admission* ke fasilitas pelayanan -> kesehatan (fasyankes) dilakukan melalui table sbb: - -- **patvisit**, *patient visit*. Berisi data kunjungan pasien ke - fasyankes. - -- **patdiag,** *patient diagnosis*. Berisi data diagnosis. Dimungkinkan - untuk multiple diagnosis per kunjungan. - -- **patvisit** , *patient visit admission-discharge-transfer*. Berisi - data siklus pasien dari *admission* hingga *discharge*. - -- **patvisitbill**, *patient visit billing*. Berisi data detail item apa - saja yang ditagihkan per kunjungan pasien. - -- **patvisitlog**, *patient visit log*. Berisi operasi/activity atas - data pasien yang disimpan di table-table: - - - patvisit - - - patdiag - - - patvisitadt - - - patvisitbill - -- - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|--------------|---------------|-------------------------|----------------------------------------------------------------------------------------------------------------------| -| InternalPVID | | Internal PVID | PK. | -| SiteID | | SiteID | FK dari table Site^23^ | -| PVID | Nvarchar(20) | Patient Visit ID (PVID) | Not null. Patient Visit ID. ID untuk setiap kunjungan pasien ke fasyankes; **Constraint**: Tidak boleh ada yang sama | -| InternalPID | | Internal PID | Foreign Key; Table 36 patient | -| EpisodeID | nvarchar | Episode ID | Episode number | -| | | | | -| CreateDate | Date Time | Create Date | Waktu *record* ini dibuat/*posting* di database. UTC+0 | -| EndDate | Date Time | End Date | Jika EndDate terisi berarti visit sudah *closed*. UTC+0 | -| ArchivedDate | Date Time | Archived Date | Jika ArchivedDate terisi berarti visit sudah diarsip dan dipindahkan ke *data warehouse*. UTC+0 | -| DelDate | Date Time | Delete Date | Jika DeleteDate terisi berarti *record* sudah dihapus dan tidak bisa di-akses oleh *user* biasa. UTC+0 | - -Table 66 specimenprep - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|--------------|---------------|----------------|----------------------------------------------------------------------------------------------------| -| InternalPVID | | Internal PVID | PK. | -| InternalPID | | | Foreign Key; Table 21 patient | -| DiagCode | nvarchar | Diagnosis Code | Diagnostic code. | -| Diagnosis | Text | Diagnosis | Penjelasan lebih detail mengenai diagnosis. | -| CreateDate | Date Time | Create Date | Waktu *record* ini dibuat/*posting* di database. UTC+0 | -| EndDate | Date Time | End Date | Jika EndDate terisi berarti visit sudah closed. UTC+0 | -| ArchivedDate | Date Time | Archived Date | Jika ArchivedDate terisi berarti visit sudah diarsip dan dipindahkan ke *data warehouse*. UTC+0 | -| DelDate | Date Time | Delete Date | Jika DeleteDate terisi berarti record sudah dihapus dan tidak bisa di-akses oleh user biasa. UTC+0 | - -Table 67 specimenlog - -> DiagCode untuk menerima diagnosis code dari host. Diagnosis tetap bisa -> di-key in di field diagnosis terlepas dari ada/tidaknya DiagCode. - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|--------------|---------------|-----------------------|-------------------------------------------------------------------------------------------------| -| PVADTID | | PVADTID | PK. Not null. Patient Visit ADT ID untuk setiap aktifitas ADT pasien per kunjungan | -| InternalPVID | | | FK. Not null. Internal Patient Visit ID. Dari Table 27 patvisit | -| Code | Nvarchar(5) | Code | Kode ADT[^19]. Lampiran 14: Value set Dari Table 84 ADT Code | -| | | | | -| LocationID | | Location ID | FK. Kode Lokasi dari Table 15 location. *Assigned patient location*. | -| AttDoc | | Attending Doctor[^20] | FK. Kode dokter yang menangani pasien. Dari table **ContactDetail, CRM**. | -| RefDoc | | Referring Doctor | FK. Kode dokter yang merujuk pasien. Dari table **ContactDetail, CRM**. | -| AdmDoc | | Admitting Doctor | FK. Kode dokter yang menerima pasien di fasyankes. Dari table **ContactDetail, CRM**. | -| CnsDoc | | Consulting Doctor | FK. Kode dokter konsulen. Dari table **ContactDetail, CRM**. | -| | | | | -| | | | | -| CreateDate | Date Time | Create Date | Waktu *record* ini dibuat/*posting* di database. UTC+0 | -| EndDate | Date Time | End Date | Jika EndDate terisi berarti visit sudah *closed*. UTC+0 | -| ArchiveDate | Date Time | Archive Date | Jika ArchivedDate terisi berarti visit sudah diarsip dan dipindahkan ke *data warehouse*. UTC+0 | -| DelDate | Date Time | Delete Date | Tanggal *record* ini dihapus. UTC+0 | -| | | | | - -Table 68. equipmentlist - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 69. comparameters

    -
    FieldTipe dataDisplayKeterangan
    PatRelIDPK
    VisitClassnvarcharVisit ClassJenis visit. Dari Table 83 Patient Visit Class
    BillAccNvarchar(20)Billing AccountFK. Not null. Billing Account – pihak yang membayar biaya layanan. -Dari table Account. Untuk pengembangan selanjutnya
    BillStatusBinaryBilling Status

    Not null. Billing Status:

    -

    0: belum dibayar

    -

    1: sudah dibayar

    CreateDateDate Time
    EndDateDate TimeJika EndDate terisi berarti record tersebut disabled di -semua bagian aplikasi. UTC+0
    - -Table 69. comparameters - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 70. devicelist

    -
    FieldTipe dataDisplayKeterangan
    PatVisLogIDPatient Visit Log IDPK
    TblNamenvarcharTable NameNama table
    RecIDintRecord IDRecord ID – PK. Record dimana -operasi/activity terjadi
    FldNamenvarcharField NameNama field
    FldValuePrevnvarcharPrevious ValueField Value Previous. Nilai sebelumnya
    OperationnvarcharOperation

    Lihat Lampiran 14:

    -
      -
    • create – create record

    • -
    • read – read record/field

    • -
    • update – update record/field

    • -
    • delete – delete record/field

    • -
    SiteIDnvarcharSite IDFK dari table Site13
    UserIDUser ID

    Identitas user yang melakukan operasi/activity data. Berasal dari -table:

    -
      -
    • CRM.User

    • -
    • CRM.ContactDetail

    • -
    OriginnvarcharOrigin Table

    Table dimana UserID disimpan:

    -
      -
    • CRM.User

    • -
    • CRM.Contact

    • -
    DIDTypenvarcharDID Type

    Device ID Type. Lihat Lampiran 14:

    -
      -
    • Windows: Device ID

    • -
    • Android: AAID

    • -
    • IOS: IDFA

    • -
    DIDnvarcharDIDDevice ID
    MachineIDnvarcharMachine IDIdentitas mesin 1dimana operasi/activity dilakukan – -MAC address
    SessionIDnvarcharSession IDApplication session ID
    AppIDnvarcharApplication IDApplication ID
    ProcessIDnvarcharProcess IDProcess ID
    WebPageIDnvarcharWeb Page ID
    EventIDnvarcharEvent ID
    ActivityIDnvarcharActivity IDActivity ID
    ReasonnvarcharReasonAlasan operasi/activity data
    LogDateDate TimeLog DateDate & time log data. UTC+0
    - - -Table 70. devicelist - -> *Patient* *admission* mandatory dilakukan, jika: - -- pasien fasyankes yang memerlukan *admit* dan *discharge* - -- memerlukan *billing* - -- pilihan dari fasyankes - -> selain itu, tidak harus dilakukan (*optional*) - -### Test Ordering {#test-ordering} - -- - -> *Test ordering* pasien dikelola menggunakan tabel-tabel sebagai -> berikut: - -- **ordertest**. Berisi data *test ordering* untuk *clinical lab test*. - -- **ordercom**, *test ordering comment*. Berisi data - komentar/catatan/penjelasan tambahan atas data *test ordering*. - -- **orderatt,** *test ordering* *attachment*. Berisi lampiran-lampiran - atas *test order*. - -- - -- **orderstatus**. Berisi status *test ordering*. Open, closed, dll - -- **ordercons**. Berisi data barang habis pakai yang digunakan. - -- **orderlog**. Berisi data operasi/activity yang dilakukan atas *test - order,* yaitu tables: - - - ordertest - - - ordercom - - - orderatt - - - orderstatus - - - ordercons - -- - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 71 testdef

    -
    FieldTipe dataDisplayKeterangan
    InternalOIDInternal Order IDPK. Internal Order ID
    OrderIDNvarchar(22)Order ID

    Not null. Nomor test order, sama dengan HL7-Filler Order -Number. Mengikuti kentetuan tersebut di 4.2.1.8

    -

    Constraint: Tidak boleh ada yang sama

    PlacerIDNvarchar(22)Placer Order ID

    Nomor identitas test order dari aplikasi lain/host, HL7 – -Placer Order Number.

    -

    Constraint: Tidak boleh ada yang sama

    InternalPIDForeign Key; Table 36 patient
    SiteIDnvarcharFK dari table Site23. Site dimana order -dibuat
    PVADTIDPVADTIDFK. Patient Visit ID. ID untuk setiap aktifitas ADT pasien per -kunjungan. Optional.
    ReqAppNvarcharRequested ApplicationRequested application, identitas aplikasi yang mengirimkan -test order.
    ReqEntityNvarchar(3)Requested Entity

    Entitas yang meminta pemeriksaan. Misalnya:

    -
      -
    • pat: pasien itu sendiri yang meminta

    • -
    • isn: permintaan oleh Perusahaan -asuransi.

    • -
    • acc: permintaan oleh Perusahaan

    • -
    • doc: permintaan oleh dokter

    • -
    ReqEntityIDNvarchar(20)Requested Entity ID

    Identitas entitas yang meminta pemeriksaan. Jika:

    -
      -
    • pat: field ini kosong

    • -
    • doc: berisi PK dari CRM.ContactDetail

    • -
    • acc: berisi PK dari CRM.Account

    • -
    PriorityPriorityKode urgensi, lihat Value set (
      -
    • -
    -
      -
    • -
    • -
      -
    • -
    TrnDateDate TimeTransaction DateTransaction date, yaitu waktu test order dibuat. -UTC+0
    EffDateDate TimeEffective DateOrder effective date time, yaitu waktu dimana -test order seharusnya mulai diproses. UTC+0
    CreateDateDate TimeCreate DateWaktu record ini dibuat/posting di database. -UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti test order sudah closed. -UTC+0
    ArchiveDateDate TimeArchive DateJika ArchiveDate terisi berarti test order sudah diarsip dan -dipindahkan ke data warehouse. UTC+0
    DelDateDate TimeDelete DateJika DeleteDate terisi berarti test order sudah dihapus dan tidak -bisa di-akses oleh user biasa. UTC+0
    - -Table 71 testdef - -> Penjelasan field: - -- **TrnDate,** jika: - - - \>= **EffDate,** maka *order* dianggap mulai diproses sejak *order - effective date/time*. - - - \< **EffDate**, maka *order* baru mulai diproses sejak *order - effective date/time* - - - **EffDate** = null, maka *order* mulai diproses sejak *transaction - date/time* - -- **CreateDate** berisi waktu dimana *record* ini di-*posting* ke dalam - *database*. CreateDate bisa berbeda dengan TrnDate pada situasi dimana - data dibuat di sistem lain atau aplikasi *remote* *medical check-up* - yang bisa beroperasi *stand alone*. - - - -- **PVADTID**. Jika PVADTID tidak diisi, maka *fields* LocationID, - AttDoc, RefDoc, AdmDoc, CnsDoc pada table order diisi saat *test - ordering*. Sebaliknya maka *order* *record* tersebut berelasi dengan - *patvisitadt record* sehingga: - - - -- *fields* LocationID, AttDoc, RefDoc, AdmDoc, CnsDoc pada table order - > terisi otomatis dengan data yang sama dari table patvisitadt. - -- *update*/perubahan yang terjadi pada *fields* LocationID, AttDoc, - > RefDoc, AdmDoc, CnsDoc pada table patvisitadt akan dicerminkan ke - > *fields* yang sama pada table order. - -| | | -|-----|-----| -| | | -| | | -| | | -| | | -| | | -| | | -| | | -| | | -| | | -| | | - -Table 72 dampak berbagai kondisi terhadap TestID dan TestCode - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 73 testdefsite

    -
    FieldTipe dataDisplayKeterangan
    OrderComIDOrder Comment IDPK
    InternalOIDFK. Internal Order ID. Dari Table 47 order
    CommenttextCommentKomentar
    UserIDUser ID

    Identitas user yang menuliskan komentar. Berasal dari table:

    -
      -
    • CRM.User

    • -
    • CRM.ContactDetail

    • -
    OriginnvarcharOrigin Table

    Table dimana UserID disimpan:

    -
      -
    • CRM.User

    • -
    -

    CRM.ContactDetail

    CreateDateDate TimeCreate DateTanggal record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti order comment sudah -closed. UTC+0
    ArchiveDateDate TimeArchive DateJika ArchiveDate terisi berarti order comment -sudah diarsip dan dipindahkan ke data warehouse. UTC+0
    DelDateDate TimeDelete DateJika DeleteDate terisi berarti order comment sudah -dihapus dan tidak bisa di-akses oleh user biasa. UTC+0
    - -Table 73 testdefsite - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 74 Contoh Parameters

    -
    FieldTipe dataDisplayKeterangan
    OrderAttIDOrder Attachment IDPK
    InternalOIDFK. Internal Order ID. Dari Table 31 order
    AddressnvarcharAddressLokasi file lampiran.
    UserIDUser ID

    Identitas user yang menuliskan komentar. Berasal dari table:

    -
      -
    • CRM.User

    • -
    • CRM.ContactDetail

    • -
    OriginnvarcharOrigin Table

    Table dimana UserID disimpan:

    -
      -
    • CRM.User

    • -
    -

    CRM.ContactDetail

    CreateDateDate TimeCreate DateTanggal record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti order comment sudah -closed. UTC+0
    ArchiveDateDate TimeArchive DateJika ArchiveDate terisi berarti order attachment -sudah diarsip dan dipindahkan ke data warehouse. UTC+0
    DelDateDate TimeDelete DateJika DeleteDate terisi berarti order attachment -sudah dihapus dan tidak bisa di-akses oleh user biasa. UTC+0
    - -Table 74 Contoh Parameters - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 75. testdeftech

    -
    FieldTipe dataDisplayKeterangan
    OrderStatIDOrder Status IDPK. Not null.
    InternalOIDFK. Internal Order ID. Dari Table 47 order
    OrderStatusNvarchar(2)Order StatusKode status test order, lihat Lampiran 14:
    -(dari Table 83 Test order status codes)
      -
    • -
      -
    • -
      -
    • -
      -
    • -
    CreateDateDate TimeCreate DateWaktu order dibuat/order date time. -UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti order status sudah -closed. UTC+0
    ArchiveDateDate TimeArchive DateJika ArchiveDate terisi, berarti record ini sudah masuk -data warehouse dan tidak boleh diiubah lagi. UTC+0
    DelDateDate TimeDelete DateJika DeleteDate terisi berarti order status sudah dihapus -dan tidak bisa di-akses oleh user biasa. UTC+0
    - -Table 75. testdeftech - -| | | -|-----|-----| -| | | -| | | -| | | -| | | -| | | -| | | -| | | -| | | -| | | -| | | - -Table 77 Contoh formula Creatinine Clearance - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 78. testdefgrp

    -
    FieldTipe dataDisplayKeterangan
    OrderLogIDOrder Log IDPK
    TblNamenvarcharTable NameNama table
    RecIDintRecord IDRecord ID – PK. Record dimana operasi/activity -terjadi
    FldNamenvarcharField NameNama field
    FldValuePrevnvarcharPrevious ValueField Value Previous. Nilai sebelumnya
    OperationnvarcharOperation

    Lihat Lampiran 14:

    -
      -
    • create – create record

    • -
    • read – read record/field

    • -
    • update – update record/field

    • -
    • delete – delete record/field

    • -
    SiteIDnvarcharSite IDFK dari table Site13
    UserIDUser ID

    Identitas user yang melakukan operasi/activity data. Berasal dari -table:

    -
      -
    • CRM.User

    • -
    • CRM.Contact

    • -
    OriginnvarcharOrigin Table

    Table dimana UserID disimpan:

    -
      -
    • CRM.User

    • -
    • CRM.ContactDetail

    • -
    DIDTypenvarcharDID Type

    Device ID Type. Lihat Lampiran 14:

    -
      -
    • Windows: Device ID

    • -
    • Android: AAID

    • -
    • IOS: IDFA

    • -
    DIDnvarcharDIDDevice ID
    MachineIDnvarcharMachine IDIdentitas mesin 1dimana operasi/activity dilakukan – -MAC address
    SessionIDnvarcharSession IDApplication session ID
    AppIDnvarcharApplication IDApplication ID
    ProcessIDnvarcharProcess IDProcess ID
    WebPageIDnvarcharWeb Page ID
    EventIDnvarcharEvent ID
    ActivityIDnvarcharActivity IDActivity ID
    ReasonnvarcharReasonAlasan operasi/activity data
    LogDateDate TimeLog DateDate & time log data. UTC+0
    - - -Table 78. testdefgrp - -### Patient Registration, Patient Visit, ADT & Test Ordering {#patient-registration-patient-visit-adt-test-ordering} - -Gambar 8 hirarki patient, patvisit, patvisitadt dan ordertest - -| **InternalPID** | **PatientID** | **NameFirst** | **NameMiddle** | **NameMaiden** | **NameLast** | **Suffix** | **Gender** | -|-----------------|---------------|---------------|----------------|----------------|--------------|------------|------------| -| 1 | 00-01-23 | Agus | | | Perikesit | | M | -| 2 | 23-87-55 | Rukmini | | | Ambarsari | | F | - -Table 79. testdispctrl - - - --------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 81 testmap

    -
    Case #

    Internal

    -

    PVID

    SiteIDPVID

    Internal

    -

    PID

    EpisodeIDCreateDate
    1101PV0011EP0012025-01-07 06:15:00
    2a201PV0032EP0032025-01-07 16:15:00
    2b301PV0042EP0042025-01-07 18:46:00
    3401PV0052EP0072025-05-21 09:55:00
    - -Table 81 testmap - - - ------------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 82 Mapping relationship

    -

    Case

    -

    #

    PVADT

    -

    ID

    Internal

    -

    PVID

    Code

    Location

    -

    ID

    Att

    -

    Doc

    Ref

    -

    Doc

    Cns

    -

    Doc

    CreateDate

    ADT Event – -integrated

    -

    (standalone)

    1
      -
    1. -
    1A042025-01-07 06:15:00P. Registration
      -
    1. -
    1A01IGDD0012025-01-07 06:25:00P. Admission
      -
    1. -
    1A02ICUD0012025-01-07 12:28:00P. Transfer (location)
      -
    1. -
    1A02IRNA 1D0012025-01-09 07:07:00P. Transfer (location)
      -
    1. -
    1A03IRNA 1D0012025-01-11 11:06:00P. Discharge
    2a
      -
    1. -
    2A042025-01-07 16:15:00P. Registration
      -
    1. -
    2A01P. JantungD0032025-01-07 16:26:22P. Admission
      -
    1. -
    2A03P. JantungD0032025-01-07 18:46:00P. Discharge
    2b
      -
    1. -
    3A01IRNA 3D005D0032025-01-07 18:50:38P. Admission
      -
    1. -
    3A02OKD005D0032025-01-07 19:55:24P. Transfer (location)
      -
    1. -
    3A02Recovery 1D005D0032025-01-07 21:30:47P. Transfer (location)
      -
    1. -
    3A02IRNA 3D005D0032025-01-08 03:52:11P. Transfer (location)
      -
    1. -
    3A03IRNA 3D005D0032025-01-08 10:54:31P. Discharge
    3
      -
    1. -
    42025-05-21 09:55:00P. Registration
      -
    1. -
    4P. JantungD0032025-05-21 10:01:00P. Admission
      -
    1. -
    4P. InternisD0092025-05-21 10:35:00P. Transfer (loc & doc)
    - -Table 82 Mapping relationship - - - ------------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 83 Contoh testdefsite

    -

    Case

    -

    #

    Internal

    -

    OID

    OrderIDPlacerID

    Internal

    -

    PID

    Site

    -

    ID

    PVADT

    -

    ID

    Req

    -

    App

    Priority

    Trn

    -

    Date

    1
      -
    1. -
    01250107000012501070011012HISStat2025-01-07 07:02:00
      -
    1. -
    01250107001122501071121013HISStat2025-01-07 18:09:00
      -
    1. -
    01250108000032501080031013HISRoutine2025-01-08 05:33:00
      -
    1. -
    01250108001072501081071013HISRoutine2025-01-08 18:29:00
      -
    1. -
    01250109000052501090051013HISRoutine2025-01-09 06:27:00
      -
    1. -
    01250110000022501100021014HISRoutine2025-01-10 06:05:00
    2b
      -
    1. -
    01250107001332501101332019HISRoutine2025-01-07 18:59:00
      -
    1. -
    012501070014225011014220110HISRoutine2025-01-07 21:07:24
    3
      -
    1. -
    012505210005620115Stat2025-05-21 10:24:00
    - -Table 83 Contoh testdefsite - -> ***Case \#1*** -> -> Pasien Agus Parikesit (MR 00-01-23) tiba di IGD fasyankes pada tanggal -> 7 Januari 2025 karena mengalami demam tinggi dan di-registrasi jam -> 06:15:00. Proses admission dilakukan jam 06:25. Dokter jaga (attending -> doctor) mendiagnosa demam berdarah dan untuk memastikannya, pada 07.02 -> pasien diperiksa **Panel Demam** ke laboratorium. -> -> Jam 12:28, pasien dipindah ke ICU karena kondisi memburuk. Pasien -> dirawat di ICU selama 2 hari dan dokter minta check **Thrombosit** 2 -> kali sehari -- di pagi dan sore hari.. -> -> Pada 9 Januari 2025, jam 7:07 pasien dipindahkan ke Instalasi Rawat -> Inap 1 (IRNA 1) karena sudah stabil dan dipantau selama 2 hari. -> Pemeriksaan **Thrombosit** dilakukan tiap pagi. Tanggal 11 Januari -> 2025, jam 11:06 pasien boleh pulang (*discharge*). -> -> ***Case \#2*** -> -> Pasien Rukmini Ambarsari (MR 23-87-55) konsultasi ke kardiolog - dr. -> D003 di Poli Jantung pada tanggal 7 Januari 2025. Registrasi dilakukan -> jam 16:15, dilanjutkan proses admission jam 16:26. Saat konsultasi, -> disarankan pemasangan *stent*. Pasien memutuskan untuk segera -> menjalani tindakan tersebut. Berdasarkan *policy* fasyankes tersebut, -> pihak administrasi Rawat Jalan melakukan *discharge* (18:46) untuk -> kemudian *admit* di fasilitas Rawat Inap. -> -> Jam 18:50, pasien dirujuk ke IRNA 3 dan ditangani dokter bedah jantung -> (bedah toraks kardiovaskular) - dr. D005. Atas permintaan dr. D005, -> pasien diperiksa **panel Pre-Op** **(fungsi ginjal, elektrolit, dan -> tanda-tanda infeksi)** pada jam 18:59 sebagai bagian dari persiapan -> operasi. Pasien siap menjalani operasi, berdasarkan hasil panel Pre-Op -> dari laboratorium yang diterima di IRNA 3 jam 19:44 -> -> Jam 19:55 pasien dipindahkan ke kamar operasi (OK) untuk menjalani -> tindakan pemasangan *stent*. -> -> Jam 21:02, dr. D005 mengambil sample darah pasien dan order -> pemeriksaan lab (21:07). *Test order* ini selesai jam 21:52. -> -> Pasca operasi, pasien dipindahkan ke ruang pemulihan Recovery 1 -> (21:30) untuk dipantau selama 6 jam kedepan. Hasil laboratorium (Order -> ID 0125010700142) yang selesai 21:52 otomatis dikirim ke Recovery 1. -> -> Tanggal 8 Januari 2025, jam 03:52 pasien dipindah ke IRNA 3 dan pada -> jam 10:54 sudah boleh pulang (*discharge*). -> -> ***Case \#3*** -> -> Pasien Rukmini Ambarsari (MR 23-87-55) konsultasi ke kardiolog - dr. -> D003 di Poli Jantung pada tanggal 21 Mei 2025. Registrasi dilakukan -> jam 09:55, dilanjutkan proses admission jam 10:01. Kedatangan kali ini -> bertujuan kontrol pasca pemasangan *stent*. Saat konsultasi, diminta -> periksa lab (10:24) dan setelahnya dirujuk ke Poli Internis dengan dr. -> D009 (10:35). -> -> Hari itu, CLQMS terputus dari HIS sehingga *test ordering* dilakukan -> langsung di CLQMS. OrderID 0125052100056 adalah atas permintaan dr -> D003 dan tercatat berasal dari Poli Jantung. Hasil baru selesai -> setelah pasien pindah ke Poli Internis, sehingga tidak dilakukan -> pencetakan hasil otomatis ke Poli Jantung. -> -> **Note:** - -1. Table patvisitadt menyimpan status pasien, yaitu *life cycle* pasien - dari *registration* hingga *discharge* -- sesuai kode ADT (Lampiran - 14: Value set / Admission -- Discharge -- Transfer Code). - -2. Jika ada ADT *events* yang dilakukan pada saat yang bersamaan, - misalnya ganti dokter dan pindah lokasi, maka dicatat di waktu yang - sama (CreateDate ADT *events* tersebut sama) tetapi dalam record - yang berbeda sesuai dengan ADT *event* yang diterima dari HIS. - -3. *Admitting* dan *Referring doctor*, seyogyanya tidak bisa diganti. - Tetapi jika terjadi kesalahan administrasi maka menggunakan kode A08 - (*Update Patient Information*). - -4. Pasca *discharge*, tidak boleh terjadi: - - a. perpindahan lokasi dan dokter. - - b. perubahan data visit. Hal ini terkait dengan *billing* *-- - discharge* berarti *billing* sdh pasti/*closed*. - -5. *Discharge* dilakukan terhadap *visit* -- oleh karenanya semua - *record* terkait visit tersebut tidak bisa diedit/*update* lagi, - termasuk penambahan *test* *order* tidak bisa dilakukan lagi - terhadap visit tersebut. - -6. Bisa/tidaknya suatu *visit* di-*discharge* bila ada hasil lab yang - belum selesai tergantung pada *policy* fasyankes. Umumnya menunggu - hasil lab selesai, baru *discharge.* - -7. *Cancel discharge* - - a. bisa dilakukan: - - i. atas instruksi dari HIS, misalnya berupa ADT message - - ii. oleh orang tertentu saja di lab - - b. tidak meng-*update* *existing record* tetapi men-*trigger* - tambahan patvisitadt record dengan Code: A13 (*cancel - discharge*). - -### Specimen [^21] {#specimen} - -> Data-data terkait specimen dikelola menggunakan tables dan Value Sets. -> Tables untuk mengelola specimen terdiri dari: - -- **containerdef**[^22]. Berisi definisi jenis-jenis wadah *specimen* - yang digunakan setiap *site*, termasuk wadah yang digunakan untuk - transport (merujuk) ke *site* lain. Agar fleksibel, table ini hanya - menyimpan atribut generik dari tiap jenis wadah, tidak sampai spesifik - atribut produk. - -- - -- - -- **spccounter**. Adalah definisi Lokasi/tempat peyimpanan specimen. - Misalnya refrigerator, dll. - -- - -- - - - - - - - - - - - - - - - - -- **specimens**. Adalah table transaksi yang berisi data *specimen* yang - harus dikumpulkan dari tiap-tiap *test orders* - - - Sebagai panduan bagi user jenis *specimen* apa saja **yang perlu** - dikumpulkan (*to be collected*). - - - Terisi otomatis: - - - segera setelah *test* *order* dibuat, berdasarkan pilihan test - - - jika user melakukan aliquot dan mencetak label tambahan - (*additional label*). - - - - - - Bersama dengan containertype table, digunakan menghitung penggunaan - container - -- - -- **specimenstatus**. Berisi data status specimen, lokasi, waktu dan - *user* yang bertanggung jawab, berikut perubahan-perubahannya. Table - specimenstatus merekam proses **actual** *specimen collection* hingga - *disposal* (dibuang, dimusnahkan). Termasuk fungsi dari table ini: - - - perpindahan *specimen* dari satu lokasi ke lokasi lain: rumah pasien - (*home service*), lokasi sampling MCU, dll -- *tracking*. - - - distribusi *specimen* ke *department* di dalam laboratorium - - - - -- **specimencollection**. Berisi data-data detail terkait *specimen* - *collection*. Misalnya, waktu mulai dan akhir pengumpulan *specimen* - untuk urine 24 jam. Tidak semua specimen memerlukan data ini. - -- **specimenconsumables**. Berisi data bahan habis pakai yang digunakan - di setiap *activity* terkait specimen. Pencatatan bahan habis pakai - dipicu oleh *activity* yang dilakukan atas specimen (direpresentasikan - oleh SID). Pencatatan bahan habis pakai specific hingga no katalog - product yang digunakan. - -- **specimenprep**. Berisi data-data terkait *specimen - preparation/processing*. Satu spesimen bisa mengalami beberapa kali - tahap persiapan. - -- **specimentrans**. Berisi data-data *specimen* *transport*/*handling*, - termasuk *packaging* untuk dikirim ke *site* lain. - - - -- **specimenlog**. Berisi data perubahan-perubahan yang dilakukan atas - *specimens,* yaitu tables: - - - specimens - - - specimenstatus - - - specimencollection - - - specimenprep - - - specimetrans - -> *Value* *sets* terkait *specimens* adalah: - -- **spctype**. Berisi definisi jenis-jenis specimen yang digunakan - setiap site. *Specimen* adalah material yang langsung didapat dari - pasien. Lihat Lampiran Specimen Type dan Specimen Type (Environmental) - -- **spcact**, yaitu definisi *specimen status*/aktivitas (*activity*). - Misalnya, "Collection", "Transport", "Reception", dll. - -- **actres**, yaitu *activity result*. - -- **spcstatus**, yaitu status dari specimen. - -- **spccon**, *specimen condition definition*. Berisi definisi kondisi - specimen. - -- - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 84. Contoh testdeftech

    -
    FieldTipe dataDisplayKeterangan
    ConDefIDContainer Definition IDPK. Container Definition ID
    SiteIDnvarcharFK. Site dimana container didefinisikan, dari -table Site.
    ConCodenvarchar(3)Container CodeContainer code -berupa abbreviated text; Bagian dari Specimen ID. Tercetak pada -label/report. Constraint: unique.
    ConNamenvarcharContainer NameNama jelas container; Tercetak pada label/report. Misal ”2H -PP”
    ConDescnvarcharDescriptionPenjelasan container. Misalnya: “Container untuk -specimen Glukosa 2HPP”
    AdditivenvarcharAdditiveValue Set. Zat additive di dalam container.
    ConClassintContainer Class

    Value Set.Container class:

    -
      -
    • 1: primary, kontak langsung dengan spesimen

    • -
    • 2: secondary, wadah primary -container

    • -
    • 3: tertiary, wadah secondary -container.

    • -
    ColorintColorValue Set. Warna container cap.
    CreateDateDate TimeCreate DateWaktu record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti record tersebut tidak -digunakan. UTC+0
    - -Table 84. Contoh testdeftech - -| **ConCode** | **ConName** | **ConDesc** | **Additive** | **Con** **Class** | **Pic** **Example**[^23] | -|-------------|---------------------|------------------------------------------------------------------------|----------------------------|-------------------|------------------------------------------------------------------------------------------------------------------------------------| -| 001 | SST | Evacuated blood collection tube, gel separator | Gel | 1 | ![](media/image6.emf){width="0.2986275153105862in" height="1.0in"} | -| 011 | Plain | Evacuated blood collection tube, no additive/metal-free | None | 1 | ![](media/image7.emf){width="0.3130216535433071in" height="1.0in"} | -| 012 | 2Hr PP | Evacuated blood collection tube, untuk Glukosa 2 Jam PP | Sodium Fluoride | 1 | ![](media/image8.emf){width="0.30431430446194224in" height="1.0in"} | -| 013 | Glukosa Sewaktu | Evacuated blood collection tube, untuk Glukosa Sewaktu | Sodium Fluoride | 1 | ![](media/image8.emf){width="0.30431430446194224in" height="1.0in"} | -| 014 | GTT 30 menit | Evacuated blood collection tube, untuk GTT 30 menit | Sodium Fluoride | 1 | ![](media/image8.emf){width="0.30431430446194224in" height="1.0in"} | -| 015 | GTT 60 menit | Evacuated blood collection tube, untuk GTT 60 menit | Sodium Fluoride | 1 | ![](media/image8.emf){width="0.30431430446194224in" height="1.0in"} | -| 016 | GTT 120 menit | Evacuated blood collection tube, untuk GTT 90 menit | Sodium Fluoride | 1 | ![](media/image8.emf){width="0.30431430446194224in" height="1.0in"} | -| 020 | RST | Evacuated blood collection tube, thrombin/clot activator/gel separator | Clot activator | 1 | ![](media/image9.emf){width="0.5196369203849519in" height="1.0in"} | -| 101 | EDTA - Hematologi | Evacuated blood collection tube, K2EDTA/aprotinin | K2EDTA | 1 | ![](media/image10.emf){width="0.1821139545056868in" height="1.0in"} | -| 150 | Citrate - Koagulasi | Evacuated blood collection tube, untuk koagulasi | Sodium citrate (substance) | 1 | ![](media/image11.emf){width="0.23609251968503936in" height="1.0in"} | -| 200 | Aliquot | General specimen container, no additive, non-sterile. Untuk aliquot | \ | 1 | ![Specimen Collection and Preparation - Mayo Clinic Laboratories](media/image12.jpeg){width="0.8in" height="0.4450371828521435in"} | -| 290 | Pot Urin | Non-sterile urine specimen container IVD | \ | 1 | ![](media/image13.png){width="0.6931025809273841in" height="0.6in"} | -| 295 | Urine Container | Urine specimen container | \ | 1 | ![](media/image14.png){width="0.6692443132108487in" height="0.8in"} | -| 900 | Packing Pengiriman | Specimen Transport Packaging | \ | 2 | ![](media/image15.png){width="1.0in" height="1.0in"} | - -Table 85. Contoh testdefcal - -> ![](media/image16.emf){width="4.5in" height="3.6030653980752407in"} - -Gambar 9 Specimen packaging - -| | | | | -|-----|-----|-----|-----| -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | - -Table 86. Contoh testdefgrp - -| | | | | -|-----|-----|-----|-----| -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | - -Table 87 Contoh test mapping - -> Catatan: - -- dalam suatu lingkungan multi-sites, semua sites harus menggunakan - ConDefID yang sama. - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|----------------|---------------|-----------------------|----------------------------------------------------------------------| -| SpcCounterID | | Specimen Counter ID | PK. *Specimen counter* ID | -| SiteID | nvarchar | | Foreign Key, dari table Site | -| LocationID | | | FK dari Table 34 location | -| SpcCounterName | nvarchar | Specimen Counter Name | Nama *specimen counter* | -| Description | nvarchar | Description | Penjelasan *specimen counter* | -| CreateDate | Date Time | Create Date | Waktu *record* ini dibuat. UTC+0 | -| EndDate | Date Time | End Date | Jika EndDate terisi berarti *record* tersebut tidak digunakan. UTC+0 | - -Table 88 testdeflog - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 89 Contoh RefType: RANGE

    -
    FieldTipe dataDisplayKeterangan
    InternalSIDInternal SIDPK. Internal Specimen ID
    SIDNvarchar(30)Sample ID (SID)

    Not null. Specimen ID. Dicetak sebagai specimen/sample number. -Mengikuti rumusan pada Specimen Management

    -

    Constraint: Tidak boleh ada yang sama

    SiteIDFK. Not null. Site asal specimen. Dari table -Site
    OrderIDFK. Not null. Test order ID, dari table ordertest
    ConDefIDContainer Definition IDFK. Not null. Dari table containerdef
    Parentnvarchar(30)ParentSID dari parent specimen. Setiap secondary -specimen harus memiliki parent specimen.
    QtyintQuantityQuantity, menunjukkan jumlah specimen yang sama yang -harus dikumpulkan. Misalnya pada urine 24 jam.
    UnitnvarcharUnitValue Set. Satuan specimen. Misalnya mL, L, pcs, dll.
    GenerateBynvarcharGenerate By

    Value Set. Pemicu terbentuknya record ini:

    -
      -
    • order: dipicu oleh proses test order

    • -
    • user: permintaan tambahan label

    • -
    SchDateTimeDate TimeScheduled Date and Time
      -
    • Jadwal specimen collection.

    • -
    CreateDateDate TimeCreate DateTanggal record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti specimen ini sudah -closed. UTC+0
    ArchiveDateDate TimeArchive DateJika ArchiveDate terisi berarti specimen sudah diarsip dan -dipindahkan ke data warehouse. UTC+0
    CreateDateDate TimeWaktu record dibuat. UTC+0
    ArchiveDate Date Time
    Jika ArchiveDate terisi berarti specimen tersebut tidak bisa -dioperasikan di semua bagian aplikasi:
    - -Table 89 Contoh RefType: RANGE - -> *Aliquot,* atau pengambilan ulang, harus memiliki identitasnya sendiri -> agar bisa dicatat dan ditelusuri keberadaannya. *Aliquot* adalah -> turunan (*secondary* *specimen*) dari *parent* *speciment*. -> -> Tetapi tidak semua *aliquot* memiliki *parent*, misalnya saat lab -> menerima *sample serum* dari fasyankes lain. - - - --------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 90 Contoh RefType: THOLD

    -
    Case#

    SID

    -

    LLYYMMDDXXXXXSSSC

    OrderID

    -

    LLYYMMDDXXXXX

    ParentQtyUnitNotes
    10025091900001001000250919000011SST
    00250919000010120002509190000112Hr PP
    0025091900001101000250919000011EDTA
    20025091900002001000250919000021SST
    0025091900002001100250919000021SST
    30025091900003001000250919000031SST
    002509190000320000025091900003002509190000300101Aliquot
    40025091900004001000250919000041SST
    002509190000400110025091900004002509190000400101SST
    50025091900005001000250919000051SST
    0025091900005295100250919000052LUrine Container
    - -Table 90 Contoh RefType: THOLD - -> Keterangan *Case*: - -1. Order pemeriksaan Hematolongi, Kimia, termasuk 2 Jam PP. - -2. Order pemeriksaan Immunologi dan Kimia, keduanya menggunakan tabung - (ber-gel) SST. Phlebotomist mengambil darah sebanyak 2 tabung - (**tambah**) agar pemeriksaan Kimia dan Imunologi bisa dikerjakan - simultan. - -3. Order pemeriksaan Immunologi, sebagian perlu merujuk sehingga - dilakukan *aliquoting* (***secondary*** ***specimen***). - -4. Order pemeriksaan Kimia. Saat *specimen reception* di lab, - *specimen* tidak memenuhi syarat sehingga harus diambil **ulang** - menggunakan tabung yang sama. Tabung pertama dinyatakan tidak layak - pakai, dikarantina dan dimusnahkan. - -5. Order pemeriksaan Kimia, termasuk *Creatinine Clearence* yang - memerlukan 2 liter *specimen* urine. - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 91 refnum

    -
    Pre-analyticAnalyticPost-analytic
    CollectionExaminationStoring
      -
    • ruang rawat inap/UGD

    • -
    • laboratorium

    • -
    • sampling station di dalam fasyankes

    • -
    • sampling station di luar fasyankes

    • -
    • rumah pasien

    • -
    • lokasi MCU

    • -
    • rujukan dari lab lain

    • -
      -
    • instrument A

    • -
    • dipindah ke instrument B

    • -
    • workbench 1A

    • -
    • dirujuk ke site lain (multi-site)

    • -
    • dirujuk ke fasyankes lain

    • -
      -
    • disimpan di storage A (2-8oC) selama x hari

    • -
    • disimpan di storage B (-20oC) selama x hari

    • -
    • -
    TransportRerun/AddRerun/Add
      -
    • transport di dalam site

    • -
    • transport dari luar site

    • -
    • transport ke luar site

    • -
      -
    • rerun

    • -
    • tambahan tes

    • -
    • di-sentrifugasi ulang

    • -
      -
    • rerun setelah beberapa waktu.

    • -
    • tambahan tes

    • -
    HandlingResults/Review
      -
    • dikemas dg suhu tertentu

    • -
    • diberi label/penanda

    • -
      -
    • -
    Reception
      -
    • terima specimen fasyankes

    • -
    • terima specimen rujukan

    • -
    Preparation
      -
    • sentrifugasi

    • -
    • aliquoting

    • -
    • -
    StoringDisposing
      -
    • disimpan sementara utk pooling.

    • -
    • disimpan sementara utk dirujuk

    • -
    dimusnahkan
    - - -Table 91 refnum - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 92 Contoh refnum

    -
    FieldTipe dataDisplayKeterangan
    SpcStaIDSpecimen Status IDPK. Not null.
    SIDnvarcharSIDSpecimen ID; Dicetak sebagai bagian dari specimen/sample -number.
    OrderIDFK. Not null. Request ID dari Table 31 .
    SpcActnvarcharSpecimen ActivityValue Set. Activity yang dilakukan atas specimen.
    ActResintActivity Result
      -
    • null: belum ada status

    • -
    • Value Set. Activity Result.

      -
        -
      • 0: gagal

      • -
      • 1: berhasil dengan catatan

      • -
      • 2: berhasil

      • -
    • -
    SpcStatusnvarcharSpecimen StatusValue Set. Specimen Status.
    QtyintQuantityQuantity, menunjukkan jumlah specimen yang sama yang -berhasil dikumpulkan.
    UnitnvarcharUnitValue Set. Satuan specimen. Misalnya mL, L, pcs, dll.
    SpcConnvarcharConditionValue Set. Specimen condition. Specimen -Condition
    CommentnvarcharCommentInformasi tambahan.
    CurrSiteIDnvarcharCurrent Site IDFK, Current Site ID. Site dimana specimen -berada. Dari table Site
    CurrLocIDnvarcharCurrent Location ID

    Current Location, lokasi dimana specimen -berada. Berisi FK, salah satu dari:

    -
      -
    • LocationID dari Table 15 location

    • -
    • SpcCounterID dari Table 38 spccounter

    • -
    • EquipmentID dari Table 47. equipmentlist

    • -
    OriginnvarcharOrigin

    Nama table asal Foreign Key:

    -
      -
    • location

    • -
    • spccounter

    • -
    • equipmentlist

    • -
    GeoLocationSystemnvarcharGeo Location System
      -
    • Sistem/standard geolocation yang digunakan

    • -
    • Untuk pemantauan pengiriman1 -specimen.

    • -
    GeoLocationDataGeo Location Data
      -
    • Untuk pemantauan pengiriman21 -specimen.

    • -
    -

    (perlu dipelajari lebih lanjut format data GeoLocation -baku)

    DIDTypenvarcharDID Type

    Value Set. Device ID Type:

    -
      -
    • Windows: Device ID

    • -
    • Android: AAID

    • -
    • IOS: IDFA

    • -
    DIDnvarcharDIDDevice ID
    UserIDnvarcharUser ID

    Identitas user yang melakukan perubahan status. Berasal dari -table:

    -
      -
    • CRM.User

    • -
    • CRM.ContactDetail

    • -
    LogDateDate TimeLog DateWaktu record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti specimen status record ini -sudah closed. UTC+0
    ArchiveDateDate TimeArchive DateJika ArchiveDate terisi berarti record ini sudah masuk -data warehouse dan tidak boleh diiubah lagi. UTC+0
    - - -Table 92 Contoh refnum - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 93 reftxt

    -
      -
    • -
      -
    • -
      -
    • -
      -
    • -
    - -Table 93 reftxt - -> Setiap membuat record specimenstatus, aplikasi melakukan: - -- mengidentifikasi DID, MachineID, IP Address dan membandingkan data - dari Table 47. devicelist, untuk menentukan CurrSiteID dan CurrLocID - -- mengidentifikasi GeoLocationData dan mencatatnya, terutama pada - *activity* terkait spesimen yg bersifat *mobile*. Misalnya pengiriman - dengan kurir. - -> **Condition** bisa berisi lebih dari satu dan dipisah dengan \^. -> Misalnya: HEM\^LIP\^FROZ -> -> **LogDate** dimana: - -- collect -- success adalah collection date time. - -- *receive* -- di lokasi lab -- *success* adalah *received date time*. - - - ------------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 94 Contoh reftxt

    -
    -

    SID

    -
    -

    Site

    -

    ID

    -
    -

    Activity

    -
    -

    ActRes

    -
    -

    LocationID1

    -
    -

    UserID

    -
    -

    Qty

    -
    -

    Unit

    -
    -

    Logdate

    -
    -

    Keterangan

    -
    0025091900001001000CollectionFailedIRNA_ATono1pc2024-06-30 08.30:12.002diambil
    0025091900001001000collectionSuccessIRNA_ASurya1pc2024-06-30 08.40:18.985diambil kedua kalinya.
    0025091900001001000ReceptionSuccessLabJono1pc2024-06-30 09.01:02.028diterima di Lab
    0025091900001001000AliquotSuccessLabTini1pc2024-06-30 09.30:08.762di-aliquot/dibagi
    0025091900001001000TransportSuccessLabBudi1pc2024-06-30 09.45:19.537dikirim ke lab rujukan
    0025091900001001002ReceptionSuccessLabRujukanSanti1pc2024-06-30 10.45:06.349diterima di lab rujukan
    0025091900001001000ReceptionSuccessTMS-30i2Bejo1pc2024-06-30 10.51:11.743diterima di TMS-30i3
    0025091900001001000ReceptionSuccessRef_14Putri1pc2024-06-30 12.03:22.835disimpan di refrigerator
    0025091900001001000destroySuccessTungku_1Putra1pc2024-07-06 17.03:45.637dimusnahkan
    - - -Table 94 Contoh reftxt - -> Perubahan status dilakukan dengan *scan label* oleh *user*/informasi -> otomatis. Aplikasi dan *user login* dimanfaatkan untuk -> mengidentifikasi CurrSiteID, CurrLocID dan UserID. -> -> *Query message* yang dikirim oleh *instrument* bisa dijadikan penanda -> bahwa *specimen* telah berada di dalam *instrument* tersebut. -> -> *Failed* *activity* termasuk *non-conformity* dan dijelaskan di *field -> Comment*. -> -> Pengambilan sample bisa juga di luar fasyankes (tempat tinggal/kerja -> pasien, MCU sampling site, dll) - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 95 Alur definisi test

    -
    FieldTipe dataDisplayKeterangan
    SpcColIDnvarcharSpecimen ColIection IDPK. Not null.
    SpcStaIDFK. Not null. Dari Table 42 specimenstatus
    SpcRolenvarcharSpecimen RoleValue Set. Peran spesimen; Lihat Table 88 Specimen Role. -Default value: P - Patient
    ColMethodnvarcharCollection MethodValue Set yang menjelaskan teknik yang digunakan untuk -melakukan specimen collection.
    BodySitenvarcharBody SiteValue Set yang menjelaskan lokasi anatomi pengambilan -spesimen (jika subjeknya adalah pasien). Lihat Value set (. -Field ini tidak digunakan untuk spesimen lingkungan. Contoh pada -liver biopsy, maka value dari field ini -adalah ‘liver.’
    CntSizeintContainer SizeValue Set. Ukuran container yang digunakan.
    FastingVolume nvarchar (2)float FastingVolume

    Coded Value yang menjelaskan fasting status. -Lihat Value set (.:Volume specimen. Urine 24 jam memerlukan data volume -dan diperhitungkan dalam pemeriksaan

    -
      -
    • F (Fasting): Pasien puasa

    • -
    • NF (Not Fasting): Pasien tidak puasa

    • -
    NG (Not Given): Pasien tidak ditanyakan status puasanya. -ColStartDate TimeCollection StartWaktu mulai pengumpulan specimen. UTC+0
    ColEndDate TimeCollection EndWaktu akhir pengumpulan specimen. UTC+0
    CreateDateLogDate Date Time CreateDateLog Date
    Waktu record ini dibuat. LogDateDate TimeLog DateWaktu record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti specimen status record ini -sudah closed. UTC+0
    ArchiveDateDate TimeArchive DateJika ArchiveDate terisi berarti record ini sudah masuk -data warehouse dan tidak boleh diiubah lagi. UTC+0
    - -Table 95 Alur definisi test - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|-------------|---------------|-------------|---------------------------------------------------------------------------------------------------------------| -| SpcTrnID | | | PK. Not null. | -| SpcStaID | | | FK. Not null. Dari Table 42 specimenstatus | -| Description | nvarchar | | Penjelasan *specimen preparation*. | -| Method | nvarchar | | *Coded value* yang menjelaskan metode yang digunakan untuk memproses spesimen. | -| Additive | int | | Bahan yang digunakan dalam persiapan spesimen.. | -| PrepStart | Datetime | | Waktu mulai persiapan specimen. UTC+0 | -| PrepEnd | Datetime | | Waktu akhir persiapan specimen. UTC+0 | -| LogDate | Date Time | | Waktu record ini dibuat. UTC+0 | -| ArchiveDate | Date Time | | Jika ArchiveDate terisi berarti *record* ini sudah masuk *data warehouse* dan tidak boleh diiubah lagi. UTC+0 | - -Table 96. valueset - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|-------------|---------------|-------------------------|------------------------------------------------------------------------------------------------------------------------------| -| SpcPrpID | | Specimen Preparation ID | PK. Not null. | -| SpcStaID | | | FK. Not null. Dari Table 42 specimenstatus | -| Description | nvarchar | Description | Penjelasan *specimen preparation*. | -| Method | nvarchar | Method | *Value Set* yang menjelaskan metode yang digunakan untuk memproses spesimen. | -| Additive | nvarchar | Additive | *Value set*. Bahan yang digunakan dalam persiapan spesimen. Sama dengan Value set yang digunakan dalam Table 41 containerdef | -| AddQty | Float | Additive Quantity | Jumlah additive yang digunakan | -| AddUnit | nvarchar | Unit | *Value Set*. Satuan. Misalnya mL, L, dll. | -| PrepStart | Datetime | Preparation Start | Waktu mulai persiapan specimen. UTC+0 | -| PrepEnd | Datetime | Preparation End | Waktu akhir persiapan specimen. UTC+0 | -| LogDate | Date Time | Log Date | Waktu record ini dibuat. UTC+0 | -| ArchiveDate | Date Time | Archive Date | Jika ArchiveDate terisi berarti *record* ini sudah masuk *data warehouse* dan tidak boleh diiubah lagi. UTC+0 | - -Table 97. valuesetdef - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 98 reagents

    -
    FieldTipe dataDisplayKeterangan
    SpcLogIDSpecimen Log IDPK
    TblNamenvarcharTable NameNama table
    RecIDintRecord IDRecord ID – FK. Record dimana perubahan -terjadi
    FldNamenvarcharField NameNama field
    FldValuePrevnvarcharPrevious ValueField Value Previous. Nilai sebelumnya
    UserIDUser ID

    Identitas user yang melakukan perubahan data. Berasal dari -table:

    -
      -
    • CRM.User

    • -
    • CRM.Contact

    • -
    SiteIDnvarcharSite IDFK dari table Site13
    DIDTypenvarcharDID Type

    Device ID Type:

    -
      -
    • Windows: Device ID

    • -
    • Android: AAID

    • -
    • IOS: IDFA

    • -
    DIDnvarcharDIDDevice ID
    MachineIDnvarcharMachine IDIdentitas mesin 1dimana perubahan dilakukan – MAC -address
    SessionIDnvarcharSession IDApplication session ID
    AppIDnvarcharApplication IDApplication ID
    ProcessIDnvarcharProcess IDProcess ID
    WebPageIDnvarcharWeb Page ID
    EventIDnvarcharEvent ID
    ActivityIDnvarcharActivity IDActivity ID
    ReasonnvarcharReasonAlasan perubahan data
    LogDateDate TimeLog DateDate & time log data. UTC+0
    - - -Table 98 reagents - -### Equipment & Device Management {#equipment-device-management-1} - -> ***Equipment*** secara umum terdaftar di tables **CRM.Product** dan -> **productext**. Secara khusus, yaitu ***equipment*** **IVD** yang -> digunakan di laboratorium atau fasyankes (*laboratory based*) dan -> memproduksi tes serta *non*-*disposable*, *non-wearable*. -> -> ***Device*** adalah *product* teknologi informasi berupa PC, *server*, -> *mobile device* yang digunakan untuk operasional *software* -> laboratorium. -> -> Pengelolaannya dilakukan melalui tables: - -- **equipmentlist**. Merelasikan *equipment* dengan *department* dalam - laboratorium dan menentukan perannya (*main*/*backup*). Data - *equipmentlist* berasal dari: - - - table CRM.Product, jika berasal dari Perusahaan. - - - table productext, jika berasal dari perusahaan lain. - - - -- **comparameters**. Berisi setting komunikasi tiap *equipment*. - -- **devicelist**. Berisi *record* PC, *server* yang merupakan bagian - dari sistem informasi laboratorium. Merelasikan *device* dengan *Site* - dan *Location.* - -- - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 99 caldef

    -
    FieldTipe dataDisplayKeterangan
    EquipmentIDNvarchar(50)Equipment ID

    Berisi:

    -
      -
    • FK: ProductID (table Product, CRM) jika berasal -dari Perusahaan.

    • -
    -
      -
    • FK: ProductExtID (Table 5 productext), jika -berasal dari perusahaan lain.

    • -
    DepartmentIDnvarcharDepartment ID
      -
    • FK; dari Table 8 department; DepartmentID sudah merepresentasikan -SiteID

    • -
    InstrumentIDnvarcharInstrument ID
      -
    • Berisi ProductNumber (table Product, CRM) jika -berasal dari perusahaan.

    • -
    • Berisi instrument serial number jika -berasal dari perusahaan lain

    • -
    InstrumentNamenvarcharInstrument Name
      -
    • Berisi ProductName (table ProductCatalog atau -alias, CRM) Misalnya:

      -
        -
      • TMS-30i

      • -
      • BS-430

      • -
    • -
    -
      -
    • Instrument name perlu dijaga konsistensinya secara -global karena akan menentukan QC grouping, -flagging.

    • -
    WorkstationIDFK. Dari table workstation.
    EnablebitEnable

    Value Set:

    -
      -
    • 1 (enabled): instrument enabled, aktif digunakan di -Department ybs.

    • -
    • 0 (disabled): instrument disabled, tidak aktif digunakan -di Department ybs.

    • -
    EquipmentRolenvarcharEquipment Role

    Peran equipment:

    -
      -
    • M: main

    • -
    • B: backup

    • -
    CreateDateDate TimeCreate DateTanggal record dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti record tersebut tidak -digunakan. UTC+0
    - -Table 99 caldef - -> Field-field EquipmentID, InstrumentName dan CreateDate pada table -> equipmentlist secara otomatis terisi, jika: - -- ada data baru pada table Product (CRM) atau productext - -> Field DepartmentID diisi manual oleh user. -> -> Field Enable dan EquipmentRole otomatis terisi dengan default value -> "Y" dan "M" -> -> ![](media/image17.png){width="2.7564260717410325in" -> height="2.7564260717410325in"} - -Gambar . Replikasi data dari table productext dan Product ke -equipmentlist - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 100 calprep

    -
    FieldTipe dataDisplayKeterangan
    SiteIDnvarcharSite IDDari table Site
    InstrumentIDnvarcharInstrument ID
      -
    • Berisi ProductNumber (table Product, CRM) jika berasal dari -perusahaan.

    • -
    • Berisi instrument serial number jika berasal dari -perusahaan lain

    • -
    InterfaceIDnvarcharInterface IDID interface; Setiap alat bisa memerlukan lebih dari satu -interface
    InterfaceNamenvarcharInterface NameNama interface
    InterfaceDescnvarcharInterface DescriptionDeskripsi interface
    ProtocolNvarcharProtocol
      -
    • ASTM

    • -
    • HL7

    • -
    • DbtoDB

    • -
    • Others

    • -
    IPAddressnvarcharIP AddressIP address dari instrument
    PortnvarcharPortPort instrument; hrs memperhatikan penggunaan multiple port
    COMNumericCOMRS232 port number
    BaudNumericBaudBaud rate
    DataNumericDataData bit
    ParityNumericParityParity bit
    StopNumericStopStop bit
    CreateDateDate TimeCreate DateTanggal record dibuat. UTC+0
    EndDateDate TimeEnd Date

    Jika EndDate terisi berarti instrument tersebut disabled di semua -bagian aplikasi: UTC+0

    -
      -
    • Tidak bisa dipilih untuk berbagai setting.

    • -
    - -Table 100 calprep - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 101 calparinst

    -
    FieldTipe dataDisplayKeterangan
    EquipmentIDNvarchar(50)Equipment ID

    Berisi:

    -
      -
    • FK: ProductID (table Product, CRM) jika berasal -dari Perusahaan.

    • -
    -
      -
    • FK: ProductExtID (Table 5 productext), jika -berasal dari perusahaan lain.

    • -
    DeviceNamenvarcharDevice NameNama device
    DescriptionnvarcharDescriptionPenjelasan mengenai device.
    SiteIDnvarcharSite IDSite dimana device berada. FK dari table -Site13
    LocationIDnvarcharLocation ID

    Lokasi dimana device berada. Berisi FK, dari

    -

    LocationID dari Table 15 location

    DIDTypenvarcharDID Type

    Device ID Type:

    -
      -
    • Windows: Device ID

    • -
    • Android: AAID

    • -
    -
      -
    • IOS: IDFA

    • -
    DIDnvarcharDIDDevice ID
    MachineIDnvarcharMachine IDDevice 1 MAC address
    IPAddressnvarcharIP AddressIP address dari device
    CreateDateDate TimeCreate DateTanggal record dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti record tersebut tidak -digunakan. UTC+0
    - - -Table 101 calparinst - -> **DIDType** dan **DID** bisa digunakan untuk: - -- *licensing* - -- *security*, misalnya *device-based access* - -- *troubleshooting* termasuk mendeteksi perubahan *hardware*, *factory - reset*. - -### Test Management - -> *Test management* mengelola: - -1. Test Definition berikut pembagian pekerjaan, terdiri dari: - - a. **testdef**. Berisi definisi test *universal*, berlaku untuk - **semua *site***, dengan tujuan utama: - - i. agregasi berbagai tes dari tiap site untuk tujuan analisis - statistik - - ii. analisis QC - - b. **testdefsite**. Berisi definisi **semua** jenis test (*test*, - *group*, *calculation*, *parameter*) **tiap *site***, sehingga - bisa *customized*: - - i. identitas *site* dimana test diproduksi. - - ii. test-test dalam testdefsite adalah yang dilihat oleh *user* - di tiap *site*. - - c. **testdeftech**. *test definition technical*, berisi definisi - teknis dan klinis semua test, kecuali TestType CALC, GROUP dan - TITLE. Hal-hal yang dikelola yaitu: - - i. *producer* atau tempat dimana test diproduksi (*department,* - *workstation* dan *instrument* atau *workbench* untuk test - yang dikerjakan secara manual). Satu test yang sama bisa - didistribusikan ke lebih dari satu *workstation*. fungsi - ditribusi pekerjaan - - ii. *specimen*/sample yang digunakan - - iii. *collection requirement*, hal-hal yang harus - dipenuhi/diperhatikan saat melakukan *specimen collection*. - - iv. *test method*, untuk pengelompokan *external QC*. - - v. *target TAT.* - - d. - - e. **testdefcal**. *test calculation*, berisi *setting* untuk - TestType **CALC**: - - i. berisi definisi formula/rumus. - - ii. formula disimpan dalam bentuk *executable expression*. - - iii. *support* beberapa bahasa: Phyton, CQL, FHIRPath, SQL. - - iv. *nested*, formula satu bisa memanfaatkan perhitungan formula - lainnya. - - f. **testdefgrp**. *test group*, berisi *setting* untuk TestType - **GROUP**: - - i. Profile, Functional Procedure, Superset. - -2. i. - ii. - iii. - - - - a. **testmap**. Berisi *test mapping* dari satu entitas ke entitas - lain. Misalnya *instrument* ke *site*, *site* ke server pusat - (GLOBAL) atau *site* ke HIS. - - i. *mapping* dengan kode tes tiap *instrument/equipmet* sesuai - > *coding system* yang digunakan. - - ii. mengendalikan jenis test apa saja yang dikerjakan suatu - > *workstation* / mengatur di *workstation* mana saja suatu - > test dikerjakan. - - iii. mengendalikan *container* apa saja yang boleh digunakan - > oleh suatu test. - - iv. mapping test ke setiap IVD *equipment*. Beberapa test yang - > berbeda bisa dipetakan ke satu test yang sama di IVD - > *equipment* (glukosa sewaktu, glukosa puasa, glukosa 2 - > hour pp, dll). Termasuk dalam *test mapping* ini adalah - > jenis *specimen* - - b. **testdeflog**. Berisi data operasi/*activity* yang dilakukan - atas *test* *definition,* yaitu *tables*: - - i. testdef - - ii. testdefsite - - iii. testdeftech - - iv. testdefcal - - v. testdefgrp - - vi. testmap - - c. - -3. Pemakaian bahan habis pakai (*consumables*). - - a. **testdefconsumables**. Berisi setting bahan habis pakai yang - diperlukan untuk memproduksi test - - i. reagent[^24] dan *consumables* lain yang digunakan - - ii. jumlah dan satuan consumables - - b. **\<\>** - -4. \<\> - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 102 Identitas calibrator dari instrument

    -
    FieldTipe dataDisplayKeterangan
    TestIDnvarcharTest IDPK;
    ParentnvarcharParent Test
      -
    • ID test induk. Misalnya Glukosa.

    • -
    • ParentTest merujuk kepada TestID lain dalam table yang sama -(self-referential)

    • -
    • Proteksi one way referral

    • -
    TestCodechar (6)Test CodeAbbreviated text, panjangnya 6 character. -Constraint: Tidak boleh ada yang sama
    TestNamenvarcharTest NameNama test lengkap
    DescriptionnvarcharDescriptionPenjelasan definisi tes
    DisciplineIDnvarcharDiscipline IDFK. Disiplin. Dari Table 9. discipline
    MethodnvarcharMethodMetoda test
    SeqintSequenceUrutan posisi test
    CountStatbitStatistic

    Value Set.

    -
      -
    • 1: tes dihitung dalam statistic

    • -
    • 0: test tidak dihitung dalam statistic; Misal: formula. -parameters

    • -
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat. UTC+0
    EndDateDate TimeEnd Date

    UTC+0. Jika EndDate terisi berarti test tersebut disabled di -semua bagian aplikasi:

    -
      -
    • Menandai record ini sudah tidak berlaku -lagi/discontinue.

    • -
    • Tidak bisa dipilih untuk berbagai setting.

    • -
    - -Table 102 Identitas calibrator dari instrument - -| **Kondisi** | **TestID** | **TestCode** | -|-------------------------|---------------|---------------| -| Perubahan reagent | Berubah | Berubah | -| Perubahan nilai rujukan | Tidak berubah | Tidak berubah | -| | | | - -Table 103 calresinst - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 104 qcdef

    -
    FieldTipe dataDisplayKeterangan
    TestSiteIDTest Site IDPK; Internal ID, tidak ditampilkan ke user;
    SiteIDnvarcharSite IDDari table Site.
    TestSiteCodechar (6)Test Site CodeAbbreviated text, panjangnya 6 character
    TestSiteNamenvarcharTest Site NameNama test lengkap yang tercetak di hasil pasien
    TestTypenvarcharTest Type

    Value Set, jenis test:

    -

    Test, Parameter, Calculated Test, -Grp, Title.

    DescriptionnvarcharDescriptionPenjelasan definisi tes
    SeqScrintSequence on ScreenUrutan test di layar.
    SeqRptintSequence on ReportUrutan test di laporan.
    IndentLeftintLeft IndentationJarak huruf pertama dari margin sebelah kiri. Indent penting untuk -antisipasi penggunaan non-monospace font.
    FontSytleintFont SyleValue Set. Bold, Italic, Underlined. Jika lebih dari satu, -dipisahkan “^”.
    VisibleScrbitVisible on ScreenValue Set. Ditampilkan di layar
    VisibleRptbitVisible on ReportValue Set. Ditampilkan di laporan
      -
    • -
    CountStatbitStatistic

    Tidak semua tes terdefinisi merupakan real -test1. Value Set.

    -
      -
    • 1: tes dihitung dalam statistic

    • -
    -
      -
    • -
    • -
    • 0: test tidak dihitung dalam statistic; Misal: formula. -parameters

    • -
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat. UTC+0
    StartDateDate TimeStart DateUTC+0. Jika StartDate terisi berarti test tersebut mulai -digunakan di semua bagian aplikasi. Default value = -CreateDate.
    EndDateDate TimeEnd Date

    UTC+0. Jika EndDate terisi berarti test tersebut -disabled di semua bagian aplikasi:

    -
      -
    • Menandai record ini sudah tidak berlaku -lagi/discontinue.

    • -
    • Tidak bisa dipilih untuk berbagai setting.

    • -
    - - -Table 104 qcdef - -| | | | -|-----|-----|-----| -| | | | -| | | | -| | | | - -Table 105 qcprep - -> *Business Rules:* - -1. Jika SiteID tidak terisi, maka: - - a. test tersebut bisa diproduksi di semua *site* dalam *instance* - yang sama. Prioritas produksi adalah di *site* dimana test - tersebut di-order. - - b. pilihan *value* untuk field SiteID pada table refnum dan reftxt - adalah *null* atau tiap *site* memiliki definisi nilai rujukan - masing-masing. - -2. Jika SiteID terisi, maka: - - a. test tersebut diproduksi di satu *site* saja - - b. field SiteID pada table refnum/reftxt otomatis terisi dengan - SiteID yang bersangkutan dan tidak bisa menggunakan SiteID lain. - - c. test bisa dilihat dan diorder di *site* lain dengan penanda. - -3. test tidak bisa dihapus tetapi bisa di-*disable* dengan memberi - nilai pada *field* EndDate. Pemberian nilai pada *field* EndDate di - table testdefsite diikuti pemberian nilai pada *field* dengan nama - yang sama di tables tesdeftech, testdefcal dan testdefgrp. - -4. *Future enabled* bisa dilakukan dengan member nilai di *field* - StartDate. - -5. *Future disabled* bisa dilakukan dengan memberi nilai di *field* - EndDate \> hari ini. Maka test tersebut akan *disabled* di tanggal - yang sudah ditentukan. - -6. *Test type* **Parameter**: - - a. - - b. untuk mencatat data pasien yang diperhitungkan dengan test lain. - Termasuk data tinggi dan berat badan, lingkar pinggang, tekanan - darah, dll. - - c. test jenis ini ditampilkan sebagai *parameter* yang harus diisi - pada saat *specimen collection* dan/atau *specimen reception* - atau di *activity* lainnya. - -7. StartDate dan EndDate \>= Today - -| **Parameter** | **Value** | **Unit** | **Notes** | -|------------------|-----------|----------|-----------| -| Tinggi | 155 | Cm | | -| Berat | 70 | Kg | | -| Lingkar pinggang | 80 | Cm | | -| Sistolik | 120 | mmHg | | -| Diastolik | 80 | mmHg | | - -Table 106 qcparinst - - - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 107 qcresinst

    -
    Resource Model

    {

    -

    "TestSiteId": "string", // PK, internal ID

    -

    "SiteId": "string", // FK to Site

    -

    "TestSiteCode": "string", // 6-char code

    -

    "TestSiteName": "string", // Full name printed in patient report

    -

    "TestType": "Test | Parameter | Calculated | Group | Title",

    -

    "Description": "string",

    -

    "SeqScr": 1, // Sequence on screen

    -

    "SeqRpt": 1, // Sequence on report

    -

    "IndentLeft": 0, // Left indentation

    -

    "FontStyle": ["Bold","Italic"],// Array of styles

    -

    "VisibleScr": true, // Display on screen

    -

    "VisibleRpt": true, // Display on report

    -

    "CountStat": true, // Included in statistics

    -

    "CreateDate": "2025-01-01T00:00:00Z",

    -

    "StartDate": "2025-01-01T00:00:00Z",

    -

    "EndDate": null

    -

    }

    Endpoints

    Create Site Test

    -

    POST/v1/tests/site

    Request

    -

    {

    -

    "SiteId": "01",

    -

    "TestSiteCode": "HB",

    -

    "TestSiteName": "Hemoglobin",

    -

    "TestType": "Test",

    -

    "Description": "Hemoglobin concentration",

    -

    "SeqScr": 3,

    -

    "SeqRpt": 3,

    -

    "IndentLeft": 0,

    -

    "FontStyle": ["Bold"],

    -

    "VisibleScr": true,

    -

    "VisibleRpt": true,

    -

    "CountStat": true,

    -

    "StartDate": "2025-01-01T00:00:00Z"

    -

    }

    -

    Response (201)

    -

    {

    -

    "TestSiteId": "TS-000123",

    -

    "Status": "created"

    -

    }

    Get Site Test by ID

    -

    POST/v1/tests/site {TestSiteID}

    Response

    -

    {

    -

    "TestSiteId": "TS-000123",

    -

    "SiteId": "01",

    -

    "TestSiteCode": "HB",

    -

    "TestSiteName": "Hemoglobin",

    -

    "TestType": "Test",

    -

    "VisibleScr": true,

    -

    "VisibleRpt": true,

    -

    "CountStat": true,

    -

    "StartDate": "2025-01-01T00:00:00Z",

    -

    "EndDate": null

    -

    }

    Update Site Test

    -

    PUT/v1/tests/site {TestSiteID}

    Request

    -

    {

    -

    "TestSiteName": "Hemoglobin (Hb)",

    -

    "Description": "Updated description",

    -

    "VisibleRpt": false

    -

    }

    -

    Response (200)

    -

    {

    -

    "TestSiteId": "TS-000123",

    -

    "Status": "updated"

    -

    }

    Disable Site Test

    -

    DELETE/v1/tests/site {TestSiteID}

    -

    Soft delete sets EndDate

    Response (200)

    -

    {

    -

    "TestSiteId": "TS-000123",

    -

    "Status": "disabled",

    -

    "EndDate": "2025-12-31T00:00:00Z"

    -

    }

    Search Site Test

    -

    GET/v1/tests/site

    Query Parameters

    -

    SiteId=

    -

    TestType=

    -

    VisibleScr=true

    -

    VisibleRpt=true

    Error Model
    Contoh Error Response

    {

    -

    "ErrorCode": "SITE-INVALID-CODE",

    -

    "message": "TestSiteCode must be unique.",

    -

    "details": {

    -

    "SiteId": "01",

    -

    "TestSiteCode": "HB"

    -

    }

    -

    }

    Standard Error Codes

    | Code | Meaning |

    -

    |------|---------|

    -

    | SITE-INVALID-CODE | Duplicate TestSiteCode |

    -

    | SITE-INVALID-DATE | StartDate/EndDate invalid |

    -

    | SITE-INVALID-TYPE | TestType not recognized |

    -

    | SITE-VISIBILITY-CONFLICT | Visibility flags inconsistent |

    -

    | SITE-COUNTSTAT-CONFLICT | CountStat invalid for TestType |

    - -Table 107 qcresinst - -> Table testdeftech digunakan untuk mendefinisikan Test Type: ***Test*** -> dan ***Parameter***. - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 108 patres

    -
    FieldTipe dataDisplayKeterangan
    TestTechIDTest Technical IDPK; Internal ID.
    TestSiteIDTest Site ID*FK dari Table 60 testdefsite
    DisciplineIDnvarcharDiscipline ID*
      -
    • Disiplin (Hematology, Clinical Chemistry, Immunology, etc.) dari -Table 9. discipline; Discipline

    • -
    • ND – Non-Discipline (misalnya untuk -parameter)

    • -
    -

    Constraint: NOT NULL.

    DepartmentIDnvarcharDepartment ID*FK. DepartemenID di site, dimana test diproduksi. Dari Table 10 -department
      -
    • -
    • -
    ResultTypenvarcharResult Type*

    Value Set. Jenis hasil:

    -

    Numeric, Range, Text, Value -set.

    -

    Constraint: NOT NULL.

    RefTypenvarcharReference Type*Value Set. Jenis nilai rujukan: NMRC, -TEXT. Constraint: NOT NULL.
    VSetintValue SetHanya diisi jike ResultType = VSET. Berisi VSetID dari Table 72. -valueset
    ReqQtyFloatRequired QuantityRequired quantity. Jumlah specimen yang -dibutuhkan. Misalnya 500mL urine dll
    ReqQtyUnitnvarchar(10)Quantity UnitValue Set. Satuan specimen. Misalnya mL, L, pcs, dll. Lihat -Value set
    Unit1nvarcharUnit1Result unit 1
    FactornumericFactorFactor konversi satuan 1 ke 2
    Unit2nvarcharUnit2Result unit 2
    DecimalintDecimal PlaceJumlah angka decimal.
    CollReqnvarcharCollection Requirementhal-hal yang harus dipenuhi/diperhatikan saat melakukan specimen -collection
      -
    • -
    • -
    MethodnvarcharMethodTest method untuk pengelompokan 1QC.
    ExpectedTATintExpected TATTAT yang diharapkan, dalam satuan menit.
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti record disabled di semua bagian -aplikasi. UTC+0
    - - -Table 108 patres - -> Business rules: - -1. Untuk ResultType: - - - *Numeric* (NMRIC) dan *Range* (RANGE) RefType yang digunakan - adalah NMRC. - - - *Text* (TEXT) dan *Value Set* (VSET) RefType yang digunakan adalah - TEXT. - -2. Untuk RefType: - - - NMRC: *reference range* yang digunakan adalah dari table refnum - - - TEXT: *reference range* yang digunakan adalah dari table reftxt. - -3. *Field* VSet berisi VSetID dari *table* valueset jika ResultType = - > VSET. Jika ResultType bukan VSET, maka field VSet adalah NULL. - -4. CreateDate dan EndDate \>= Today - -5. mapping *instrument* -- *workstation* yang terjadi adalah - > \[ConDefID-TestTechCode\] dengan \[TestSiteID\]. - -| | | | | | | | | | | | | | | | | | -|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| -| | | | | | | | | | | | | | | | | | -| | | | | | | | | | | | | | | | | | -| | | | | | | | | | | | | | | | | | -| | | | | | | | | | | | | | | | | | -| | | | | | | | | | | | | | | | | | -| | | | | | | | | | | | | | | | | | -| | | | | | | | | | | | | | | | | | -| | | | | | | | | | | | | | | | | | -| | | | | | | | | | | | | | | | | | -| | | | | | | | | | | | | | | | | | -| | | | | | | | | | | | | | | | | | -| | | | | | | | | | | | | | | | | | -| | | | | | | | | | | | | | | | | | -| | | | | | | | | | | | | | | | | | - -Table 109 patresflag - -> Table testdefcal digunakan untuk definisi detail dari tes dengan Test -> Type: ***Calculated Test***. -> -> *Table* *76. testdefcal* - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 110 patrestech

    -
    FieldTipe dataDisplayKeterangan
    TestCalIDTest Technical IDPK; Internal ID.
    TestSiteIDTest Site IDFK dari Table 50 testdefsite
    DisciplineIDnvarcharDiscipline ID
      -
    • Disiplin (Hematology, Clinical Chemistry, Immunology, etc.) dari -Table 9. discipline; Discipline

    • -
    • ND – Non Discipline (misalnya untuk parameter, -title)

    • -
    DepartmentIDnvarcharDepartment IDFK. DepartemenID di site, dimana test diproduksi. Dari Table 10 -department
    FormulaInputTextInput parameterMengambil dari table testdefsite. Constraint: Hanya -yang ResultType berjenis numeric. Bisa terdiri dari -beberapa test, dipisahkan dengan “^”. Tujuannya adalah untuk memastikan -dan memudahkan semua faktor yang terlibat di dalam formula ikut dalam -test order yang sama.
    FormulaCodeTextFormulaExecutable formula/rumus.
    RefTypenvarcharReference TypeValue Set. Jenis nilai rujukan: NMRC, -TEXT.
    Unit1nvarcharUnit1Result unit 1
    FactornumericFactorFactor konversi satuan 1 ke 2
    Unit2nvarcharUnit2Result unit 2
    DecimalintDecimal PlaceJumlah angka decimal.
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti record disabled di semua bagian -aplikasi. UTC+0
    - -Table 110 patrestech - -> *Business Rules:* - -1. Hanya test yang terdaftar di tesdeftech dan testdefcal - (*self-referential*), yang bisa digunakan dalam perhitungan di - testdefcal. - - - ---- - - - - - - - - - - - - -
    -

    Table 111 patrestatus

    -
    FormulaKeterangan

    {

    -

    "TestCalID": “1”,

    -

    "SiteID": "01",

    -

    "TestSiteID":"546",

    -

    "FormulaCode": "(140 - AGE) * WEIGHT / (72 * Crea)",

    -

    "FormulaLang": "Python",

    -

    "FormulaInput": "age,Berat,Crea",

    -

    "Unit1": "mL/min",

    -

    "Decimal": "2"

    -

    }

      -
    1. Usia diperhitungkan dari dob pasien dan di-copy ke AGE -(PNum)

    2. -
    3. WEIGHT adalah test dengan type Pnum. Lihat Contoh -Parameters.

    4. -
    5. Crea adalah test dengan type TNum

    6. -
    - -Table 111 patrestatus - -> Table testdefgrp digunakan untuk definisi detail dari tes dengan Test -> Type: ***Grp***. - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 113 patres saat test ordering

    -
    FieldTipe dataDisplayKeterangan
    TestGrpIDnvarcharTest Group IDPK; Internal ID.
    TestSiteIDTest Site IDFK; dari testdefsite , tidak ditampilkan ke user; TestSiteID dengan -type Grp.
    MemberMember Test

    FK; dari testdefsite. Constraint: Tidak boleh -lebih dari 1 test yang sama dalam group test yang -sama.

    -

    Bisa nested Grp.

      -
    • -
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti record disabled di semua bagian -aplikasi. UTC+0
    - -Table 113 patres saat test ordering - -- - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|------------|---------------|-------------------------|-----------------------------------------------------------------------------| -| TestDispID | nvarchar | Test Display Control ID | PK; Internal ID, untuk setiap equipment. | -| SiteID | | Site ID | FK; Dari table Site | -| TestSiteID | | Test Site ID | FK dari Table 50 testdefsite | -| Activity | nvarchar | Activity | Activity dimana test ditampilkan | -| Seq | int | Sequence | *Test sequence*, urutan diplay test di layar dan *report*. | -| | | | | -| | | | | -| | | | | -| Method | nvarchar | Method | Test method untuk pengelompokan [^25]QC. | -| CreateDate | Date Time | Create Date | Menandai kapan record ini dibuat. UTC+0 | -| EndDate | Date Time | End Date | Jika EndDate terisi berarti record disabled di semua bagian aplikasi. UTC+0 | - -Table 114 patresstatus saat test ordering - -> Catatan: - -9. \<\> - -> *Table 80.* *testdefconsumables* - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 115 Mapping related to calibration data

    -
    FieldTipe dataDisplayKeterangan
    TestConsIDnvarcharTest Consumable IDPK; Internal ID, untuk setiap test
    TestTechIDnvarcharFK; dari Table 52. testdeftech
    ItemTypenvarcharItem Type

    Jenis consumables, digunakan membatasi query untuk ItemID:

    -
      -
    • reagent

    • -
    • calibrators

    • -
    • controls

    • -
    • washsol (washing solution)

    • -
    • othcons (other consumables)

    • -
    ItemIDnvarcharItem ID
      -
    • Foreign Key: UnitGroupID dari table UnitGroup 13 atau -CatalogExtID dari Table 3 productcatalogext

    • -
    ItemQtynvarcharQuantityJumlah item yang diperlukan untuk memproduksi satu test.
    ItemUnitnvarcharUnitForeignKey UnitGroupID dari table UnitGroup; Satuan item.
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti record disabled di semua bagian -aplikasi. UTC+0
    - -Table 115 Mapping related to calibration data - -> Catatan: - -- Jika reagen/consumables yang digunakan berubah, TestTechCode bisa saja - > tidak berubah, tetapi TestTechID berubah - -- Tests yang tidak didefinisikan dalam table testdefconsumables, adalah - > test yang tidak memerlukan bahan habis pakai. Salah satu controh - > adalah formula. Misal HbA1C hasil perhitungan Hb dan A1C. - -- Test, reagen yang digunakan, method, instrument alias akan menentukan - > grouping QC. - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 116 Mapping related to QC results

    -
    FieldTipe dataDisplayKeterangan
    TestMapIDTest Mapping IDPK; Internal ID, untuk setiap mapping
    TestSiteIDTest Site IDFK; dari table testdefsite
    HostTypenvarcharHost TypeValue Set, Entity Type
    HostIDnvarcharHost ID
      -
    • SiteID atau “GLOBAL”, WorkstationID

    • -
    • Constraint: tidak boleh sama dengan -ClientID

    • -
    HostDataSourceHost Data Source
      -
    • Table site atau “GLOBAL”

    • -
    • Constraint: tidak boleh sama dengan -ClientDatasource

    • -
      -
    • -
    • -
    HostTestCodenvarcharHost Test CodeKode test host, misalnya TestSiteCode.
    HostTestNamenvarcharHost Test NameFull test name/Abbreviated text. Optional.
    ClientTypenvarcharClient TypeValue Set, Entity Type
    ClientIDnvarcharClient ID
      -
    • EquipmentID, WorkstationID, SiteID

    • -
    • Constraint: tidak boleh sama dengan -HostID

    • -
    ClientDataSourceClient Data Source
      -
    • Table InstrumentList atau site

    • -
    • Constraint: tidak boleh sama dengan -HostDatasource

    • -
      -
    • -
    • -
    ConDefIDContainer Definition IDFK. Dari Table 41 containerdef. Yang ditampilkan di UI adalah -ConCode.
    ClientTestCodenvarcharClient Test CodeKode test client
    ClientTestNamenvarcharClient Test NameFull test name/Abbreviated text. Optional.
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti record disabled di -semua bagian aplikasi. UTC+0
    - -Table 116 Mapping related to QC results - -| **Mapping relationship** | **ClientID** | **HostID** | **ClientTestCode** | **HostTestCode** | -|--------------------------|---------------|------------|--------------------|------------------| -| site global (CRM) | SiteID | "GLOBAL" | TestSiteID | TestID | -| site host | SiteID | \ | TestSiteID | \ | -| workstation site | WorkstationID | SiteID | TestTechID | TestSiteID | -| instrument workstation | EquipmentID | SiteID | TestTechID | TestSiteID | -| | | | | | -| | | | | | -| | | | | | - -Table 117 Mapping related to patient result - - - ------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 118 Contoh hasil query hasil pasien dan penempatan pada table -patres

    -
    -

    TestSiteID

    -
    -

    SiteID

    -
    -

    TestSiteCode

    -
    -

    TestSiteName

    -
    -

    TestType

    -
    -

    Description

    -
    -

    SeqScr

    -
    -

    SeqRpt

    -
    -

    VisibleScr

    -
    -

    VisibleRpt

    -
    -

    CountStat

    -
    101MCU1MCU 1GROUPMCU Paket 111111
    01HEMATOLOGIDisiplin; Discipline code: HEMA
    201CBCHematologi LengkapGROUPJudul panel22110
    301HBHemoglobinTEST33111
    401HCTHematokritTEST44111
    501ERYEritrositTEST55111
    601MCNilai-nilai MCGROUPCorpuscular profile66110
    701MCVMCVTEST77111
    801MCHMCHTEST88111
    901MCHCMCHCTEST99111
    01KIMIADisiplin; Discipline code: CHEM
    01Gula DarahBlood profile; Sub-disiplin (BGP)
    1001GLUARGlukosa SewaktuTEST1010111
    1101GLUFGlukosa PuasaTEST1111111
    1201GLU2HPPGlukosa 2 Jam PPTEST1212111
    01Profil LipidLipid profile; Sub-disiplin (LPD)
    1301LPDPProfil LipidGROUPLipid profile; Group1313000
    1401TCCholesterol TotalTEST1414111
    1501LDLCholesterol LDL DirekTEST1515111
    1601HDLCholesterol HDLTEST1616111
    1701TGTrigliseridaTEST1717111
    1801RTCHDLRasio Chol. Total/Chol. HDLCALCTChol/HDL Ratio1818110
    01Fungsi HatiLiver profile; Sub-disiplin (LVRP)
    1901SGOTAspartate AminotransferaseTEST1919111
    2001SGPTAlanine AminotransferaseTEST2020111
    01Fungsi GinjalKidney profile; Sub-disiplin (KDN)
    2101KDNLFungsi GinjalGROUPKidney profile; Group2121000
    2201CREAKreatininTEST2222111
    2301CREAUKreatinin UrinTEST2323111
    2401CREACCreatinine ClearanceCALCCockcroft-Gault formula2424110
    01URINDisiplin; Discipline code: URIN
    2501URUTUrin RutinGROUPUrine profile; Group.2525110
    2601COLORWarnaTEST2626111
    2701HEIGHTTinggi badanPARAM2727110
    2801WEIGHTBerat badanPARAM2828110
    2901WAISTLingkar pinggangPARAM2929110
    3001AGEUsiaTESTDihitung dari Birthdate saat order3030100
    3101SISTLSistolikPARAMHasil tensi di nurse station3131110
    3201DIASTLDiastolikPARAMHasil tensi di nurse station3232110
    - -Table 118 Contoh hasil query hasil pasien dan penempatan pada table -patres - -> Keterangan: - -- MCU1 adalah *group test* yang Namanya ditampilkan di *result report* - > maupun *result view* di layar. - -- Discipline dan sub-disciplines ditampilkan di *result report* maupun - > *result view*. - -- LPDP (Profil Lipid) adalah *group* *tests* yang terdiri dari TC, LDL, - > HDL dan TG. LPDP tidak ditampilkan dalam *result report* maupun - > *result view*, agar tidak tumpang tindih dengan sub disiplin LPD. - > TC, LDL, HDL dan TG sendiri bisa di-*order* secara terpisah. Hal - > yang sama dilakukan pada KDNL - - - ---------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 119 Contoh penempatan flag pada table patresflag

    -
    -

    TestTechID

    -
    -

    SiteID

    -
    -

    TestSiteID

    -
    -

    TestSiteCode

    -
    -

    DisciplineID

    -
    -

    DisciplineCode

    -
    -

    DepartmentID

    -
    -

    VSet

    -
    -

    SpcType

    -
    -

    SpcDesc

    -
    -

    Unit1

    -
    -

    Factor

    -
    -

    Unit2

    -
    -

    Method

    -
    1013HB1HEMA1BLDWhle bldg/dL
    2014HCT1HEMA1BLDWhle bld%
    3015ERY1HEMA1BLDWhle bld10^6/mL
    40113GLUAR2CHEM3SERSerumU/LHexokinase
    50114GLUF2CHEM3SERSerumU/LHexokinase
    60115GLU2HPP2CHEM3SERSerummg/dLHexokinase
    70123SGOT2CHEM3SERSerummg/dL0.017μkat/LIFCC
    80124SGPT2CHEM3SERSerummg/dLIFCC
    90126CREA2CHEM3SERSerummg/dL88.4μmol/LEnzymatic
    100127CREAU2CHEM3URUrinemg/dLEnzymatic
    110129COLOR4URIN61002URUrine
    120130HEIGHT10NDm
    130131WEIGHT10NDKg
    140133AGE10NDTahun
    - -Table 119 Contoh penempatan flag pada table patresflag - -> kolom dengan *background* *orange* bukan merupakan bagian dari *table* -> testdeftech tetapi dari *table* berelasi untuk memperjelas. - - - -------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 120 Contoh penempatan data teknis pada table patrestech

    -
    -

    TestCalID

    -
    -

    SiteID

    -
    -

    TestSiteID

    -
    -

    TestSiteCode

    -
    -

    DisciplineID

    -
    -

    DisciplineCode

    -
    -

    DepartmentID

    -
    -

    FormulaInput

    -
    -

    FormulaCode

    -
    -

    Unit1

    -
    -

    Factor

    -
    -

    Unit2

    -
    10121RTCHDL2CHEM3TC^HDLCHOL/HDL
    20128CREAC2CHEM3AGE^WEIGHT^CREA(140-AGE)* WEIGHT/ (72*CREA)
    - -Table 120 Contoh penempatan data teknis pada table patrestech - - - -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 121 Mapping related to calibration data

    -
    -

    TestGrpID

    -
    -

    SiteID

    -
    -

    TestSiteID

    -
    -

    TestSiteCode

    -
    -

    Member

    -
    -

    TestSiteCode

    -
    1011MCU12H
    2011MCU13CBC
    3011MCU14HB
    4011MCU15HCT
    5011MCU16ERY
    6011MCU17MC
    7011MCU111K
    8011MCU112BP
    9011MCU113GLUAR
    10011MCU114GLUF
    11011MCU115GLU2HPP
    12011MCU116LPDP
    13011MCU121RTCHDL
    14011MCU122LVRP
    15011MCU123SGOT
    16011MCU124SGPT
    17011MCU125KDNL
    18011MCU126CREA
    19011MCU127CREAU
    20011MCU128CREAC
    21011MCU129U
    22011MCU130COLOR
    23017MC8MCV
    24017MC9MCH
    25017MC10MCHC
    - -Table 121 Mapping related to calibration data - - - -------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 122 Mapping related to QC results

    -
    -

    TestMap

    -

    ID

    -
    -

    HostType

    -
    -

    HostID

    -
    -

    Host

    -

    DataSource

    -
    -

    Host

    -

    TestCode

    -
    -

    Host

    -

    TestName

    -
    -

    ClientType

    -
    -

    Client

    -

    ID

    -
    -

    Client

    -

    DataSource

    -
    -

    ConDef

    -

    ID

    -
    -

    Client

    -

    TestCode

    -
    -

    Client

    -

    TestName

    -
      -
    1. -
    HIS<HISID><HISDS>GluSGlukosa SewaktuSITE01testdefsiteGLUARGlukosa Sewaktu
      -
    1. -
    HIS<HISID><HISDS>GluPGlukosa PuasaSITE01testdefsiteGLUFGlukosa Puasa
      -
    1. -
    HIS<HISID><HISDS>Glu2PPGlukosa 2 Jam PPSITE01testdefsiteGLU2HPPGlukosa 2 Jam PP
      -
    1. -
    HIS<HISID><HISDS>GOTSGOTSITE01testdefsiteSGOTSGOT
      -
    1. -
    HIS<HISID><HISDS>GPTSGPTSITE01testdefsiteSGPTSGOT
      -
    1. -
    HIS<HISID><HISDS>CreaCreatinineSITE01testdefsiteCREACreatinine
      -
    1. -
    HIS<HISID><HISDS>CreaUCreatinine UrineSITE01testdefsiteCREAUCreatinine Urine
      -
    1. -
    SITE01testdeftechGLUARGlukosa SewaktuWST3testdeftechGLUARGlukosa Sewaktu
      -
    1. -
    SITE01testdeftechGLUFGlukosa PuasaWST3testdeftechGLUFGlukosa Puasa
      -
    1. -
    SITE01testdeftechGLU2HPPGlukosa 2 Jam PPWST3testdeftechGLU2HPPGlukosa 2 Jam PP
      -
    1. -
    SITE01testdeftechCREACreatinineWST3testdeftechCREACreatinine
      -
    1. -
    SITE01testdeftechCREAUCreatinine UrineWST3testdeftechCREAUCreatinine Urine
      -
    1. -
    SITE01testdeftechSGOTSGOTWST3testdeftechSGOTSGOT
      -
    1. -
    SITE01testdeftechSGPTSGPTWST3testdeftechSGPTSGOT
      -
    1. -
    SITE01testdeftechALPAlkali PhospataseWST3testdeftechALPAlkali Phospatase
      -
    1. -
    SITE01testdeftechGLUARGlukosa SewaktuWST4testdeftechGLUARGlukosa Sewaktu
      -
    1. -
    SITE01testdeftechGLUFGlukosa PuasaWST4testdeftechGLUFGlukosa Puasa
      -
    1. -
    SITE01testdeftechGLU2HPPGlukosa 2 Jam PPWST4testdeftechGLU2HPPGlukosa 2 Jam PP
      -
    1. -
    WST3testdeftechGLUARGlukosa SewaktuINST597testdeftech1GLUGlukosa Sewaktu
      -
    1. -
    WST3testdeftechGLUFGlukosa PuasaINST597testdeftech2GLUGlukosa Puasa
      -
    1. -
    WST3testdeftechGLU2HPPGlukosa 2 Jam PPINST597testdeftech3GLUGlukosa 2 Jam PP
      -
    1. -
    WST3testdeftechCREACreatinineINST597testdeftech1CREACreatinine
      -
    1. -
    WST3testdeftechCREAUCreatinine UrineINST597testdeftech10CREACreatinine Urine
      -
    1. -
    WST3testdeftechSGOTSGOTINST597testdeftechSGOTSGOT
      -
    1. -
    WST3testdeftechSGPTSGPTINST597testdeftechSGPTSGOT
      -
    1. -
    WST3testdeftechALPAlkali PhospataseINST597testdeftech1ALPAlkali Phospatase
      -
    1. -
    WST3testdeftechALPAlkali PhospataseINST597testdeftech20ALPAlkali Phospatase
      -
    1. -
    WST3testdeftechALPAlkali PhospataseINST597testdeftech50ALPAlkali Phospatase
    - -Table 122 Mapping related to QC results - - - --- - - - - - - - - - - - - - - - - -
    -

    Table 123 Mapping related to patient result

    -
    Test mapping dari HIS ke CLQMS Site. Site menggunakan -semua data test terdefinisi (testdefsite)
    Test mapping dari Site ke Workstation Automatic -Clinical Chemistry (CAUTO, lihat Table 19 Contoh definisi -Workstation). Site menyalurkan test yang memerlukan hasil saja ke -workstation tersebut (testdeftech).
    Glukosa Sewaktu, GlukosaPuasa, Glukosa 2 Jam PP juga dipetakan ke -Workstation Automatic Clinical Chemistry Backup -(CBACK) untuk antisipasi jika tidak bisa dikerjakan di workstation utama -(CAUTO)

    Test mapping dari Workstation Workstation Automatic -Clinical Chemistry (CAUTO) ke instrument TMS-30i.

    -

    Mapping juga termasuk kombinasi ClientTestCode dan ConDefID -agar bisa dilakukan relasi one to many dari -instrument/equipment.

    -

    Tidak ada value di field ConDefID di test SGOT dan -SGPT, sehingga keduanya bisa menggunakan container apa -saja.

    -

    Test ALP bisa menggunakan tabung plain (1), tabung dengan clot -activator (10) maupun dengan additive citrate (50 – -plasma citrate).

    - -Table 123 Mapping related to patient result - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 124 Race

    -
    FieldTipe dataDisplayKeterangan
    SpcLogIDSpecimen Log IDPK
    TblNamenvarcharTable NameNama table
    RecIDintRecord IDRecord ID – FK. Record dimana perubahan terjadi
    FldNamenvarcharField NameNama field
    FldValuePrevnvarcharPrevious ValueField Value Previous. Nilai sebelumnya
    UserIDUser ID

    Identitas user yang melakukan perubahan data. Berasal dari -table:

    -
      -
    • CRM.User

    • -
    • CRM.Contact

    • -
    SiteIDnvarcharSite IDFK dari table Site13
    DIDTypenvarcharDID Type

    Device ID Type:

    -
      -
    • Windows: Device ID

    • -
    • Android: AAID

    • -
    • IOS: IDFA

    • -
    DIDnvarcharDIDDevice ID
    MachineIDnvarcharMachine IDIdentitas mesin 1dimana perubahan dilakukan – MAC -address
    SessionIDnvarcharSession IDApplication session ID
    AppIDnvarcharApplication IDApplication ID
    ProcessIDnvarcharProcess IDProcess ID
    WebPageIDnvarcharWeb Page ID
    EventIDnvarcharEvent ID
    ActivityIDnvarcharActivity IDActivity ID
    ReasonnvarcharReasonAlasan perubahan data
    LogDateDate TimeLog DateDate & time log data. UTC+0
    - - -Table 124 Race - -### Reference Range {#reference-range} - -> *Reference range* memperhatikan *determinant*[^26]. Data-data terkait -> nilai rujukan (*reference range*) dikelola menggunakan tables dan -> Value Sets. Tables untuk mengelola *reference range* terdiri dari: - -- **refnum**. Berisi definisi rujukan untuk RefType RANGE (*Range*) dan - THOLD (*Threshold*), untuk test dengan ResultType: ***Numeric*** dan - ***Range***. - -- **reftxt**. Berisi definisi nilai rujukan text [^27]untuk test dengan - ResultType: ***Value set*** dan ***Text***. - -| | | | | -|-----|-----|-----|-----| -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | - -Table 125 Ethnic - - - ------------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 126 Religion

    -

    Test

    -

    Site

    -

    Code

    Spc

    -

    Type

    SexCriteria

    Age

    -

    Start

    Age

    -

    End

    Critical

    -

    Low

    LowHighCritical High
    TBILSERpre-term0D1D16
    TBILSERpre-term1D2D67
    TBILSERpre-term3D5D1015
    TBILSERterm0D1D26
    TBILSERterm1D2D67
    TBILSERterm3D5D412
    - -Table 126 Religion - -### - -| | | | | | -|-----|-----|-----|-----|-----| -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | - -Table 127 Country - -| **Threshold** | **Arti** | **Contoh** | -|----------------|------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------| -| \< 200 | Hasil pasien yang *normal* adalah kurang dari 200; Jika sama dengan 200 atau lebih besar, diinterpretasikan sebagai *abnormal*. | Nilai rujukan *Total Cholesterol* adalah \<200 | -| \> 15 | Hasil pasien yang *normal* adalah lebih dari 15; Jika sama dengan 15 atau lebih kecil, diinterpretasikan sebagai *abnormal*. | | -| \>= 40 | Hasil pasien yang *normal* adalah lebih dari atau sama dengan 40; Jika lebih kecil daripada 40, diinterpretasikan sebagai *abnormal*. | Nilai rujukan *HDL Cholesterol* untuk laki-laki dewasa adalah \>=40 | -| \<= 100 | Hasil pasien yang *normal* adalah kurang dari atau sama dengan 100; Jika lebih besar daripada 100, diinterpretasikan sebagai *abnormal*. | | - -Table 128 Patient Visit Class - - - ---- - - - - - - - - -
    -

    Table 129 Patient Service Class

    -

    -

    Gambar 11 Kit insert Vitamin D

    -

    Gambar 12 Kit insert HIV

    - -Table 129 Patient Service Class - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 130 ADT Code

    -
    FieldTipe dataDisplayKeterangan
    RefNumIDReference Range IDPK.
    SiteIDnvarcharSite ID*Dari table Site
    TestSiteIDnvarcharTest ID*FK dari Table 60 testdefsite
    SpcTypenvarchar(10)Specimen TypeValue Set. Specimen Type; Jika null, berlaku untuk semua -jenis specimen.
    SexnumericSex

    Value Set. Jenis kelamin:

    -

    1: female; 2: male; 3: unknown. Jika null, berlaku untuk -semua.

    CriterianvarcharBiological Criteria1Faktor biologis 2yang mempengaruhi nilai rujukan. -Optional.
    AgeStartnumericAge Start*Disimpan dalam days. Constraint NOT -NULL.
    AgeEndnumericAge End*Disimpan dalam days. Constraint NOT -NULL
    NumRefTypenvarcharNumeric Reference Type*Value Set. Jenis nilai rujukan: RANGE, THOLD
    RangeTypenvarcharRange Type

    Value Set. Jenis range:

    -
      -
    • REF: Reference Range

    • -
    • CRTC: Critical Range

    • -
    • VAL: Validation Range

    • -
    • RERUN: Rerun Range

    • -
    -

    Constraint: NOT NULL; Default: -REF

    LowSignnvarchar(2)Low SignValue Set. Math sign: “<”, “>”, “<=”, -“>=”
    LownumericLow*Low limit; Constraint NOT NULL
    HighSignnvarchar(2)High SignValue Set. Math sign: “<”, “>”, “<=”, -“>=”
    HighnumericHigh*High limit; Constraint NOT NULL.
    DisplaybitDisplay on Report and ScreenTampilkan sebagai nilai rujukan yang tercetak di laporan dan layar. -Constraint: NOT NULL.
    Flagnvarchar(10)FlagFlag hasil
    InterpretationnvarcharInterpretationInterpretasi hasil
    NotesnvarcharNotesPenjelasan nilai rujukan, dll.
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat. UTC+0
    StartDateDate TimeStart DateUTC+0. Jika StartDate terisi berarti test tersebut mulai -digunakan di semua bagian aplikasi. Default value = -CreateDate.
    EndDateDate TimeEnd DateJika EndDate terisi berarti record tersebut -disabled di semua bagian aplikasi. UTC+0
    - - -Table 130 ADT Code - -> *Business Rules:* - -1. Setiap interval didefinisikan secara eksplisit[^28]. - -2. Flag hanya berlaku untuk RangeType = REF dan CRTC. Flag = *null* - untuk VAL dan RERUN. - -3. Dalam SiteID, TestSiteCode, SpcType, Sex, NumRefType yang sama, - AgeStart, AgeEnd, tidak boleh *overlap*. - -4. Dalam satu *record* yang sama, Low dan High tidak boleh memiliki - nilai yang sama. - -5. Pengaturan *reference range*: - - - ----- - - - - - - - - - - - - - - - - - - - -
    -

    Table 131 Test order urgency codes

    -
    CriteriaNumRefType = RANGENumRefType = THOLD
    LowSign & HighSigntidak berlaku; harus null.
      -
    • berlaku

    • -
    • dalam satu record yang sama, LowSign dan HighSign tidak -boleh sama.

    • -

    Interval reference range. Untuk -records dengan nilai field yang sama:

    -
      -
    • SiteID

    • -
    • TestSiteCode

    • -
    • SpcType

    • -
    • Sex

    • -
    • AgeStart

    • -
    • AgeEnd

    • -
    • RangeType

    • -
      -
    • Low dan High tidak menggunakan angka yang sama

    • -
    • tidak overlap.

    • -
    • Low = null artinya tidak ada batas bawah; High = null, artinya -tidak ada batas atas.

    • -
      -
    • urut, dari nilai terendah (null terlebih dahulu) sampai nilai -tertinggi.

    • -
    • tanpa celah, Interval berikutnya harus dimulai tepat di tempat -interval sebelumnya berakhir

    • -
    • tidak overlap, kondisi logis tidak boleh mengizinkan -suatu hasil memenuhi lebih dari satu interval.

    • -
    • tanpa sign yg kontradiktif. Contoh:

      -
        -
      • interval sebelumnya berakhir dengan <= 200

      • -
      • interval berikutnya harus dimulai dengan > 200 atau ->= 201

      • -
      • tetapi bukan >= 200 (overlap).

      • -
    • -
    • LowSign = null jika Low = null; HighSign = -null jika High = null.

    • -
    - -Table 131 Test order urgency codes - -6. Display = 'No' untuk RangeType: CRTC, VAL, RERUN. - -7. Dalam SiteID, TestSiteCode, SpcType, (Sex,) AgeStart, AgeEnd, - NumRefType yang sama: - - a. hanya ada satu Display = 'Yes' - - b. Sex = null tidak boleh berdampingan dengan Sex = M atau F atau - Unknown. - -8. StartDate dan EndDate \>= Today. - -9. **Criteria**. Data ini diinput saat *test ordering activity*. - - - ----------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 132 Test order status codes

    -

    TestSite

    -

    Code

    Sex

    Age

    -

    Start

    Age

    -

    End

    NumRef

    -

    Type

    Range

    -

    Type

    Unit

    Low

    -

    Sign

    Low

    High

    -

    Sign

    HighDisplayFlagInterpretationKeterangan
    HbM6205D73000DRANGECRTCg/dLnull0null6NoLL
    HbM6205D73000DRANGEREF1g/dLnull7null12NoL
    HbM6205D73000DRANGEREFg/dLnull13null17Yesnull
    HbM6205D73000DRANGEREFg/dLnull18null20NoH
    HbM6205D73000DRANGECRTCg/dLnull21nullnullNoHHno high limit
    HbM6205D73000DRANGEVALg/dLnull0null13Nonull
    HbM6205D73000DRANGEVALg/dLnull17nullnullNonullno high limit
    HbF6205D73000DRANGECRTCg/dLnull0null6NoLL
    HbF6205D73000DRANGEREFg/dLnull7null11NoL
    HbF6205D73000DRANGEREFg/dLnull12null16Yesnull
    HbF6205D73000DRANGEREFg/dLnull17null20NoH
    HbF6205D73000DRANGECRTCg/dLnull21nullnullNoHH
    HbF6205D73000DRANGEVALg/dLnull0null12Nonull
    HbF6205D73000DRANGEVALg/dLnull16nullnullNonull
    CholM073000DTHOLDREFmg/dLnullnull<200YesnullDesirable
    CholM073000DTHOLDREFmg/dL>=200<=239No*Limitno low limit
    CholM073000DTHOLDREFmg/dL>=240nullnullNo*Highno high limit
    CholM073000DTHOLDVALmg/dL>=200nullnullNonullno high limit
    VitDnull073000DTHOLDREFng/mLnullnull<20No*Deficient
    VitDnull073000DTHOLDREFng/mL>=20<=30YesnullInsufficient
    VitDnull073000DTHOLDREFng/mL>30nullnullNo*Sufficientno low limit
    HIVnull073000DTHOLDREFCOInullnull<1YesnullNon-reactiveno low limit
    HIVnull073000DTHOLDREFCOI>=1<5No*Borderline
    HIVnull073000DTHOLDREFCOI>=5nullnullNo*Reactiveno high limit
    - - -Table 132 Test order status codes - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 133 Result status codes

    -
    FieldTipe dataDisplayKeterangan
    RefTxtIDReference Range IDPK.
    SiteIDnvarcharSite ID*Dari table Site
    TestSiteIDnvarcharTest ID*FK dari Table 60 testdefsite
    SpcTypenvarchar(10)Specimen TypeValue Set. Specimen Type; Jika null, berlaku untuk semua -jenis specimen.
    SexnumericSex

    Value Set. Jenis kelamin:

    -

    1: female; 2: male; 3: unknown. Jika null, berlaku untuk -semua.

    CriterianvarcharBiological Criteria1Faktor biologis 2yang mempengaruhi nilai rujukan. -Optional.
    AgeStartnumericAge Start*Disimpan dalam days. Constraint NOT -NULL.
    AgeEndnumericAge End*Disimpan dalam days. Constraint NOT -NULL
    TxtRefTypenvarcharText Reference Type*Value Set. Jenis nilai rujukan: VSET, TEXT
    RefTxtnvarcharReference Text*Text yang dijadikan referensi hasil.
    Flagnvarchar(10)FlagFlag hasil
    NotesnvarcharNotesPenjelasan nilai rujukan, dll.
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat. UTC+0
    StartDateDate TimeStart DateUTC+0. Jika StartDate terisi berarti test tersebut mulai -digunakan di semua bagian aplikasi. Default value = -CreateDate.
    EndDateDate TimeEnd DateJika EndDate terisi berarti record tersebut -disabled di semua bagian aplikasi. UTC+0
    - - -Table 133 Result status codes - -> *Business Rules:* - -1. Setiap interval didefinisikan secara eksplisit[^29]. - -2. Dalam SiteID, TestSiteCode, SpcType, Sex, TxtRefType yang sama, - AgeStart, AgeEnd, tidak boleh *overlap*. - -3. Nilai RefTxt, jika TxtRefType: - - a. VSET: salah satu dari *Value Set* dari test yang bersangkutan - - testdeftech.VSet - - b. TEXT: *Formated free text*. - -4. Dalam SiteID, TestSiteCode, SpcType, (Sex,) AgeStart, AgeEnd, - TxtRefType yang sama, maka Sex = null tidak boleh berdampingan - dengan Sex = M atau F atau Unknown. - -5. StartDate dan EndDate \>= Today - - - ----------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Table 134 Report Status

    -

    TestSite

    -

    Code

    Sex

    Age

    -

    Start

    Age

    -

    End

    NumRef

    -

    Type

    UnitRefTxtFlagKeterangan
    UColrnull0D73000DVSETYELLOW*Warna urin
    UClarnull0D73000DVSETCLEAR*Kejernihan urin
    SColrnull0D73000DVSETBROWN*Warna feses
    HIVRnull0D73000DVSETNon-Reactive*HIV Rapid
    Cultrnull0D73000DVSETg/dLNo growth*Kultur
    GrStnnull0D73000DVSETg/dLNo organisms seen*Gram stain
    ESTRDLF0D73000DTEXT

    Early follicular phase 20-150

    -

    Late follicular phase 40-350

    -

    Midcycle 150-750

    -

    Luteal phase 30-450

    -

    Postmenopausal <21

    nullEstradiol
    - -Table 134 Report Status - - - ----------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Table 135 Specimen collection method

    Definition

    -

    tab

    Testdefsite.

    -

    TestType

    Testdeftech.

    -

    ResultType

    Testdeftech.

    -

    RefType

    Technical

    -

    tab

    Calculation

    -

    tab

    Reference

    -

    tab

    Group

    -

    tab

    Mapping

    -

    tab

    SemuaTESTNumericNMRCEnableDisableNumericDisableEnable
    testRangeNMRCEnableDisableNumericDisableEnable
    Value setTEXTEnableDisableTextDisableEnable
    TextTEXTEnableDisableTextDisableEnable
    PARAMNumericNMRCEnableDisableNumericDisableEnable
    RangeNMRCEnableDisableNumericDisableEnable
    Value setTEXTEnableDisableTextDisableEnable
    TextTEXTEnableDisableTextDisableEnable
    CALCNumericNMRCEnableDisableNumericDisableEnable
    GROUPDisableDisableDisableEnableEnable
    TITLEDisableDisableDisableDisableEnable
    - -Table 135 Specimen collection method - -> Keterangan: - -1. Semua test didefinisikan di Definition tab - -2. TEST, PARAM dan CALC dilanjutkan di Technical, Reference dan Mapping - tab. - -3. CALC dilanjutkan ke Calculation, Reference dan Mapping tab - -4. GROUP dilanjutkan ke Group dan Mapping tab - -5. TITLE dilanjutkan ke Mapping tab saja - -### Value Set {#value-set} - -> Value set bertujuan menyediakan **pilihan baku**[^30] untuk memastikan -> konsistensi *value* yang digunakan. Value set ada dua jenis yaitu: - -- ***value set record***, digunakan oleh *test*. Misalnya *value set* - > untuk hasil test HBsAg Adalah "*reactive*", "*grayzone*" dan - > "*non-reactive*" - -- ***value set field***, digunakan oleh *field* dari berbagai tables. - > Misalnya pilihan untuk specimen status adalah: "collected", - > "receive/arrive", "aliquot", "transport", "stored", "expire", - > "reject", "destroyed" - -> Terdiri dari tables berikut: - -- **valueset**, *value set*. Yaitu *table* untuk menyimpan definisi - *value set*. Lihat Table 72. valueset - -- **valuesetfld**, *value set field*. Menyimpan relasi antara *value - set* dengan *field* yang menggunakannya. Lihat Table 73. valuesetfld - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Table 136 Body site

    FieldTipe dataDisplayKeterangan
    VIDValue IDPK; Internal ID.
    SiteIDSite IDFK; Dari table Site; Jika tidak terisi, maka berlaku untuk semua -site
    VSetIDintValue SetFK, dari Table 73. valuesetdef. Untuk grouping.
    VOrderintValue OrderUrutan tampilan
    VValuenvarcharValueValue, nilai terdefinisi.
    VDescnvarcharValue Description
    VCategoryintCategory

    Value Set. Kategory value set:

    -

    0: system

    -

    1: user-defined

    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti record disabled di semua bagian -aplikasi. UTC+0
    - -Table 136 Body site - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|------------|---------------|----------------------|--------------------------------------------------------------------------------------------| -| VSetID | | Value Set ID | PK; Internal ID. | -| SiteID | | Site ID | FK; Dari table Site. Jika tidak terisi, berarti berlaku sebagai *default* bagi semua site. | -| VSName | nvarchar | Value Set Name | Nama Value Set | -| VSDesc | nvarchar | Table name.FieldName | Nama *table.*Nama *field* ; Penjelasan dimana value set ini digunakan. | -| | | | | -| | | | | -| CreateDate | Date Time | Create Date | Menandai kapan *record* ini dibuat. UTC+0 | -| EndDate | Date Time | End Date | Jika EndDate terisi berarti *record* *disabled* di semua bagian aplikasi. UTC+0 | - -Table 137 Specimen Role - -### Reagent {#reagent} - -> Terdiri dari tables berikut: - -- **reagents**, berisi data reagen yang berasal dari instrument. Antara - lain no. catalog, no. lot, *expiry date*, identitas vial, dst. Table - Reagents bersifat transaksional, nilai-nilainya mengikuti reagent yang - sedang digunakan - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Table 138 Specimen Condition

    FieldTipe dataKeterangan
    ReagentIDnvarchar

    PK. Identitas reagen:

    -
      -
    • Dari pabrikan

    • -
    • Key in manual?

    • -
    AnalytenvarcharAnalit. Further development
    LotNumbernvarcharNomor lot kalibrator.
    ExpiryDatedatetimeTanggal kadaluwarsa kalibrator
    BottleIDnvarcharIdentitas botol/vial reagen
    OpenBottleDatedatetimeWaktu botol/vial reagen mulai digunakan.
    RoundNoNumericNomor reagent carousel
    PositionNumericPosisi reagen di carousel
    CreateDatedatetimeWaktu record ini dibuat.
    - -Table 138 Specimen Condition - -### Calibration {#calibration} - -> Tujuan pengelolaan data kalibrasi adalah: - -1. Mendapatkan jumlah tes yang digunakan untuk kalibrasi berikut - perulangannya - -2. Merekam data-data teknis penting terkait proses kalibrasi - (absorbance, result, factor, dll) sehingga bisa dilakukan analisis - perbandingan antar instrument/site dan *early warning detection & - alert*. - -> Terdiri dari tables berikut: - -- **InvTransaction**^13^, *Inventory Transaction*. Berisi data kit - kalibrator yang diterima laboratorium. Antara lain no. catalog, no. - lot, *expiry date*, jumlah, dst. - -- **caldef**, *calibrator definition* -- merelasikan antara product - calibrator dengan analyte/reagen. Antara lain no. catalog, no. lot, - *expiry date*, value untuk setiap analyte/reagent - jenis instrument. - Input data caldef dilakukan Technical Support Perusahaan. - -- **calprep**, *calibrator preparation*. Berisi data open bottle date, - jumlah aliquot, user yang melakukan persiapan kalibrasi, catatan. - Input data calprep dilakukan user. Data dari calprep bisa digunakan - untuk pencetakan label untuk identitas setiap vial kalibrator. - -- **calparinst**, *calibration parameters of instrument*. Berisi - data-data setting jenis dan nilai target calibrator yang digunakan - tiap instrument. Data diperoleh dari *instrument interfacing* atau - input manual. - -- **calresinst**, *calibration results of instrument*. berisi data hasil - kalibrasi dari setiap instrument (melalui *instrument interfacing*) - atau di-input manual. Tabel ini menyimpan semua tes berikut hasilnya - yang digunakan dalam prosedur kalibrasi, tetapi mungkin tidak semua - hasil digunakan untuk menghitung factor kalibrasi. - -- **calfactor**, *calibration factor*. Berisi data faktor kalibrasi. - Faktor kalibrasi bisa berasal dari table database instrument atau dari - perhitungan. - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Table 139. Contoh testdeftech

    FieldTipe dataKeterangan
    CalDefIDNvarcharPK
    InvTransactionIDnvarchar

    Foreign Key. Inventory transaction ID; dari table -InvTransaction.

    -

    Format: ITRYYXXXXXX;

    Calibratornvarchar
      -
    • Foreign Key: CatalogID dari ProductCatalog13 atau -CatalogExtID dari Table 3 productcatalogext.

    • -
    • ProductCatalog.Type, productcatalogext.Type: -calibrators

    • -
    OpenBottleStabilityNumericStabilitas product setelah dibuka. Dalam satuan hari.
    AnalytenvarcharAnalit. Further development
    LotNumbernvarcharNomor lot kalibrator.
    ExpiryDatedatetimeTanggal kadaluwarsa kalibrator
    Reagentnvarchar
      -
    • Foreign Key: CatalogID dari ProductCatalog13 atau -CatalogExtID dari Table 3 productcatalogext

    • -
    • ProductCatalog.Type, productcatalogext.Type: -reagent.

    • -
    • Menunjukkan reagen yang mengguna-kan kalibrator ini. Bisa lebih -dari satu nomor catalog reagen.

    • -
    SpcTypeIDnvarchar

    FK; Specimen Type ID; Dari

    -

    Table 37. spctype

    LevelnumericLevel kalibrasi
    ValuenumericNilai target kalibrasi.
    UnitnvarcharSatuan dari nilai target kalibrasi.
    InstrumentAliasnvarchar
      -
    • Brand dan type instrument. Misalnya TMS-30i. dari table -instrument alias. Belum spesifik s/n.

    • -
    • Opsional.

    • -
    - -Table 139. Contoh testdeftech - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTipe dataKeterangan
    CalPrepIDnvarcharPK.
    Calibratornvarchar
      -
    • Foreign Key: CatalogID dari ProductCatalog13 atau -CatalogExtID dari Table 3 productcatalogext.

    • -
    • ProductCatalog.Type, productcatalogext.Type: -calibrators

    • -
    OpenBottleDateTimedatetimeWaktu membuka vial(-vial) kalibrator
    LotNumbernvarcharNomor lot kalibrator.
    ExpiryDatedatetimeTanggal kadaluwarsa kalibrator
    LevelNumericLevel kalibrator
    VialsNumericJumlah vial (hasil aliquoting).
    NoteTextCatatan
    UsernvarcharForeign Key, ContactID, dari table ContactDetail13
    CreateDateDate TimeMenandai kapan record ini dibuat.
    - -> Saat user melakukan persiapan bahan kalibrator (pengenceran dan -> aliquoting), yang bersangkutan mencatatkan kalibrator (catalog ID), -> no. lot, tanggal buka vial, expiry date, jumlah via hasil aliquoting. - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTipe dataKeterangan
    CalParInstIDnvarcharPK
    EquipmentIDnvarchar
      -
    • EquipmentID dari Table 47. -equipmentlist

    • -
    -
      -
    • Jika dikerjakan manual, maka berisi WorkbenchID -dari Table 10 workbench.

    • -
    Calibratornvarchar

    Nama kalibrator, berasal dari instrument.

    -

    Jika identitas kalibrator tidak ada, digantikan dengan gabungan -beberap field data. Lihat Table 62 Identitas calibrator dari -instrument

    LotNonvarcharNomor lot bahan kalibrator
    ExpiryDateDate TimeTanggal expired
    TestInstIDnvarcharForeign Key dari Table 52. testdeftech
    SampleTypenvarcharJenis sample
    LevelNumericCalibrator level
    ConcentrationNumericNilai target konsentrasi masing-masing level kalibrator
    CalUnitnvarcharSatuan hasil kalibrasi. Tidak selalu sama dengan satuan -concentration
    CreateDateDate TimeMenandai kapan record ini dibuat.
    - -| **Instrument** | **Format code** | **Calibrator** | -|----------------|-----------------|-----------------------------------------| -| TMS-1024i | F1? | Apakah bisa menggunakan format yg sama? | -| TMS-24i | F1? | Apakah bisa menggunakan format yg sama? | -| TMS-30i | F2 | F2\^\\^\\^\ | -| TMS-50i | F3 | | -| | | | -| | | | - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTipe dataKeterangan
    CalRestIDnvarcharPK
    EquipmentIDnvarchar
      -
    • EquipmentID dari Table 47. -equipmentlist

    • -
    • Jika dikerjakan manual, maka berisi WorkbenchID -dari Table 10 workbench.

    • -
    InstCalIDNvarchar(5)Identitas bahan calibrator yang berasal dari -instrument. Data bisa dibandingkan dengan Level di table -calparinst untuk crosscheck.
    InstCalNamenvarcharNama bahan calibrator yang berasal dari instrument. -Jika identitas kalibrator tidak ada, digantikan dengan gabungan beberap -field data. Lihat Table 62 Identitas calibrator dari instrument
    TestTechCodenvarchar
      -
    • Kode test yang berasal dari instrument. Biasanya -berupa kode numeric.

    • -
    • Disamakan dengan TestSiteCode jika EquipmentID = -WorkbenchID.

    • -
    SampleTypenvarcharJenis sample dari instrument
    CalDateDate TimeTanggal kalibrasi
    LevelNumericCalibrator level. Data bisa dibandingkan dengan Level di table -calparinst untuk crosscheck.
    BlankNumericBlank calibrator
    ConcentrationNumericKonsentrasi kalibrator. Data bisa dibandingkan dengan Concentration -di table calparinst untuk crosscheck.
    ResultNumericHasil kalibrasi
    ResultUnitNvarcharSatuan hasil kalibrasi1.
    IsTotalbit
      -
    • 0: hasil original

    • -
    • 1: hasil perhitungan

    • -
    LotNonvarcharNomor lot kalibrator. Optional
    AspirationNumericJumlah aspirasi/perulangan kalibrasi
    Valnvarchar
      -
    • Jika memenuhi kriteria validasi, maka berisi “SYSTEM”

    • -
    • Jika tidak memenuhi kriteria, maka berisi UserID dari table -User13

    • -
    ValDateTimeDatetime
      -
    • Jika memenuhi kriteria validasi, maka berisi date & time saat -Val = “SYSTEM” direkam.

    • -
    • Jika tidak memenuhi kriteria, maka berisi date & time saat -user melakukan validasi.

    • -
    - - -> Calibration factor[^31] dihitung sesuai formula pada Lampiran 2 bagian -> Calibration dan Calibration Factor. - -### Quality Control (QC) - -> Terdiri dari tables berikut: - -- **InvTransaction**^13^, *Inventory Transaction*. Berisi data kit QC - yang diterima laboratorium. Antara lain no. catalog, no. lot, *expiry - date*, jumlah, dst. - -- **qcdef**, *qc definition* -- merelasikan antara product QC dengan - analyte/reagen. Antara lain no. catalog, no. lot, *expiry date*, value - untuk setiap analyte/reagent - jenis instrument. Input data qcdef - dilakukan Technical Support Perusahaan. - -- **qcprep**, *qc preparation*. Berisi data open bottle date, jumlah - aliquot, *user* yang melakukan persiapan qc, catatan. Input data - qcprep dilakukan user. Data dari qcprep bisa digunakan untuk - pencetakan label untuk identitas setiap vial qc. - -- **qcparinst**, *qc parameter of instrument*. Berisi data-data setting - jenis dan nilai target qc yang digunakan tiap instrument. - -- **qcresinst**, *qc results of instrument*. Berisi data hasil qc dari - setiap instrument (melalui *instrument interfacing*) atau di-input - manual. - -- **qcresflag**, *qc result flag*. Berisi data flag hasil (klinis) dari - instrument. Setiap hasil bisa saja memiliki lebih dari satu flag. - -- **qcrescom**, *qc result comment*. Berisi data - komentar/catatan/penjelasan tambahan atas hasil tes pasien. - -- **qcrestech,** *qc result technic*. Berisi data detail teknis terkait - hasil seperti *reaction cell* yang digunakan, *absorbance*, *error*, - *dilution*, dll. - -- - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTipe dataKeterangan
    QCDefIDnvarcharPK
    InvTransactionIDnvarchar

    Foreign Key. Inventory transaction ID; dari table -InvTransaction13.

    -

    Format: ITRYYXXXXXX;

    Controlnvarchar
      -
    • Foreign Key: CatalogID dari ProductCatalog13 atau -CatalogExtID dari Table 3 productcatalogext.

    • -
    • ProductCatalog.Type, productcatalogext.Type: -controls

    • -
    OpenBottleStabilityNumericStabilitas product setelah dibuka. Dalam satuan -hari.
    AnalytenvarcharAnalit. Further development
    LotNumbernvarcharNomor lot kalibrator.
    ExpiryDatedatetimeTanggal kadaluwarsa kalibrator
    Reagentnvarchar
      -
    • Foreign Key: CatalogID dari ProductCatalog13 -atau CatalogExtID dari Table 3 productcatalogext

    • -
    • ProductCatalog.Type, productcatalogext.Type: -reagent.

    • -
    • Menunjukkan reagen yang mengguna-kan kalibrator ini. Bisa -lebih dari satu nomor catalog reagen.

    • -
    SpcTypeIDnvarcharForeign Key; Specimen Type ID; Dari Table -37. spctype
    LevelnumericLevel control1.
    ValuenumericNilai target kalibrasi.
    UnitnvarcharSatuan dari nilai target kalibrasi.
    InstrumentAliasnvarchar
      -
    • Brand dan type instrument. Misalnya TMS-30i. dari table -instrument alias. Belum spesifik s/n.

    • -
    • Opsional.

    • -
    - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTipe dataKeterangan
    QCPrepIDnvarcharPK.
    Controlnvarchar
      -
    • Foreign Key: CatalogID dari ProductCatalog13 atau -CatalogExtID dari Table 3 productcatalogext.

    • -
    • ProductCatalog.Type, productcatalogext.Type: -controls

    • -
    OpenBottleDateTimedatetimeWaktu membuka vial(-vial) kontrol
    LotNumbernvarcharNomor lot kontrol.
    ExpiryDatedatetimeTanggal kadaluwarsa kontrol
    LevelNumericLevel kontrol; Opsional, tidak diisi jika control level -yang berbeda menggunakan no. catalog terpisah.
    VialsNumericJumlah vial (hasil aliquoting).
    NoteTextCatatan
    UsernvarcharForeign Key, ContactID, dari table ContactDetail13
    CreateDateDate TimeMenandai kapan record ini dibuat.
    - -> Saat user melakukan persiapan bahan kontrol (pengenceran dan -> aliquoting), yang bersangkutan mencatatkan control (catalog ID), no. -> lot, tanggal buka vial, expiry date, jumlah via hasil aliquoting. - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTipe dataKeterangan
    QCParInstIDnvarcharPK
    EquipmentIDnvarchar
      -
    • Berisi ProductNumber (table Product, CRM) jika berasal dari -perusahaan.

    • -
    • Berisi instrument serial number jika berasal dari -perusahaan lain

    • -
    • Foreign Key dari table InstrumentList

    • -
    ControlInstnvarcharIdentitas bahan control yang berasal dari -instrument.
    LotNonvarcharNomor lot bahan kontrol
    ExpiryDateDate TimeTanggal expired
    TestInstIDnvarcharForeign Key dari Table 52. testdef
    SampleTypenvarcharJenis sample
    LevelNumericControl level
    MeanNumericNilai mean masing-masing level control
    SDNumericNilai simpangan baku masing-masing level control
    QCUnitnvarcharSatuan hasil kalibrasi.
    CreateDateDate TimeMenandai kapan record ini dibuat.
    - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTipe dataKeterangan
    QCRestIDnvarcharPK
    EquipmentIDnvarchar
      -
    • EquipmentID dari Table 47. -equipmentlist

    • -
    • Jika dikerjakan manual, maka berisi WorkbenchID -dari Table 10 workbench.

    • -
    InstCtrlIDNvarchar(5)Identitas bahan control yang berasal dari -instrument. Data bisa dibandingkan dengan Level di table -qcparinst untuk crosscheck.
    InstCtrlNamenvarcharNama bahan control yang berasal dari -instrument.
    TestTechCodenvarchar
      -
    • Kode test yang berasal dari instrument. Biasanya -berupa kode numeric.

    • -
    • Disamakan dengan TestSiteCode jika EquipmentID = -WorkbenchID.

    • -
    SampleTypenvarcharJenis sample
    QCDateDate TimeTanggal kontrol
    ResultNumericHasil kontrol
    ResultUnitNvarcharSatuan hasil kontrol1.
    LotNonvarcharNomor lot kontrol
    Valnvarchar
      -
    • Jika memenuhi kriteria validasi, maka berisi “SYSTEM”

    • -
    • Jika tidak memenuhi kriteria, maka berisi UserID dari table -User13

    • -
    ValDateTimeDatetime
      -
    • Jika memenuhi kriteria validasi, maka berisi date & time saat -Val = “SYSTEM” direkam.

    • -
    • Jika tidak memenuhi kriteria, maka berisi date & time saat -user melakukan validasi.

    • -
    CreateDateDate TimeMenandai kapan record ini dibuat.
    - - -### Results - -> Hasil pasien dikelola menggunakan tabel-tabel sebagai berikut: - -- **patres**, *patient results*. - - - terisi otomatis akibat *test ordering activity*. - - - Berisi data hasil pasien, baik yang berasal dari *instrument* maupun - manual. - - - Menyimpan semua hasil [^32]pasien dari *instrument*, baik yang - memiliki *test order* ataupun tidak. - -- **patresflag**, patient result flag. Berisi data flag hasil (klinis) - dari *instrument*. Setiap hasil bisa saja memiliki lebih dari satu - flag. - -- **patrescom**, *patient result comment*. Berisi data - komentar/catatan/penjelasan tambahan atas hasil tes pasien. - -- **patrestech,** *patient result technic*. Berisi data detail teknis - terkait hasil seperti *reaction cell* yang digunakan, *absorbance*, - *error*, *dilution*, dll. - -- **patrestatus**, *patient result* *status*. Berisi data tindakan apa - saja yang telah/sedang dilakukan atas hasil tes pasien. - -- **flagdef**, *flag definition*. Berisi definisi flag dari berbagai - macam instrument - -- **techdef**, *technical definition*. - -- **patreslog**, *patient result audit***.** Berisi data - perubahan-perubahan atas data hasil pasien, yang meliputi tables: - - - patres - - - patresflag - - - patrescom - - - patrestech - - - patrestatus - -> Berisi data hasil analisis dari masing-masing instrument: - -- Semua hasil (validated/not validated) disimpan - -- Expiry date - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTipe dataDisplayKeterangan
    ResultIDIntResult IDPK
    SiteIDFK. Not null. Site asal specimen. Dari table -Site
    OrderIDFK. Not null. Test order ID, dari table ordertest
    InternalSIDInternal SIDFK. Internal Specimen ID dari table specimens
    SIDNvarchar(30)Sample ID (SID)
      -
    • Specimen ID; Dari Table 40 specimens.

    • -
    • Jika null, berarti hasil tidak memiliki test -order.

    • -
    SampleIDNvarchar(30)Instrument SIDSample identity yang berasal dari instrument.
    TestSiteIDTest Site IDFK; dari table testdefsite;
      -
    • -
    -
      -
    • -
    TestSiteCodechar (6)Test Site CodeAbbreviated text, panjangnya 6 character
    AspCntintAspiration CountAspiration counter. Menunjukan aspirasi ke# atau perulangan -ke#. Default value adalah 1
    ResultNvarcharResultHasil analisis dari instrument/manual
    SampleTypeNvarchar(50)Sample Type

    Data dari instrument.

    -
      -
    • Serum

    • -
    • Urine

    • -
    • Plasma

    • -
    • CSF

    • -
    • Etc.

    • -
    ResultDateTimeDate TimeResult Date TimeTanggal analisis/result dari instrument. UTC+0
    WorkstationIDWorkstation IDFK, dari Table 14 workstation; Workstation dimana test -dikerjakan.
    EquipmentIDEquipment IDFK, dari Table 47. equipmentlist; Equipment dimana test -dikerjakan.
    ValNvarchar(30)Validator
      -
    • Jika memenuhi kriteria validasi, maka berisi “SYSTEM”

    • -
    • Jika tidak memenuhi kriteria, maka berisi UserID dari table -User13

    • -
    ValDateTimeDatetimeValidation Date Time
      -
    • Jika memenuhi kriteria validasi, maka berisi date & time saat -Val = “SYSTEM” direkam.

    • -
    • Jika tidak memenuhi kriteria, maka berisi date & time saat -user melakukan validasi.

    • -
    RefNumIDReference Range IDFK, dari table refnum
    RefTHoldIDReference Threshold IDFK, dari table refthold
    RefVSetIDReference Value Set IDFK, dari table refvset
    RefTxtIDReference Text IDFK, dari table reftxt
    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti result sudah closed. -UTC+0
    ArchiveDateDate TimeArchive DateJika ArchiveDate terisi, berarti record ini sudah masuk -data warehouse dan tidak boleh diiubah lagi. UTC+0
    DelDateDate TimeDelete DateJika DeleteDate terisi berarti result sudah dihapus dan -tidak bisa di-akses oleh user biasa. UTC+0
    - -> **AspCnt -- Aspiration Count** -> -> Menandakan banyaknya test tersebut dilakukan (*rerun*). Data berasal -> dari: - -- perhitungan otomatis di CLQMS, yaitu Result pertama dihitung sebagai - AspCnt=1; Selanjutnya jika ada **Result** dengan **ResultDateTime** - yang berbeda dengan *record* yang sudah ada, maka AspCnt bertambah - satu (1). - -- *instrument*, misalnya OBX-17 pada Mindray BS-430, CL-900i. Perhatikan - bahwa tidak semua *instrument* menggunakan OBX-17 dengan cara yang - sama. - -| **Field** | **Tipe data** | **Display** | **Keterangan** | | -|-------------|---------------|----------------|----------------------------------------------------------------------------------------------------|-----| -| ResFlagID | Int | Result Flag ID | PK | | -| ResultID | Int | Result ID | Foreign Key dari Table 68 patres | | -| Flag | Nvarchar(50) | Flag | Flag dari instrument | | -| CreateDate | Date Time | Create Date | Menandai kapan record ini dibuat. UTC+0 | | -| EndDate | Date Time | End Date | Jika terisi berarti *record* sudah *closed*. UTC+0 | | -| ArchiveDate | Date Time | Archive Date | Jika terisi, berarti *record* ini sudah masuk *data warehouse* dan tidak boleh diiubah lagi. UTC+0 | | -| DelDate | Date Time | Delete Date | Jika terisi berarti *record* sudah dihapus dan tidak bisa di-akses oleh user biasa. UTC+0 | | -| | | | | | -| | | | | | -| | | | | | - -- Table patresflag menyimpan data flag dari instrument as is[^33]. - -- Untuk menampilkan flag, harus merelasikan dengan table flagdef **dan** - untuk InstrumentName yang sama. - -- ResultID dan Flag bisa dijadikan PK sehingga ResFlagID tdak - diperlukan. - -| **Field** | **Tipe data** | **Display** | **Keterangan** | -|-------------|---------------|----------------|----------------------------------------------------------------------------------------------------| -| ResTechID | Int | Result Tech ID | PK | -| ResultID | Int | Result ID | Foreign Key dari Table 68 patres | -| DBField | nvarchar(50) | Database Field | Nama field dari database instrument | -| DBValue | nvarchar(100) | Value | Nilai dari field tersebut | -| CreateDate | Date Time | Create Date | Menandai kapan record ini dibuat. UTC+0 | -| EndDate | Date Time | End Date | Jika terisi berarti *record* sudah *closed*. UTC+0 | -| ArchiveDate | Date Time | Archive Date | Jika terisi, berarti *record* ini sudah masuk *data warehouse* dan tidak boleh diiubah lagi. UTC+0 | -| DelDate | Date Time | Delete Date | Jika terisi berarti *record* sudah dihapus dan tidak bisa di-akses oleh user biasa. UTC+0 | - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTipe dataDisplayKeterangan
    ResStatusIDPK.
    ResultIDResult IDFK. Not null. Dari table patres
    SIDNvarchar(30)Sample ID (SID)
      -
    • Specimen ID; Dari Table 40 specimens.

    • -
    • Jika null, berarti hasil tidak memiliki test -order.

    • -
    TestActnvarcharTest ActivityValue Set. Activity yang dilakukan atas -test. Berdasarkan test life cycle dari Table 4 Test activity -& status
    ActResintActivity Result
      -
    • null: belum ada status

    • -
    • Value Set. Activity Result.

      -
        -
      • 0: gagal

      • -
      • 1: berhasil dengan catatan

      • -
      • 2: berhasil

      • -
    • -
    TestStatusnvarcharTest StatusValue Set. Test Status.
    CurrSiteIDnvarcharCurrent Site IDFK, Current Site ID. Site dimana Action -dilakukan. Dari table Site
    CurrLocIDnvarcharCurrent Location ID

    Current Location, lokasi dimana Action -dilakukan. Berisi FK, salah satu dari:

    -
      -
    • LocationID dari Table 20 location

    • -
    • WorkstationID dari Table 14 workstation

    • -
    • EquipmentID dari Table 47. equipmentlist

    • -
    OriginnvarcharOrigin

    Nama table asal Foreign Key:

    -
      -
    • location

    • -
    • workstation

    • -
    • equipmentlist

    • -
    GeoLocationSystemnvarcharGeo Location System
      -
    • Sistem/standard geolocation yang digunakan

    • -
    • Untuk pemantauan pengiriman1 -specimen.

    • -
    GeoLocationDataGeo Location Data
      -
    • Untuk pemantauan pengiriman21 -specimen.

    • -
    -

    (perlu dipelajari lebih lanjut format data GeoLocation -baku)

    DIDTypenvarcharDID Type

    Value Set. Device ID Type:

    -
      -
    • Windows: Device ID

    • -
    • Android: AAID

    • -
    • IOS: IDFA

    • -
    DIDnvarcharDIDDevice ID
    UserIDnvarcharUser ID

    Identitas user yang melakukan perubahan status. Berasal dari -table:

    -
      -
    • CRM.User

    • -
    • CRM.ContactDetail

    • -
    LogDateDate TimeLog DateWaktu record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika EndDate terisi berarti specimen status record ini -sudah closed. UTC+0
    ArchiveDateDate TimeArchive DateJika ArchiveDate terisi berarti record ini sudah masuk -data warehouse dan tidak boleh diiubah lagi. UTC+0
    - - -> **CurrSiteID**, termasuk lab rujukan tempat test diproduksi. -> -> *Table 112 flagdef* - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTipe dataKeterangan
    FlagDefIDIntFlag Definition IDPK
    InstrumentNamenvarchar(100)Instrument Name
      -
    • Berisi ProductName (table ProductCatalog atau -alias, CRM) Misalnya:

      -
        -
      • TMS-30i

      • -
      • BS-430

      • -
    • -
    -

    Instrument name perlu dijaga konsistensinya secara global karena akan -menentukan QC grouping, flagging.

    FlagNvarchar(50)FlagFlag dari instrument
    FlagTextNvarchar(100)Full TextText yang ditampilkan ke user
    FlagDescNvarchar(255)DescriptionPenjelasan/arti flag
    OnScreenBitOn Screen

    Y: ditampilkan di layar

    -

    N: sebaliknya

    OnResultBitOn Result

    Y: ditampilkan di result report

    -

    N: sebaliknya

    CreateDateDate TimeCreate DateMenandai kapan record ini dibuat. UTC+0
    EndDateDate TimeEnd DateJika terisi berarti record sudah tidak digunakan lagi. -UTC+0
    - -### Test Ordering, Samples, Tests dan Distribusi Pekerjaan - -> Berikut adalah penjelasan apa yang terjadi ketika dilakukan *activity* -> terkait test (Table 3 Test Life Cycle). -> -> Keterangan: - - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    OrderID0125010700001
    Order Date&Time2025-01-07 07:02:00
    WorkstationID

    3: CAUTO

    -

    4: CBACK

    EquipmentID

    597: TMS-30i (s/n 6016850924)

    -

    58: TMS-24i (s/n 2711771113)

    Specimen Reception Date & Time2025-01-07 07:30:00
    Instrument Query Date & Time2025-01-07 07:40:00
    - -> **Test Ordering** - - --------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    ResultID

    -
    -

    SiteID

    -
    -

    OrderID

    -
    -

    SID

    -
    -

    SampleID

    -

    (instrument)

    -
    -

    TestSiteCode

    -
    -

    AspCnt

    -
    -

    Result (instrument)

    -
    -

    SampleType

    -

    (instrument)

    -
    -

    ResultDateTime

    -

    (instrument)

    -
    -

    WorkstationID

    -
    -

    EquipmentID

    -
    -

    CreateDate

    -
    101<OrderID><OrderID>0010CREASERUM2025-01-07 07:02:00
    201<OrderID><OrderID>0010CREAUURINE2025-01-07 07:02:00
    301<OrderID><OrderID>0010SGOTSERUM2025-01-07 07:02:00
    401<OrderID><OrderID>0010SGPTSERUM2025-01-07 07:02:00
    501<OrderID><OrderID>0010ALPSERUM2025-01-07 07:02:00
    GLUAR1SERUM
    GLUF1SERUM
    GLU2HPP1SERUM
    - - --------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    ResStatusID

    -
    -

    ResultID

    -
    -

    SID

    -
    -

    TestSiteCode

    -
    -

    TestAct

    -
    -

    ActRes

    -
    -

    TestStatus

    -
    -

    CurrSiteID

    -
    -

    CurrLocID

    -
    -

    Origin

    -
    11<OrderID>0010CREAORD2Ordered01labsite2025-01-07 07:02:00
    22<OrderID>0010CREAUORD2Ordered01labsite2025-01-07 07:02:00
    33<OrderID>0010SGOTORD2Ordered01labsite2025-01-07 07:02:00
    44<OrderID>0010SGPTORD2Ordered01labsite2025-01-07 07:02:00
    55<OrderID>0010ALPORD2Ordered01labsite2025-01-07 07:02:00
    61<OrderID>0010CREASCH2Scheduled013workstation2025-01-07 07:30:00
    72<OrderID>0010CREAUSCH2Scheduled013workstation2025-01-07 07:30:00
    83<OrderID>0010SGOTSCH2Scheduled013workstation2025-01-07 07:30:00
    94<OrderID>0010SGPTSCH2Scheduled013workstation2025-01-07 07:30:00
    105<OrderID>0010ALPSCH2Scheduled013workstation2025-01-07 07:30:00
    111<OrderID>0010CREASCH2Scheduled014workstation2025-01-07 07:30:00
    122<OrderID>0010CREAUSCH2Scheduled014workstation2025-01-07 07:30:00
    133<OrderID>0010SGOTSCH2Scheduled014workstation2025-01-07 07:30:00
    144<OrderID>0010SGPTSCH2Scheduled014workstation2025-01-07 07:30:00
    155<OrderID>0010ALPSCH2Scheduled014workstation2025-01-07 07:30:00
    16ANASchedule failed597
    VERWaiting to be analyse597
    REVAnalysed597
    REPAnalysis failed597
    597
    58
    58
    58
    58
    58
    - -### Result Distribution - -> Distribusi hasil yang dimaksud adalah hasil pemeriksaan pasien, -> meliputi: - -1. Cetak hardcopy, baik otomatis maupun manual - -2. Cetak softcopy, baik otomatis maupun manual - -3. Kirim hasil cetak softcopy via email, baik otomatis maupun manual - -4. Kirim hasil cetak softcopy via instant messaging applications, baik - otomatis maupun manual - -### Result Reporting & Visualization {#result-reporting-visualization} - -> Result Reporting & Visualization adalah pengaturan tampilan di layar -> maupun report (softcopy, hardcopy). Terdiri dari: - -- **\<\>** - -- - -- \<\> - -| | | | -|-----|-----|-----| -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | - -### Audit - -> Prinsip audit adalah mencatat (*to log*): - -- data yang diubah (**what**), sehingga perlu pencatatan detail: - - - nama table - - - nama field - - - previous value - -- kapan terjadinya perubahan (**when**) - -- siapa yang melakukan perubahan (**who**) - -- bagaimana perubahan dilakukan (**how**) yaitu dengan mencatat - applicationID, halaman web, *session*, *event*, mekanisme (manual atau - perulangan dari instrument -- *duplo*) *system identification*. - -- dari lokasi mana perubahan dilakukan (**where**), yaitu site, - *workstation*, pc dimana perubahan dilakukan (termasuk informasi - lokasi) *access location*. - -- alasan perubahan (**why**), diinput oleh user yang melakukan perubahan - -> Jenis-jenis log yang digunakan dalam audit trail adalah: - -5. ***data log***, yaitu *log of events* (catatan kejadian) terkait - data. Antara lain: - - a. data demografi pasien, *visit*, *requests*, *samples*, hasil dan - semua yang terkait dengan pasien - - b. data *user* - - c. data *master* (tests, location, doctors, dll) - - d. data archiving - - e. kegagalan (*transaction errors*), misalnya kegagalan posting - database, dll - -6. ***service log***, yaitu catatan kejadian terkait *services* [^34]. - Antara lain: - - a. komunikasi: *host communication*, *instrument communication*, - dll - - b. *resource access*: database access/backup/restore, network - access, internet access, (IP address & port), dll. - - c. manual/automatic *printing* (*service class*) - - d. manual/automatic *messaging* - - e. kegagalan (*system error*) - -7. ***security log***, yaitu catatan kejadian terkait pengaturan akses, - hal-hal terkait lintas boundary: - - a. user logins and logouts (*security class*) - - b. accessing sensitive files/folders - - c. network share access attempts - - d. perubahan system security settings - - e. percobaan input password yang gagal - - f. install/uninstall aplikasi - - g. system shutdown/restart events - - h. perubahan user access (*disabled*, perubahan *access rights*, - dll) - - i. kegagalan (*security error*) - -> Jenis interaksi (tindakan) yang masuk dalam audit adalah: - -1. create, read (view), update, delete (CRUD) data - -2. printing - -### Relational Diagram - -> \. - -## Antarmuka - -\. - -### Access Page - -> \. - -### - -# Versioning - -\ mengelola laboratorium klinik, termasuk mikrobiologi klinik, - > patologi anatomi, bank darah, biobank dan lab genetika. - -- **PK** adalah singkatan Primary Key - -- **FK** adalah singkatan Foreign Key - -- **SMCRM** adalah singkatan dari SUMMIT CRM - -- **PID** adalah singkatan *Patient ID* -- nomor unik identitas pasien - > dalam LIS - -- **OrderID** adalah nomor unik identitas *order*, yaitu permintaan - > test. - -- **Container** **code** adalah kode setiap jenis *specimen container* - > dan menjadi bagian dari Specimen ID - -- **SID** adalah singkatan dari *Specimen ID* -- nomor unik identitas - > specimen. - -- **TSOIVD** adalah singkatan dari *Technical Support Officer for IVD - > Products* - -- **TSSIVD** adalah singkatan dari *Technical Support Supervisor for IVD - > Products* - -- **TSSIT** adalah singkatan dari *Technical Support Supervisor for IT - > Solution*. - -- **TSOIT** adalah singkatan dari *Technical Support Officer for IT - > Solution*. - -- **TSM** adalah singkatan *Technical Support Manager* - -- ***default definition*** adalah definisi yang berlaku untuk - > umum/semua. Bisa berupa *master data* seperti *race*, *ethnic*, - > *religion*, *country*. - -- - -> . - -# Referensi - -1. Aplikasi QC V1 (milik SUMMIT) - -2. Laboratory Quality Management Handbook, WHO Library - Cataloguing-in-Publication Data - -3. BUKU PANDUAN SATUSEHAT Lampiran Standar Terminologi SATUSEHAT - -4. ISO 9001 - -5. ISO 13485 - -6. ISO 15189 - -7. - -8. ISO/IEC 25000 - -# Lampiran - -## Lampiran 1: *Database Connection Requirement* - -### Architecture - -![](media/image20.png){width="6.8in" height="1.7256944444444444in"} - - ----- - - - - - - - - - - - - - - -
    Communication App. (server side)TunnelCommunication App. (client side)
      -
    • Mampu mengelola multiple client connection -(+ 3001) secara bersamaan pada saat yang -sama (multi thread).

    • -
    • Connect to host database

    • -
    • Mengirim query script

    • -
    • Menerima data dari client side

    • -
    • Decrypt data

    • -
    • Save data to host database

    • -
    • Kirim encrypted JSON query message on -demand/periodic ke client side via VPN

    • -
    • Setting periode pengiriman query.

    • -
    • Checking mechanism:

      -
        -
      • data integrity (checksum, hash, -dll).

      • -
      • Instrument ID (S/n) check.

      • -
    • -
    • Tidak menerima data demografi pasien.

    • -
    • Windows service (running in background, tidak -memerlukan user interaction).

    • -
    • Mengirim database query script ke client -side

    • -
    • Memiliki log.

    • -
    Virtual Private Network
      -
    • Connect to instrument database

    • -
    • Query data

    • -
    • Ubah data hasil query ke encrypted -JSON

    • -
    • Kirim encrypted JSON ke server via VPN secara -berkala

    • -
    • Format data bisa diubah (HL7, ASTM, custom)

    • -
    • Setting periode pengiriman data

    • -
    • Memiliki mekanisme menjaga data integrity -(checksum, hash, dll).

    • -
    • Tidak mengirim data demografi pasien.

    • -
    • Windows service (running in background, tidak -memerlukan user interaction).

    • -
    • Menerima, menyimpan dan menjalankan database query -script dari server side

    • -
    • Memiliki log.

    • -
    • Antisipasi jika internet terputus.

    • -
    - - -### Data scope - -Data yang diintegrasikan meliputi: - -- absorban kalibrasi termasuk perulangannya - -- hasil control termasuk perulangannya - -- data sample (nomor sample, jenis sample) - -- hasil pasien termasuk perulangannya - -- waktu pengerjaan semua aktivitas di atas - -Integrasi dilakukan dengan pertukaran *encrypted* JSON *file* antara -client dan server. Terdapat beberapa jenis JSON file yang masing-masing -merepresentasikan data yang dikirimkan: - -- Calibration - -- QC - -- Patient - -- Request - -- Sample & Result - -Elemen data yang harus ada dalam file JSON: - -- Equipment s/n - -- Data type marking (CAL, QC, PAT, REQ, SRT) - -- Query result sesuai jenis data type marking (calibration, qc, patient, - request, sample & result) - -- Checksum (cs) - -## Lampiran 2: TMS-30i - -### Calibration Results SQL Scripts and Data Mapping - -> *select cd.ItemName as \[TestTechCode\], MS.StringData as -> \[SampleType\], cd.RDATE as \[CalDate\], cd.TrayNo, cd.PosNo, -> CP.STD_NO as \[Level\], /\*C.BLK_ORDER,\*/ CP.CONC as -> \[Concentration\], cd.Result, cd.IsTotal, cd.LotNo, CP.ASP* -> -> *from caldata cd* -> -> *inner join MasSampleType MST on cd.SampleType = \[INDEX\]* -> -> *inner join MasString MS on MST.StringID = MS.StringID* -> -> *left join ITEMPARA_NAME IPN on cd.ItemNo = IPN.ITEM_NO* -> -> *left join CALIB_POSITION CP on cd.ItemNo = CP.ITEM_NO and cd.PosNo = -> CP.POS_NO* -> -> *where MS.LanguageID = \'1\'* -> -> *order by cd.RDATE* - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    LQMSTMS-30iNotes
    calparinst.CalParInstID<auto numbering>
    calparinst.EquipmentID
    calparinst.Calibrator
    calparinst.LotNo
    calparinst.ExpiryDate
    calparinst.TestInstID1ITEM_NAME
    calparinst.SampleTypeSAMP_TYPE
    calparinst.Level
    calparinst.Concentration
    calparinst.CalUnit
    calparinst.CreateDateRDATE
    calresinst.CalRestIDNot availablePrimary Key. Terisi otomatis di CLQMS
    calresinst.EquipmentIDNot availableDiisi dengan s/n alat, ada di ini. file
    calresinst.InstCalID
    calresinst.InstCalNameF2^<TrayNo>^<PosNo>^<Level>
    calresinst.TestTechCodeTestTechCode
    calresinst.SampleTypeSampleType
    calresinst.CalDateCalDate
    calresinst.LevelLevel
    calresinst.BlankNot available
    calresinst.ConcentrationConcentration
    calresinst.ResultResult
    calresinst.ResultUnit<diisi text ‘OD’>berasal dari ini file.
    calresinst.IsTotalIsTotal

    Untuk menghitung:

    -
      -
    • jumlah total tes yang digunakan untuk kalibrasi, count semua -record dg IsTotal=0.

    • -
    • Factor kalibrasi, gunakan records dg -IsTotal=1.

    • -
    calresinst.LotNoLotNo
    calresinst.AspirationASP
    calresinst.Val<null>
    calresinst.ValDateTime<null>
    - -> Perhitungan *calibration factor* pada TMS-30i adalah sebagai berikut: -> -> Factor = -> $\frac{CalibFactorConc2\ - \ CalibFactorConc1}{CalibFactorAbs2\ - \ CalibFactorAbs1}$ -> -> Dimana: -> -> CalibFactorConc2 : nilai Concentration dari table caldatinst dimana -> Level = 2 -> -> CalibFactorConc1 : nilai Concentration dari table caldatinst dimana -> Level = 1 -> -> CalibFactorAbs2 : nilai Result dari table caldatinst Dimana Level = 2 -> -> CalibFactorAbs1 : nilai Result dari table caldatinst Dimana Level = 1 -> -> Keempat nilai harus pada records dimana TestInstID2, SampleType yang -> sama dan CalDate di tanggal, jam dan menit yang sama. - -### QC Results SQL Scripts and Data Mapping - -> *select distinct IPN.ITEM_NO, IPN.ITEM_NAME as \[TestTechCode\], -> MS.StringData as \[SampleType\], CH.RunDate as \[QCDate\], -> CH.ControlID as \[InstCtrlID\], CN.Name as \[InstCtrlName\], -> CH.Result, CH.LotNo, CP.MEAN, CP.SD* -> -> *from ControlHistory CH* -> -> *inner join ITEMPARA_NAME IPN on CH.ItemNo = IPN.ITEM_NO* -> -> *inner join CTRLNAME CN on CH.LotNo = CN.LotNo* -> -> *inner join MasSampleType MST on CN.SampleType = \[INDEX\]* -> -> *inner join MasString MS on MST.StringID = MS.StringID* -> -> *left join CTRLPARA CP on CH.ItemNo = CP.ITEM_NO and -> CH.ControlID=CP.CTRL_NO and CH.LotNo=CP.LotNo* -> -> *where MS.LanguageID = \'1\'* -> -> *order by IPN.ITEM_NAME* - -| **LQMS** | **TMS-30i** | **Notes** | -|-------------------------|---------------|----------------------------------------------------------| -| qcrestinst.QCRestID | Not available | **Primary Key. Terisi otomatis di CLQMS** | -| qcrestinst.EquipmentID | Not available | Diisi dengan s/n alat, ada di ini. file | -| qcrestinst.InstCtrlID | InstCtrlID | | -| qcrestinst.InstCtrlName | InstCtrlName | | -| qcrestinst.TestTechCode | TestTechCode | | -| qcrestinst.SampleType | SampleType | | -| qcrestinst.QCDate | QCDate | | -| qcrestinst.Result | Result | | -| qcrestinst.ResultUnit | Not available | | -| qcrestinst.LotNo | LotNo | | -| qcrestinst.Val | Not available | | -| qcrestinst.ValDateTime | Not available | | -| qcrestinst.CreateDate | Not available | Terisi dengan waktu saat record terekam di database LQMS | - -### Patient Results SQL Scripts and Data Mapping - -> *select distinct SAMP_ID, ITEM_NAME, ASP_CNT, CONC_DATA, OD_DATA, -> RST_DATE,* -> -> *Flag = case* -> -> *when flagvalue=0 then null* -> -> *else Flag* -> -> *end, ReactionNo, DIL_ORD* -> -> *from* -> -> *(select s.SAMP_ID, s.ASP_CNT, s.ITEM_NO, IPN.ITEM_NAME, s.CONC_DATA, -> s.OD_DATA, s.ReactionNo, s.RST_DATE, s.DIL_ORD, s.PFlg_C, s.PFlg_E, -> s.PFlg_L, s.PFlg_P, s.PFlg_B, s.PFlg_G, s.PFlg_VL, s.PFlg_VH, -> s.PFlg_T, s.PFlg_W, s.PFlg_AB, s.SFlg_S, s.SFlg_R1, s.SFlg_R2, -> s.SFlg_D, s.SFlg_C, s.SFlg_T, s.SFlg_B, s.SFlg_R3, CAST(s.RFlg_L as -> bit) RFlg_L, CAST(s.RFlg_H as bit) RFlg_H* -> -> *from SAMP_DAT s inner join ITEMPARA_NAME IPN on s.ITEM_NO -> =IPN.ITEM_NO* -> -> *)a* -> -> *unpivot* -> -> *(flagvalue for Flag in(PFlg_C,PFlg_E, PFlg_L, PFlg_P, PFlg_B, PFlg_G, -> PFlg_VL, PFlg_VH, PFlg_T, PFlg_W, PFlg_AB, SFlg_S, SFlg_R1, SFlg_R2, -> SFlg_D, SFlg_C, SFlg_T, SFlg_B, RFlg_L, SFlg_R3)* -> -> *)unpiv* -> -> *where RST_DATE is not null* -> -> *order by SAMP_ID, RST_DATE* - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    LQMSTMS-30iNotes
    patres.TypeNot availablePatient/Rerun
    patres.ResultIDNot availablePrimary Key. Terisi otomatis di CLQMS
    patres.EquipmentIDNot availableDiisi dengan s/n alat
    patres.SampleIDSAMP_IDSampleID
    patres. AspCntASP_CNT
    patres.TestTechCodeITEM_NAME
    patres.ResultCONC_DATA
    patres.SampleTypeNot available
    patres.ResultDateTimeRST_DATE
    patres.ValNot availableTerisi UserID yang melakukan validasi di LQMS
    patres.ValDateTimeNot availableTerisi UserID yang melakukan validasi di LQMS
    patres.CreateDateNot availableTerisi dengan waktu saat record terekam di database LQMS
    patrestech.RestechIDNot availablePrimary Key. Terisi otomatis di CLQMS
    patrestech.ResultIDNot availableForeign Key dari patres.ResultID
    patrestech.DBField
      -
    • Flag

    • -
    • ReactionNo

    • -
    • OD_DATA

    • -
    • DIL_ORD

    • -
    patrestech.DBValue<Nilai dari DBField>
    patrestech.CreateDateNot availableTerisi dengan waktu saat record terekam di database LQMS
    - - ------------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Patres.

    -

    ResultID

    patres.

    -

    SampleID

    patres.

    -

    TestTechCode

    patres.

    -

    AspCnt

    patres.

    -

    Result

    patres.

    -

    ResultDateTime

    SAMP_IDITEM_NAMEASP_CNTCONC_DATAOD_DATARST_DATEFlagReactionNoDIL_ORD
    12402296034SCREA10.8036860.030162024-03-01 13:30:39.500NULL476230
    22402296035SCHOL1215.17320.3864282024-03-01 13:30:52.840NULL476240
    32402296035SLDL1157.87660.3777532024-03-01 13:31:06.150NULL476250
    42402296035SHDL159.352030.0962212024-03-01 13:31:19.510NULL476260
    52402296035STRIG159.696170.1954392024-03-01 13:31:32.867NULL476270
    ignored2402296035SUREUM127.87867-0.039782024-03-01 13:31:46.200NULL476280
    62402296035SUREUM127.87867-0.039782024-03-01 13:31:46.200PFlg_C476280
    72402296035SCREA10.7037910.027342024-03-01 13:32:26.203NULL476290
    82402296035SUREA -N112.4881802024-03-01 13:50:12.967NULL00
    92402296035SUREUM126.72469-0.038152024-03-01 13:50:12.967NULL476720
    - - ------ - - - - - - - - - - - - - - - - - - - - - - -

    patresflag.

    -

    ResflagID

    patresflag.

    -

    ResultID

    patresflag.

    -

    Flag

    patresflag.

    -

    CreateDate

    FlagRST_DATE
    16PFlg_C2024-03-01 13:31:46.200
    - - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    patrestech.

    -

    RestechID

    patrestech.

    -

    ResultID

    patrestech.

    -

    DBField

    patrestech.

    -

    DBValue

    patrestech.

    -

    CreateDate

    RST_DATE
    11OD_DATA0.030162024-03-01 13:30:39.500
    21ReactionNo476232024-03-01 13:30:39.500
    31DIL_ORD02024-03-01 13:30:39.500
    42OD_DATA0.3864282024-03-01 13:30:52.840
    52ReactionNo476242024-03-01 13:30:52.840
    62DIL_ORD02024-03-01 13:30:52.840
    73OD_DATA0.3777532024-03-01 13:31:06.150
    83ReactionNo476252024-03-01 13:31:06.150
    93DIL_ORD02024-03-01 13:31:06.150
    104OD_DATA0.0962212024-03-01 13:31:19.510
    114ReactionNo476262024-03-01 13:31:19.510
    124DIL_ORD02024-03-01 13:31:19.510
    135OD_DATA0.1954392024-03-01 13:31:32.867
    145ReactionNo476272024-03-01 13:31:32.867
    155DIL_ORD02024-03-01 13:31:32.867
    166OD_DATA-0.039782024-03-01 13:31:46.200
    176ReactionNo476282024-03-01 13:31:46.200
    186DIL_ORD02024-03-01 13:31:46.200
    197OD_DATA0.027342024-03-01 13:32:26.203
    207ReactionNo476292024-03-01 13:32:26.203
    217DIL_ORD02024-03-01 13:32:26.203
    228OD_DATA02024-03-01 13:50:12.967
    238ReactionNo02024-03-01 13:50:12.967
    248DIL_ORD02024-03-01 13:50:12.967
    259OD_DATA-0.038152024-03-01 13:50:12.967
    269ReactionNo476722024-03-01 13:50:12.967
    279DIL_ORD02024-03-01 13:50:12.967
    - -### Calibration Factor {#calibration-factor} - -SQL scripts untuk TMS-30i terdiri dari 3, yaitu: - -#### Calibration dan Calibration Factor - -> Perhitungan *calibration factor* pada TMS-30i adalah sebagai berikut: -> -> Factor = -> $\frac{CalibFactorConc2\ - \ CalibFactorConc1}{CalibFactorAbs2\ - \ CalibFactorAbs1}$ -> -> Dimana: -> -> CalibFactorConc2 : nilai Concentration dari table caldatinst dimana -> Level = 2 -> -> CalibFactorConc1 : nilai Concentration dari table caldatinst dimana -> Level = 1 -> -> CalibFactorAbs2 : nilai Result dari table caldatinst Dimana Level = 2 -> -> CalibFactorAbs1 : nilai Result dari table caldatinst Dimana Level = 1 -> -> Keempat nilai harus pada records dimana TestInstID2, SampleType yang -> sama dan CalDate di tanggal, jam dan menit yang sama. - -#### Quality Control - -> *select distinct IPN.ITEM_NO, IPN.ITEM_NAME as \[TestTechCode\], -> MS.StringData as \[SampleType\], CH.RunDate as \[QCDate\], -> CH.ControlID as \[InstCtrlID\], CN.Name as \[InstCtrlName\], -> CH.Result, CH.LotNo, CP.MEAN, CP.SD* -> -> *from ControlHistory CH* -> -> *inner join ITEMPARA_NAME IPN on CH.ItemNo = IPN.ITEM_NO* -> -> *inner join CTRLNAME CN on CH.LotNo = CN.LotNo* -> -> *inner join MasSampleType MST on CN.SampleType = \[INDEX\]* -> -> *inner join MasString MS on MST.StringID = MS.StringID* -> -> *left join CTRLPARA CP on CH.ItemNo = CP.ITEM_NO and -> CH.ControlID=CP.CTRL_NO and CH.LotNo=CP.LotNo* -> -> *where MS.LanguageID = \'1\'* -> -> *order by IPN.ITEM_NAME* - -#### Patient Result - -> *select distinct SAMP_ID, ITEM_NAME, ASP_CNT, CONC_DATA, OD_DATA, -> RST_DATE,* -> -> *Flag = case* -> -> *when flagvalue=0 then null* -> -> *else Flag* -> -> *end,ReactionNo,DIL_ORD* -> -> *from* -> -> *(select -> s.SAMP_ID,s.ASP_CNT,s.ITEM_NO,IPN.ITEM_NAME,s.CONC_DATA,s.OD_DATA,s.ReactionNo,s.RST_DATE,s.DIL_ORD,* -> -> *s.PFlg_C,s.PFlg_E,s.PFlg_L,s.PFlg_P,s.PFlg_B,s.PFlg_G,s.PFlg_VL,s.PFlg_VH,s.PFlg_T,s.PFlg_W,s.PFlg_AB,s.SFlg_S,s.SFlg_R1,s.SFlg_R2,s.SFlg_D,s.SFlg_C,s.SFlg_T,s.SFlg_B,s.SFlg_R3,CAST(s.RFlg_L -> as bit) RFlg_L,CAST(s.RFlg_H as bit) RFlg_H* -> -> *from SAMP_DAT s inner join ITEMPARA_NAME IPN on s.ITEM_NO -> =IPN.ITEM_NO* -> -> *)a* -> -> *unpivot* -> -> *(flagvalue for Flag -> in(PFlg_C,PFlg_E,PFlg_L,PFlg_P,PFlg_B,PFlg_G,PFlg_VL,PFlg_VH,PFlg_T,PFlg_W,PFlg_AB,SFlg_S,SFlg_R1,SFlg_R2,SFlg_D -> ,SFlg_C,SFlg_T,SFlg_B,RFlg_L,SFlg_R3)* -> -> *)unpiv* -> -> *where RST_DATE is not null* -> -> *order by SAMP_ID, RST_DATE* - -### Flags {#flags} - -TMS-30i flags, yaitu: - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FlagTextDescription
    PFlg_CCCell blank Abs. of main, sub or both wavelengths is lower than check -level 1 or higher than check level 3.
    PFlg_EEFor END point assay, Cell blank subtracted Abs. of main wavelength, -is higher than set [Endpoint Limit].
    PFlg_LL

    For RATE assay,

    -

    The main reading point is above 3 points, and reaction Abs. of main -reading per minute exceeds [Linearity check %] value.

    -
      -
    • No linearity check is done if the main reading points are not -more than three points.

    • -
    • Linearity check value is set above zero.

    • -
    • The check value calculated by using points where Abs. of main -measurement interval are within the Abs. limit.

    • -
    • If the Abs. in the limit is less than 2 points, the check value -is calculated by using all the points.

    • -
    PFlg_PP

    The check value exceeds limit % of high limit or

    -

    low limit

    -

    No Prozone check is done when the

    -

    minimum Abs. of average and variation is

    -

    lower than the set value.

    -

    No Prozone check is done if the slope value

    -

    of the first interval is zero.

    -

    No Prozone check is done if the minimum

    -

    Abs. of average and slope are not set.

    -

    Please input “0” to minimum Abs. of

    -

    average if the Prozone check is required

    -

    without setting.

    PFlg_BB

    For RATE assay,

    -

    The Abs. of main wavelength in main reading is

    -

    lower than [Absorbance limit], at three points

    -

    from first measuring points.

    -

    (Measuring range is used when the reading

    -

    point less than 2 points)

    -

    Sensitivity range error, for HbA1c Item No. 106.

    -

    Concentration of Hb or A1c is below than

    -

    setting value.

    -

    Selection of gender is essential in order

    -

    entry.

    -

    It is not judged when the gender field is

    -

    blank (not selected) or unknown is selected.

    PFlg_GG
    PFlg_VL<
    PFlg_VH>
    PFlg_TT
    PFlg_WW
    PFlg_ABAB
    SFlg_S
    SFlg_R1
    SFlg_R2
    SFlg_D
    SFlg_C
    SFlg_T
    SFlg_B
    - -## Lampiran 3: TMS-24i - -### Calibration Results SQL Scripts and Data Mapping - -> *select cd.ItemName as \[TestTechCode\], MS.StringData as -> \[SampleType\], cd.RDATE as \[CalDate\], cd.TrayNo, cd.PosNo, -> CP.STD_NO as \[Level\], /\*C.BLK_ORDER,\*/ CP.CONC as -> \[Concentration\], cd.Result, cd.IsTotal, cd.LotNo, CP.ASP* -> -> *from caldata cd* -> -> *inner join MasSampleType MST on cd.SampleType = \[INDEX\]* -> -> *inner join MasString MS on MST.StringID = MS.StringID* -> -> *left join ITEMPARA_NAME IPN on cd.ItemNo = IPN.ITEM_NO* -> -> *left join CALIB_POSITION CP on cd.ItemNo = CP.ITEM_NO and cd.PosNo = -> CP.POS_NO* -> -> *where MS.LanguageID = \'1\'* -> -> *order by cd.RDATE* - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    LQMSTMS-30iNotes
    calparinst.CalParInstID<auto numbering>
    calparinst.EquipmentID
    calparinst.Calibrator
    calparinst.LotNo
    calparinst.ExpiryDate
    calparinst.TestInstID1ITEM_NAME
    calparinst.SampleTypeSAMP_TYPE
    calparinst.Level
    calparinst.Concentration
    calparinst.CalUnit
    calparinst.CreateDateRDATE
    calresinst.CalRestIDNot availablePrimary Key. Terisi otomatis di CLQMS
    calresinst.EquipmentIDNot availableDiisi dengan s/n alat, ada di ini. file
    calresinst.InstCalID
    calresinst.InstCalNameF2^<TrayNo>^<PosNo>^<Level>
    calresinst.TestTechCodeTestTechCode
    calresinst.SampleTypeSampleType
    calresinst.CalDateCalDate
    calresinst.LevelLevel
    calresinst.BlankNot available
    calresinst.ConcentrationConcentration
    calresinst.ResultResult
    calresinst.ResultUnit<diisi text ‘OD’>berasal dari ini file.
    calresinst.IsTotalIsTotal

    Untuk menghitung:

    -
      -
    • jumlah total tes yang digunakan untuk kalibrasi, count semua -record dg IsTotal=0.

    • -
    • Factor kalibrasi, gunakan records dg -IsTotal=1.

    • -
    calresinst.LotNoLotNo
    calresinst.AspirationASP
    calresinst.Val<null>
    calresinst.ValDateTime<null>
    - -### QC Results SQL Scripts and Data Mapping - -> *select distinct IPN.ITEM_NO, IPN.ITEM_NAME as \[TestTechCode\], -> MS.StringData as \[SampleType\], CH.RunDate as \[QCDate\], -> CH.ControlID as \[InstCtrlID\], CN.Name as \[InstCtrlName\], -> CH.Result, CH.LotNo, CP.MEAN, CP.SD* -> -> *from ControlHistory CH* -> -> *inner join ITEMPARA_NAME IPN on CH.ItemNo = IPN.ITEM_NO* -> -> *inner join CTRLNAME CN on CH.LotNo = CN.LotNo* -> -> *inner join MasSampleType MST on CN.SampleType = \[INDEX\]* -> -> *inner join MasString MS on MST.StringID = MS.StringID* -> -> *left join CTRLPARA CP on CH.ItemNo = CP.ITEM_NO and -> CH.ControlID=CP.CTRL_NO and CH.LotNo=CP.LotNo* -> -> *where MS.LanguageID = \'1\'* -> -> *order by IPN.ITEM_NAME* - -| **LQMS** | **TMS-30i** | **Notes** | -|-------------------------|---------------|----------------------------------------------------------| -| qcrestinst.QCRestID | Not available | **Primary Key. Terisi otomatis di CLQMS** | -| qcrestinst.EquipmentID | Not available | Diisi dengan s/n alat, ada di ini. file | -| qcrestinst.InstCtrlID | InstCtrlID | | -| qcrestinst.InstCtrlName | InstCtrlName | | -| qcrestinst.TestTechCode | TestTechCode | | -| qcrestinst.SampleType | SampleType | | -| qcrestinst.QCDate | QCDate | | -| qcrestinst.Result | Result | | -| qcrestinst.ResultUnit | Not available | | -| qcrestinst.LotNo | LotNo | | -| qcrestinst.Val | Not available | | -| qcrestinst.ValDateTime | Not available | | -| qcrestinst.CreateDate | Not available | Terisi dengan waktu saat record terekam di database LQMS | - -### Patient Results SQL Scripts and Data Mapping - -> *select distinct SAMP_ID, ITEM_NAME, ASP_CNT, CONC_DATA, OD_DATA, -> RST_DATE,* -> -> *Flag = case* -> -> *when flagvalue=0 then null* -> -> *else Flag* -> -> *end, ReactionNo, DIL_ORD* -> -> *from* -> -> *(select s.SAMP_ID, s.ASP_CNT, s.ITEM_NO, IPN.ITEM_NAME, s.CONC_DATA, -> s.OD_DATA, s.ReactionNo, s.RST_DATE, s.DIL_ORD, s.PFlg_C, s.PFlg_E, -> s.PFlg_L, s.PFlg_P, s.PFlg_B, s.PFlg_G, s.PFlg_VL, s.PFlg_VH, -> s.PFlg_T, s.PFlg_W, s.PFlg_AB, s.SFlg_S, s.SFlg_R1, s.SFlg_R2, -> s.SFlg_D, s.SFlg_C, s.SFlg_T, s.SFlg_B, s.SFlg_R3, CAST(s.RFlg_L as -> bit) RFlg_L, CAST(s.RFlg_H as bit) RFlg_H* -> -> *from SAMP_DAT s inner join ITEMPARA_NAME IPN on s.ITEM_NO -> =IPN.ITEM_NO* -> -> *)a* -> -> *unpivot* -> -> *(flagvalue for Flag in(PFlg_C,PFlg_E, PFlg_L, PFlg_P, PFlg_B, PFlg_G, -> PFlg_VL, PFlg_VH, PFlg_T, PFlg_W, PFlg_AB, SFlg_S, SFlg_R1, SFlg_R2, -> SFlg_D, SFlg_C, SFlg_T, SFlg_B, RFlg_L, SFlg_R3)* -> -> *)unpiv* -> -> *where RST_DATE is not null* -> -> *order by SAMP_ID, RST_DATE* - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    LQMSTMS-30iNotes
    patres.TypeNot availablePatient/Rerun
    patres.ResultIDNot availablePrimary Key. Terisi otomatis di CLQMS
    patres.EquipmentIDNot availableDiisi dengan s/n alat
    patres.SampleIDSAMP_IDSampleID
    patres. AspCntASP_CNT
    patres.TestTechCodeITEM_NAME
    patres.ResultCONC_DATA
    patres.SampleTypeNot available
    patres.ResultDateTimeRST_DATE
    patres.ValNot availableTerisi UserID yang melakukan validasi di LQMS
    patres.ValDateTimeNot availableTerisi UserID yang melakukan validasi di LQMS
    patres.CreateDateNot availableTerisi dengan waktu saat record terekam di database LQMS
    patrestech.RestechIDNot availablePrimary Key. Terisi otomatis di CLQMS
    patrestech.ResultIDNot availableForeign Key dari patres.ResultID
    patrestech.DBField
      -
    • Flag

    • -
    • ReactionNo

    • -
    • OD_DATA

    • -
    • DIL_ORD

    • -
    patrestech.DBValue<Nilai dari DBField>
    patrestech.CreateDateNot availableTerisi dengan waktu saat record terekam di database LQMS
    - -## Lampiran 4: File-based Integration - -![](media/image21.png){width="6.8in" height="1.773611111111111in"} - - ----- - - - - - - - - - - - - - - - - - - - -
    Communication App. (server side)TunnelCommunication App. (client side)
      -
    • Mampu mengelola multiple client connection -secara bersamaan pada saat yang sama (multi thread).

    • -
    • Connect to host database

    • -
    • Menerima data dari client side

    • -
    • Decrypt data

    • -
    • Save data to host database

    • -
    • Memiliki mekanisme menjaga data integrity -(checksum, hash, dll).

    • -
    • Windows service (running in background, tidak -memerlukan user interaction).

    • -
    • Memiliki log.

    • -
    Virtual Private Network
      -
    • Read file ke shared folder secara -berkala.

    • -
    • Ubah data ke encrypted JSON

    • -
    • Kirim encrypted JSON ke server via VPN.

    • -
    • Setting periode baca shared folder.

    • -
    • Memiliki mekanisme menjaga data integrity -(checksum, hash, dll).

    • -
    • Windows service 1(running in -background, tidak memerlukan user interaction).

    • -
    • Memiliki log.

    • -
    - - -## Lampiran 5: File-based Integration SES - -Setiap pencatatan barang masuk, pindah counter atau keluar, SES membuat -sepasang file text. - - ----- - - - - - - - - - - - - - - - - - - - - - - - - -
    EventFilesFormat Data
    Terima barang
      -
    • yyyymmddxxxx.tr

    • -
    • yyyymmddxxxx.ok

    • -

    No.Bukti:TR24040336

    -

    Tgl:20240404

    -

    Vendor:<kode vendor>^ DELTASINDO RAYA SEJAHTERA

    -

    Keterangan:

    -

    Tgl_Terima:20240404111800

    -

    Penerima: ASEP

    -

    Item_1_0107/PO/SUMMIT-INV/IV/024^301002^<expdate>^6015560324^1^UNIT

    -

    Item_2_0107/PO/SUMMIT-INV/IV/024^80001^<expdate>^<batch>^1^UNIT

    -

    Item_3_0107/PO/SUMMIT-INV/IV/024^40000U-UPS -EATON^<expdate>^GG123A0816^1^UNIT

    -

    Dst

    Pindah counter
      -
    • yyyymmddxxxx.kc

    • -
    • yyyymmddxxxx.ok

    • -

    No.Bukti_Pengirim:KC24040332

    -

    No.Bukti_Pemohon:RC24040137

    -

    TglKirim:20240404

    -

    TglMohon:20240404

    -

    CounterAsal:0000^PUSAT - ASEP

    -

    CounterTujuan:0008^SEMARANG - (MARIA)

    -

    Keterangan:

    -

    Item_1_SO240402740^301002^<expdate>^6015560324^1^UNIT

    -

    Item_2_SO240402740^80001^<expdate>^<batch>^1^UNIT

    -

    Item_3_SO240402740^40000U-UPS -EATON^<expdate>^GG123A0816^1^UNIT

    -

    dst

    Kirim barang (ke customer)
      -
    • yyyymmddxxxx.sj

    • -
    • yyyymmddxxxx.ok

    • -

    No.Bukti:SJ240402914

    -

    Tgl:20240404

    -

    Customer:<kode customer>^ANUGRAH PRAKARSA UTAMA

    -

    No.KSO:KSO24030025

    -

    Sales:<kode sales>^SUSILO PUJININGSIH

    -

    Keterangan:

    -

    Kirim:SCAN ME LAB

    -

    Branch:01^PUSAT

    -

    Counter:<kode counter>^PUSAT - ASEP

    -

    AlamatKirim:RUKO GADING NIAS …

    -

    Jenis:<KSO/CPRR/JUAL>

    -

    Item_1_SO240402740^301002^<expdate>^6015560324^1^UNIT

    -

    Item_2_SO240402740^80001^<expdate>^<batch>^1^UNIT

    -

    Item_3_SO240402740^40000U-UPS -EATON^<expdate>^GG123A0816^1^UNIT

    -

    dst

    - -File dengan extension .tr, .kc dan .sj adalah file text yang berisi data -sesuai format. - -File .ok adalah file text kosong sebagai penanda bahwa file yang berisi -data siap untuk dibaca. - -yyyy : tahun - -mm : bulan - -dd : tanggal - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    EventFilesFormat Data
    Update master vendor
      -
    • yyyymmddxxxx.vd

    • -
    • yyyymmddxxxx.ok

    • -

    No.Bukti:TR24040336

    -

    Tgl:20240404

    -

    Vendor:<kode vendor>^ DELTASINDO RAYA SEJAHTERA

    -

    Keterangan:

    -

    Tgl_Terima:20240404111800

    -

    Penerima: ASEP

    -

    Item_1_0107/PO/SUMMIT-INV/IV/024^301002^<expdate>^6015560324^1^UNIT

    -

    Item_2_0107/PO/SUMMIT-INV/IV/024^80001^<expdate>^<batch>^1^UNIT

    -

    Item_3_0107/PO/SUMMIT-INV/IV/024^40000U-UPS -EATON^<expdate>^GG123A0816^1^UNIT

    -

    Dst

    Update master product
      -
    • yyyymmddxxxx.pd

    • -
    • yyyymmddxxxx.ok

    • -
    Update master customer
      -
    • yyyymmddxxxx.cs

    • -
    • yyyymmddxxxx.ok

    • -
    Update master user
      -
    • yyyymmddxxxx.us

    • -
    • yyyymmddxxxx.ok

    • -
    - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Event: Terima barangTable: Product
    DataFieldValue
    ProductID<auto number>
    No.Bukti:TR24040336ReferenceTR24040336
    Penerima: ASEPUserIDSES^ASEP
    Tgl:20240404LogDate20240404
    Vendor:<kode vendor>^ DELTASINDO RAYA SEJAHTERA
    Keterangan:
    SiteIDSUMMIT
    Tgl_Terima:20240404111800LocationStartDate20240404111800
    Item_1_0107/PO/SUMMIT-INV/IV/024^301002^<expdate>^6015560324^1^UNIT

    CatalogID

    -

    ProductNumber

    301002

    -

    6015560324

    ActiveNo
    OwnerSUMMIT
    Status_serviceGaransi
    ProductID<auto number>
    ReferenceTR24040336
    UserIDSES^ASEP
    LogDate20240404
    SiteIDSUMMIT
    LocationStartDate20240404111800
    Item_2_0107/PO/SUMMIT-INV/IV/024^40000U-UPS -EATON^<expdate>^GG123A0816^1^UNIT

    CatalogID

    -

    ProductNumber

    40000U-UPS EATON

    -

    GG123A0816

    ActiveNo
    OwnerSUMMIT
    Status_serviceGaransi
    - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Event: Kirim barang (ke customer)Table: Product
    DataFieldValue
    ProductID<auto number>
    No.Bukti: SJ240402914ReferenceSJ240402914
    Tgl:20240404LogDate20240404
    Customer:<kode customer>^ANUGRAH PRAKARSA UTAMA
    No.KSO:KSO24030025
    Sales:<kode sales>^SUSILO PUJININGSIH
    Keterangan:
    Kirim:SCAN ME LAB
    Branch:01^PUSAT

    Counter:<kode counter>^PUSAT - ASEP

    -

    AlamatKirim:RUKO GADING NIAS …

    -

    Jenis:<KSO/CPRR/JUAL>

    -

    Item_1_SO240402740^301002^<expdate>^6015560324^1^UNIT

    -

    Item_2_SO240402740^80001^<expdate>^<batch>^1^UNIT

    -

    Item_3_SO240402740^40000U-UPS -EATON^<expdate>^GG123A0816^1^UNIT

    Tgl_Terima:20240404111800LocationStartDate20240404111800

    Item_1_0107/PO/SUMMIT-INV/IV/024^301002^<expdate>^6015560324^1^UNIT

    -

    Item_2_0107/PO/SUMMIT-INV/IV/024^40000U-UPS -EATON^<expdate>^GG123A0816^1^UNIT

    CatalogID

    -

    ProductNumber

    301002

    -

    6015560324

    Tgl:20240404

    -

    Customer:<kode customer>^ANUGRAH PRAKARSA UTAMA

    -

    No.KSO:KSO24030025

    -

    Sales:<kode sales>^SUSILO PUJININGSIH

    -

    Keterangan:

    -

    Kirim:SCAN ME LAB

    -

    No.Bukti:SJ240402914

    -

    Tgl:20240404

    -

    Customer:<kode customer>^ANUGRAH PRAKARSA -UTAMA

    -

    No.KSO:KSO24030025

    -

    Sales:<kode sales>^SUSILO PUJININGSIH

    -

    Keterangan:

    -

    Kirim:SCAN ME LAB

    -

    Branch:01^PUSAT

    -

    Counter:<kode counter>^PUSAT - ASEP

    -

    AlamatKirim:RUKO GADING NIAS …

    -

    Jenis:<KSO/CPRR/JUAL>

    -

    Item_1_SO240402740^301002^<expdate>^6015560324^1^UNIT

    -

    Item_2_SO240402740^80001^<expdate>^<batch>^1^UNIT

    -

    Item_3_SO240402740^40000U-UPS -EATON^<expdate>^GG123A0816^1^UNIT

    UserIDASEP
    Event: Pindah counter
    DataFieldValue

    No.Bukti_Pengirim:KC24040332

    -

    No.Bukti_Pemohon:RC24040137

    -

    TglKirim:20240404

    -

    TglMohon:20240404

    -

    CounterAsal:0000^PUSAT - ASEP

    -

    CounterTujuan:0008^SEMARANG - (MARIA)

    -

    Keterangan:

    -

    Item_1_SO240402740^301002^<expdate>^6015560324^1^UNIT

    -

    Item_2_SO240402740^80001^<expdate>^<batch>^1^UNIT

    -

    Item_3_SO240402740^40000U-UPS -EATON^<expdate>^GG123A0816^1^UNIT

    -

    dst

    DataFieldValue
    - -## Lampiran 6: SES Screens - -![](media/image22.jpeg){width="6.0in" height="3.0036767279090113in"} - -Gambar Penerimaan Product - -![](media/image23.jpeg){width="6.0in" height="4.208825459317585in"} - -Gambar Permintaan Kirim Counter - -![](media/image24.jpeg){width="6.0in" height="3.741174540682415in"} - -Gambar Kirim Counter - -![](media/image25.jpeg){width="6.0in" height="3.2224245406824146in"} - -Gambar Surat Jalan - -## - -## Lampiran 7: Clinical Laboratory Activity - - -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ActivityIDActivity NameActivity DescriptionStandardDetail Activity/TaskOutcome
    AP001Patient Registration – electronicMenandakan bahwa pasien telah tiba atau check-in sebagai -pasien rawat jalan/inap satu kali atau berulang dan tidak ditempatkan di -lokasi spesifik (bed). Contohnya adalah penggunaannya sebagai -tanda dimulainya kunjungan ke Ruang Gawat Darurat (= Korban, dll.) -dicatat sebagai pendaftaran rawat jalan atau penerimaan darurat.HL7 – Event A04
      -
    • Receive data from host

    • -
    • Check & compare with existing database

    • -
      -
    • Patient record added.

    • -
    • Raise error, notify host.

    • -
    AP002Patient Registration - manualidem
      -
    • Input patient data

    • -
    • Check & compare with existing database.

    • -
    • Save

    • -
      -
    • Patient record added.

    • -
    • Raise error, notify user.

    • -
    AP003Update Patient Information - electronicMisalnya perubahan nama pasien atau alamat.HL7 - Event A08
      -
    • Receive update data from host

    • -
    • Check & compare with existing database

    • -
      -
    • Patient record updated.

    • -
    • Raise error, notify host.

    • -
    AP004Update Patient Information - manualidem
      -
    • Select patient

    • -
    • Update patient information

    • -
    • Check & compare with existing database.

    • -
    • Save

    • -
      -
    • Patient record updated.

    • -
    • Raise error, notify user.

    • -
    AP005Patient Admission - electronicPenerimaan pasien, hingga penempatannya di lokasi speisifik -(bed). Menandakan dimulainya masa tinggal pasien di -fasyankes.HL7 - Event A01
      -
    • Receive admission from host

    • -
    • Check & compare with existing database.

    • -
      -
    • Patient admitted, visit number recorded.

    • -
    • Raise error, notify host.

    • -
    AP006Patient Admission - manualidem
      -
    • Select patient

    • -
    • Admit patient

    • -
    • Check & compare with existing database.

    • -
    • Save

    • -
      -
    • Patient admitted, visit number recorded.

    • -
    • Raise error, notify user.

    • -
    AP007Patient Transfer – electronicPerubahan lokasi fisik pasien. Misalnya dari UGD ke Rawat Inap.HL7 – Event A02
      -
    • Receive transfer from host

    • -
    • Check & compare with existing database.

    • -
      -
    • Patient transferred.

    • -
    • Raise error, notify host.

    • -
    AP008Patient Transfer - manualidem
      -
    • Select patient

    • -
    • Transfer patient

    • -
    • Check & compare with existing database.

    • -
    • Save

    • -
      -
    • Patient transferred.

    • -
    • Raise error, notify user.

    • -
    AP009Patient Discharge – electronicMenandakan berakhirnya masa tinggal pasien di fasyankes Ini -menandakan bahwa status pasien telah berubah menjadi “boleh pulang” dan -tanggal pulang dicatat. Pasien tidak lagi berada di fasyankes.HL7 – Event A03
      -
    • Receive discharge from host

    • -
    • Check & compare with existing database.

    • -
      -
    • Patient discharged.

    • -
    • Raise error, notify host.

    • -
    AP010Patient Discharge – manualidem
      -
    • Select patient

    • -
    • Discharge patient

    • -
    • Check & compare with existing database.

    • -
    • Save

    • -
      -
    • Patient discharged.

    • -
    • Raise error, notify user.

    • -
    AP011Cancel Patient Admission - electronicMembatalkan admissionHL7 – Event A11
      -
    • Receive cancel admission from host

    • -
      -
    • Admission cancelled.

    • -
    • Raise error, notify host.

    • -
    AP012Cancel Patient Admission - manualIdem
      -
    • Select patient

    • -
    • Cancel admission.

    • -
    • Save

    • -
      -
    • Admission cancelled.

    • -
    • Raise error, notify user.

    • -
    AP013Cancel Patient Transfer – electronicMembatalkan transferHL7 – Event A12
      -
    • Receive cancel transfer from host

    • -
      -
    • Transfer cancelled.

    • -
    • Raise error, notify host.

    • -
    AP014Cancel Patient Transfer – manualidem
      -
    • Select patient

    • -
    • Cancel transfer.

    • -
    • Save

    • -
      -
    • Transfer cancelled.

    • -
    • Raise error, notify user.

    • -
    AP015Cancel Patient Discharge – electronicMembatalkan dischargeHL7 – Event A13
      -
    • Receive cancel discharge from host

    • -
      -
    • Discharge cancelled.

    • -
    • Raise error, notify host.

    • -
    AP016Cancel Patient Discharge – manualidem
      -
    • Select patient

    • -
    • Cancel Discharge.

    • -
    • Save

    • -
      -
    • Discharge cancelled.

    • -
    • Raise error, notify user.

    • -
    AP017Delete Patient Record – electronicMenghapus informasi spesifik kunjungan/ visit/ -episode dari catatan pasien.HL7 – Event A23
      -
    • Receive patient visit record deletion from host.

    • -
    • Check for existing patient visit record

    • -
    • Check for order belong to visit record

    • -
      -
    • Patient record deleted.

    • -
    • Raise warning if visit record has order record

    • -
    • Raise error, notify host.

    • -
    AP018Delete Patient Record – manualidem
      -
    • Select visit record.

    • -
    • Check for existing patient visit record

    • -
    • Check for order belong to visit record

    • -
      -
    • Patient record deleted.

    • -
    • Raise warning if visit record has order record

    • -
    • Raise error, notify user.

    • -
    AP020Link Patient Information – electronicEvent A24 digunakan ketika segmen PID pertama perlu -dihubungkan ke segmen PID kedua dan ketika kedua patient -identifier mengidentifikasi pasien yang sama. Menghubungkan dua -atau lebih pasien tidak memerlukan penggabungan informasi pasien yang -sebenarnya; setelah link event, record data pasien -yang terpengaruh harus tetap berbeda. Aplikasinya adalah di lingkungan -jaringan rumah sakit yang record pasien-nya perlu dihubungkan. -Misalnya, rumah sakit A, rumah sakit B, dan rumah sakit C masing-masing -akan menyimpan catatan pasiennya sendiri, namun link event A24 -akan dikirim ke MPI seluruh perusahaan untuk memungkinkan penggabungan -informasi ID dengan nomor ID perusahaan. Digunakan untuk penyimpanan -data perusahaan, dll. Activity ini tidak dimaksudkan untuk menghubungkan -ibu dan bayi.HL7 – Event A24
      -
    • Receive link from host

    • -
    • Check if there are other links

    • -
      -
    • Patient records linked.

    • -
    • Raise error, notify host.

    • -
    AP021Link Patient Information – manualidem
      -
    • Select source & destination patient record.

    • -
    • Link source to destination.

    • -
    • Save

    • -
      -
    • Patient records linked.

    • -
    • Raise error, notify user.

    • -
    AP022Unlink Patient Information – electronicMembatalkan link Patient InformationHL7 – Event A37
      -
    • Receive unlink from host

    • -
    • Check if the link exists

    • -
    • Unlink patient records

    • -
      -
    • Patient records unlinked.

    • -
    • Raise error, notify host.

    • -
    AP023Unlink Patient Information – manualMembatalkan link Patient Information
      -
    • Select source & destination patient record.

    • -
    • Unlink source from destination.

    • -
    • Save

    • -
      -
    • Patient records unlinked.

    • -
    • Raise error, notify user.

    • -
    AP016Merge Patient RecordMenggabungkan satu atau lebih record pasienHL7 – Event A40
    AO001Test Order - electronicOrder test baru dari hostHL7 – Event O01
      -
    • Receive test order from host

    • -
    • Check for existing order number

    • -
      -
    • New order created

    • -
    • Record of required specimen container created.

    • -
    • Specimen label printed

    • -
    • Raise error, notify host

    • -
    AO003Additional test order - electronicTambahan test ke order yang telah ada
      -
    • Receive additional test order

    • -
    • Check for existing order number

    • -
    • Check if additional specimen container needed

    • -
      -
    • Additional tests added

    • -
    • Additional specimen container added (if needed)

    • -
    • Additional specimen label printed (if needed)

    • -
    • Raise error, notify host

    • -
    AO005Deletion test order - electronicMenghapus satu atau beberapa test dalam satu order
      -
    • Receive deletion test order

    • -
    • Check for existing order number

    • -
    • Check for test status

    • -
      -
    • Tests deleted

    • -
    • Raise warning that tests already processed

    • -
    • Raise error, notify host

    • -
    AO007Update order - electronicPerubahan doctor, location, priority, -notes.
      -
    • Receive update order

    • -
    • Check for existing order number

    • -
      -
    • Order is updated

    • -
    • Raise error, notify host.

    • -
    AO002Test Order - manualMembuat test order baru
      -
    • Select patient

    • -
    • Select clinical indication

    • -
    • Select priority

    • -
    • Select tests

    • -
    • Input order note/instruction

    • -
    • Save

    • -
      -
    • New order created

    • -
    • Record of required specimen container created.

    • -
    • Specimen label printed

    • -
    • Raise error, notify host

    • -
    AO004Additional test order - manualTambahan test ke order yang telah ada
      -
    • Select order

    • -
    • Add tests

    • -
    • Save

    • -
      -
    • Additional tests added

    • -
    • Additional specimen container added (if needed)

    • -
    • Additional specimen label printed (if needed)

    • -
    • Raise error, notify user

    • -
    AO006Deletion test order - manualMenghapus satu atau beberapa test dalam satu order
      -
    • Select order

    • -
    • Delete tests

    • -
    • Save

    • -
      -
    • Tests deleted

    • -
    • Raise warning that tests already processed

    • -
    • Raise error, notify user

    • -
    AO008Update order - manualPerubahan doctor, location, priority, -notes.
      -
    • Select order

    • -
    • Edit order

    • -
    • Save

    • -
      -
    • Order is updated

    • -
    • Raise error, notify user.

    • -
    AP017Patient VerificationProcedure to verify patient identity, verbally or based on formal ID -(bracelet, etc.)
      -
    • Select Patient

    • -
    • Verify Patient Identity

    • -
    AS001Specimen CollectionProsedur untuk mendapatkan darah, urine, satau sample lainnya yang -penting untuk mendapatkan hasil akurat. Termasuk labeling.
      -
    • Select single/multiple patient/order

    • -
    • Print Label (option) of single/multiple order.

    • -
    • Stick label onto every container

    • -
    • Scan label to change specimen status to “collected”

    • -
    • Record non-conformity (if any)

    • -
      -
    • Specimen collected status

    • -
    • Notification of specimen status sent to host.

    • -
    • Raise warning if specimen collection failed or does not meet -criteria

    • -
    • non-conformity recorded (if any)

    • -
    • Raise error, notify user

    • -
    AS002Specimen TransportTermasuk penyimpanan, dan transportasi dg cara tertentu untuk -mencegah kontaminasi atau kerusakan
      -
    • Store specimen

    • -
    • Transport specimen to lab

    • -
    • Packaging

    • -
    • package labeling

    • -
    • Transport

    • -
    • Documentation

    • -
    AS003Specimen ReceptionMenerima spesimen di suatu lokasi
      -
    • Inspect specimen

    • -
    • Scan specimen label to change specimen status to -“received”

    • -
    • Record non-conformity (if any)

    • -
      -
    • Specimen received status

    • -
    • Notification of specimen status sent to host.

    • -
    • Raise warning if specimen does not meet criteria

    • -
    • Raise error, notify user

    • -
    AS004Specimen PreparationPersiapan spesimen untuk fase analitik
      -
    • Specimen processing

    • -
    • Centrifugation

    • -
    • Aliquoting

    • -
    • Decanting1

    • -
    • print additional label for aliquot/decanting sample

    • -
    • Pre-treatment

    • -
      -
    • additional label printed

    • -
    • additional specimen record added.

    • -
    • Raise error, notify user

    • -
    AS005Specimen DispatchingTermasuk penyimpanan, dan transportasi ke lokasi geografis lain -(lab rujukan) dg cara tertentu untuk mencegah kontaminasi -atau kerusakan
      -
    • Packaging

    • -
    • package labeling

    • -
    • Transport

    • -
    • Documentation

    • -
    Order DispatchingDistribusi order ke setiap workstation hingga -instrument.
      -
    • Distribute order to workstations

    • -
    • Transmission to instruments (bi-directional)

    • -
    • Receiving Instrument Query

    • -
    • Transmit Request to Instruments

    • -
      -
    • Order available/accessible in workstation

    • -
    • Instrument query responded

    • -
    • Raise error, notify user

    • -
    BS001Analyze specimen – automaticAnalisis specimen menggunakan peralatan otomatis
      -
    • put specimen into analyzer

    • -
    • analyser scan every specimen ID

    • -
    • analyser send query message to LIS

    • -
    • analyser receive order message

    • -
    • analyse specimen

    • -
      -
    • Instrument query responded correctly

    • -
    • specimen status changed to “analyzing”

    • -
    • Raise error, notify user

    • -
    BS002Analyze specimen – manualAnalisis specimen
      -
    • -
      -
    • -
    Result AcquisitionPenerimaan hasil dari instrument
      -
    • Receive results from instruments

    • -
    • Automatic flagging

    • -
      -
    • correct results recorded in LIS

    • -
    • specimen status changed to “finish” when all tests -resulted.

    • -
    • Raise error, notify user

    • -
    Result Entry (manual)Mengisikan hasil manual
      -
    • User enter manual results

    • -
    • Automatic flagging

    • -
      -
    • result recorded.

    • -
    • specimen status changed to “finish” when all tests -resulted.

    • -
    • Raise error, notify user

    • -
    Test RerunTest rerun, baik otomatis maupun manual
      -
    • Send rerun message to instrument

    • -
    • instrument rerun

    • -
    • (go to Result Acquisition)

    • -
      -
    • Rerun transmitted.

    • -
    • specimen status changed to “rerun”.

    • -
    • Raise error, notify user

    • -
    Validation – Technical
      -
    • Technical validation

    • -
    • User trigger rerun

    • -
    • (go to Test Rerun)

    • -
      -
    • Technical validation recorded.

    • -
    • order status changed to “technical validated”.

    • -
    Validation – Clinical
      -
    • Clinical validation

    • -
    Report distributionR01/R21
      -
    • Transmit result to host

    • -
    • Transmit result to ref lab

    • -
    • Transmit result via 3rd party app

    • -
    • Print hardcopy

    • -
    • Print PDF file

    • -
    • Verbal report

    • -
    Specimen Storage (Specimen Reception)
      -
    • Scan specimen into storage location.

    • -
    QC Result Acquisition
      -
    • -
    QC Result Validation
      -
    • -
      -
    • -
      -
    • -
      -
    • -
    - - -## - -## Lampiran 8: Versions - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ElementsActivity/MenuTableV 1.00
    OrganizationAccount. Merepresentasikan organisasi – Perusahaan -swasta, BUMN, single lab, chain labs, dll.(dari CRM)
      -
    • -
    Sites. Berisi definisi lokasi geografis yang -bersifat fixed (yaitu laboratory site)(dari CRM)
      -
    • -
    Discipline. Bidang keahlian khusus dan bidang -ilmiah dalam kedokteran laboratorium, yang meliputi bidang-bidang -seperti mikrobiologi, hematologi, imunologi, kimia klinik, biologi -molekuler, histologi, sitologi, dll.
      -
    • discipline

    • -
    • department

    • -
      -
    • -
    Workstation. Tempat bekerja di dalam laboratorium -klinik. Biasanya spesifik untuk satu hal tertentu. Misalnya routine -hematology, coagulation, dll.workstation
      -
    • -
    Instrument. Adalah IVD instrument yang -digunakan untuk menghasilkan berbagai pengukuran diagnostic.
      -
    • ProductCatalog (dari CRM)

    • -
    • productcatalogext

    • -
    • Product (dari CRM)

    • -
    • productext

    • -
      -
    • -
    Location type. Yaitu definisi jenis Lokasi. -Misalnya: floor, point of care, room, -bed, mobile, remote, dll.locationtype
      -
    • -

    Location.

    -
      -
    • -

      Yaitu definisi lokasi dalam setiap site. Misalnya, ruangan di -Instalasi Rawat Inap, dll. Rawat Inap adalah Facility unit

      -
    • -
    • -

      Cascade 1dimungkinkan, misalnya Bed1, Bed2 -berada dalam ruang “VIP-A”. Keduanya terdefinisi dalam table -Location.

      -
    • -
    • Termasuk pengelolaan remote location, misalnya -sampling station, sampling site Medical Checkup, Home -Service, dll

    • -
    • Location address. Yaitu data alamat dari lokasi, -terutama remote location. Data ini penting untuk pengambilan -sample di luar fasyankes. Misalnya pada Home Service

    • -
      -
    • location

    • -
    • locationaddress

    • -
      -
    • -
    PersonnelRole
    Access control
    User
      -
    • User (dari CRM – u/ internal)

    • -
    • Contact (dari CRM – u/ end user)

    • -
    Login dialog
    Activity recording
    EquipmentMaster – Equipment
      -
    • Product (dari CRM)

    • -
    • productext

    • -
    • equipmentlist

    • -
    Communication settings
      -
    • comparameters

    • -
    Information managementMaster – Test Definition
      -
    • testdef

    • -
    • testdefsite

    • -
    • testdeftech

    • -
    • testdefconsumables

    • -
    • testmap

    • -
      -
    • -

    Master – Container

    -

    Master – Specimen Type

    -

    Master – Specimen Activity

      -
    • containertype

    • -
    • spctype

    • -
    • spcactdef

    • -
      -
    • -
    Patient Registration
      -
    • patient

    • -
    • patcom

    • -
    • patatt

    • -
    • patidt

    • -
    • patrelation

    • -
    • -
      -
    • -
    Patient Admission
      -
    • patvisit

    • -
    • patvisitadt

    • -
      -
    • -
    Test Ordering
      -
    • -
    • -
      -
    • -

    Specimen Collection

    -

    Specimen Transport

    -

    Specimen Reception

    -

    Specimen Preparation

      -
    • specimens

    • -
    • specimenstatus

    • -
    • specimencollection

    • -
    - - -## Lampiran 9: Patient - -### Race, Ethnic, Religion - -| **RaceID** | **Race** | **RaceID** | **Race** | -|------------|-------------------------------|------------|---------------------------------------| -| 1 | Jawa | 17 | Dayak | -| 2 | Sunda | 18 | Tionghoa | -| 3 | Batak | 19 | Suku asal Papua | -| 4 | Suku asal Sulawesi lainnya | 20 | Makassar | -| 5 | Madura | 21 | Suku asal Sumatera lainnya | -| 6 | Betawi | 22 | Suku asal Maluku | -| 7 | Minangkabau | 23 | Suku asal Kalimantan lainnya | -| 8 | Bugis | 24 | Cirebon | -| 9 | Melayu | 25 | Suku asal Jambi | -| 10 | Suku asal Sumatera Selatan | 26 | Suku Lampung | -| 11 | Suku asal Banten | 27 | Suku asal Nusa Tenggara Barat lainnya | -| 12 | Suku asal Nusa Tenggara Timur | 28 | Gorontalo | -| 13 | Banjar | 29 | Minahasa | -| 14 | Aceh | 30 | Nias | -| 15 | Bali | 31 | Asing/luar negeri | -| 16 | Sasak | | | - -| | | -|--------------|--------------------------------| -| **EthnicID** | **Ethnic** | -| 1 | Papua Melanezoid | -| 2 | Negroid | -| 3 | Weddoid | -| 4 | Melayu Mongoloid_Proto Melayu | -| 5 | Melayu Mongoloid_Deutro Melayu | -| 6 | Tionghoa | -| 7 | India | -| 8 | Arab | - -| | | -|----------------|--------------| -| **ReligionID** | **Religion** | -| 1 | Islam | -| 2 | Kristen | -| 3 | Katolik | -| 4 | Hindu | -| 5 | Budha | -| 6 | Khong Hu Cu | -| 7 | Lainnya | - -### Country[^35] - - -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Cnty

    -

    ID

    Country

    Cnty

    -

    ID

    Country

    Cnty

    -

    ID

    Country
    AFGAfghanistanGUMGuamQATQatar
    ALAÅland IslandsGTMGuatemalaREURéunion
    ALBAlbaniaGGYGuernseyROURomania
    DZAAlgeriaGINGuineaRUSRussian Federation
    ASMAmerican SamoaGNBGuinea-BissauRWARwanda
    ANDAndorraGUYGuyanaBLMSaint Barthélemy
    AGOAngolaHTIHaitiSHNSaint Helena, Ascension and Tristan da Cunha[e]
    AIAAnguillaHMDHeard Island and McDonald IslandsKNASaint Kitts and Nevis
    ATAAntarcticaVATHoly SeeLCASaint Lucia
    ATGAntigua and BarbudaHNDHondurasMAFSaint Martin (French part)
    ARGArgentinaHKGHong KongSPMSaint Pierre and Miquelon
    ARMArmeniaHUNHungaryVCTSaint Vincent and the Grenadines
    ABWArubaISLIcelandWSMSamoa
    AUSAustraliaINDIndiaSMRSan Marino
    AUTAustriaIDNIndonesiaSTPSao Tome and Principe
    AZEAzerbaijanIRNIran, Islamic Republic ofSAUSaudi Arabia
    BHSBahamasIRQIraqSENSenegal
    BHRBahrainIRLIrelandSRBSerbia
    BGDBangladeshIMNIsle of ManSYCSeychelles
    BRBBarbadosISRIsraelSLESierra Leone
    BLRBelarusITAItalySGPSingapore
    BELBelgiumJAMJamaicaSXMSint Maarten (Dutch part)
    BLZBelizeJPNJapanSVKSlovakia
    BENBeninJEYJerseySVNSlovenia
    BMUBermudaJORJordanSLBSolomon Islands
    BTNBhutanKAZKazakhstanSOMSomalia
    BOLBolivia, Plurinational State ofKENKenyaZAFSouth Africa
    BESBonaire, Sint Eustatius and Saba[d]KIRKiribatiSGSSouth Georgia and the South Sandwich Islands
    BIHBosnia and HerzegovinaPRKKorea, Democratic People's Republic ofSSDSouth Sudan
    BWABotswanaKORKorea, Republic ofESPSpain
    BVTBouvet IslandKWTKuwaitLKASri Lanka
    BRABrazilKGZKyrgyzstanSDNSudan
    IOTBritish Indian Ocean TerritoryLAOLao People's Democratic RepublicSURSuriname
    BRNBrunei DarussalamLVALatviaSJMSvalbard and Jan Mayen[f]
    BGRBulgariaLBNLebanonSWESweden
    BFABurkina FasoLSOLesothoCHESwitzerland
    BDIBurundiLBRLiberiaSYRSyrian Arab Republic
    CPVCabo VerdeLBYLibyaTWNTaiwan, Province of China[c]
    KHMCambodiaLIELiechtensteinTJKTajikistan
    CMRCameroonLTULithuaniaTZATanzania, United Republic of
    CANCanadaLUXLuxembourgTHAThailand
    CYMCayman IslandsMACMacaoTLSTimor-Leste
    CAFCentral African RepublicMDGMadagascarTGOTogo
    TCDChadMWIMalawiTKLTokelau
    CHLChileMYSMalaysiaTONTonga
    CHNChina[c]MDVMaldivesTTOTrinidad and Tobago
    CXRChristmas IslandMLIMaliTUNTunisia
    CCKCocos (Keeling) IslandsMLTMaltaTURTürkiye
    COLColombiaMHLMarshall IslandsTKMTurkmenistan
    COMComorosMTQMartiniqueTCATurks and Caicos Islands
    COGCongoMRTMauritaniaTUVTuvalu
    CODCongo, Democratic Republic of theMUSMauritiusUGAUganda
    COKCook IslandsMYTMayotteUKRUkraine
    CRICosta RicaMEXMexicoAREUnited Arab Emirates
    CIVCôte d'IvoireFSMMicronesia, Federated States ofGBRUnited Kingdom of Great Britain and Northern Ireland
    HRVCroatiaMDAMoldova, Republic ofUSAUnited States of America
    CUBCubaMCOMonacoUMIUnited States Minor Outlying Islands[g]
    CUWCuraçaoMNGMongoliaURYUruguay
    CYPCyprus[c]MNEMontenegroUZBUzbekistan
    CZECzechiaMSRMontserratVUTVanuatu
    DNKDenmarkMARMoroccoVENVenezuela, Bolivarian Republic of
    DJIDjiboutiMOZMozambiqueVNMViet Nam
    DMADominicaMMRMyanmarVGBVirgin Islands (British)
    DOMDominican RepublicNAMNamibiaVIRVirgin Islands (U.S.)
    ECUEcuadorNRUNauruWLFWallis and Futuna
    EGYEgyptNPLNepalESHWestern Sahara[c]
    SLVEl SalvadorNLDNetherlands, Kingdom of theYEMYemen
    GNQEquatorial GuineaNCLNew CaledoniaZMBZambia
    ERIEritreaNZLNew ZealandZWEZimbabwe
    ESTEstoniaNICNicaragua
    SWZEswatiniNERNiger
    ETHEthiopiaNGANigeria
    FLKFalkland Islands (Malvinas)[c]NIUNiue
    FROFaroe IslandsNFKNorfolk Island
    FJIFijiMKDNorth Macedonia
    FINFinlandMNPNorthern Mariana Islands
    FRAFranceNORNorway
    GUFFrench GuianaOMNOman
    PYFFrench PolynesiaPAKPakistan
    ATFFrench Southern TerritoriesPLWPalau
    GABGabonPSEPalestine, State of[c]
    GMBGambiaPANPanama
    GEOGeorgiaPNGPapua New Guinea
    DEUGermanyPRYParaguay
    GHAGhanaPERPeru
    GIBGibraltarPHLPhilippines
    GRCGreecePCNPitcairn
    GRLGreenlandPOLPoland
    GRDGrenadaPRTPortugal
    GLPGuadeloupePRIPuerto Rico
    - -### Patient Visit Class - -| | | | -|----------|-----------------------|---------------------------------------------------------------------------------------------------------------| -| **Code** | **Meaning** | **Description** | -| AMB | Ambulatory | Kunjungan rawat jalan | -| EMER | Emergency | Kunjungan instalasi gawat darurat | -| FLD | Field | Kunjungan lapangan | -| HH | Home health | Kunjungan ke rumah | -| IMP | Inpatient encounter | Kunjungan rawat inap | -| ACUTE | Inpatient acute | Kunjungan rawat inap akut | -| NONAC | Inpatient non-acute | Kunjungan rawat inap non-akut | -| OBSENC | Observation encounter | Kunjungan observasi | -| PRENC | Pre-admission | Kunjungan pre-admisi | -| SS | Short stay | Kunjungan pendek | -| VR | Virtual | kunjungan dimana pasien dan nakes tidak berada dalam satu tempat (telefon, email, chat, televideo konferensi) | -| REFFP | Referred-procedure | Prosedur yang dirujuk | - -### Patient Service Class - -| | | | | -|----------|-------------|-----------|-----------------| -| **Code** | **Meaning** | **Code** | **Meaning** | -| 1 | Kelas 1 | VVIP | Kelas VVIP | -| 2 | Kelas 2 | Reguler | Kelas Reguler | -| 3 | Kelas 3 | Eksekutif | Kelas Eksekutif | -| VIP | Kelas VIP | | | - -### Admission -- Discharge -- Transfer Code {#admission-discharge-transfer-code} - -| **Code** | **Meaning** | **Description** | -|----------|----------------------------|-----------------------------------------------------------------------------| -| A01 | Admit | Admit pasien ke suatu fasyankes; pasien ditempatkan di lokasi yang spesifik | -| A02 | Transfer | Perpindahan lokasi rawat pasien | -| A03 | Discharge | Akhir dari perawatan pasien di fasyankes. | -| A04 | Register | Registrasi pasien, belum menempatkan pasien ke lokasi perawatan spesifik. | -| A08 | Update patient information | | -| A11 | Cancel admit | Batal admit | -| A12 | Cancel transfer | Batal transfer | -| A13 | Cancel discharge | Batal discharge | -| A23 | Delete patient record | | -| A24 | Link patient information | Menghubungkan *patient record* satu dengan yang lain | -| A37 | Unlink patient information | Memutuskan hubungan *patient record* satu dengan yang lain | -| A54 | Change attending doctor | Ganti *attending doctor*. | -| A61 | Change consulting doctor | Ganti *consulting doctor*. | - -## {#section-29 .unnumbered} - -## Lampiran 10: Cumulative View - -| **Patient** | | **Visit** | | **Request** | | -|-------------|-------------------------------------|-----------------|-------------|-------------|--------------------------| -| Patient ID: | 1234567890 | Hosp. Number: | 451672801 | Doctor: | Indrawaty, SpPD | -| Name: | Badu Triputra | Admission date: | 20-Aug-2018 | Location: | Rawat Inap 1 | -| Age/Sex: | 37 years 3 months/Male | Discharge date: | 22-Aug-2018 | Comment: | Dengue Hemorrhagic Fever | -| Phone: | +62 21 451 6728 | | | | | -| Email: | headoffice@summit.co.id | | | | | -| Address: | Gading Bukit Indah H3 Kelapa Gading | | | | | -| | Jakarta 14240 | | | | | -| Comment: | | | | | | - - ----------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TestUnitsReference

    1040334567

    -

    3-Apr-2021

    1021923456

    -

    19-Feb-2021

    8082012345

    -

    20-Aug-2018

    Hematologi Lengkap
    Hemoglobing/dL13.2 - 17.314.314.514.6
    Hematokrit%40 - 5243.245.445.8
    Eritrosit10^6/μL4.4 - 5.95.695.765.94
    Nilai-nilai MC
    - MCVfL80 - 1007.978.877.2
    - MCHPg26 - 3425.225.124.7
    - MCHCg/dL32 - 3633.131.931.9
    RDW-CV%11.5 - 14.512.51311.9
    Trombosit10^3/μL150 - 44050026990
    Leukosit10^33.8 - 10.67.44.75.1
    Hitung Jenis Leukosit
    - Basofil%0.0 - 1.00.41.61.2
    - Eosinofil%2.0 - 4.03.53.83.9
    - Neutrofil%50.0 - 70.076.762.962.8
    - Limfosit%25.0 - 40.010.823.824.8
    - Monosit%2.0 - 8.08.57.97.3
    <slider>
    - -Keterangan: - -- Bagian atas terdiri dari 3 kelompok data sesuai hirarki: data pasien, - visit dan request - -- Data visit dan pasien secara default sesuai dengan request terbaru (3 - Apr 2021). Tetapi jika user hover cursor mouse ke kolom nomor request - lain, makan data yang ditampilkan di kelompok visit dan request akan - menyesuaikan. Contoh di atas menunjukkan kursor mouse sedang ada di - nomor request 8082012345. - -- Color codes: - - - Light yellow: below reference range - - - Dark yellow: above reference range - - - Light red: below critical range - - - Dark red: above critical range - -## Lampiran 11: Test Ordering - -### Test Order Urgency - -| | | | -|----------|-----------------|------------------------------------------------------------------------------------------------------------------------------------| -| **Code** | **Meaning** | **Description** | -| S | Stat | With highest priority | -| A | ASAP | Fill after S orders | -| R | Routine | Default | -| P | Preop | | -| C | Callback | | -| T | Timing critical | A request implying that it is critical to come as close as possible to the requested time, e.g., for a trough antimicrobial level. | -| PRN | As needed | | - -### Test Order Status - -| **Code** | **Description** | **Code** | **Description** | -|----------|---------------------------------|----------|-------------------------| -| A | Some, not all results available | IP | In process, unspecified | -| CA | Order is cancelled | RP | Order has been replaced | -| CM | Order is completed | SC | In process, scheduled | -| DC | Order was discontinued | CL | Closed | -| ER | Error, order not found | AC | Archived | -| HD | Order "*on hold*" | DL | Deleted | - -### Result Status - -| Code | Description | Code | Description | -|------|-----------------------------------------------------------------------------------|------|------------------------------------------------------------------------------------------| -| O | Order received; specimen not yet received | R | Results stored; not yet verified | -| I | No results available; specimen received, procedure incomplete | F | Final results; results stored and verified. Can only be changed with a corrected result. | -| S | No results available; procedure scheduled, but not done | X | No results available; Order canceled. | -| A | Some, but not all, results available | Y | No order on record for this test. (Used only on queries) | -| P | Preliminary: A verified early result is available, final results not yet obtained | Z | No record of this patient. (Used only on queries) | -| C | Correction to results | | | - -### Diagnostic Report Status - -| **Lvl** | **Code** | **Display** | **Definition** | -|---------|------------------|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 1 | registered | Registered | The existence of the report is registered, but there is nothing yet available. | -| 1 | partial | Partial | This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified. | -| 2 | preliminary | Preliminary | Verified early results are available, but not all results are final. | -| 1 | final | Final | The report is complete and verified by an authorized person. | -| 1 | amended | Amended | Subsequent to being final, the report has been modified. This includes any change in the results, diagnosis, narrative text, or other content of a report that has been issued. | -| 2 | corrected | Corrected | Subsequent to being final, the report has been modified to correct an error in the report or referenced results. | -| 2 | appended | Appended | Subsequent to being final, the report has been modified by adding new content. The existing content is unchanged. | -| 1 | cancelled | Cancelled | The report is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\"). | -| 1 | entered-in-error | Entered in Error | The report has been withdrawn following a previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".). | -| 1 | unknown | Unknown | The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which. | - -## Lampiran 12: Specimen - -### Container Type - -| **Code** | **Display** | **Definition** | -|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|----------------| -| 22566001 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Cytology brush, device | | -| 463568005 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Pleural drainage system fluid collector | | -| 464527005 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Paediatric blood donor set | | -| 464573007 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Assisted reproduction needle, reprocessed | | -| 464784003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Assisted reproduction catheter | | -| 464946000 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Assisted reproduction needle, single-use | | -| 465046006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Assisted reproduction cryotube | | -| 465091002 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Tissue extraction bag | | -| 465141003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Otological bone particle collector | | -| 465487000 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Rigid endotherapy cytology brush, reusable | | -| 466164006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Rigid endotherapy cytology brush, single-use | | -| 466421006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Viscerotome | | -| 466447002 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood-processing autotransfusion system container | | -| 466623002 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood gas syringe/needle, sodium heparin | | -| 466637006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood donor set, quad-pack | | -| 466704003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood collection/fat content reduction device | | -| 466844004 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood donor set, double-pack | | -| 466898000 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood donor set, quin-pack | | -| 466930006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood donor set, triple-pack | | -| 467030004 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood gas syringe/needle, lithium heparin | | -| 467131002 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood autotransfusion system tubing | | -| 467132009 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood donor set, single-pack | | -| 467141004 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood donor set, many-pack | | -| 467182004 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Cervical cytology inflatable collector | | -| 467330006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Adipose tissue stem cell recovery unit | | -| 467431009 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Abortion suction system collection bottle | | -| 467499008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Chorionic villus sampling catheter | | -| 467647004 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Cryostat microtome | | -| 467697000 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Cytology scraper, single-use | | -| 467743009 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Bone marrow explant needle | | -| 467967005 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Cytology scraper, reusable | | -| 467989009 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Capillary blood collection tube, no-additive | | -| 468076003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Bone marrow collection/transfusion set | | -| 468131000 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Cervical cytology brush | | -| 468200003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Epididymal fluid aspiration catheter | | -| 468981005 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Dental bone particle collector | | -| 468999002 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Endometrial cytology brush | | -| 469287008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Intrauterine secretion scoop | | -| 469322002 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Intravascular catheter endoluminal brush | | -| 469454007 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Intrauterine scoop | | -| 469822008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Flexible endotherapy cytology brush, single-use | | -| 470114007 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Flexible endotherapy cytology brush, reusable | | -| 470547006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | General-purpose cytology brush | | -| 470597005 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Gastro-urological scoop | | -| 700855008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Tissue/fluid collection bag, sterile | | -| 700905004 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Specimen container mailer, insulated | | -| 700906003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Specimen container mailer, non-insulated | | -| 700945008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood cell freeze/thaw system set | | -| 700955007 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood collection Luer-syringe adaptor | | -| 700956008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood collection needle, basic | | -| 700957004 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood/tissue storage/culture container | | -| 701394007 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | General specimen receptacle transport container | | -| 701516009 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated blood collection tube transport container | | -| 701720006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Tissue/fluid collection bag, non-sterile | | -| 702120003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood collection Luer adaptor | | -| 702223006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Sputum specimen container | | -| 702224000 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Midstream urine specimen container | | -| 702232008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Sweat specimen container IVD | | -| 702244006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Sterile urine specimen container | | -| 702256007 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube, no additive | | -| 702264001 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-sterile urine specimen container IVD | | -| 702268003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | General specimen container, no additive, non-sterile | | -| 702269006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | General specimen container, no additive, sterile | | -| 702275002 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Microcapillary blood collection tube, ammonium heparin | | -| 702276001 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Microcapillary blood collection tube, K2EDTA | | -| 702277005 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Microcapillary blood collection tube, no additive | | -| 702278000 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated blood collection tube, no additive/metal-free | | -| 702279008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated blood collection tube, gel separator | | -| 702280006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated blood collection tube, RNA stabilizer | | -| 702281005 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated blood collection tube, thrombin/clot activator/gel separator | | -| 702282003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube, EDTA | | -| 702283008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube, gel separator | | -| 702284002 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube, lithium heparin | | -| 702285001 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube, lithium heparin/gel separator, sterile | | -| 702286000 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube, NaEDTA/sodium fluoride | | -| 702287009 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube, potassium oxalate/sodium fluoride | | -| 702288004 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated urine specimen container, boric acid (H3BO3)/sodium formate | | -| 702289007 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated urine specimen container, ethyl paraben/sodium porpionate/chlorhexidine | | -| 702290003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Cervical cytology microscopy slide | | -| 702292006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated blood collection tube , K3EDTA/sodium fluoride | | -| 702293001 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated blood collection tube, K2EDTA/aprotinin | | -| 702294007 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Syringe-blood collection tube transfer | | -| 702295008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube, clot activator/gel separator | | -| 702296009 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube, sodium citrate | | -| 702297000 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube, clot activator | | -| 702298005 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube, K3EDTA | | -| 702299002 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube, K2EDTA | | -| 702300005 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube, lithium heparin/gel separator, non-sterile | | -| 702301009 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Microcapillary blood collection funnel | | -| 702302002 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated urine specimen container, boric acid (H3BO3) | | -| 702303007 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated urine specimen container, multiple preservative | | -| 702304001 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Microcapillary blood transfer tube, clot activator | | -| 702305000 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Microcapillary blood transfer tube, sodium fluoride | | -| 702306004 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Microcapillary blood transfer tube, EDTA | | -| 702307008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Microcapillary blood transfer tube IVD, heparin | | -| 702308003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated urine specimen container IVD, no additive | | -| 702309006 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Saliva specimen container IVD, no additive | | -| 702310001 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated saliva specimen container IVD, sodium azide | | -| 704866005 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Orthopedic bone particle collector, reusable | | -| 704921002 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Hemoperfusion tubing set | | -| 706042001 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Clinical sampling brush | | -| 706044000 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Endotherapy cytology brush | | -| 706045004 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Bone particle collector | | -| 706046003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Specimen receptacle | | -| 706047007 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Fecal specimen container | | -| 706048002 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood specimen receptacle | | -| 706049005 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood tube | | -| 706050005 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Microcapillary blood collection tube | | -| 706051009 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Non-evacuated blood collection tube | | -| 706052002 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated blood collection tube | | -| 706053007 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | General specimen container | | -| 706054001 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Urine specimen container | | -| 706055000 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | 24-hour urine specimen container | | -| 706056004 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Evacuated urine specimen container | | -| 706057008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Cytology specimen container | | -| 706058003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Secretory specimen container | | -| 706067003 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood collection/transfer device | | -| 706070004 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood donor set | | -| 706071000 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Specimen receptacle transport container | | -| 712485008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Autologous blood collection tube | | -| 713951005 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Adipose tissue stem cell recovery unit, ultrasonic | | -| 714731008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Blood component separator | | -| 718301008 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Urological fluid funnel, sterile | | -| 718302001 ![](media/image27.png){width="0.10416666666666667in" height="0.10416666666666667in"} | Urological fluid funnel, non-sterile | | - -### Additive[^36] - -| **Code** | **System** | **Display (en-US)** | -|-------------------|------------------------|------------------------------| -|   1259913003 | http://snomed.info/sct | Heparin ammonium | -|   386961008 | http://snomed.info/sct | Aprotinin (substance) | -|   29725000 | http://snomed.info/sct | Heparin calcium | -|   21611007 | http://snomed.info/sct | Boric acid | -|   30531001 | http://snomed.info/sct | Calcium oxalate | -|   69519002 | http://snomed.info/sct | EDTA | -|   372628006 | http://snomed.info/sct | Edetate (substance) | -|   27763000 | http://snomed.info/sct | Hydrochloric acid | -|   414407009 | http://snomed.info/sct | Hirudin (substance) | -|   1256100007 | http://snomed.info/sct | Edetate dipotassium | -|   1256101006 | http://snomed.info/sct | Tripotassium edetate | -|   1256102004 | http://snomed.info/sct | Heparin lithium (substance) | -|   387418006 | http://snomed.info/sct | Edetate disodium (substance) | -|   412546005 | http://snomed.info/sct | Sodium citrate (substance) | -|   50045009 | http://snomed.info/sct | Heparin sodium | -|   6910009 | http://snomed.info/sct | Sodium fluoride | -|   50306007 | http://snomed.info/sct | Sodium tetraborate | -|   387168006 | http://snomed.info/sct | Mannitol (substance) | -|   115281000146102 | http://snomed.info/sct | Sodium formate | - -### Specimen Type - -Berdasarkan dokumentasi dari FHIR -(https://terminology.hl7.org/5.1.0/CodeSystem-v2-0487.html) - -| **Code** | **Display** | **Code** | **Display** | **Code** | **Display** | -|----------|-------------------------|----------|----------------------------|----------|---------------------------------------| -| ABS | Abscess | CSMY | Fluid, Cystostomy Tube | GENL | Genital lochia | -| ACNE | Tissue, Acne | CST | Fluid, Cyst | GENV | Genital vaginal | -| ACNFLD | Fluid, Acne | CSVR | Blood, Cell Saver | GRAFT | Graft | -| AIRS | Air Sample | CTP | Catheter tip | GRAFTS | Graft Site | -| ALL | Allograft | CUR | Curretage | GRANU | Granuloma | -| AMN | Amniotic fluid | CVM | Cervical Mucus | GROSH | Catheter, Groshong | -| AMP | Amputation | CVPS | Site, CVP | GSOL | Solution, Gastrostomy | -| ANGI | Catheter Tip, Angio | CVPT | Catheter Tip, CVP | GSPEC | Biopsy, Gastric | -| ARTC | Catheter Tip, Arterial | CYN | Nodule, Cystic | GT | Tube, Gastric | -| ASERU | Serum, Acute | CYST | Cyst | GTUBE | Drainage Tube, Drainage (Gastrostomy) | -| ASP | Aspirate | DBITE | Bite, Dog | HAR | Hair | -| AUTP | Autopsy | DCS | Sputum, Deep Cough | HBITE | Bite, Human | -| BBL | Blood bag | DEC | Ulcer, Decubitus | HBLUD | Blood, Autopsy | -| BCYST | Cyst, Baker\'s | DIA | Dialysate | HEMAQ | Catheter Tip, Hemaquit | -| BDY | Whole body | DIAF | Dialysis Fluid | HEMO | Catheter Tip, Hemovac | -| BIFL | Bile Fluid | DISCHG | Discharge | HERNI | Tissue, Herniated | -| BITE | Bite | DIV | Diverticulum | HEV | Drain, Hemovac | -| BLD | Whole blood | DRN | Drain | HIC | Catheter, Hickman | -| BLDA | Blood arterial | DRNG | Drainage, Tube | HYDC | Fluid, Hydrocele | -| BLDCO | Cord blood | DRNGP | Drainage, Penrose | IBITE | Bite, Insect | -| BLDV | Blood venous | DUFL | Duodenal fluid | ICYST | Cyst, Inclusion | -| BLEB | Bleb | EARW | Ear wax (cerumen) | IDC | Catheter Tip, Indwelling | -| BLIST | Blister | EBRUSH | Brush, Esophageal | IHG | Gas, Inhaled | -| BOIL | Boil | EFFUS | Effusion | ILEO | Drainage, Ileostomy | -| BON | Bone | ELT | Electrode | ILLEG | Source of Specimen Is Illegible | -| BONE | Bone | EOS | Eosinophils | IMP | Implant | -| BOWL | Bowel contents | ETA | Aspirate, Endotrach | INCI | Site, Incision/Surgical | -| BPH | Basophils | ETTP | Catheter Tip, Endotracheal | INFIL | Infiltrate | -| BPU | Blood product unit | ETTUB | Tube, Endotracheal | INS | Insect | -| BRN | Burn | EXG | Gas, exhaled (=breath) | INTRD | Catheter Tip, Introducer | -| BRSH | Brush | EXS | Shunt, External | ISLT | Isolate | -| BRTH | Breath (use EXHLD) | EXUDTE | Exudate | IT | Intubation tube | -| BRUS | Brushing | FBLOOD | Blood, Fetal | IUD | Intrauterine Device | -| BUB | Bubo | FGA | Fluid, Abdomen | IVCAT | Catheter Tip, IV | -| BULLA | Bulla/Bullae | FIB | Fibroblasts | IVFLD | Fluid, IV | -| BX | Biopsy | FIST | Fistula | IVTIP | Tubing Tip, IV | -| CALC | Calculus (=Stone) | FLD | Fluid, Other | JEJU | Drainage, Jejunal | -| CARBU | Carbuncle | FLT | Filter | JNTFLD | Fluid, Joint | -| CAT | Catheter | FLU | Fluid, Body unsp | JP | Drainage, Jackson Pratt | -| CBITE | Bite, Cat | FLUID | Fluid | KELOI | Lavage | -| CDM | Cardiac muscle | FOLEY | Catheter Tip, Foley | KIDFLD | Fluid, Kidney | -| CLIPP | Clippings | FRS | Fluid, Respiratory | LAVG | Lavage, Bronhial | -| CNJT | Conjunctiva | FSCLP | Scalp, Fetal | LAVGG | Lavage, Gastric | -| CNL | Cannula | FUR | Furuncle | LAVGP | Lavage, Peritoneal | -| COL | Colostrum | GAS | Gas | LAVPG | Lavage, Pre-Bronch | -| CONE | Biospy, Cone | GASA | Aspirate, Gastric | LENS1 | Contact Lens | -| CSCR | Scratch, Cat | GASAN | Antrum, Gastric | LENS2 | Contact Lens Case | -| CSERU | Serum, Convalescent | GASBR | Brushing, Gastric | LESN | Lesion | -| CSF | Cerebral spinal fluid | GASD | Drainage, Gastric | LIQ | Liquid, Unspecified | -| CSITE | Catheter Insertion Site | GAST | Fluid/contents, Gastric | LIQO | Liquid, Other | - -lanjutan specimen type ... - -| **Code** | **Display** | **Code** | **Display** | **Code** | **Display** | -|----------|-------------------------------------|----------|-------------------------------|----------|---------------------------------| -| LNA | Line arterial | PPP | Plasma, Platelet poor | TASP | Aspirate, Tracheal | -| LNV | Line venous | PROST | Prosthetic Device | TEAR | Tears | -| LSAC | Fluid, Lumbar Sac | PRP | Plasma, Platelet rich | THRB | Thrombocyte (platelet) | -| LYM | Lymphocytes | PSC | Pseudocyst | TISS | Tissue | -| MAC | Macrophages | PUNCT | Wound, Puncture | TISU | Tissue ulcer | -| MAHUR | Catheter Tip, Makurkour | PUS | Pus | TLC | Cathether Tip, Triple Lumen | -| MAR | Marrow | PUSFR | Pustule | TRAC | Site, Tracheostomy | -| MASS | Mass | PUST | Pus | TRANS | Transudate | -| MBLD | Blood, Menstrual | QC3 | Quality Control | TSERU | Serum, Trough | -| MEC | Meconium | RANDU | Urine, Random | TSTES | Abscess, Testicular | -| MILK | Breast milk | RBC | Erythrocytes | TTRA | Aspirate, Transtracheal | -| MLK | Milk | RBITE | Bite, Reptile | TUBES | Tubes | -| MUCOS | Mucosa | RECT | Drainage, Rectal | TUMOR | Tumor | -| MUCUS | Mucus | RECTA | Abscess, Rectal | TZANC | Smear, Tzanck | -| NAIL | Nail | RENALC | Cyst, Renal | UDENT | Source, Unidentified | -| NASDR | Drainage, Nasal | RENC | Fluid, Renal Cyst | UMED | Unknown Medicine | -| NEDL | Needle | RES | Respiratory | UR | Urine | -| NEPH | Site, Nephrostomy | SAL | Saliva | URC | Urine clean catch | -| NGASP | Aspirate, Nasogastric | SCAR | Tissue, Keloid (Scar) | URINB | Urine, Bladder Washings | -| NGAST | Drainage, Nasogastric | SCLV | Catheter Tip, Subclavian | URINC | Urine, Catheterized | -| NGS | Site, Naso/Gastric | SCROA | Abscess, Scrotal | URINM | Urine, Midstream | -| NODUL | Nodule(s) | SECRE | Secretion(s) | URINN | Urine, Nephrostomy | -| NSECR | Secretion, Nasal | SER | Serum | URINP | Urine, Pedibag | -| ORH | Other | SHU | Site, Shunt | URNS | Urine sediment | -| ORL | Lesion, Oral | SHUNF | Fluid, Shunt | URT | Urine catheter | -| OTH | Source, Other | SHUNT | Shunt | USCOP | Urine, Cystoscopy | -| PACEM | Pacemaker | SITE | Site | USPEC | Source, Unspecified | -| PAFL | Pancreatic fluid | SKBP | Biopsy, Skin | USUB | Unkown substance | -| PCFL | Fluid, Pericardial | SKN | Skin | VASTIP | Catheter Tip, Vas | -| PDSIT | Site, Peritoneal Dialysis | SMM | Mass, Sub-Mandibular | VENT | Catheter Tip, Ventricular | -| PDTS | Site, Peritoneal Dialysis Tunnel | SMN | Seminal fluid | VITF | Vitreous Fluid | -| PELVA | Abscess, Pelvic | SNV | Fluid, synovial (Joint fluid) | VOM | Vomitus | -| PENIL | Lesion, Penile | SPRM | Spermatozoa | WASH | Wash | -| PERIA | Abscess, Perianal | SPRP | Catheter Tip, Suprapubic | WASI | Washing, e.g. bronchial washing | -| PILOC | Cyst, Pilonidal | SPRPB | Cathether Tip, Suprapubic | WAT | Water | -| PINS | Site, Pin | SPT | Sputum | WB | Blood, Whole | -| PIS | Site, Pacemaker Insetion | SPTC | Sputum - coughed | WBC | Leukocytes | -| PLAN | Plant Material | SPTT | Sputum - tracheal aspirate | WEN | Wen | -| PLAS | Plasma | SPUT1 | Sputum, Simulated | WICK | Wick | -| PLB | Plasma bag | SPUTIN | Sputum, Inducted | WND | Wound | -| PLC | Placenta | SPUTSP | Sputum, Spontaneous | WNDA | Wound abscess | -| PLEVS | Serum, Peak Level | STL | Stool = Fecal | WNDD | Wound drainage | -| PLR | Pleural fluid (thoracentesis fluid) | STONE | Stone, Kidney | WNDE | Wound exudate | -| PMN | Polymorphonuclear neutrophils | SUBMA | Abscess, Submandibular | WORM | Worm | -| PND | Drainage, Penile | SUBMX | Abscess, Submaxillary | WRT | Wart | -| POL | Polyps | SUMP | Drainage, Sump | | | -| POPGS | Graft Site, Popliteal | SUP | Suprapubic Tap | | | -| POPLG | Graft, Popliteal | SUTUR | Suture | | | -| POPLV | Site, Popliteal Vein | SWGZ | Catheter Tip, Swan Gantz | | | -| PORTA | Catheter, Porta | SWT | Sweat | | | - -### Specimen Type (Environmental) - -Berikut adalah specimen type untuk lingkungan - -| **Code** | **Display** | **Code** | **Display** | -|----------|---------------------------------------|----------|-----------------------------------| -| ATTE | Environment, Attest | ESOI | Environmental, Soil | -| AUTOA | Environmental, Autoclave Ampule | ESOS | Environmental, Solution (Sterile) | -| AUTOC | Environmental, Autoclave Capsule | EWHI | Environmental, Whirlpool | -| DEION | Environmental, Water (Deionized) | FAW | Environmental, Water (Well) | -| EEYE | Environmental, Eye Wash | SPS | Environmental, Spore Strip | -| EFF | Environmental, Effluent | STER | Environmental, Sterrad | -| EFOD | Environmental, Food | WWA | Environmental, Water | -| EISO | Environmental, Isolette | WWO | Environmental, Water (Ocean) | -| ENVIR | Environmental, Unidentified Substance | WWT | Environmental, Water (Tap) | -| EOTH | Environmental, Other Substance | | | - -### Specimen Component - -Berikut adalah specimen component value set berdasarkan HL7 dan FHIR: - -| **Value** | **Description** | -|-----------|---------------------------------------| -| SUP | Supernatant | -| SED | Sediment | -| BLD | Whole blood, homogeneous | -| BSEP | Whole blood, separated | -| PRP | Platelet rich plasma | -| PPP | Platelet poor plasma | -| SER | Serum, NOS (not otherwise specified) | -| PLAS | Plasma, NOS (not otherwise specified) | - -### Collection Method - -Menjelaskan prosedur atau proses pengumpulan spesimen. Sistem pengkodean -apa pun yang diakui secara nasional dapat digunakan untuk bidang ini -termasuk SNOMED; sebagai alternatif, tabel yang ditentukan HL7 0488 -dapat digunakan -(https://build.fhir.org/valueset-specimen-collection-method.html) - -| **Code** | **System** | **Text** | -|-------------|------------|-----------------------------------------| -|   129316008 | snomed | Aspiration - action | -|   129314006 | snomed | Biopsy - action | -|   129300006 | snomed | Puncture - action | -|   129304002 | snomed | Excision - action | -|   129323009 | snomed | Scraping - action | -|   73416001 | snomed | Urine specimen collection, clean catch | -|   225113003 | snomed | Timed urine collection | -|   70777001 | snomed | Urine specimen collection, catheterized | -|   386089008 | snomed | Collection of coughed sputum | -|   278450005 | snomed | Finger-prick sampling | - -### Body Site - -Specifies the source from which the specimen was obtained. For example, -in the case where a liver biopsy is obtained via a percutaneous needle, -the source would be 'liver.' - -| | | | | | | -|-----------|-------------------------|-----------|-------------------------|-----------|--------------------------| -| **Value** | **Description** | **Value** | **Description** | **Value** | **Description** | -| BE | Bilateral Ears | LMFA | Left Mid Forearm | REJ | Right External Jugular | -| OU | Bilateral Eyes | LN | Left Naris | OD | Right Eye | -| BN | Bilateral Nares | LPC | Left Posterior Chest | RF | Right Foot | -| BU | Buttock | LSC | Left Subclavian | RG | Right Gluteus Medius | -| CT | Chest Tube | LT | Left Thigh | RH | Right Hand | -| LA | Left Arm | LUA | Left Upper Arm | RIJ | Right Internal Jugular | -| LAC | Left Anterior Chest | LUAQ | Left Upper Abd Quadrant | RLAQ | Rt Lower Abd Quadrant | -| LACF | Left Antecubital Fossa | LUFA | Left Upper Forearm | RLFA | Right Lower Forearm | -| LD | Left Deltoid | LVG | Left Ventragluteal | RMFA | Right Mid Forearm | -| LE | Left Ear | LVL | Left Vastus Lateralis | RN | Right Naris | -| LEJ | Left External Jugular | NB | Nebulized | RPC | Right Posterior Chest | -| OS | Left Eye | PA | Perianal | RSC | Right Subclavian | -| LF | Left Foot | PERIN | Perineal | RT | Right Thigh | -| LG | Left Gluteus Medius | RA | Right Arm | RUA | Right Upper Arm | -| LH | Left Hand | RAC | Right Anterior Chest | RUAQ | Right Upper Abd Quadrant | -| LIJ | Left Internal Jugular | RACF | Right Antecubital Fossa | RUFA | Right Upper Forearm | -| LLAQ | Left Lower Abd Quadrant | RD | Right Deltoid | RVL | Right Vastus Lateralis | -| LLFA | Left Lower Forearm | RE | Right Ear | RVG | Right Ventragluteal | - -### Source - -This field differs from SPM-8-Specimen Source Site in those cases where -the source site must be approached via a particular site (e.g., anatomic -location). For example, in the case where a liver biopsy is obtained via -a percutaneous needle, the collection site would be the point of entry -of the needle. For venous blood collected from the left radial vein, the -collection site could be "antecubital fossa". - -### Specimen Role - -| | | -|-----------|--------------------------------------------------------------------------------------------------------------------------------| -| **Value** | **Description** | -| B | Blind Sample | -| C | Calibrator | -| E | Electronic QC. Used with manufactured reference providing signals that simulate QC results | -| F | Filler Organization Proficiency. Specimen used for testing proficiency of the organization performing the testing (Filler) PME | -| O | Operator Proficiency. Specimen used for testing Operator Proficiency. | -| P | Patient (default if blank component value) | -| Q | Control specimen | -| R | Replicate (of patient sample as a control). Used when a patient sample is re-run as a control for a repeat test | -| V | Verifying Calibrator. Used for periodic calibration checks. | - -### Specimen Condition - -Based on https://terminology.hl7.org/5.4.0/CodeSystem-v2-0493.html atau -https://terminology.hl7.org/6.5.0/ValueSet-v2-0493.html - -| | | -|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Value** | **Description** | -| AUT | Autolyzed; *An autolyzed specimen is a tissue or cell sample that has undergone autolysis, a natural process where the cell\'s own enzymes begin to digest and break down the cell\'s components, often after death* | -| CLOT | Clotted; *A clotted specimen is a biological sample, typically blood, that has begun to coagulate, forming a gel-like mass, rendering it unsuitable for most laboratory tests* | -| CON | Contaminated | -| COOL | Cool | -| FROZ | Frozen | -| HEM | Hemolyzed | -| LIVE | Live | -| ROOM | Room temperature | -| SNR | Sample not received | -| CFU | Centrifuged | -| LIP | Lipemic | -| ITC | Icteric | -| | | - -## Lampiran 13: Location - -### Location Type - -| **LocTypeID** | **LocTypeAbb** | **LocTypeFull** | **Description** | **CreateDate** | **EndDate** | -|---------------|----------------|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|-------------| -| | Nvarchar(5) | Nvarchar | Nvarchar | Date Time | Date Time | -| 1 | FCLT | Facility | Organisasi atau lembaga tempat layanan disediakan, atau gedung tertentu dalam organisasi | 2025-02-25 17:50:00 | | -| 2 | BLDG | Building | Gedung | 2025-02-25 17:50:00 | | -| 3 | FLOR | Floor | Lantai dari gedung | 2025-02-25 17:50:00 | | -| 4 | POC | Point of Care | | 2025-02-25 17:50:00 | | -| 5 | ROOM | Room | Ruangan dalam Gedung-lantai | 2025-02-25 17:50:00 | | -| 6 | BED | Bed | Tempat tidur pasien | 2025-02-25 17:50:00 | | -| 7 | MOBL | Mobile | Lokasi bergerak, ditandai dengan koordinat GPS, lokasi sementara, atau deskripsi lokasi unit bergerak saat ini. Misalnya MCU onsite, home service, dll | 2025-02-25 17:50:00 | | -| 8 | REMT | Remote | Lokasi di luar lokasi utama. Misalnya prkatek dokter, klinik/lab perujuk. | 2025-02-25 17:50:00 | | - -## Lampiran 14: Value set - -### Value Set {#value-set-1} - -Lihat Table 72. valueset untuk struktur lengkap. - -| **VSetID** | **VOrder** | **VValue** | **VDesc** | **VCategory** | -|------------|------------|------------|--------------------------------------------------------------------------------------------------------------------------------|---------------| -| 1 | 1 | 0 | Primary | System | -| 1 | 2 | 1 | Secondary | System | -| 2 | 1 | 0 | Disabled | System | -| 2 | 2 | 1 | Enabled | System | -| 3 | 1 | 1 | Female | System | -| 3 | 2 | 2 | Male | System | -| 3 | 3 | 3 | Unknown | System | -| 4 | 1 | A | Separated | System | -| 4 | 2 | D | Divorced | System | -| 4 | 3 | M | Married | System | -| 4 | 4 | S | Single | System | -| 4 | 5 | W | Widowed | System | -| 4 | 6 | B | Unmarried | System | -| 4 | 7 | U | Unknown | System | -| 4 | 8 | O | Other | System | -| 5 | 1 | Y | Death | System | -| 5 | 2 | N | Life | System | -| 6 | 1 | KTP | Kartu Tanda Penduduk | System | -| 6 | 2 | PASS | Passport | System | -| 6 | 3 | SSN | Social Security Number | System | -| 6 | 4 | SIM | Surat Izin Mengemudi | System | -| 6 | 5 | KTAS | Kartu Izin Tinggal Terbatas | System | -| 7 | 1 | Create | create record | System | -| 7 | 2 | Read | read record/field | System | -| 7 | 3 | Update | update record/field | System | -| 7 | 4 | Delete | delete record/field | System | -| 8 | 1 | WDID | Windows Device ID | System | -| 8 | 2 | AAID | Android AAID | System | -| 8 | 3 | IDFA | IOS IDFA | System | -| 9 | 1 | PAT | Patient | System | -| 9 | 2 | ISN | Insurance | System | -| 9 | 3 | ACC | Account | System | -| 9 | 4 | DOC | Doctor | System | -| 10 | 1 | S | Stat | System | -| 10 | 2 | A | ASAP | System | -| 10 | 3 | R | Routine | System | -| 10 | 4 | P | Preop | System | -| 10 | 5 | C | Callback | System | -| 10 | 6 | T | Timing critical | System | -| 10 | 7 | PRN | As needed | System | -| 11 | 1 | A | Some, not all results available | System | -| 11 | 2 | CA | Order is cancelled | System | -| 11 | 3 | CM | Order is completed | System | -| 11 | 4 | DC | Order was discontinued | System | -| 11 | 5 | ER | Error, order not found | System | -| 11 | 6 | HD | Order "*on hold*" | System | -| 11 | 7 | IP | In process, unspecified | System | -| 11 | 8 | RP | Order has been replaced | System | -| 11 | 9 | SC | In process, scheduled | System | -| 11 | 10 | CL | Closed | System | -| 11 | 11 | AC | Archived | System | -| 11 | 12 | DL | Deleted | System | -| 12 | 1 | FCLT | *Facility*. Organisasi atau lembaga tempat layanan disediakan, atau gedung tertentu dalam organisasi | System | -| 12 | 2 | BLDG | *Building*. Gedung | System | -| 12 | 3 | FLOR | *Floor*. Lantai dari gedung | System | -| 12 | 4 | POC | *Point of Care* | System | -| 12 | 5 | ROOM | *Room*. Ruangan dalam Gedung-lantai | System | -| 12 | 6 | BED | *Bed*. Tempat tidur pasien | System | -| 12 | 7 | MOBL | *Mobile*. Lokasi bergerak, ditandai dengan koordinat GPS, lokasi sementara, atau deskripsi lokasi unit bergerak saat ini. | System | -| 12 | 8 | REMT | *Remote*. Lokasi di luar lokasi utama | System | -| 13 | 1 | Hep | Heparin ammonium | System | -| 13 | 2 | Apro | Aprotinin (substance) | System | -| 13 | 3 | HepCa | Heparin calcium | System | -| 13 | 4 | H3BO3 | Boric acid | System | -| 13 | 5 | CaOxa | Calcium oxalate | System | -| 13 | 6 | EDTA | EDTA | System | -| 13 | 7 | Ede | Edetate (substance) | System | -| 13 | 8 | HCl | Hydrochloric acid | System | -| 13 | 9 | Hrdn | Hirudin (substance) | System | -| 13 | 10 | EdeK | Edetate dipotassium | System | -| 13 | 11 | EdeTri | Tripotassium edetate | System | -| 13 | 12 | LiHep | Heparin lithium (substance) | System | -| 13 | 13 | EdeNa | Edetate disodium (substance) | System | -| 13 | 14 | NaCtrt | Sodium citrate (substance) | System | -| 13 | 15 | NaHep | Heparin sodium | System | -| 13 | 16 | NaF | Sodium fluoride | System | -| 13 | 17 | Borax | Sodium tetraborate | System | -| 13 | 18 | Mntl | Mannitol (substance) | System | -| 13 | 19 | NaFrm | Sodium formate | System | -| 14 | 1 | Pri | *primary*, kontak langsung dengan spesimen | System | -| 14 | 2 | Sec | *secondary*, wadah *primary container* | System | -| 14 | 3 | Ter | *tertiary*, wadah *secondary container*. | System | -| 15 | 1 | BLD | Whole blood | System | -| 15 | 2 | BLDA | Blood arterial | System | -| 15 | 3 | BLDCO | Cord blood | System | -| 15 | 4 | FBLOOD | Blood, Fetal | System | -| 15 | 5 | FBLOOD | Blood, Fetal | System | -| 15 | 6 | WB | Blood, Whole | System | -| 15 | 7 | BBL | Blood bag | System | -| 15 | 8 | SER | Serum | System | -| 15 | 9 | PLAS | Plasma | System | -| 15 | 10 | PLB | Plasma bag | System | -| 15 | 11 | MUCOS | Mucosa | System | -| 15 | 12 | MUCUS | Mucus | System | -| 15 | 13 | UR | Urine | System | -| 15 | 14 | RANDU | Urine, Random | System | -| 15 | 15 | URINM | Urine, Midstream | System | -| 16 | 1 | L | Liter | System | -| 16 | 2 | mL | Mili Liter | System | -| 16 | 3 | μL | Micro Liter | System | -| 16 | 4 | Pcs | Pieces | System | -| 17 | 1 | order | Generate by order | | -| 17 | 2 | user | Generate by user | | -| 18 | 1 | SColl | Collection | System | -| 18 | 2 | STran | Transport | System | -| 18 | 3 | SRec | Reception | System | -| 18 | 4 | SPrep | Preparation | System | -| 18 | 5 | SAlqt | Aliquot | System | -| 18 | 6 | SDisp | Dispatching | System | -| 18 | 7 | SDest | Destruction | System | -| 19 | 1 | 0 | Failed | System | -| 19 | 2 | 1 | Success with note | System | -| 19 | 3 | 2 | Success | System | -| 20 | 1 | STC | To be collected | System | -| 20 | 2 | SCFld | Collection failed | System | -| 20 | 3 | SCtd | Collected | System | -| 20 | 4 | STran | In-transport | System | -| 20 | 5 | STFld | Transport failed | System | -| 20 | 6 | SArrv | Arrived | System | -| 20 | 7 | SRejc | Rejected | System | -| 20 | 8 | SRcvd | Received | System | -| 20 | 9 | SPAna | Pre-analytical | System | -| 20 | 10 | SPAF | Pre-analytical failed | System | -| 20 | 11 | STA | To be analyze | System | -| 20 | 12 | SAFld | Analytical failed | System | -| 20 | 13 | SAna | Analytical | System | -| 20 | 14 | STS | To be stored | System | -| 20 | 15 | SSFld | Store failed | System | -| 20 | 16 | SStrd | Stored | System | -| 20 | 17 | SExp | Expired | System | -| 20 | 18 | STD | To be destroyed | System | -| 20 | 19 | SDFld | Failed to destroy | System | -| 20 | 20 | SDstd | Destroyed | System | -| 21 | 1 | HEM | Hemolyzed | System | -| 21 | 2 | ITC | Icteric | System | -| 21 | 3 | LIP | Lipemic | System | -| 21 | 4 | CFU | Centrifuged | System | -| 21 | 5 | ROOM | Room temperature | System | -| 21 | 6 | COOL | Cool | System | -| 21 | 7 | FROZ | Frozen | System | -| 21 | 8 | CLOT | Clotted | System | -| 21 | 9 | AUT | Autolyzed | System | -| 21 | 10 | CON | Contaminated | System | -| 21 | 11 | LIVE | Live | System | -| 22 | 1 | P | Patient | System | -| 22 | 2 | B | Blind Sample | System | -| 22 | 3 | Q | Control specimen | System | -| 22 | 4 | E | Electronic QC. Used with manufactured reference providing signals that simulate QC results | System | -| 22 | 5 | F | Filler Organization Proficiency. Specimen used for testing proficiency of the organization performing the testing (Filler) PME | System | -| 22 | 6 | O | Operator Proficiency. Specimen used for testing Operator Proficiency. | System | -| 22 | 7 | C | Calibrator | System | -| 22 | 8 | R | Replicate (of patient sample as a control). Used when a patient sample is re-run as a control for a repeat test | System | -| 22 | 9 | V | Verifying Calibrator. Used for periodic calibration checks. | System | -| 23 | 1 | pcntr | Puncture | System | -| 23 | 2 | fprk | Finger-prick sampling | System | -| 23 | 3 | ucct | Urine specimen collection, clean catch | System | -| 23 | 4 | utcl | Timed urine collection | System | -| 23 | 5 | ucth | Urine specimen collection, catheterized | System | -| 23 | 6 | scgh | Collection of coughed sputum | System | -| 23 | 7 | bpsy | Biopsy | System | -| 23 | 8 | aspn | Aspiration | System | -| 23 | 9 | excs | Excision | System | -| 23 | 10 | scrp | Scraping | System | -| 24 | 1 | LA | Left Arm | System | -| 24 | 2 | RA | Right Arm | System | -| 24 | 3 | LF | Left Foot | System | -| 24 | 4 | RF | Right Foot | System | -| 25 | 1 | 5ml | 5 mL | System | -| 25 | 2 | 7ml | 7 mL | System | -| 25 | 3 | 10ml | 10 mL | System | -| 25 | 4 | 1l | 1 L | System | -| 26 | 1 | F | *Fasting*. Pasien puasa | System | -| 26 | 2 | NF | *Not Fasting*. Pasien tidak puasa | System | -| 26 | 3 | NG | *Not Given*. Pasien tidak ditanyakan status puasanya. | System | -| 27 | 1 | TEST | *Test* | System | -| 27 | 2 | PARAM | *Parameter* | System | -| 27 | 3 | CALC | *Calculated Test* | System | -| 27 | 4 | GROUP | *Group Test* [^37] | System | -| 27 | 5 | TITLE | *Title*. | System | -| 28 | 1 | g/dL | | System | -| 28 | 2 | g/L | | System | -| 28 | 3 | mg/dL | | System | -| 28 | 4 | mg/L | | System | -| 28 | 5 | L/L | | System | -| 28 | 6 | x10^6^/μL | | System | -| 28 | 7 | x10^12^/L | | System | -| 28 | 8 | fL | | System | -| 28 | 9 | pg | | System | -| 28 | 10 | x10^9^/L | | System | -| 29 | 1 | Phyton | Phyton | System | -| 29 | 2 | CQL | Clinical Quality Language | System | -| 29 | 3 | FHIRP | FHIRPath | System | -| 29 | 4 | SQL | SQL | System | -| 30 | 1 | JAWA | Jawa | System | -| 30 | 2 | SUNDA | Sunda | System | -| 30 | 3 | BATAK | Batak | System | -| 30 | 4 | SULOR | Suku asal Sulawesi lainnya | System | -| 30 | 5 | MDRA | Madura | System | -| 30 | 6 | BTWI | Betawi | System | -| 30 | 7 | MNG | Minangkabau | System | -| 30 | 8 | BUGIS | Bugis | System | -| 30 | 9 | MLYU | Melayu | System | -| 30 | 10 | SUMSL | Suku asal Sumatera Selatan | System | -| 30 | 11 | BTNOR | Suku asal Banten | System | -| 30 | 12 | NTTOR | Suku asal Nusa Tenggara Timur | System | -| 30 | 13 | BNJAR | Banjar | System | -| 30 | 14 | ACEH | Aceh | System | -| 30 | 15 | BALI | Bali | System | -| 30 | 16 | SASAK | Sasak | System | -| 30 | 17 | DAYAK | Dayak | System | -| 30 | 18 | TNGHA | Tionghoa | System | -| 30 | 19 | PPAOR | Suku asal Papua | System | -| 30 | 20 | MKSSR | Makassar | System | -| 30 | 21 | SUMOR | Suku asal Sumatera lainnya | System | -| 30 | 22 | MLKOR | Suku asal Maluku | System | -| 30 | 23 | KLMOR | Suku asal Kalimantan lainnya | System | -| 30 | 24 | CRBON | Cirebon | System | -| 30 | 25 | JBIOR | Suku asal Jambi | System | -| 30 | 26 | LPGOR | Suku Lampung | System | -| 30 | 27 | NTBOR | Suku asal Nusa Tenggara Barat lainnya | System | -| 30 | 28 | GRTLO | Gorontalo | System | -| 30 | 29 | MNHSA | Minahasa | System | -| 30 | 30 | NIAS | Nias | System | -| 30 | 31 | FORGN | Asing/luar negeri | System | -| 31 | 1 | ISLAM | Islam | System | -| 31 | 2 | KRSTN | Kristen | System | -| 31 | 3 | KTLIK | Katolik | System | -| 31 | 4 | HINDU | Hindu | System | -| 31 | 5 | BUDHA | Budha | System | -| 31 | 6 | KHCU | Khong Hu Cu | System | -| 31 | 7 | OTHER | Lainnya | System | -| 32 | 1 | PPMLN | Papua Melanezoid | System | -| 32 | 2 | NGRID | Negroid | System | -| 32 | 3 | WDOID | Weddoid | System | -| 32 | 4 | MMPM | Melayu Mongoloid_Proto Melayu | System | -| 32 | 5 | MMDM | Melayu Mongoloid_Deutro Melayu | System | -| 32 | 6 | TNGHA | Tionghoa | System | -| 32 | 7 | INDIA | India | System | -| 32 | 8 | ARAB | Arab | System | -| 33 | | | \ | System | -| 34 | 1 | PRPL | Purple | System | -| 34 | 2 | RED | Red | System | -| 34 | 3 | YLLW | Yellow | System | -| 34 | 4 | GRN | Green | System | -| 34 | 5 | PINK | Pink | System | -| 34 | 6 | LBLU | Light Blue | System | -| 34 | 7 | RBLU | Royal Blue | System | -| 34 | 8 | GRAY | Gray | System | -| 35 | 1 | ORD | Order | System | -| 35 | 2 | ANA | Analyse | System | -| 35 | 3 | VER | Result Verification/Technical Validation | System | -| 35 | 4 | REV | Clinical Review/Clinical Validation | System | -| 35 | 5 | REP | Reporting | System | -| 36 | 1 | A01 | Admit | System | -| 36 | 2 | A02 | Transfer | System | -| 36 | 3 | A03 | Discharge | System | -| 36 | 4 | A04 | Register | System | -| 36 | 5 | A08 | Update patient information | System | -| 36 | 6 | A11 | Cancel admit | System | -| 36 | 7 | A12 | Cancel transfer | System | -| 36 | 8 | A13 | Cancel discharge | System | -| 36 | 9 | A23 | Delete patient record | System | -| 36 | 10 | A24 | Link patient information | System | -| 36 | 11 | A37 | Unlink patient information | System | -| 36 | 12 | A54 | Change attending doctor | System | -| 36 | 13 | A61 | Change consulting doctor | System | -| 37 | 1 | GH | Government Hospital (rumah sakit pemerintah) | System | -| 37 | 2 | PH | Private Hospital (rumah sakit swasta) | System | -| 37 | 3 | GHL | Government Hospital Lab (lab RS pemerintah) | System | -| 37 | 4 | PHL | Private Hospital Lab (Lab RS swasta) | System | -| 37 | 5 | GL | Government Lab (laboratorium mandiri pemerintah) | System | -| 37 | 6 | PL | Private Lab (laboratorium mandiri swasta) | System | -| 38 | 1 | A | Kelas A | System | -| 38 | 2 | B | Kelas B | System | -| 38 | 3 | C | Kelas C | System | -| 38 | 4 | D | Kelas D | System | -| 38 | 5 | Utm | Utama | System | -| 38 | 6 | Ptm | Pratama | System | -| 39 | 1 | HIS | HIS | System | -| 39 | 2 | SITE | Site | System | -| 39 | 3 | WST | Workstation | System | -| 39 | 4 | INST | Equipment/Instrument | System | -| 40 | 1 | PROP | Propinsi | System | -| 40 | 2 | KAB | Kabupaten | System | -| 40 | 3 | KOTA | Kota | System | -| 41 | 1 | = | Equal | System | -| 41 | 2 | \< | Greater than | System | -| 41 | 3 | \> | More than | System | -| 41 | 4 | \<= | Less than or equal to | System | -| 41 | 5 | \>= | Greater than or equal to | System | -| 42 | 1 | 0 | System | System | -| 42 | 2 | 1 | User-defined | System | -| 43 | 1 | NMRIC | Numeric | System | -| 43 | 2 | RANGE | Range | System | -| 43 | 3 | TEXT | Text | System | -| 43 | 4 | VSET | Value set | System | -| 44 | 1 | NMRC | Numeric | System | -| 44 | 2 | TEXT | Text | System | -| 45 | 1 | REF | Reference Range | System | -| 45 | 2 | CRTC | Critical Range | System | -| 45 | 3 | VAL | Validation Range | System | -| 45 | 4 | RERUN | Rerun Range | System | -| 46 | 1 | RANGE | Range | System | -| 46 | 2 | THOLD | Threshold | System | -| 47 | 1 | VSET | Value Set | System | -| 47 | 2 | TEXT | Text. | System | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| 1001 | 1 | NEG | Negative | User | -| 1001 | 2 | POS | Positive | User | -| 1001 | 3 | GZ | Grayzone | User | -| 1002 | 1 | KNG | Kuning | User | -| 1002 | 2 | JNG | Jingga | User | -| 1002 | 3 | MRH | Merah | User | -| 1002 | 4 | CKLT | Coklat tua | User | -| | | | • | | - -Value Set - -### Value set Field (Table 97. ) {#value-set-field-table-97.} - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    VSNameVDescVSetID
    WSTypeworkstation.Type1
    Enable/Disable

    workstation.Enable

    -

    equipmentlist.Enable

    -

    testdef.CountStat

    -

    testdefsite.CountStat

    -

    testdefsite.VisibleScr

    -

    testdefsite.VisibleRpt

    2
    Gender

    patient.Gender

    -

    refnum.Sex

    3
    Marital Statuspatient.MaritalStatus4
    Death Indicatorpatient.DeathIndicator5
    Identifier Typepatidt.IdentifierType6
    Operation

    patreglog.Operation

    -

    patvisitlog.Operation

    -

    orderlog.Operation

    7
    DID Type

    patreglog.DIDType

    -

    patvisitlog.DIDType

    8
    Requested Entityorder.ReqEntity9
    Order Priorityorder.Priority10
    Order Statusorderststatus.OrderStatus11
    Location TypeTable 34 locationlocation.LocationType12
    Additive

    containertype.Additive

    -

    specimenprep.Additive

    13
    Container Classcontainertype.ConClass14
    Specimen Type

    testdeftech.SpcType

    -

    refnum.SpcType

    -

    reftxt.SpcType

    15
    Unit

    spcdef.Unit

    -

    specimens.Unit

    -

    specimenstatus.Unit

    -

    specimenprep.AddUnit

    16
    GenerateByspecimens. GenerateBy17
    Specimen Activityspecimenstatus.SpcAct18
    Activity Result

    specimenstatus.ActRes

    -

    patrestatus.ActRes

    19
    Specimen Statusspecimenstatus.SpcStatus20
    Specimen Conditionspecimenstatus.SpcCon21
    Specimen Rolespecimencollection.SpcRole22
    Collection Methodspecimencollection.ColMethod23
    Body Sitespecimencollection.BodySite24
    Container Sizespecimencollection.CntSize25
    Fasting Statusspecimencollection.Fasting26
    Test Typetestdefsite.TestType27
    Result Unit

    testdefsite.Unit1

    -

    testdefsite.Unit2

    28
    Formula Languangetestdefcal.FormulaLang29
    Racepatient.Race30
    Religionpatient.Religion31
    Ethnicpatient.Ethnic32
    Countrypatient.Country33
    Container cap colorcontainerdef.Color34
    Test Activitypatrestatus.TestAct35
    ADT Eventpatvisitadt.Code36
    Site TypeSite.SiteType37
    Site ClassSite.SiteClass38
    Entity Type

    testmap.HostType

    -

    testmap.ClientType

    39
    Area ClassAreaGeo40
    Math Sign

    refnum.LowSign

    -

    refnum.HighSign

    41
    VCategoryvalueset. VCategory42
    Result Typetestdeftech.ResultType43
    Reference Typetestdeftech.RefType44
    Range Typerefnum.RangeType45
    Numeric Reference Typerefnum.NumRefType46
    Text Reference Typereftxt. TxtRefType47
    HIVValue set untuk hasil HIV1001
    - -## Lampiran 15: Organization Structure - -### Discipline - -Reference: Table 9. discipline - -| **DisciplineID** | **DisciplineCode** | **DisciplineName** | **Parent** | -|------------------|--------------------|---------------------|------------| -| 1 | HEMA | Hematology | | -| 2 | CHEM | Clinical Chemistry | | -| 3 | IMSR | Immunology/Serology | | -| 4 | URIN | Urinalysis | | -| 5 | FECAL | Fecal Analysis | | -| 6 | HC | Pathology/Cytology | | -| 7 | MICRO | Microbiology | | -| 8 | TXC | Toxicology | | -| 9 | LF | Life Sciences | | -| 10 | ND | Non-discipline | | -| 11 | BGP | Gula Darah | HEMA | -| 12 | LPD | Profil Lipid | CHEM | -| 13 | LVRP | Fungsi Hati | CHEM | -| 14 | KDN | Fungsi Ginjal | CHEM | - -## Lampiran 16: HL7 Message - -| | | | | -|-----|-----|-----|-----| -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | -| | | | | - -MSH\|\^\~\\\|\|\|\|\|20251006112101\|\|ORU\^R01\|8510\|P\|2.3.1\|\|\|\|0\|\|ASCII\|\|\|\ - -PID\|2298\|0500048614\|\|\|Rukmini -Ambarsari\|\|19680607000000\|F\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\ - -OBR\|2298\|2510060052GSK\|12\|\^\|N\|20251006110950\|20251006110950\|\|\|1\^20\|\|\|\|20251006110950\|Serum\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\ - -OBX\|1\|NM\|ALT\|Alanine -Aminotransferase\|43.638382\|U/L\|-34.0\|N\|\|\|F\|\|43.638382\|20251006112052\|\|\|**0**\|\ - -OBX\|2\|NM\|AST\|Aspartate -Aminotransferase\|77.419359\|U/L\|-31.0\|N\|\|\|F\|\|77.419359\|20251006112101\|\|\|**0**\|\ - -OBX\|3\|NM\|CREA\|Creatinine (Sarcosine Oxidase -Method)\|4.495076\|mg/dL\|0.50-0.90\|N\|\|\|F\|\|4.495076\|20251006112101\|\|\|**0**\|\ - -OBX\|4\|NM\|ALB\|Albumin\|0.974539\|g/dL\|3.50-5.30\|N\|\|\|F\|\|0.974539\|20251006111655\|\|\|**0**\|\ - -OBX\|5\|NM\|UREA\|Urea\|163.754362\|mg/dL\|16.81-43.25\|N\|\|\|F\|\|163.754362\|20251006112027\|\|\|**0**\|\ - -MSH\|\^\~\\\|\|\|\|\|20251006121224\|\|ORU\^R01\|8514\|P\|2.3.1\|\|\|\|0\|\|ASCII\|\|\|\ - -PID\|2300\|0500048614\|\|\| Rukmini -Ambarsari\|\|19680607000000\|F\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\ - -OBR\|2300\|2510060052GSK\|12\|\^\|N\|20251006110950\|20251006110950\|\|\|1\^1\|\|\|\|20251006110950\|Serum\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\ - -OBX\|1\|NM\|CREA\|Creatinine (Sarcosine Oxidase -Method)\|4.405742\|mg/dL\|0.50-0.90\|N\|\|\|F\|\|4.405742\|20251006121224\|\|\|**1**\|\ - -OBX\|2\|NM\|UREA\|Urea\|162.841855\|mg/dL\|16.81-43.25\|N\|\|\|F\|\|162.841855\|20251006121124\|\|\|**1**\|\ - -# Referensi - - ------------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    TestTechID

    -
    -

    SiteID

    -
    -

    WorkstationID

    -
    -

    EquipmentID

    -
    -

    InstrumentID

    -
    -

    InstrumentName

    -
    -

    TestSiteID

    -
    -

    TestSiteCode

    -
    -

    TestSiteName

    -
    -

    ConDefID

    -
    -

    ConCode

    -
    -

    TestTechCode

    -
    -

    TestTechAbb

    -
    -

    TestTechName

    -
    -

    Method

    -
    -

    CreateDate

    -
    -

    EndDate

    -
    101CC_main5976010840622TMS-30i1GLUARGlukosa Sewaktu11011GLUGlucoseHexokinase
    201CC_main5976010840622TMS-30i2GLUFGlukosa Puasa21021GLUGlucoseHexokinase
    301CC_main5976010840622TMS-30i3GLU2HPPGlukosa 2 Jam PP31031GLUGlucoseHexokinase
    401CC_main5976010840622TMS-30i4SGOTAspartate Aminotransferase11012ASTASTIFCC
    501CC_main5976010840622TMS-30i5SGPTAlanine Aminotransferase11013ALTALTIFCC
    601CC_main5976010840622TMS-30i6CREACreatinine11014CREACREAEnzymatic
    701CC_main5976010840622TMS-30i7CREAUCreatinine Urine104014CREACREAEnzymatic
    801CC_back582711000813TMS-24i1GLUARGlukosa Sewaktu11011GLUGlucoseHexokinase
    901CC_back582711000813TMS-24i2GLUFGlukosa Puasa21021GLUGlucoseHexokinase
    1001CC_back582711000813TMS-24i3GLU2HPPGlukosa 2 Jam PP31031GLUGlucoseHexokinase
    1101CC_back582711000813TMS-24i4SGOTAspartate Aminotransferase11012ASTASTIFCC
    1201CC_back582711000813TMS-24i5SGPTAlanine Aminotransferase11013ALTALTIFCC
    1301CC_back582711000813TMS-24i6CREACreatinine11014CREACREAEnzymatic
    1401CC_back582711000813TMS-24i7CREAUCreatinine Urine104014CREACREAEnzymatic
    - -# Riwayat Perubahan - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    VersiTanggal BerlakuPerubahan
      21 Agustus 2024Dokumen dibuat 
      21 Oktober 2024Lampiran 3: TMS-24i 
    11 September 2025

    Tambahan value set untuk:

    -
      -
    • containertype – Additive

    • -
    • containertype – ConClass

    • -
    • spcdef – SpcType

    • -
    • spcedef-Unit.

    • -
    12 September 2025
      -
    • tambahan value set untuk:

      -
        -
      • specimens – SpcRole

      • -
      • specimenstatus – SpcAct

      • -
      • specimenstatus – ActRes

      • -
      • specimenstatus – SpcStatus

      • -
    • -
    • spcactdef table ditiadakan dan diganti dengan value -set.

    • -
    • spccondition table ditiadakan dan digantikan dengan -value set.

    • -
      -
    • Ganti nama containertype table menjadi containerdef -table.

    • -
    • Ganti terminology specimen code menjadi -container code. Container code -menjadi bagian dari SID.

    • -
    • hapus spcdef table dan atributnya digabungkan ke containerdef -table.

    • -
    29 September 2025
      -
    1. Tambahan password pada Table 15. Contact

    2. -
    3. Copy Account dan Site tables dari CRM

    4. -
    5. Tambahan SiteCode pada Table 42. Site

    6. -
    7. Race, religion, ethnic dan -country menjadi Value Set, bukan dikelola dalam table -terpisah.

    8. -
    1 Oktober 2025
      -
    1. hapus table race, religion, ethnic dan -country

    2. -
    3. Rules dalam test ordering

    4. -
    2 Oktober 2025
      -
    1. hapus field TestID dari table testdefsite, karena fungsi mapping -dikelola di table testmap.

    2. -
    14 Oktober 2025
      -
    1. Tambahan contoh relasi Patient Registration, Patient -Visit, ADT & Test Ordering .

    2. -
    15 Oktober 2025
      -
    1. Update testdefcal table

    2. -
    3. tambahan value set testdefcal.FormulaLang dan -containerdef.Color

    4. -
    5. Update testgrp table

    6. -
    16 Oktober 2025
      -
    1. create table refnum, refthold, refvset, revtxt

    2. -
    3. update table patres

    4. -
    20 Oktober 2025
      -
    1. tambahan table patrestatus

    2. -
    3. tambahan Value Set TestAct

    4. -
    21 Oktober 2025
      -
    1. Update semua datetime disimpan sebagai UTC+0 kecuali DoB dan -ToD.

    2. -
    3. Test activity & Test status

    4. -
    5. tambahan ADT event di Value Set

    6. -
    22 Oktober 2025
      -
    1. Tambahan value set untuk SiteClass dan SiteType

    2. -
    3. Contoh struktur organisasi

    4. -
    23 Oktober 2025
      -
    1. Update table testmap, testdefcal.

    2. -
    3. Contoh test mapping.

    4. -
    3 November 2025
      -
    1. Update table Workstation. Hapus referensi -equipment.

    2. -
    3. Update table Equipment. Tambah referensi ke -workstation.

    4. -
    6 November 2025
      -
    1. Beberapa irrelevant fields dari table CRM -dihilangkan di CLQMS:

      -
        -
      1. NPWP di table Account

      2. -
      3. ME di table Site

      4. -
    2. -
    20 November 2025
      -
    1. Contoh tables: testdefsite, testdeftech, testdefcal, -testdefgrp

    2. -
    3. ConDefID dihilangkan dari table testdeftech.

    4. -
    28 November 2025
      -
    1. Field Type di table testdefsite -diuraikan menjadi:

      -
        -
      1. TestType di table testdefsite

      2. -
      3. ResultType di table testdeftech.

      4. -
      5. RefType di table testdeftech.

      6. -
    2. -
    1 Desember 2025
      -
    1. Result Reporting

    2. -
    3 Desember 2025
      -
    1. Tambahan Value Set untuk ResultType dan RefType

    2. -
    3. Perubahan Value Set untuk Test Type (VSet 27) dari sebelumnya 12 -items menjadi 5 items

    4. -
    4 Desember 2025
      -
    1. Tambahan fields pada table discipline: Parent -dan SiteID

    2. -
    16 Desember 2025
      -
    1. Hapus SiteID dari testdeftech, testdefcal dan testdefgrp

    2. -
    19 Desember 2025
      -
    1. Menggabungkan refnum dan refthold menjadi refnum.

    2. -
    3. Mengganti opsi pada testdeftech.RefType dan testdefcal.RefType -dari sebelumnya Range, Threshold, Value Set, -Text. menjadi Numeric dan Text.

    4. -
    24 Desember 2025
      -
    1. Menggabungkan refvset dan reftxt menjadi reftxt

    2. -
    3. update Value Set

    4. -
    26 Desember 2025
      -
    1. Update Business Rules untuk reftxt

    2. -
    3. API contract untuk testdefsite

    4. -
    - -# Distribusi - -| Asli | | : | -|------|-------|-----| -| Kopi | No. 1 | : | -| | No. 2 | : | -| | No. 3 | : | -| | No. 4 | : | - -**[PERSETUJUAN]{.underline}** - -Yang bertanda tangan di bawah ini menyatakan telah membaca dan -menyetujui isi dokumen ini. - - ----- - - - - - - - - - - - - - - - - - - - -
    Alam Dari HendartoIrham Faid Faiztyan
    Technical Support Supervisor for IT SolutionTechnical Support Officer for IT Solution
    -
    Tanggal: 30 Agustus 2023Tanggal: 30 Agustus 2023
    - -Mengetahui, - -Adhitya Pranata Putra - -\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ - -*Technical Support Manager* - -[^1]: (Albetkova & Barteluk, 2011) - -[^2]: https://en.wikipedia.org/wiki/Data_integrity - -[^3]: karena juga berarti *area*, maka dimungkinkan *specimen reception* - di *workstation*. - -[^4]: Location yang dimaksud adalah lokasi/ruang-ruang dalam site - (hospital, lab). - -[^5]: Self-reference dalam table yang sama melalui link *parent*. - -[^6]: *Informed consent* (persetujuan berpengetahuan) adalah persetujuan - yang diberikan oleh pasien atau keluarganya setelah mendapatkan - informasi lengkap dan dipahami mengenai tindakan medis yang akan - dilakukan. Persetujuan ini merupakan dasar penting dalam praktik - kedokteran, memastikan pasien memahami risiko dan manfaat sebelum - memutuskan untuk menerima tindakan - -[^7]: biasanya diwujudkan dalam bentuk *worklist*. - -[^8]: Kode instrument ini specific dan terikat dengan Lokasi (site) - sehingga sample bisa ditelusuri di site mana (LabRujukan) - -[^9]: Jika instrument punya kemampuan untuk scan label dan update ke - LIS, maka fungsi ini bisa dijalankan. Atau bisa dilakukan manual - oleh analis. Instrument TLA kemungkinan bisa mengupdate keberadaan - tabung sample secara lebih detail. - -[^10]: Kode tempat peyimpanan ini specific dan terikat dengan Lokasi - (site) sehingga sample bisa ditelusuri di site mana (LabRujukan) - -[^11]: *Laboratory test panels* *(also called test batteries)* *are the - aggregation of several laboratory tests, as they are often - commissioned in a clinical context and presented as results*. - (https://fhir.ch/ig/ch-lab-report/1.0.0/usecases-en.html) - -[^12]: Lihat table InvCounter dan InvTransaction di prj_crm_origin.docx - -[^13]: ***services*** adalah program/aplikasi yang berjalan di - background, secara otomatis, tanpa *user interaction*, berfungsi - untuk komunikasi (network connections), pengelolaan *hardware*, - software update, Program/aplikasi tersebut bisa diakses dan dikelola - melalui suatu *user interface* atau *console*. - -[^14]: https://en.wikipedia.org/wiki/Operational_system - -[^15]: https://en.wikipedia.org/wiki/Data_warehouse - -[^16]: https://www.altexsoft.com/blog/non-functional-requirements/ - -[^17]: prj_crm_origin.docx - -[^18]: Missal: reagen Proline dengan no. catalog yang sama dipasarkan - oleh SUMMIT dan beberapa distributor lain. No catalog item tersebut - hanya ada di table ProductCatalog saja. - -[^19]: Kode ADT menggunakan HL7 Standard - -[^20]: dokter utama - -[^21]: The International Organization for Standardization (ISO) and - Clinical and Laboratory Standards Institute (CLSI) define a sample - as "one or more parts taken from a system and intended to provide - information on the system" (ISO 15189:2007). The term "specimen" is - very commonly used in the laboratory to indicate a sample taken from - the human body, but the terminology used throughout ISO documents is - "primary sample", or just "sample". In this handbook, the terms - "sample" and "specimen" should be considered interchangeable. It is - useful to note that in some of the existing transport regulations, - the term "specimen" continues to be used - -[^22]: https://hl7.org/fhir/R4/valueset-specimen-container-type.html - -[^23]: gambar disimpan di table ProductCatalogDescription (CRM) -- - *inventory module*. - -[^24]: Reagen atau bahan habis pakai yang diperlukan bisa saja lebih - dari satu item. - -[^25]: External QC (EQC) dikelompokkan berdasarkan instrument, method. - Field method diletakkan per site untuk fleksibilitas. - -[^26]: https://en.wikipedia.org/wiki/Risk_factor#General_determinants - -[^27]: Biasanya panjang, untuk pemeriksaan hormonal - -[^28]: *comply* dengan ISO 15189/13485 -- *traceable*, *explicit rules*. - -[^29]: *comply* dengan ISO 15189/13485 -- *traceable*, *explicit rules*. - -[^30]: Value Set tidak digunakan untuk menyimpan definisi object. - -[^31]: Pada 50i, dihitung dari ITEMPARA.STD1 dibagi dengan - (Calib.STD_1OD-Calib.BLK_OD) - -[^32]: Bertujuan menghitung jumlah test keseluruhan yang diproduksi - instrument - -[^33]: Menyimpan data dari instrument apa adanya penting, untuk - memudahkan penelusuran. Database CLQMS dipandang sebagai *data - warehouse* dari semua instrument. - -[^34]: ***services*** adalah program/aplikasi yang berjalan di - background, secara otomatis, tanpa *user interaction*, berfungsi - untuk komunikasi (network connections), pengelolaan *hardware*, - software update, Program/aplikasi tersebut bisa diakses dan dikelola - melalui suatu *user interface* atau *console*. - -[^35]: https://en.wikipedia.org/wiki/ISO_3166-1 - -[^36]: https://build.fhir.org/ig/hl7-eu/laboratory/ValueSet-lab-specimenAdditive-eu-lab.html - -[^37]: terdiri dari *Profile, Functional Procedure, Superset* diff --git a/public/docs.html b/public/docs.html new file mode 100644 index 0000000..0c24423 --- /dev/null +++ b/public/docs.html @@ -0,0 +1,17 @@ + + + + + + + Elements in HTML + + + + + + + + + + \ No newline at end of file diff --git a/public/openapi.yaml b/public/openapi.yaml new file mode 100644 index 0000000..9000ef3 --- /dev/null +++ b/public/openapi.yaml @@ -0,0 +1,3287 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "CLQMS API", + "description": "Clinical Laboratory Quality Management System REST API", + "version": "1.0.0", + "contact": { + "name": "CLQMS Development Team" + } + }, + "servers": [ + { + "url": "http://localhost/clqms01/", + "description": "Development server" + } + ], + "components": { + "securitySchemes": { + "jwtAuth": { + "type": "apiKey", + "in": "cookie", + "name": "token", + "description": "JWT token stored in HTTP-only cookie" + } + }, + "schemas": { + "ApiResponse": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["success", "failed"], + "description": "Response status" + }, + "message": { + "type": "string", + "description": "Response message" + }, + "data": { + "type": "object", + "description": "Response data payload" + } + } + }, + "Patient": { + "type": "object", + "properties": { + "InternalPID": { + "type": "integer", + "description": "Internal patient ID" + }, + "PatientID": { + "type": "string", + "maxLength": 30, + "description": "Patient identifier" + }, + "AlternatePID": { + "type": "string", + "maxLength": 30, + "description": "Alternate patient ID" + }, + "Prefix": { + "type": "string", + "maxLength": 10, + "description": "Name prefix" + }, + "NameFirst": { + "type": "string", + "minLength": 1, + "maxLength": 60, + "description": "First name" + }, + "NameMiddle": { + "type": "string", + "minLength": 1, + "maxLength": 60, + "description": "Middle name" + }, + "NameLast": { + "type": "string", + "minLength": 1, + "maxLength": 60, + "description": "Last name" + }, + "NameMaiden": { + "type": "string", + "minLength": 1, + "maxLength": 60, + "description": "Maiden name" + }, + "Suffix": { + "type": "string", + "maxLength": 10, + "description": "Name suffix" + }, + "Sex": { + "type": "string", + "description": "Gender (M/F)" + }, + "Birthdate": { + "type": "string", + "format": "date", + "description": "Date of birth" + }, + "PlaceOfBirth": { + "type": "string", + "maxLength": 100, + "description": "Place of birth" + }, + "Street_1": { + "type": "string", + "maxLength": 255, + "description": "Address line 1" + }, + "Street_2": { + "type": "string", + "maxLength": 255, + "description": "Address line 2" + }, + "Street_3": { + "type": "string", + "maxLength": 255, + "description": "Address line 3" + }, + "City": { + "type": "string", + "description": "City" + }, + "Province": { + "type": "string", + "description": "Province/State" + }, + "ZIP": { + "type": "string", + "maxLength": 10, + "description": "Postal code" + }, + "EmailAddress1": { + "type": "string", + "format": "email", + "maxLength": 100, + "description": "Primary email" + }, + "EmailAddress2": { + "type": "string", + "format": "email", + "maxLength": 100, + "description": "Secondary email" + }, + "Phone": { + "type": "string", + "pattern": "^\\+?[0-9]{8,15}$", + "description": "Phone number" + }, + "MobilePhone": { + "type": "string", + "pattern": "^\\+?[0-9]{8,15}$", + "description": "Mobile phone number" + }, + "PatIdt": { + "$ref": "#/components/schemas/PatientIdentifier" + }, + "PatAtt": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PatientAttribute" + }, + "description": "Patient attributes/addresses" + } + } + }, + "PatientIdentifier": { + "type": "object", + "properties": { + "IdentifierType": { + "type": "string", + "description": "Identifier type (KTP, PASS, SSN, SIM, KTAS)" + }, + "Identifier": { + "type": "string", + "maxLength": 255, + "description": "Identifier value" + } + } + }, + "PatientAttribute": { + "type": "object", + "properties": { + "Address": { + "type": "string", + "description": "Patient address" + } + } + }, + "PatVisit": { + "type": "object", + "properties": { + "PatVisitID": { + "type": "integer", + "description": "Patient visit ID" + }, + "InternalPID": { + "type": "integer", + "description": "Internal patient ID" + }, + "VisitDate": { + "type": "string", + "format": "date-time", + "description": "Visit date/time" + }, + "VisitType": { + "type": "string", + "description": "Type of visit" + }, + "DepartmentID": { + "type": "integer", + "description": "Department ID" + }, + "ProviderID": { + "type": "integer", + "description": "Provider/Doctor ID" + }, + "VisitStatus": { + "type": "string", + "description": "Visit status" + } + } + }, + "OrderTest": { + "type": "object", + "properties": { + "OrderID": { + "type": "integer", + "description": "Order ID" + }, + "InternalPID": { + "type": "integer", + "description": "Patient ID" + }, + "PatVisitID": { + "type": "integer", + "description": "Visit ID" + }, + "OrderDateTime": { + "type": "string", + "format": "date-time", + "description": "Order date/time" + }, + "Priority": { + "type": "string", + "description": "Order priority" + }, + "OrderStatus": { + "type": "string", + "enum": ["ORD", "SCH", "ANA", "VER", "REV", "REP"], + "description": "Order status" + }, + "OrderingProvider": { + "type": "string", + "description": "Ordering provider" + }, + "DepartmentID": { + "type": "integer", + "description": "Department ID" + }, + "WorkstationID": { + "type": "integer", + "description": "Workstation ID" + }, + "Tests": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrderTestItem" + } + } + } + }, + "OrderTestItem": { + "type": "object", + "properties": { + "TestID": { + "type": "integer", + "description": "Test ID" + }, + "TestCode": { + "type": "string", + "description": "Test code" + }, + "TestName": { + "type": "string", + "description": "Test name" + } + } + }, + "Specimen": { + "type": "object", + "properties": { + "SID": { + "type": "integer", + "description": "Specimen ID" + }, + "OrderID": { + "type": "integer", + "description": "Order ID" + }, + "InternalPID": { + "type": "integer", + "description": "Patient ID" + }, + "SpecimenType": { + "type": "string", + "description": "Specimen type" + }, + "ContainerCode": { + "type": "string", + "description": "Container code" + }, + "CollectionDateTime": { + "type": "string", + "format": "date-time", + "description": "Collection date/time" + }, + "ReceivedDateTime": { + "type": "string", + "format": "date-time", + "description": "Received date/time" + }, + "Status": { + "type": "string", + "description": "Specimen status" + } + } + }, + "TestDefinition": { + "type": "object", + "properties": { + "TestID": { + "type": "integer", + "description": "Test ID" + }, + "TestCode": { + "type": "string", + "description": "Test code" + }, + "TestName": { + "type": "string", + "description": "Test name" + }, + "SpecimenType": { + "type": "string", + "description": "Required specimen type" + }, + "DepartmentID": { + "type": "integer", + "description": "Department ID" + }, + "Category": { + "type": "string", + "description": "Test category" + } + } + }, + "ValueSet": { + "type": "object", + "properties": { + "ValueSetID": { + "type": "integer", + "description": "Value set ID" + }, + "ValueSetKey": { + "type": "string", + "description": "Value set key" + }, + "Name": { + "type": "string", + "description": "Value set name" + }, + "Description": { + "type": "string", + "description": "Value set description" + }, + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ValueSetItem" + } + } + } + }, + "ValueSetItem": { + "type": "object", + "properties": { + "ItemID": { + "type": "integer", + "description": "Item ID" + }, + "Value": { + "type": "string", + "description": "Item value/code" + }, + "Label": { + "type": "string", + "description": "Item display label" + }, + "Sequence": { + "type": "integer", + "description": "Display order" + } + } + }, + "ValueSetDef": { + "type": "object", + "properties": { + "VSetDefID": { + "type": "integer", + "description": "Value set definition ID" + }, + "ValueSetKey": { + "type": "string", + "description": "Value set key" + }, + "Name": { + "type": "string", + "description": "Definition name" + } + } + }, + "Location": { + "type": "object", + "properties": { + "LocationID": { + "type": "integer", + "description": "Location ID" + }, + "Code": { + "type": "string", + "description": "Location code" + }, + "Name": { + "type": "string", + "description": "Location name" + }, + "Type": { + "type": "string", + "description": "Location type" + }, + "ParentID": { + "type": "integer", + "description": "Parent location ID" + } + } + }, + "Contact": { + "type": "object", + "properties": { + "ContactID": { + "type": "integer", + "description": "Contact ID" + }, + "Name": { + "type": "string", + "description": "Contact name" + }, + "Type": { + "type": "string", + "description": "Contact type" + }, + "Phone": { + "type": "string", + "description": "Phone number" + }, + "Email": { + "type": "string", + "format": "email", + "description": "Email address" + } + } + }, + "Organization": { + "type": "object", + "properties": { + "AccountID": { + "type": "integer", + "description": "Account ID" + }, + "AccountCode": { + "type": "string", + "description": "Account code" + }, + "AccountName": { + "type": "string", + "description": "Account name" + } + } + }, + "Site": { + "type": "object", + "properties": { + "SiteID": { + "type": "integer", + "description": "Site ID" + }, + "SiteCode": { + "type": "string", + "description": "Site code" + }, + "SiteName": { + "type": "string", + "description": "Site name" + }, + "AccountID": { + "type": "integer", + "description": "Account ID" + } + } + }, + "Department": { + "type": "object", + "properties": { + "DepartmentID": { + "type": "integer", + "description": "Department ID" + }, + "DepartmentCode": { + "type": "string", + "description": "Department code" + }, + "DepartmentName": { + "type": "string", + "description": "Department name" + }, + "SiteID": { + "type": "integer", + "description": "Site ID" + } + } + }, + "Discipline": { + "type": "object", + "properties": { + "DisciplineID": { + "type": "integer", + "description": "Discipline ID" + }, + "DisciplineCode": { + "type": "string", + "description": "Discipline code" + }, + "DisciplineName": { + "type": "string", + "description": "Discipline name" + } + } + }, + "Workstation": { + "type": "object", + "properties": { + "WorkstationID": { + "type": "integer", + "description": "Workstation ID" + }, + "WorkstationCode": { + "type": "string", + "description": "Workstation code" + }, + "WorkstationName": { + "type": "string", + "description": "Workstation name" + }, + "DepartmentID": { + "type": "integer", + "description": "Department ID" + } + } + }, + "AreaGeo": { + "type": "object", + "properties": { + "AreaGeoID": { + "type": "integer", + "description": "Area ID" + }, + "ParentID": { + "type": "integer", + "description": "Parent area ID" + }, + "AreaName": { + "type": "string", + "description": "Area name" + }, + "Level": { + "type": "integer", + "description": "Geographic level" + } + } + }, + "SpecimenContainerDef": { + "type": "object", + "properties": { + "ContainerDefID": { + "type": "integer", + "description": "Container definition ID" + }, + "ContainerCode": { + "type": "string", + "description": "Container code" + }, + "ContainerName": { + "type": "string", + "description": "Container name" + }, + "Volume": { + "type": "string", + "description": "Required volume" + }, + "SpecimenType": { + "type": "string", + "description": "Specimen type" + } + } + }, + "SpecimenPrep": { + "type": "object", + "properties": { + "PrepID": { + "type": "integer", + "description": "Preparation ID" + }, + "PrepCode": { + "type": "string", + "description": "Preparation code" + }, + "PrepName": { + "type": "string", + "description": "Preparation name" + } + } + }, + "SpecimenStatus": { + "type": "object", + "properties": { + "StatusID": { + "type": "integer", + "description": "Status ID" + }, + "StatusCode": { + "type": "string", + "description": "Status code" + }, + "StatusName": { + "type": "string", + "description": "Status name" + } + } + }, + "Counter": { + "type": "object", + "properties": { + "CounterID": { + "type": "integer", + "description": "Counter ID" + }, + "CounterName": { + "type": "string", + "description": "Counter name" + }, + "CounterValue": { + "type": "integer", + "description": "Current counter value" + }, + "CounterPrefix": { + "type": "string", + "description": "Counter prefix" + }, + "CounterSuffix": { + "type": "string", + "description": "Counter suffix" + } + } + }, + "Error": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["failed"], + "description": "Error status" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "LoginRequest": { + "type": "object", + "required": ["username", "password"], + "properties": { + "username": { + "type": "string", + "description": "Username" + }, + "password": { + "type": "string", + "format": "password", + "description": "Password" + } + } + }, + "LoginResponse": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["success"] + }, + "code": { + "type": "integer", + "description": "HTTP status code" + }, + "message": { + "type": "string", + "description": "Response message" + } + } + } + } + }, + "security": [ + { + "jwtAuth": [] + } + ], + "paths": { + "/v2/auth/login": { + "post": { + "tags": ["Authentication"], + "summary": "User login", + "description": "Authenticate user and receive JWT token in HTTP-only cookie", + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/LoginRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Login successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginResponse" + } + } + } + }, + "401": { + "description": "Invalid credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v2/auth/logout": { + "post": { + "tags": ["Authentication"], + "summary": "User logout", + "description": "Clear JWT token cookie", + "responses": { + "200": { + "description": "Logout successful" + } + } + } + }, + "/v2/auth/check": { + "get": { + "tags": ["Authentication"], + "summary": "Check authentication status", + "description": "Verify if JWT token is valid", + "responses": { + "200": { + "description": "Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResponse" + } + } + } + }, + "401": { + "description": "Not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/api/auth/login": { + "post": { + "tags": ["Authentication"], + "summary": "User login (legacy)", + "description": "Authenticate user and receive JWT token in HTTP-only cookie", + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/LoginRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Login successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginResponse" + } + } + } + }, + "401": { + "description": "Invalid credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/api/auth/register": { + "post": { + "tags": ["Authentication"], + "summary": "Register new user", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["username", "password"], + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string", + "format": "password" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "User created successfully" + }, + "409": { + "description": "Username already exists" + } + } + } + }, + "/api/patient": { + "get": { + "tags": ["Patient"], + "summary": "List patients", + "description": "Get list of patients with optional filtering", + "parameters": [ + { + "name": "InternalPID", + "in": "query", + "schema": { + "type": "integer" + } + }, + { + "name": "PatientID", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "Name", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "Birthdate", + "in": "query", + "schema": { + "type": "string", + "format": "date" + } + } + ], + "responses": { + "200": { + "description": "List of patients", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResponse" + } + } + } + } + } + }, + "post": { + "tags": ["Patient"], + "summary": "Create patient", + "description": "Create a new patient record", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Patient" + } + } + } + }, + "responses": { + "201": { + "description": "Patient created successfully" + }, + "400": { + "description": "Validation error" + } + } + }, + "patch": { + "tags": ["Patient"], + "summary": "Update patient", + "description": "Update an existing patient record", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Patient" + } + } + } + }, + "responses": { + "200": { + "description": "Patient updated successfully" + }, + "400": { + "description": "Validation error" + } + } + }, + "delete": { + "tags": ["Patient"], + "summary": "Delete patient (soft delete)", + "description": "Soft delete a patient record", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["InternalPID"], + "properties": { + "InternalPID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Patient deleted successfully" + }, + "400": { + "description": "Invalid patient ID" + }, + "404": { + "description": "Patient not found" + } + } + } + }, + "/api/patient/{InternalPID}": { + "get": { + "tags": ["Patient"], + "summary": "Get patient by ID", + "parameters": [ + { + "name": "InternalPID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Patient details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResponse" + } + } + } + } + } + } + }, + "/api/patient/check": { + "get": { + "tags": ["Patient"], + "summary": "Check patient existence", + "parameters": [ + { + "name": "PatientID", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "EmailAddress1", + "in": "query", + "schema": { + "type": "string", + "format": "email" + } + } + ], + "responses": { + "200": { + "description": "Check result", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "message": { + "type": "string" + }, + "data": { + "type": "boolean", + "description": "true if not exists (available), false if exists" + } + } + } + } + } + }, + "400": { + "description": "Missing required parameter" + } + } + } + }, + "/api/patvisit": { + "get": { + "tags": ["Patient Visit"], + "summary": "List patient visits", + "responses": { + "200": { + "description": "List of visits" + } + } + }, + "post": { + "tags": ["Patient Visit"], + "summary": "Create patient visit", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatVisit" + } + } + } + }, + "responses": { + "201": { + "description": "Visit created successfully" + } + } + }, + "patch": { + "tags": ["Patient Visit"], + "summary": "Update patient visit", + "responses": { + "200": { + "description": "Visit updated successfully" + } + } + }, + "delete": { + "tags": ["Patient Visit"], + "summary": "Delete patient visit (soft delete)", + "responses": { + "200": { + "description": "Visit deleted successfully" + } + } + } + }, + "/api/patvisit/patient/{InternalPID}": { + "get": { + "tags": ["Patient Visit"], + "summary": "Get visits by patient", + "parameters": [ + { + "name": "InternalPID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "List of patient visits" + } + } + } + }, + "/api/patvisit/{PatVisitID}": { + "get": { + "tags": ["Patient Visit"], + "summary": "Get visit by ID", + "parameters": [ + { + "name": "PatVisitID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Visit details" + } + } + } + }, + "/api/ordertest": { + "get": { + "tags": ["Order Test"], + "summary": "List test orders", + "parameters": [ + { + "name": "InternalPID", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Filter by patient ID" + } + ], + "responses": { + "200": { + "description": "List of orders" + } + } + }, + "post": { + "tags": ["Order Test"], + "summary": "Create test order", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["InternalPID"], + "properties": { + "InternalPID": { + "type": "integer", + "description": "Patient ID" + }, + "PatVisitID": { + "type": "integer", + "description": "Visit ID (optional)" + }, + "Priority": { + "type": "string", + "description": "Order priority" + }, + "Tests": { + "type": "array", + "items": { + "type": "integer", + "description": "Test IDs" + } + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Order created successfully" + }, + "400": { + "description": "Validation error" + } + } + }, + "patch": { + "tags": ["Order Test"], + "summary": "Update test order", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "OrderID": { + "type": "integer" + }, + "Priority": { + "type": "string" + }, + "OrderStatus": { + "type": "string" + }, + "OrderingProvider": { + "type": "string" + }, + "DepartmentID": { + "type": "integer" + }, + "WorkstationID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Order updated successfully" + } + } + }, + "delete": { + "tags": ["Order Test"], + "summary": "Delete test order (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["OrderID"], + "properties": { + "OrderID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Order deleted successfully" + } + } + } + }, + "/api/ordertest/{OrderID}": { + "get": { + "tags": ["Order Test"], + "summary": "Get order by ID", + "parameters": [ + { + "name": "OrderID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Order details" + } + } + } + }, + "/api/ordertest/status": { + "post": { + "tags": ["Order Test"], + "summary": "Update order status", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["OrderID", "OrderStatus"], + "properties": { + "OrderID": { + "type": "integer" + }, + "OrderStatus": { + "type": "string", + "enum": ["ORD", "SCH", "ANA", "VER", "REV", "REP"], + "description": "Order status code" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Status updated successfully" + }, + "400": { + "description": "Invalid status" + } + } + } + }, + "/api/specimen": { + "get": { + "tags": ["Specimen"], + "summary": "List specimens", + "responses": { + "200": { + "description": "List of specimens" + } + } + }, + "post": { + "tags": ["Specimen"], + "summary": "Create specimen", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Specimen" + } + } + } + }, + "responses": { + "201": { + "description": "Specimen created successfully" + } + } + }, + "patch": { + "tags": ["Specimen"], + "summary": "Update specimen", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Specimen" + } + } + } + }, + "responses": { + "200": { + "description": "Specimen updated successfully" + } + } + } + }, + "/api/specimen/{SID}": { + "get": { + "tags": ["Specimen"], + "summary": "Get specimen by ID", + "parameters": [ + { + "name": "SID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Specimen details" + } + } + } + }, + "/api/specimen/container": { + "get": { + "tags": ["Specimen"], + "summary": "List container definitions", + "responses": { + "200": { + "description": "List of containers" + } + } + }, + "post": { + "tags": ["Specimen"], + "summary": "Create container definition", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpecimenContainerDef" + } + } + } + }, + "responses": { + "201": { + "description": "Container created successfully" + } + } + }, + "patch": { + "tags": ["Specimen"], + "summary": "Update container definition", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpecimenContainerDef" + } + } + } + }, + "responses": { + "200": { + "description": "Container updated successfully" + } + } + } + }, + "/api/specimen/container/{ContainerDefID}": { + "get": { + "tags": ["Specimen"], + "summary": "Get container definition by ID", + "parameters": [ + { + "name": "ContainerDefID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Container details" + } + } + } + }, + "/api/specimen/prep": { + "get": { + "tags": ["Specimen"], + "summary": "List specimen preparations", + "responses": { + "200": { + "description": "List of preparations" + } + } + }, + "post": { + "tags": ["Specimen"], + "summary": "Create specimen preparation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpecimenPrep" + } + } + } + }, + "responses": { + "201": { + "description": "Preparation created successfully" + } + } + }, + "patch": { + "tags": ["Specimen"], + "summary": "Update specimen preparation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpecimenPrep" + } + } + } + }, + "responses": { + "200": { + "description": "Preparation updated successfully" + } + } + } + }, + "/api/specimen/status": { + "get": { + "tags": ["Specimen"], + "summary": "List specimen statuses", + "responses": { + "200": { + "description": "List of statuses" + } + } + }, + "post": { + "tags": ["Specimen"], + "summary": "Create specimen status", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpecimenStatus" + } + } + } + }, + "responses": { + "201": { + "description": "Status created successfully" + } + } + }, + "patch": { + "tags": ["Specimen"], + "summary": "Update specimen status", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpecimenStatus" + } + } + } + }, + "responses": { + "200": { + "description": "Status updated successfully" + } + } + } + }, + "/api/specimen/collection": { + "get": { + "tags": ["Specimen"], + "summary": "List specimen collections", + "responses": { + "200": { + "description": "List of collections" + } + } + }, + "post": { + "tags": ["Specimen"], + "summary": "Create specimen collection", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Collection created successfully" + } + } + }, + "patch": { + "tags": ["Specimen"], + "summary": "Update specimen collection", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Collection updated successfully" + } + } + } + }, + "/api/tests": { + "get": { + "tags": ["Tests"], + "summary": "List test definitions", + "responses": { + "200": { + "description": "List of tests" + } + } + }, + "post": { + "tags": ["Tests"], + "summary": "Create test definition", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestDefinition" + } + } + } + }, + "responses": { + "201": { + "description": "Test created successfully" + } + } + }, + "patch": { + "tags": ["Tests"], + "summary": "Update test definition", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestDefinition" + } + } + } + }, + "responses": { + "200": { + "description": "Test updated successfully" + } + } + } + }, + "/api/tests/{TestID}": { + "get": { + "tags": ["Tests"], + "summary": "Get test definition by ID", + "parameters": [ + { + "name": "TestID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Test details" + } + } + } + }, + "/api/location": { + "get": { + "tags": ["Location"], + "summary": "List locations", + "responses": { + "200": { + "description": "List of locations" + } + } + }, + "post": { + "tags": ["Location"], + "summary": "Create location", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Location" + } + } + } + }, + "responses": { + "201": { + "description": "Location created successfully" + } + } + }, + "patch": { + "tags": ["Location"], + "summary": "Update location", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Location" + } + } + } + }, + "responses": { + "200": { + "description": "Location updated successfully" + } + } + }, + "delete": { + "tags": ["Location"], + "summary": "Delete location (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["LocationID"], + "properties": { + "LocationID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Location deleted successfully" + } + } + } + }, + "/api/location/{LocationID}": { + "get": { + "tags": ["Location"], + "summary": "Get location by ID", + "parameters": [ + { + "name": "LocationID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Location details" + } + } + } + }, + "/api/contact": { + "get": { + "tags": ["Contact"], + "summary": "List contacts", + "responses": { + "200": { + "description": "List of contacts" + } + } + }, + "post": { + "tags": ["Contact"], + "summary": "Create contact", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contact" + } + } + } + }, + "responses": { + "201": { + "description": "Contact created successfully" + } + } + }, + "patch": { + "tags": ["Contact"], + "summary": "Update contact", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contact" + } + } + } + }, + "responses": { + "200": { + "description": "Contact updated successfully" + } + } + }, + "delete": { + "tags": ["Contact"], + "summary": "Delete contact (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["ContactID"], + "properties": { + "ContactID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Contact deleted successfully" + } + } + } + }, + "/api/contact/{ContactID}": { + "get": { + "tags": ["Contact"], + "summary": "Get contact by ID", + "parameters": [ + { + "name": "ContactID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Contact details" + } + } + } + }, + "/api/occupation": { + "get": { + "tags": ["Contact"], + "summary": "List occupations", + "responses": { + "200": { + "description": "List of occupations" + } + } + }, + "post": { + "tags": ["Contact"], + "summary": "Create occupation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "OccupationCode": { + "type": "string" + }, + "OccupationName": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Occupation created successfully" + } + } + }, + "patch": { + "tags": ["Contact"], + "summary": "Update occupation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "OccupationID": { + "type": "integer" + }, + "OccupationCode": { + "type": "string" + }, + "OccupationName": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Occupation updated successfully" + } + } + } + }, + "/api/occupation/{OccupationID}": { + "get": { + "tags": ["Contact"], + "summary": "Get occupation by ID", + "parameters": [ + { + "name": "OccupationID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Occupation details" + } + } + } + }, + "/api/medicalspecialty": { + "get": { + "tags": ["Contact"], + "summary": "List medical specialties", + "responses": { + "200": { + "description": "List of specialties" + } + } + }, + "post": { + "tags": ["Contact"], + "summary": "Create medical specialty", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "SpecialtyCode": { + "type": "string" + }, + "SpecialtyName": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Specialty created successfully" + } + } + }, + "patch": { + "tags": ["Contact"], + "summary": "Update medical specialty", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "SpecialtyID": { + "type": "integer" + }, + "SpecialtyCode": { + "type": "string" + }, + "SpecialtyName": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Specialty updated successfully" + } + } + } + }, + "/api/medicalspecialty/{SpecialtyID}": { + "get": { + "tags": ["Contact"], + "summary": "Get medical specialty by ID", + "parameters": [ + { + "name": "SpecialtyID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Specialty details" + } + } + } + }, + "/api/organization/account": { + "get": { + "tags": ["Organization"], + "summary": "List accounts", + "responses": { + "200": { + "description": "List of accounts" + } + } + }, + "post": { + "tags": ["Organization"], + "summary": "Create account", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "responses": { + "201": { + "description": "Account created successfully" + } + } + }, + "patch": { + "tags": ["Organization"], + "summary": "Update account", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "responses": { + "200": { + "description": "Account updated successfully" + } + } + }, + "delete": { + "tags": ["Organization"], + "summary": "Delete account (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["AccountID"], + "properties": { + "AccountID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Account deleted successfully" + } + } + } + }, + "/api/organization/account/{AccountID}": { + "get": { + "tags": ["Organization"], + "summary": "Get account by ID", + "parameters": [ + { + "name": "AccountID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Account details" + } + } + } + }, + "/api/organization/site": { + "get": { + "tags": ["Organization"], + "summary": "List sites", + "responses": { + "200": { + "description": "List of sites" + } + } + }, + "post": { + "tags": ["Organization"], + "summary": "Create site", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Site" + } + } + } + }, + "responses": { + "201": { + "description": "Site created successfully" + } + } + }, + "patch": { + "tags": ["Organization"], + "summary": "Update site", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Site" + } + } + } + }, + "responses": { + "200": { + "description": "Site updated successfully" + } + } + }, + "delete": { + "tags": ["Organization"], + "summary": "Delete site (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["SiteID"], + "properties": { + "SiteID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Site deleted successfully" + } + } + } + }, + "/api/organization/site/{SiteID}": { + "get": { + "tags": ["Organization"], + "summary": "Get site by ID", + "parameters": [ + { + "name": "SiteID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Site details" + } + } + } + }, + "/api/organization/discipline": { + "get": { + "tags": ["Organization"], + "summary": "List disciplines", + "responses": { + "200": { + "description": "List of disciplines" + } + } + }, + "post": { + "tags": ["Organization"], + "summary": "Create discipline", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Discipline" + } + } + } + }, + "responses": { + "201": { + "description": "Discipline created successfully" + } + } + }, + "patch": { + "tags": ["Organization"], + "summary": "Update discipline", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Discipline" + } + } + } + }, + "responses": { + "200": { + "description": "Discipline updated successfully" + } + } + }, + "delete": { + "tags": ["Organization"], + "summary": "Delete discipline (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["DisciplineID"], + "properties": { + "DisciplineID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Discipline deleted successfully" + } + } + } + }, + "/api/organization/discipline/{DisciplineID}": { + "get": { + "tags": ["Organization"], + "summary": "Get discipline by ID", + "parameters": [ + { + "name": "DisciplineID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Discipline details" + } + } + } + }, + "/api/organization/department": { + "get": { + "tags": ["Organization"], + "summary": "List departments", + "responses": { + "200": { + "description": "List of departments" + } + } + }, + "post": { + "tags": ["Organization"], + "summary": "Create department", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Department" + } + } + } + }, + "responses": { + "201": { + "description": "Department created successfully" + } + } + }, + "patch": { + "tags": ["Organization"], + "summary": "Update department", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Department" + } + } + } + }, + "responses": { + "200": { + "description": "Department updated successfully" + } + } + }, + "delete": { + "tags": ["Organization"], + "summary": "Delete department (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["DepartmentID"], + "properties": { + "DepartmentID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Department deleted successfully" + } + } + } + }, + "/api/organization/department/{DepartmentID}": { + "get": { + "tags": ["Organization"], + "summary": "Get department by ID", + "parameters": [ + { + "name": "DepartmentID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Department details" + } + } + } + }, + "/api/organization/workstation": { + "get": { + "tags": ["Organization"], + "summary": "List workstations", + "responses": { + "200": { + "description": "List of workstations" + } + } + }, + "post": { + "tags": ["Organization"], + "summary": "Create workstation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workstation" + } + } + } + }, + "responses": { + "201": { + "description": "Workstation created successfully" + } + } + }, + "patch": { + "tags": ["Organization"], + "summary": "Update workstation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workstation" + } + } + } + }, + "responses": { + "200": { + "description": "Workstation updated successfully" + } + } + }, + "delete": { + "tags": ["Organization"], + "summary": "Delete workstation (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["WorkstationID"], + "properties": { + "WorkstationID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Workstation deleted successfully" + } + } + } + }, + "/api/organization/workstation/{WorkstationID}": { + "get": { + "tags": ["Organization"], + "summary": "Get workstation by ID", + "parameters": [ + { + "name": "WorkstationID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Workstation details" + } + } + } + }, + "/api/valueset": { + "get": { + "tags": ["Value Set"], + "summary": "List value sets", + "parameters": [ + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by value set key" + } + ], + "responses": { + "200": { + "description": "List of value sets" + } + } + }, + "post": { + "tags": ["Value Set"], + "summary": "Refresh value sets", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Value set key to refresh" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Value sets refreshed" + } + } + } + }, + "/api/valueset/{key}": { + "get": { + "tags": ["Value Set"], + "summary": "Get value set by key", + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Value set details" + } + } + } + }, + "/api/valueset/items": { + "get": { + "tags": ["Value Set"], + "summary": "List value set items", + "parameters": [ + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by value set key" + } + ], + "responses": { + "200": { + "description": "List of value set items" + } + } + }, + "post": { + "tags": ["Value Set"], + "summary": "Create value set item", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ValueSetID": { + "type": "integer" + }, + "Value": { + "type": "string" + }, + "Label": { + "type": "string" + }, + "Sequence": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Item created successfully" + } + } + } + }, + "/api/valueset/items/{ItemID}": { + "get": { + "tags": ["Value Set"], + "summary": "Get value set item by ID", + "parameters": [ + { + "name": "ItemID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Item details" + } + } + }, + "put": { + "tags": ["Value Set"], + "summary": "Update value set item", + "parameters": [ + { + "name": "ItemID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "Value": { + "type": "string" + }, + "Label": { + "type": "string" + }, + "Sequence": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Item updated successfully" + } + } + }, + "delete": { + "tags": ["Value Set"], + "summary": "Delete value set item", + "parameters": [ + { + "name": "ItemID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Item deleted successfully" + } + } + } + }, + "/api/result/valueset": { + "get": { + "tags": ["Result Value Set"], + "summary": "List result value sets", + "description": "CRUD operations for result value sets", + "responses": { + "200": { + "description": "List of result value sets" + } + } + }, + "post": { + "tags": ["Result Value Set"], + "summary": "Create result value set", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValueSet" + } + } + } + }, + "responses": { + "201": { + "description": "Value set created successfully" + } + } + } + }, + "/api/result/valueset/{ValueSetID}": { + "get": { + "tags": ["Result Value Set"], + "summary": "Get result value set by ID", + "parameters": [ + { + "name": "ValueSetID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Value set details" + } + } + }, + "put": { + "tags": ["Result Value Set"], + "summary": "Update result value set", + "parameters": [ + { + "name": "ValueSetID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValueSet" + } + } + } + }, + "responses": { + "200": { + "description": "Value set updated successfully" + } + } + }, + "delete": { + "tags": ["Result Value Set"], + "summary": "Delete result value set", + "parameters": [ + { + "name": "ValueSetID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Value set deleted successfully" + } + } + } + }, + "/api/result/valuesetdef": { + "get": { + "tags": ["Result Value Set Definition"], + "summary": "List value set definitions", + "description": "CRUD operations for value set definitions", + "responses": { + "200": { + "description": "List of value set definitions" + } + } + }, + "post": { + "tags": ["Result Value Set Definition"], + "summary": "Create value set definition", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValueSetDef" + } + } + } + }, + "responses": { + "201": { + "description": "Definition created successfully" + } + } + } + }, + "/api/result/valuesetdef/{VSetDefID}": { + "get": { + "tags": ["Result Value Set Definition"], + "summary": "Get value set definition by ID", + "parameters": [ + { + "name": "VSetDefID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Definition details" + } + } + }, + "put": { + "tags": ["Result Value Set Definition"], + "summary": "Update value set definition", + "parameters": [ + { + "name": "VSetDefID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValueSetDef" + } + } + } + }, + "responses": { + "200": { + "description": "Definition updated successfully" + } + } + }, + "delete": { + "tags": ["Result Value Set Definition"], + "summary": "Delete value set definition", + "parameters": [ + { + "name": "VSetDefID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Definition deleted successfully" + } + } + } + }, + "/api/counter": { + "get": { + "tags": ["Counter"], + "summary": "List counters", + "responses": { + "200": { + "description": "List of counters" + } + } + }, + "post": { + "tags": ["Counter"], + "summary": "Create counter", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Counter" + } + } + } + }, + "responses": { + "201": { + "description": "Counter created successfully" + } + } + }, + "patch": { + "tags": ["Counter"], + "summary": "Update counter", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Counter" + } + } + } + }, + "responses": { + "200": { + "description": "Counter updated successfully" + } + } + }, + "delete": { + "tags": ["Counter"], + "summary": "Delete counter (soft delete)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["CounterID"], + "properties": { + "CounterID": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Counter deleted successfully" + } + } + } + }, + "/api/counter/{CounterID}": { + "get": { + "tags": ["Counter"], + "summary": "Get counter by ID", + "parameters": [ + { + "name": "CounterID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Counter details" + } + } + } + }, + "/api/areageo": { + "get": { + "tags": ["Area Geo"], + "summary": "List geographic areas", + "responses": { + "200": { + "description": "List of geographic areas" + } + } + } + }, + "/api/areageo/provinces": { + "get": { + "tags": ["Area Geo"], + "summary": "List provinces", + "responses": { + "200": { + "description": "List of provinces" + } + } + } + }, + "/api/areageo/cities": { + "get": { + "tags": ["Area Geo"], + "summary": "List cities", + "parameters": [ + { + "name": "province_id", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Filter by province ID" + } + ], + "responses": { + "200": { + "description": "List of cities" + } + } + } + }, + "/api/demo/order": { + "post": { + "tags": ["Demo"], + "summary": "Create demo order", + "description": "Create a demo test order (no auth required)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Demo order created" + } + } + } + }, + "/api/demo/orders": { + "get": { + "tags": ["Demo"], + "summary": "List demo orders", + "description": "List demo test orders (no auth required)", + "responses": { + "200": { + "description": "List of demo orders" + } + } + } + }, + "/api/edge/results": { + "post": { + "tags": ["Edge"], + "summary": "Receive instrument results", + "description": "Receive test results from tiny-edge middleware (no auth required)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Results received" + } + } + } + }, + "/api/edge/orders": { + "get": { + "tags": ["Edge"], + "summary": "Get orders for edge", + "description": "Get orders for instrument integration (no auth required)", + "responses": { + "200": { + "description": "Orders for edge" + } + } + } + }, + "/api/edge/orders/{OrderID}/ack": { + "post": { + "tags": ["Edge"], + "summary": "Acknowledge order", + "description": "Acknowledge order receipt by edge (no auth required)", + "parameters": [ + { + "name": "OrderID", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Order acknowledged" + } + } + } + }, + "/api/edge/status": { + "post": { + "tags": ["Edge"], + "summary": "Receive instrument status", + "description": "Receive status updates from instruments (no auth required)", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Status received" + } + } + } + } + }, + "tags": [ + { + "name": "Authentication", + "description": "User authentication endpoints" + }, + { + "name": "Patient", + "description": "Patient management endpoints" + }, + { + "name": "Patient Visit", + "description": "Patient visit management endpoints" + }, + { + "name": "Order Test", + "description": "Test order management endpoints" + }, + { + "name": "Specimen", + "description": "Specimen management endpoints" + }, + { + "name": "Tests", + "description": "Test definition endpoints" + }, + { + "name": "Location", + "description": "Location management endpoints" + }, + { + "name": "Contact", + "description": "Contact management endpoints" + }, + { + "name": "Organization", + "description": "Organization management endpoints" + }, + { + "name": "Value Set", + "description": "Value set library endpoints" + }, + { + "name": "Result Value Set", + "description": "Result-specific value set CRUD endpoints" + }, + { + "name": "Result Value Set Definition", + "description": "Value set definition CRUD endpoints" + }, + { + "name": "Counter", + "description": "Counter management endpoints" + }, + { + "name": "Area Geo", + "description": "Geographic area endpoints" + }, + { + "name": "Demo", + "description": "Demo/test endpoints (no auth)" + }, + { + "name": "Edge", + "description": "Instrument integration endpoints (no auth)" + } + ] +} diff --git a/tests/_support/v2/MasterTestCase.php b/tests/_support/v2/MasterTestCase.php deleted file mode 100644 index 5b33d69..0000000 --- a/tests/_support/v2/MasterTestCase.php +++ /dev/null @@ -1,325 +0,0 @@ -token = $this->generateTestToken(); - } - - /** - * Cleanup after test - */ - protected function tearDown(): void - { - parent::tearDown(); - } - - /** - * Generate JWT token for testing - */ - protected function generateTestToken(): string - { - $key = getenv('JWT_SECRET') ?: 'my-secret-key'; - $payload = [ - 'iss' => 'localhost', - 'aud' => 'localhost', - 'iat' => time(), - 'nbf' => time(), - 'exp' => time() + 3600, - 'uid' => 1, - 'email' => 'admin@admin.com' - ]; - return JWT::encode($payload, $key, 'HS256'); - } - - /** - * Make authenticated GET request - */ - protected function get(string $path, array $options = []) - { - $this->withHeaders(['Authorization' => 'Bearer ' . $this->token]); - return $this->call('get', $path, $options); - } - - /** - * Make authenticated POST request - */ - protected function post(string $path, array $options = []) - { - $this->withHeaders(['Authorization' => 'Bearer ' . $this->token]); - return $this->call('post', $path, $options); - } - - /** - * Make authenticated PUT request - */ - protected function put(string $path, array $options = []) - { - $this->withHeaders(['Authorization' => 'Bearer ' . $this->token]); - return $this->call('put', $path, $options); - } - - /** - * Make authenticated DELETE request - */ - protected function delete(string $path, array $options = []) - { - $this->withHeaders(['Authorization' => 'Bearer ' . $this->token]); - return $this->call('delete', $path, $options); - } - - /** - * Create a TEST type test definition - */ - protected function createTestData(): array - { - return [ - 'SiteID' => 1, - 'TestSiteCode' => $this->testSiteCode, - 'TestSiteName' => 'Test Definition ' . time(), - 'TestType' => self::TEST_TYPE_TEST, - 'Description' => 'Test description', - 'SeqScr' => 10, - 'SeqRpt' => 10, - 'IndentLeft' => 0, - 'VisibleScr' => 1, - 'VisibleRpt' => 1, - 'CountStat' => 1, - 'details' => [ - 'DisciplineID' => 1, - 'DepartmentID' => 1, - 'ResultType' => 1, // Numeric - 'RefType' => 1, // NMRC - 'Unit1' => 'mg/dL', - 'Decimal' => 2, - 'Method' => 'Test Method', - 'ExpectedTAT' => 60 - ], - 'testmap' => [ - [ - 'HostType' => 'HIS', - 'HostID' => 'TEST001', - 'HostTestCode' => 'TEST001', - 'HostTestName' => 'Test (HIS)' - ] - ] - ]; - } - - /** - * Create a PARAM type test definition - */ - protected function createParamData(): array - { - return [ - 'SiteID' => 1, - 'TestSiteCode' => 'PARM' . substr(time(), -4), - 'TestSiteName' => 'Parameter Test ' . time(), - 'TestType' => self::TEST_TYPE_PARAM, - 'Description' => 'Parameter test description', - 'SeqScr' => 5, - 'SeqRpt' => 5, - 'VisibleScr' => 1, - 'VisibleRpt' => 1, - 'CountStat' => 1, - 'details' => [ - 'DisciplineID' => 1, - 'DepartmentID' => 1, - 'ResultType' => 1, - 'RefType' => 1, - 'Unit1' => 'unit', - 'Decimal' => 1, - 'Method' => 'Parameter Method' - ] - ]; - } - - /** - * Create a GROUP type test definition with members - */ - protected function createGroupData(array $memberIds = []): array - { - return [ - 'SiteID' => 1, - 'TestSiteCode' => 'GRUP' . substr(time(), -4), - 'TestSiteName' => 'Group Test ' . time(), - 'TestType' => self::TEST_TYPE_GROUP, - 'Description' => 'Group test description', - 'SeqScr' => 100, - 'SeqRpt' => 100, - 'VisibleScr' => 1, - 'VisibleRpt' => 1, - 'CountStat' => 1, - 'Members' => $memberIds ?: [1, 2], - 'testmap' => [ - [ - 'HostType' => 'LIS', - 'HostID' => 'LIS001', - 'HostTestCode' => 'PANEL', - 'HostTestName' => 'Test Panel (LIS)' - ] - ] - ]; - } - - /** - * Create a CALC type test definition - */ - protected function createCalcData(): array - { - return [ - 'SiteID' => 1, - 'TestSiteCode' => 'CALC' . substr(time(), -4), - 'TestSiteName' => 'Calculated Test ' . time(), - 'TestType' => self::TEST_TYPE_CALC, - 'Description' => 'Calculated test description', - 'SeqScr' => 50, - 'SeqRpt' => 50, - 'VisibleScr' => 1, - 'VisibleRpt' => 1, - 'CountStat' => 1, - 'details' => [ - 'DisciplineID' => 1, - 'DepartmentID' => 1, - 'FormulaInput' => '["TEST1", "TEST2"]', - 'FormulaCode' => 'TEST1 + TEST2', - 'FormulaLang' => 'SQL', - 'RefType' => 1, - 'Unit1' => 'mg/dL', - 'Decimal' => 0, - 'Method' => 'Calculation Method' - ], - 'testmap' => [ - [ - 'HostType' => 'LIS', - 'HostID' => 'LIS001', - 'HostTestCode' => 'CALCR', - 'HostTestName' => 'Calculated Result (LIS)' - ] - ] - ]; - } - - /** - * Assert API response has success status - */ - protected function assertSuccessResponse($response, string $message = 'Response should be successful'): void - { - $body = json_decode($response->response()->getBody(), true); - $this->assertArrayHasKey('status', $body, $message); - $this->assertEquals('success', $body['status'], $message); - } - - /** - * Assert API response has error status - */ - protected function assertErrorResponse($response, string $message = 'Response should be an error'): void - { - $body = json_decode($response->response()->getBody(), true); - $this->assertArrayHasKey('status', $body, $message); - $this->assertNotEquals('success', $body['status'], $message); - } - - /** - * Assert response has data key - */ - protected function assertHasData($response, string $message = 'Response should have data'): void - { - $body = json_decode($response->response()->getBody(), true); - $this->assertArrayHasKey('data', $body, $message); - } - - /** - * Get test type name from VID - */ - protected function getTestTypeName(int $vid): string - { - return match ($vid) { - self::TEST_TYPE_TEST => 'TEST', - self::TEST_TYPE_PARAM => 'PARAM', - self::TEST_TYPE_CALC => 'CALC', - self::TEST_TYPE_GROUP => 'GROUP', - self::TEST_TYPE_TITLE => 'TITLE', - default => 'UNKNOWN' - }; - } - - /** - * Skip test if database not available - */ - protected function requireDatabase(): void - { - $db = \Config\Database::connect(); - try { - $db->connect(); - } catch (\Exception $e) { - $this->markTestSkipped('Database not available: ' . $e->getMessage()); - } - } - - /** - * Skip test if required seeded data not found - */ - protected function requireSeededData(): void - { - $db = \Config\Database::connect(); - $count = $db->table('valueset') - ->where('VSetID', self::VALUESET_TEST_TYPE) - ->countAllResults(); - - if ($count === 0) { - $this->markTestSkipped('Test type valuesets not seeded'); - } - } -} diff --git a/tests/feature/v2/master/TestDef/TestDefCalcTest.php b/tests/feature/v2/master/TestDef/TestDefCalcTest.php deleted file mode 100644 index 985b216..0000000 --- a/tests/feature/v2/master/TestDef/TestDefCalcTest.php +++ /dev/null @@ -1,328 +0,0 @@ - 1, - 'TestSiteCode' => 'CALC' . substr(time(), -4), - 'TestSiteName' => 'Calculated Test ' . time(), - 'TestType' => $this::TEST_TYPE_CALC, - 'Description' => 'Calculated test with formula', - 'SeqScr' => 50, - 'SeqRpt' => 50, - 'VisibleScr' => 1, - 'VisibleRpt' => 1, - 'CountStat' => 1, - 'details' => [ - 'DisciplineID' => 1, - 'DepartmentID' => 1, - 'FormulaInput' => '["CHOL", "HDL", "TG"]', - 'FormulaCode' => 'CHOL - HDL - (TG / 5)', - 'FormulaLang' => 'SQL', - 'RefType' => 1, // NMRC - 'Unit1' => 'mg/dL', - 'Decimal' => 0, - 'Method' => 'Friedewald Formula' - ] - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($calcData)]); - - $status = $result->response()->getStatusCode(); - $this->assertTrue( - in_array($status, [201, 400, 500]), - "Expected 201, 400, or 500, got $status" - ); - - if ($status === 201) { - $body = json_decode($result->response()->getBody(), true); - $this->assertEquals('created', $body['status']); - - // Verify calc details were created - $calcId = $body['data']['TestSiteId']; - $showResult = $this->get($this->endpoint . '/' . $calcId); - $showBody = json_decode($showResult->response()->getBody(), true); - - if ($showBody['data'] !== null) { - $this->assertArrayHasKey('testdefcal', $showBody['data']); - } - } - } - - /** - * Test CALC with different formula languages - */ - public function testCalcWithDifferentFormulaLanguages(): void - { - $languages = ['Phyton', 'CQL', 'FHIRP', 'SQL']; - - foreach ($languages as $lang) { - $calcData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'C' . substr(time(), -5) . strtoupper(substr($lang, 0, 1)), - 'TestSiteName' => "Calc with $lang", - 'TestType' => $this::TEST_TYPE_CALC, - 'details' => [ - 'FormulaInput' => '["TEST1"]', - 'FormulaCode' => 'TEST1 * 2', - 'FormulaLang' => $lang - ] - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($calcData)]); - $status = $result->response()->getStatusCode(); - - $this->assertTrue( - in_array($status, [201, 400, 500]), - "CALC with $lang: Expected 201, 400, or 500, got $status" - ); - } - } - - /** - * Test CALC with JSON formula input - */ - public function testCalcWithJsonFormulaInput(): void - { - $calcData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'CJSN' . substr(time(), -3), - 'TestSiteName' => 'Calc with JSON Input', - 'TestType' => $this::TEST_TYPE_CALC, - 'details' => [ - 'FormulaInput' => '["parameter1", "parameter2", "parameter3"]', - 'FormulaCode' => '(param1 + param2) / param3', - 'FormulaLang' => 'FHIRP' - ] - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($calcData)]); - $status = $result->response()->getStatusCode(); - - $this->assertTrue( - in_array($status, [201, 400, 500]), - "Expected 201, 400, or 500, got $status" - ); - } - - /** - * Test CALC with complex formula - */ - public function testCalcWithComplexFormula(): void - { - $calcData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'CCMP' . substr(time(), -3), - 'TestSiteName' => 'Calc with Complex Formula', - 'TestType' => $this::TEST_TYPE_CALC, - 'details' => [ - 'FormulaInput' => '["WBC", "NEUT", "LYMPH", "MONO", "EOS", "BASO"]', - 'FormulaCode' => 'if WBC > 0 then (NEUT + LYMPH + MONO + EOS + BASO) / WBC * 100 else 0', - 'FormulaLang' => 'Phyton' - ] - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($calcData)]); - $status = $result->response()->getStatusCode(); - - $this->assertTrue( - in_array($status, [201, 400, 500]), - "Expected 201, 400, or 500, got $status" - ); - } - - /** - * Test update CALC formula - */ - public function testUpdateCalcFormula(): void - { - // Create a CALC first - $calcData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'UPCL' . substr(time(), -4), - 'TestSiteName' => 'Update Calc Test', - 'TestType' => $this::TEST_TYPE_CALC, - 'details' => [ - 'FormulaInput' => '["A", "B"]', - 'FormulaCode' => 'A + B', - 'FormulaLang' => 'SQL' - ] - ]; - - $createResult = $this->post($this->endpoint, ['body' => json_encode($calcData)]); - $createStatus = $createResult->response()->getStatusCode(); - - if ($createStatus === 201) { - $createBody = json_decode($createResult->response()->getBody(), true); - $calcId = $createBody['data']['TestSiteId'] ?? null; - - if ($calcId) { - // Update formula - $updateData = [ - 'TestSiteName' => 'Updated Calc Test Name', - 'details' => [ - 'FormulaInput' => '["A", "B", "C"]', - 'FormulaCode' => 'A + B + C' - ] - ]; - - $updateResult = $this->put($this->endpoint . '/' . $calcId, ['body' => json_encode($updateData)]); - $updateStatus = $updateResult->response()->getStatusCode(); - - $this->assertTrue( - in_array($updateStatus, [200, 400, 500]), - "Expected 200, 400, or 500, got $updateStatus" - ); - } - } - } - - /** - * Test CALC has correct TypeCode in response - */ - public function testCalcTypeCodeInResponse(): void - { - $indexResult = $this->get($this->endpoint . '?TestType=CALC'); - $indexBody = json_decode($indexResult->response()->getBody(), true); - - if (isset($indexBody['data']) && is_array($indexBody['data']) && !empty($indexBody['data'])) { - $calc = $indexBody['data'][0]; - - // Verify TypeCode is CALC - $this->assertEquals('CALC', $calc['TypeCode'] ?? ''); - } - } - - /** - * Test CALC details structure - */ - public function testCalcDetailsStructure(): void - { - $indexResult = $this->get($this->endpoint . '?TestType=CALC'); - $indexBody = json_decode($indexResult->response()->getBody(), true); - - if (isset($indexBody['data']) && is_array($indexBody['data']) && !empty($indexBody['data'])) { - $calc = $indexBody['data'][0]; - $calcId = $calc['TestSiteID'] ?? null; - - if ($calcId) { - $showResult = $this->get($this->endpoint . '/' . $calcId); - $showBody = json_decode($showResult->response()->getBody(), true); - - if ($showBody['data'] !== null && isset($showBody['data']['testdefcal'])) { - $calcDetails = $showBody['data']['testdefcal']; - - if (is_array($calcDetails) && !empty($calcDetails)) { - $firstDetail = $calcDetails[0]; - - // Check required fields in calc structure - $this->assertArrayHasKey('TestCalID', $firstDetail); - $this->assertArrayHasKey('TestSiteID', $firstDetail); - $this->assertArrayHasKey('FormulaInput', $firstDetail); - $this->assertArrayHasKey('FormulaCode', $firstDetail); - - // Check for joined discipline/department - if (isset($firstDetail['DisciplineName'])) { - $this->assertArrayHasKey('DepartmentName', $firstDetail); - } - } - } - } - } - } - - /** - * Test CALC delete cascades to details - */ - public function testCalcDeleteCascadesToDetails(): void - { - // Create a CALC - $calcData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'CDEL' . substr(time(), -4), - 'TestSiteName' => 'Calc to Delete', - 'TestType' => $this::TEST_TYPE_CALC, - 'details' => [ - 'FormulaInput' => '["TEST1"]', - 'FormulaCode' => 'TEST1 * 2' - ] - ]; - - $createResult = $this->post($this->endpoint, ['body' => json_encode($calcData)]); - $createStatus = $createResult->response()->getStatusCode(); - - if ($createStatus === 201) { - $createBody = json_decode($createResult->response()->getBody(), true); - $calcId = $createBody['data']['TestSiteId'] ?? null; - - if ($calcId) { - // Delete the CALC - $deleteResult = $this->delete($this->endpoint . '/' . $calcId); - $deleteStatus = $deleteResult->response()->getStatusCode(); - - $this->assertTrue( - in_array($deleteStatus, [200, 404, 500]), - "Expected 200, 404, or 500, got $deleteStatus" - ); - - if ($deleteStatus === 200) { - // Verify CALC details are also soft deleted - $showResult = $this->get($this->endpoint . '/' . $calcId); - $showBody = json_decode($showResult->response()->getBody(), true); - - // CALC should show EndDate set - if ($showBody['data'] !== null) { - $this->assertNotNull($showBody['data']['EndDate']); - } - } - } - } - } - - /** - * Test CALC with result unit configuration - */ - public function testCalcWithResultUnit(): void - { - $units = ['mg/dL', 'g/L', 'mmol/L', '%', 'IU/L']; - - foreach ($units as $unit) { - $calcData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'CUNT' . substr(time(), -3) . substr($unit, 0, 1), - 'TestSiteName' => "Calc with $unit", - 'TestType' => $this::TEST_TYPE_CALC, - 'details' => [ - 'Unit1' => $unit, - 'Decimal' => 2, - 'FormulaInput' => '["TEST1"]', - 'FormulaCode' => 'TEST1' - ] - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($calcData)]); - $status = $result->response()->getStatusCode(); - - $this->assertTrue( - in_array($status, [201, 400, 500]), - "CALC with unit $unit: Expected 201, 400, or 500, got $status" - ); - } - } -} diff --git a/tests/feature/v2/master/TestDef/TestDefGroupTest.php b/tests/feature/v2/master/TestDef/TestDefGroupTest.php deleted file mode 100644 index 81d70bc..0000000 --- a/tests/feature/v2/master/TestDef/TestDefGroupTest.php +++ /dev/null @@ -1,291 +0,0 @@ -getExistingTestIds(); - - $groupData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'GRUP' . substr(time(), -4), - 'TestSiteName' => 'Test Group ' . time(), - 'TestType' => $this::TEST_TYPE_GROUP, - 'Description' => 'Group test with members', - 'SeqScr' => 100, - 'SeqRpt' => 100, - 'VisibleScr' => 1, - 'VisibleRpt' => 1, - 'CountStat' => 1, - 'Members' => $memberIds - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($groupData)]); - - $status = $result->response()->getStatusCode(); - $this->assertTrue( - in_array($status, [201, 400, 500]), - "Expected 201, 400, or 500, got $status" - ); - - if ($status === 201) { - $body = json_decode($result->response()->getBody(), true); - $this->assertEquals('created', $body['status']); - - // Verify members were created - $groupId = $body['data']['TestSiteId']; - $showResult = $this->get($this->endpoint . '/' . $groupId); - $showBody = json_decode($showResult->response()->getBody(), true); - - if ($showBody['data'] !== null) { - $this->assertArrayHasKey('testdefgrp', $showBody['data']); - } - } - } - - /** - * Test create GROUP without members - */ - public function testCreateGroupWithoutMembers(): void - { - $groupData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'GREM' . substr(time(), -4), - 'TestSiteName' => 'Empty Group ' . time(), - 'TestType' => $this::TEST_TYPE_GROUP, - 'Members' => [] // Empty members - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($groupData)]); - - // Should still succeed but with warning or empty members - $status = $result->response()->getStatusCode(); - $this->assertTrue( - in_array($status, [201, 400]), - "Expected 201 or 400, got $status" - ); - } - - /** - * Test update GROUP members - */ - public function testUpdateGroupMembers(): void - { - // Create a group first - $memberIds = $this->getExistingTestIds(); - $groupData = $this->createGroupData($memberIds); - $groupData['TestSiteCode'] = 'UPMB' . substr(time(), -4); - - $createResult = $this->post($this->endpoint, ['body' => json_encode($groupData)]); - $createStatus = $createResult->response()->getStatusCode(); - - if ($createStatus === 201) { - $createBody = json_decode($createResult->response()->getBody(), true); - $groupId = $createBody['data']['TestSiteId'] ?? null; - - if ($groupId) { - // Update with new members - $updateData = [ - 'Members' => array_slice($memberIds, 0, 1) // Only one member - ]; - - $updateResult = $this->put($this->endpoint . '/' . $groupId, ['body' => json_encode($updateData)]); - $updateStatus = $updateResult->response()->getStatusCode(); - - $this->assertTrue( - in_array($updateStatus, [200, 400, 500]), - "Expected 200, 400, or 500, got $updateStatus" - ); - } - } - } - - /** - * Test add member to existing GROUP - */ - public function testAddMemberToGroup(): void - { - // Get existing test - $indexResult = $this->get($this->endpoint . '?TestType=GROUP'); - $indexBody = json_decode($indexResult->response()->getBody(), true); - - if (isset($indexBody['data']) && is_array($indexBody['data']) && !empty($indexBody['data'])) { - $group = $indexBody['data'][0]; - $groupId = $group['TestSiteID'] ?? null; - - if ($groupId) { - // Get a test ID to add - $testIds = $this->getExistingTestIds(); - $newMemberId = $testIds[0] ?? 1; - - $updateData = [ - 'Members' => [$newMemberId] - ]; - - $result = $this->put($this->endpoint . '/' . $groupId, ['body' => json_encode($updateData)]); - $status = $result->response()->getStatusCode(); - - $this->assertTrue( - in_array($status, [200, 400, 500]), - "Expected 200, 400, or 500, got $status" - ); - } - } - } - - /** - * Test GROUP with single member - */ - public function testGroupWithSingleMember(): void - { - $memberIds = $this->getExistingTestIds(); - - $groupData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'GSGL' . substr(time(), -4), - 'TestSiteName' => 'Single Member Group ' . time(), - 'TestType' => $this::TEST_TYPE_GROUP, - 'Members' => [array_slice($memberIds, 0, 1)[0] ?? 1] - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($groupData)]); - - $status = $result->response()->getStatusCode(); - $this->assertTrue( - in_array($status, [201, 400, 500]), - "Expected 201, 400, or 500, got $status" - ); - } - - /** - * Test GROUP members have correct structure - */ - public function testGroupMembersStructure(): void - { - $indexResult = $this->get($this->endpoint . '?TestType=GROUP'); - $indexBody = json_decode($indexResult->response()->getBody(), true); - - if (isset($indexBody['data']) && is_array($indexBody['data']) && !empty($indexBody['data'])) { - $group = $indexBody['data'][0]; - $groupId = $group['TestSiteID'] ?? null; - - if ($groupId) { - $showResult = $this->get($this->endpoint . '/' . $groupId); - $showBody = json_decode($showResult->response()->getBody(), true); - - if ($showBody['data'] !== null && isset($showBody['data']['testdefgrp'])) { - $members = $showBody['data']['testdefgrp']; - - if (is_array($members) && !empty($members)) { - $firstMember = $members[0]; - - // Check required fields in member structure - $this->assertArrayHasKey('TestGrpID', $firstMember); - $this->assertArrayHasKey('TestSiteID', $firstMember); - $this->assertArrayHasKey('Member', $firstMember); - - // Check for joined test details (if loaded) - if (isset($firstMember['TestSiteCode'])) { - $this->assertArrayHasKey('TestSiteName', $firstMember); - } - } - } - } - } - } - - /** - * Test GROUP delete cascades to members - */ - public function testGroupDeleteCascadesToMembers(): void - { - // Create a group - $memberIds = $this->getExistingTestIds(); - $groupData = $this->createGroupData($memberIds); - $groupData['TestSiteCode'] = 'GDEL' . substr(time(), -4); - - $createResult = $this->post($this->endpoint, ['body' => json_encode($groupData)]); - $createStatus = $createResult->response()->getStatusCode(); - - if ($createStatus === 201) { - $createBody = json_decode($createResult->response()->getBody(), true); - $groupId = $createBody['data']['TestSiteId'] ?? null; - - if ($groupId) { - // Delete the group - $deleteResult = $this->delete($this->endpoint . '/' . $groupId); - $deleteStatus = $deleteResult->response()->getStatusCode(); - - $this->assertTrue( - in_array($deleteStatus, [200, 404, 500]), - "Expected 200, 404, or 500, got $deleteStatus" - ); - - if ($deleteStatus === 200) { - // Verify group members are also soft deleted - $showResult = $this->get($this->endpoint . '/' . $groupId); - $showBody = json_decode($showResult->response()->getBody(), true); - - // Group should show EndDate set - if ($showBody['data'] !== null) { - $this->assertNotNull($showBody['data']['EndDate']); - } - } - } - } - } - - /** - * Test GROUP type has correct TypeCode in response - */ - public function testGroupTypeCodeInResponse(): void - { - $indexResult = $this->get($this->endpoint . '?TestType=GROUP'); - $indexBody = json_decode($indexResult->response()->getBody(), true); - - if (isset($indexBody['data']) && is_array($indexBody['data']) && !empty($indexBody['data'])) { - $group = $indexBody['data'][0]; - - // Verify TypeCode is GROUP - $this->assertEquals('GROUP', $group['TypeCode'] ?? ''); - } - } - - /** - * Helper to get existing test IDs - */ - private function getExistingTestIds(): array - { - $indexResult = $this->get($this->endpoint); - $indexBody = json_decode($indexResult->response()->getBody(), true); - - $ids = []; - if (isset($indexBody['data']) && is_array($indexBody['data'])) { - foreach ($indexBody['data'] as $item) { - if (isset($item['TestSiteID'])) { - $ids[] = $item['TestSiteID']; - } - if (count($ids) >= 3) { - break; - } - } - } - - return $ids ?: [1, 2, 3]; - } -} diff --git a/tests/feature/v2/master/TestDef/TestDefParamTest.php b/tests/feature/v2/master/TestDef/TestDefParamTest.php deleted file mode 100644 index 96b5e2c..0000000 --- a/tests/feature/v2/master/TestDef/TestDefParamTest.php +++ /dev/null @@ -1,288 +0,0 @@ - 1, - 'TestSiteCode' => 'PARM' . substr(time(), -4), - 'TestSiteName' => 'Parameter Test ' . time(), - 'TestType' => $this::TEST_TYPE_PARAM, - 'Description' => 'Parameter/sub-test description', - 'SeqScr' => 5, - 'SeqRpt' => 5, - 'VisibleScr' => 1, - 'VisibleRpt' => 1, - 'CountStat' => 1, - 'details' => [ - 'DisciplineID' => 1, - 'DepartmentID' => 1, - 'ResultType' => 1, // Numeric - 'RefType' => 1, // NMRC - 'Unit1' => 'unit', - 'Decimal' => 1, - 'Method' => 'Parameter Method' - ] - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($paramData)]); - - $status = $result->response()->getStatusCode(); - $this->assertTrue( - in_array($status, [201, 400, 500]), - "Expected 201, 400, or 500, got $status" - ); - - if ($status === 201) { - $body = json_decode($result->response()->getBody(), true); - $this->assertEquals('created', $body['status']); - - // Verify tech details were created - $paramId = $body['data']['TestSiteId']; - $showResult = $this->get($this->endpoint . '/' . $paramId); - $showBody = json_decode($showResult->response()->getBody(), true); - - if ($showBody['data'] !== null) { - $this->assertArrayHasKey('testdeftech', $showBody['data']); - } - } - } - - /** - * Test PARAM has correct TypeCode in response - */ - public function testParamTypeCodeInResponse(): void - { - $indexResult = $this->get($this->endpoint . '?TestType=PARAM'); - $indexBody = json_decode($indexResult->response()->getBody(), true); - - if (isset($indexBody['data']) && is_array($indexBody['data']) && !empty($indexBody['data'])) { - $param = $indexBody['data'][0]; - - // Verify TypeCode is PARAM - $this->assertEquals('PARAM', $param['TypeCode'] ?? ''); - } - } - - /** - * Test PARAM details structure - */ - public function testParamDetailsStructure(): void - { - $indexResult = $this->get($this->endpoint . '?TestType=PARAM'); - $indexBody = json_decode($indexResult->response()->getBody(), true); - - if (isset($indexBody['data']) && is_array($indexBody['data']) && !empty($indexBody['data'])) { - $param = $indexBody['data'][0]; - $paramId = $param['TestSiteID'] ?? null; - - if ($paramId) { - $showResult = $this->get($this->endpoint . '/' . $paramId); - $showBody = json_decode($showResult->response()->getBody(), true); - - if ($showBody['data'] !== null && isset($showBody['data']['testdeftech'])) { - $techDetails = $showBody['data']['testdeftech']; - - if (is_array($techDetails) && !empty($techDetails)) { - $firstDetail = $techDetails[0]; - - // Check required fields in tech structure - $this->assertArrayHasKey('TestTechID', $firstDetail); - $this->assertArrayHasKey('TestSiteID', $firstDetail); - $this->assertArrayHasKey('ResultType', $firstDetail); - $this->assertArrayHasKey('RefType', $firstDetail); - - // Check for joined discipline/department - if (isset($firstDetail['DisciplineName'])) { - $this->assertArrayHasKey('DepartmentName', $firstDetail); - } - } - } - } - } - } - - /** - * Test PARAM with different result types - */ - public function testParamWithDifferentResultTypes(): void - { - $resultTypes = [ - 1 => 'NMRIC', // Numeric - 2 => 'RANGE', // Range - 3 => 'TEXT', // Text - 4 => 'VSET' // Value Set - ]; - - foreach ($resultTypes as $resultTypeId => $resultTypeName) { - $paramData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'PR' . substr(time(), -4) . substr($resultTypeName, 0, 1), - 'TestSiteName' => "Param with $resultTypeName", - 'TestType' => $this::TEST_TYPE_PARAM, - 'details' => [ - 'ResultType' => $resultTypeId, - 'RefType' => 1 - ] - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($paramData)]); - $status = $result->response()->getStatusCode(); - - $this->assertTrue( - in_array($status, [201, 400, 500]), - "PARAM with ResultType $resultTypeName: Expected 201, 400, or 500, got $status" - ); - } - } - - /** - * Test PARAM with different reference types - */ - public function testParamWithDifferentRefTypes(): void - { - $refTypes = [ - 1 => 'NMRC', // Numeric - 2 => 'TEXT' // Text - ]; - - foreach ($refTypes as $refTypeId => $refTypeName) { - $paramData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'PR' . substr(time(), -4) . 'R' . substr($refTypeName, 0, 1), - 'TestSiteName' => "Param with RefType $refTypeName", - 'TestType' => $this::TEST_TYPE_PARAM, - 'details' => [ - 'ResultType' => 1, - 'RefType' => $refTypeId - ] - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($paramData)]); - $status = $result->response()->getStatusCode(); - - $this->assertTrue( - in_array($status, [201, 400, 500]), - "PARAM with RefType $refTypeName: Expected 201, 400, or 500, got $status" - ); - } - } - - /** - * Test PARAM delete cascades to details - */ - public function testParamDeleteCascadesToDetails(): void - { - // Create a PARAM - $paramData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'PDEL' . substr(time(), -4), - 'TestSiteName' => 'Param to Delete', - 'TestType' => $this::TEST_TYPE_PARAM, - 'details' => [ - 'ResultType' => 1, - 'RefType' => 1 - ] - ]; - - $createResult = $this->post($this->endpoint, ['body' => json_encode($paramData)]); - $createStatus = $createResult->response()->getStatusCode(); - - if ($createStatus === 201) { - $createBody = json_decode($createResult->response()->getBody(), true); - $paramId = $createBody['data']['TestSiteId'] ?? null; - - if ($paramId) { - // Delete the PARAM - $deleteResult = $this->delete($this->endpoint . '/' . $paramId); - $deleteStatus = $deleteResult->response()->getStatusCode(); - - $this->assertTrue( - in_array($deleteStatus, [200, 404, 500]), - "Expected 200, 404, or 500, got $deleteStatus" - ); - - if ($deleteStatus === 200) { - // Verify PARAM details are also soft deleted - $showResult = $this->get($this->endpoint . '/' . $paramId); - $showBody = json_decode($showResult->response()->getBody(), true); - - // PARAM should show EndDate set - if ($showBody['data'] !== null) { - $this->assertNotNull($showBody['data']['EndDate']); - } - } - } - } - } - - /** - * Test PARAM visibility settings - */ - public function testParamVisibilitySettings(): void - { - $visibilityCombinations = [ - ['VisibleScr' => 1, 'VisibleRpt' => 1], - ['VisibleScr' => 1, 'VisibleRpt' => 0], - ['VisibleScr' => 0, 'VisibleRpt' => 1], - ['VisibleScr' => 0, 'VisibleRpt' => 0] - ]; - - foreach ($visibilityCombinations as $vis) { - $paramData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'PVIS' . substr(time(), -4), - 'TestSiteName' => 'Visibility Test', - 'TestType' => $this::TEST_TYPE_PARAM, - 'VisibleScr' => $vis['VisibleScr'], - 'VisibleRpt' => $vis['VisibleRpt'] - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($paramData)]); - $status = $result->response()->getStatusCode(); - - $this->assertTrue( - in_array($status, [201, 400, 500]), - "PARAM visibility ({$vis['VisibleScr']}, {$vis['VisibleRpt']}): Expected 201, 400, or 500, got $status" - ); - } - } - - /** - * Test PARAM sequence ordering - */ - public function testParamSequenceOrdering(): void - { - $paramData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'PSEQ' . substr(time(), -4), - 'TestSiteName' => 'Sequenced Param', - 'TestType' => $this::TEST_TYPE_PARAM, - 'SeqScr' => 25, - 'SeqRpt' => 30 - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($paramData)]); - $status = $result->response()->getStatusCode(); - - $this->assertTrue( - in_array($status, [201, 400, 500]), - "Expected 201, 400, or 500, got $status" - ); - } -} diff --git a/tests/feature/v2/master/TestDef/TestDefSiteTest.php b/tests/feature/v2/master/TestDef/TestDefSiteTest.php deleted file mode 100644 index 2d635f1..0000000 --- a/tests/feature/v2/master/TestDef/TestDefSiteTest.php +++ /dev/null @@ -1,375 +0,0 @@ -get($this->endpoint); - $result->assertStatus(200); - - $body = json_decode($result->response()->getBody(), true); - $this->assertArrayHasKey('status', $body); - $this->assertArrayHasKey('data', $body); - $this->assertArrayHasKey('message', $body); - } - - /** - * Test index with SiteID filter - */ - public function testIndexWithSiteFilter(): void - { - $result = $this->get($this->endpoint . '?SiteID=1'); - $result->assertStatus(200); - - $body = json_decode($result->response()->getBody(), true); - $this->assertEquals('success', $body['status']); - } - - /** - * Test index with TestType filter - */ - public function testIndexWithTestTypeFilter(): void - { - // Filter by TEST type - $result = $this->get($this->endpoint . '?TestType=TEST'); - $result->assertStatus(200); - - $body = json_decode($result->response()->getBody(), true); - $this->assertEquals('success', $body['status']); - } - - /** - * Test index with Visibility filter - */ - public function testIndexWithVisibilityFilter(): void - { - $result = $this->get($this->endpoint . '?VisibleScr=1&VisibleRpt=1'); - $result->assertStatus(200); - - $body = json_decode($result->response()->getBody(), true); - $this->assertEquals('success', $body['status']); - } - - /** - * Test index with keyword search - */ - public function testIndexWithKeywordSearch(): void - { - $result = $this->get($this->endpoint . '?TestSiteName=hemoglobin'); - $result->assertStatus(200); - - $body = json_decode($result->response()->getBody(), true); - $this->assertEquals('success', $body['status']); - } - - /** - * Test show endpoint returns single test - */ - public function testShowReturnsSingleTest(): void - { - // First get the list to find a valid ID - $indexResult = $this->get($this->endpoint); - $indexBody = json_decode($indexResult->response()->getBody(), true); - - if (isset($indexBody['data']) && is_array($indexBody['data']) && !empty($indexBody['data'])) { - $firstItem = $indexBody['data'][0]; - $testSiteID = $firstItem['TestSiteID'] ?? null; - - if ($testSiteID) { - $showResult = $this->get($this->endpoint . '/' . $testSiteID); - $showResult->assertStatus(200); - - $body = json_decode($showResult->response()->getBody(), true); - $this->assertArrayHasKey('data', $body); - $this->assertEquals('success', $body['status']); - - // Check that related details are loaded based on TestType - if ($body['data'] !== null) { - $typeCode = $body['data']['TypeCode'] ?? ''; - if ($typeCode === 'CALC') { - $this->assertArrayHasKey('testdefcal', $body['data']); - } elseif ($typeCode === 'GROUP') { - $this->assertArrayHasKey('testdefgrp', $body['data']); - } elseif (in_array($typeCode, ['TEST', 'PARAM'])) { - $this->assertArrayHasKey('testdeftech', $body['data']); - } - // All types should have testmap - $this->assertArrayHasKey('testmap', $body['data']); - } - } - } - } - - /** - * Test show with non-existent ID returns null data - */ - public function testShowWithInvalidIDReturnsNull(): void - { - $result = $this->get($this->endpoint . '/9999999'); - $result->assertStatus(200); - - $body = json_decode($result->response()->getBody(), true); - $this->assertArrayHasKey('data', $body); - $this->assertNull($body['data']); - } - - /** - * Test create new TEST type test definition - */ - public function testCreateTestTypeTest(): void - { - $testData = $this->createTestData(); - - $result = $this->post($this->endpoint, ['body' => json_encode($testData)]); - - $status = $result->response()->getStatusCode(); - // Expect 201 (created) or 400 (validation error) or 500 (server error) - $this->assertTrue( - in_array($status, [201, 400, 500]), - "Expected 201, 400, or 500, got $status" - ); - - if ($status === 201) { - $body = json_decode($result->response()->getBody(), true); - $this->assertEquals('created', $body['status']); - $this->assertArrayHasKey('TestSiteId', $body['data']); - } - } - - /** - * Test create new PARAM type test definition - */ - public function testCreateParamTypeTest(): void - { - $paramData = $this->createParamData(); - - $result = $this->post($this->endpoint, ['body' => json_encode($paramData)]); - - $status = $result->response()->getStatusCode(); - $this->assertTrue( - in_array($status, [201, 400, 500]), - "Expected 201, 400, or 500, got $status" - ); - } - - /** - * Test create new GROUP type test definition - */ - public function testCreateGroupTypeTest(): void - { - // First create some member tests - $memberIds = $this->getExistingTestIds(); - - $groupData = $this->createGroupData($memberIds); - - $result = $this->post($this->endpoint, ['body' => json_encode($groupData)]); - - $status = $result->response()->getStatusCode(); - $this->assertTrue( - in_array($status, [201, 400, 500]), - "Expected 201, 400, or 500, got $status" - ); - } - - /** - * Test create new CALC type test definition - */ - public function testCreateCalcTypeTest(): void - { - $calcData = $this->createCalcData(); - - $result = $this->post($this->endpoint, ['body' => json_encode($calcData)]); - - $status = $result->response()->getStatusCode(); - $this->assertTrue( - in_array($status, [201, 400, 500]), - "Expected 201, 400, or 500, got $status" - ); - } - - /** - * Test update existing test - */ - public function testUpdateTest(): void - { - $indexResult = $this->get($this->endpoint); - $indexBody = json_decode($indexResult->response()->getBody(), true); - - if (isset($indexBody['data']) && is_array($indexBody['data']) && !empty($indexBody['data'])) { - $firstItem = $indexBody['data'][0]; - $testSiteID = $firstItem['TestSiteID'] ?? null; - - if ($testSiteID) { - $updateData = [ - 'TestSiteName' => 'Updated Test Name ' . time(), - 'Description' => 'Updated description' - ]; - - $result = $this->put($this->endpoint . '/' . $testSiteID, ['body' => json_encode($updateData)]); - $status = $result->response()->getStatusCode(); - $this->assertTrue( - in_array($status, [200, 404, 500]), - "Expected 200, 404, or 500, got $status" - ); - - if ($status === 200) { - $body = json_decode($result->response()->getBody(), true); - $this->assertEquals('success', $body['status']); - } - } - } - } - - /** - * Test soft delete (disable) test - */ - public function testDeleteTest(): void - { - // Create a test first to delete - $testData = $this->createTestData(); - $testData['TestSiteCode'] = 'DEL' . substr(time(), -4); - - $createResult = $this->post($this->endpoint, ['body' => json_encode($testData)]); - $createStatus = $createResult->response()->getStatusCode(); - - if ($createStatus === 201) { - $createBody = json_decode($createResult->response()->getBody(), true); - $testSiteID = $createBody['data']['TestSiteId'] ?? null; - - if ($testSiteID) { - $deleteResult = $this->delete($this->endpoint . '/' . $testSiteID); - $deleteStatus = $deleteResult->response()->getStatusCode(); - - $this->assertTrue( - in_array($deleteStatus, [200, 404, 500]), - "Expected 200, 404, or 500, got $deleteStatus" - ); - - if ($deleteStatus === 200) { - $deleteBody = json_decode($deleteResult->response()->getBody(), true); - $this->assertEquals('success', $deleteBody['status']); - $this->assertArrayHasKey('EndDate', $deleteBody['data']); - } - } - } - } - - /** - * Test validation - missing required fields - */ - public function testCreateValidationRequiredFields(): void - { - $invalidData = [ - 'TestSiteName' => 'Test without required fields' - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($invalidData)]); - $result->assertStatus(400); - } - - /** - * Test that TestSiteCode is max 6 characters - */ - public function testTestSiteCodeLength(): void - { - $invalidData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'HB123456', // 8 characters - invalid - 'TestSiteName' => 'Test with too long code', - 'TestType' => $this::TEST_TYPE_TEST - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($invalidData)]); - $result->assertStatus(400); - } - - /** - * Test that TestSiteCode is at least 3 characters - */ - public function testTestSiteCodeMinLength(): void - { - $invalidData = [ - 'SiteID' => 1, - 'TestSiteCode' => 'HB', // 2 characters - invalid - 'TestSiteName' => 'Test with too short code', - 'TestType' => $this::TEST_TYPE_TEST - ]; - - $result = $this->post($this->endpoint, ['body' => json_encode($invalidData)]); - $result->assertStatus(400); - } - - /** - * Test that duplicate TestSiteCode is rejected - */ - public function testDuplicateTestSiteCode(): void - { - // First create a test - $testData = $this->createTestData(); - $testData['TestSiteCode'] = 'DUP' . substr(time(), -3); - - $this->post($this->endpoint, ['body' => json_encode($testData)]); - - // Try to create another test with the same code - $duplicateData = $testData; - $duplicateData['TestSiteName'] = 'Different Name'; - - $result = $this->post($this->endpoint, ['body' => json_encode($duplicateData)]); - - // Should fail with 400 or 500 - $status = $result->response()->getStatusCode(); - $this->assertTrue( - in_array($status, [400, 500]), - "Expected 400 or 500 for duplicate, got $status" - ); - } - - /** - * Test filtering by multiple parameters - */ - public function testIndexWithMultipleFilters(): void - { - $result = $this->get($this->endpoint . '?SiteID=1&TestType=TEST&VisibleScr=1'); - $result->assertStatus(200); - - $body = json_decode($result->response()->getBody(), true); - $this->assertEquals('success', $body['status']); - } - - /** - * Helper method to get existing test IDs for group members - */ - private function getExistingTestIds(): array - { - $indexResult = $this->get($this->endpoint); - $indexBody = json_decode($indexResult->response()->getBody(), true); - - $ids = []; - if (isset($indexBody['data']) && is_array($indexBody['data'])) { - foreach ($indexBody['data'] as $item) { - if (isset($item['TestSiteID'])) { - $ids[] = $item['TestSiteID']; - } - if (count($ids) >= 2) { - break; - } - } - } - - return $ids ?: [1, 2]; - } -} diff --git a/tests/unit/HealthTest.php b/tests/unit/HealthTest.php index b3e480f..75f2016 100644 --- a/tests/unit/HealthTest.php +++ b/tests/unit/HealthTest.php @@ -34,13 +34,11 @@ final class HealthTest extends CIUnitTestCase $validation->check($config->baseURL, 'valid_url'), 'baseURL "' . $config->baseURL . '" in .env is not valid URL', ); + return; } - // Get the baseURL in app/Config/App.php - // You can't use Config\App, because phpunit.xml.dist sets app.baseURL + // If no baseURL in .env, check app/Config/App.php $reader = new ConfigReader(); - - // BaseURL in app/Config/App.php is a valid URL? $this->assertTrue( $validation->check($reader->baseURL, 'valid_url'), 'baseURL "' . $reader->baseURL . '" in app/Config/App.php is not valid URL', diff --git a/tests/unit/ValueSet/ValueSetTest.php b/tests/unit/ValueSet/ValueSetTest.php index 11e212a..47d74a2 100644 --- a/tests/unit/ValueSet/ValueSetTest.php +++ b/tests/unit/ValueSet/ValueSetTest.php @@ -358,14 +358,16 @@ class ValueSetTest extends CIUnitTestCase ['Gender' => '1', 'Country' => 'IDN'], ['Gender' => '2', 'Country' => 'USA'] ]; - + $result = ValueSet::transformLabels($data, [ 'Gender' => 'sex', 'Country' => 'country' ]); - - $this->assertEquals('Female', $result[0]['GenderText']); - $this->assertEquals('Male', $result[1]['GenderText']); + + $this->assertEquals('Female', $result[0]['Gender']); + $this->assertEquals('1', $result[0]['GenderKey']); + $this->assertEquals('Male', $result[1]['Gender']); + $this->assertEquals('2', $result[1]['GenderKey']); } public function testGetOptions() diff --git a/tests/unit/v2/master/TestDef/TestDefCalModelTest.php b/tests/unit/v2/master/TestDef/TestDefCalModelTest.php deleted file mode 100644 index a7bf3ed..0000000 --- a/tests/unit/v2/master/TestDef/TestDefCalModelTest.php +++ /dev/null @@ -1,145 +0,0 @@ -model = new TestDefCalModel(); - } - - /** - * Test model has correct table name - */ - public function testModelHasCorrectTableName(): void - { - $this->assertEquals('testdefcal', $this->model->table); - } - - /** - * Test model has correct primary key - */ - public function testModelHasCorrectPrimaryKey(): void - { - $this->assertEquals('TestCalID', $this->model->primaryKey); - } - - /** - * Test model uses soft deletes - */ - public function testModelUsesSoftDeletes(): void - { - $this->assertTrue($this->model->useSoftDeletes); - $this->assertEquals('EndDate', $this->model->deletedField); - } - - /** - * Test model has correct allowed fields - */ - public function testModelHasCorrectAllowedFields(): void - { - $allowedFields = $this->model->allowedFields; - - // Foreign key - $this->assertContains('TestSiteID', $allowedFields); - - // Calculation fields - $this->assertContains('DisciplineID', $allowedFields); - $this->assertContains('DepartmentID', $allowedFields); - $this->assertContains('FormulaInput', $allowedFields); - $this->assertContains('FormulaCode', $allowedFields); - - // Result fields - $this->assertContains('RefType', $allowedFields); - $this->assertContains('Unit1', $allowedFields); - $this->assertContains('Factor', $allowedFields); - $this->assertContains('Unit2', $allowedFields); - $this->assertContains('Decimal', $allowedFields); - $this->assertContains('Method', $allowedFields); - - // Timestamp fields - $this->assertContains('CreateDate', $allowedFields); - $this->assertContains('EndDate', $allowedFields); - } - - /** - * Test model uses timestamps - */ - public function testModelUsesTimestamps(): void - { - $this->assertTrue($this->model->useTimestamps); - $this->assertEquals('CreateDate', $this->model->createdField); - } - - /** - * Test model return type is array - */ - public function testModelReturnTypeIsArray(): void - { - $this->assertEquals('array', $this->model->returnType); - } - - /** - * Test model has correct skip validation - */ - public function testModelSkipValidation(): void - { - $this->assertFalse($this->model->skipValidation); - } - - /** - * Test model has correct useAutoIncrement - */ - public function testModelUseAutoIncrement(): void - { - $this->assertTrue($this->model->useAutoIncrement); - } - - /** - * Test FormulaInput field is in allowed fields - */ - public function testFormulaInputFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('FormulaInput', $allowedFields); - } - - /** - * Test FormulaCode field is in allowed fields - */ - public function testFormulaCodeFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('FormulaCode', $allowedFields); - } - - /** - * Test RefType field is in allowed fields - */ - public function testRefTypeFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('RefType', $allowedFields); - } - - /** - * Test Method field is in allowed fields - */ - public function testMethodFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('Method', $allowedFields); - } -} diff --git a/tests/unit/v2/master/TestDef/TestDefGrpModelTest.php b/tests/unit/v2/master/TestDef/TestDefGrpModelTest.php deleted file mode 100644 index 5951120..0000000 --- a/tests/unit/v2/master/TestDef/TestDefGrpModelTest.php +++ /dev/null @@ -1,132 +0,0 @@ -model = new TestDefGrpModel(); - } - - /** - * Test model has correct table name - */ - public function testModelHasCorrectTableName(): void - { - $this->assertEquals('testdefgrp', $this->model->table); - } - - /** - * Test model has correct primary key - */ - public function testModelHasCorrectPrimaryKey(): void - { - $this->assertEquals('TestGrpID', $this->model->primaryKey); - } - - /** - * Test model uses soft deletes - */ - public function testModelUsesSoftDeletes(): void - { - $this->assertTrue($this->model->useSoftDeletes); - $this->assertEquals('EndDate', $this->model->deletedField); - } - - /** - * Test model has correct allowed fields - */ - public function testModelHasCorrectAllowedFields(): void - { - $allowedFields = $this->model->allowedFields; - - // Foreign keys - $this->assertContains('TestSiteID', $allowedFields); - $this->assertContains('Member', $allowedFields); - - // Timestamp fields - $this->assertContains('CreateDate', $allowedFields); - $this->assertContains('EndDate', $allowedFields); - } - - /** - * Test model uses timestamps - */ - public function testModelUsesTimestamps(): void - { - $this->assertTrue($this->model->useTimestamps); - $this->assertEquals('CreateDate', $this->model->createdField); - } - - /** - * Test model return type is array - */ - public function testModelReturnTypeIsArray(): void - { - $this->assertEquals('array', $this->model->returnType); - } - - /** - * Test model has correct skip validation - */ - public function testModelSkipValidation(): void - { - $this->assertFalse($this->model->skipValidation); - } - - /** - * Test model has correct useAutoIncrement - */ - public function testModelUseAutoIncrement(): void - { - $this->assertTrue($this->model->useAutoIncrement); - } - - /** - * Test TestSiteID field is in allowed fields - */ - public function testTestSiteIDFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('TestSiteID', $allowedFields); - } - - /** - * Test Member field is in allowed fields - */ - public function testMemberFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('Member', $allowedFields); - } - - /** - * Test CreateDate field is in allowed fields - */ - public function testCreateDateFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('CreateDate', $allowedFields); - } - - /** - * Test EndDate field is in allowed fields - */ - public function testEndDateFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('EndDate', $allowedFields); - } -} diff --git a/tests/unit/v2/master/TestDef/TestDefSiteModelMasterTest.php b/tests/unit/v2/master/TestDef/TestDefSiteModelMasterTest.php deleted file mode 100644 index 528feb0..0000000 --- a/tests/unit/v2/master/TestDef/TestDefSiteModelMasterTest.php +++ /dev/null @@ -1,220 +0,0 @@ -model = new TestDefSiteModel(); - } - - /** - * Test model has correct table name - */ - public function testModelHasCorrectTableName(): void - { - $this->assertEquals('testdefsite', $this->model->table); - } - - /** - * Test model has correct primary key - */ - public function testModelHasCorrectPrimaryKey(): void - { - $this->assertEquals('TestSiteID', $this->model->primaryKey); - } - - /** - * Test model uses soft deletes - */ - public function testModelUsesSoftDeletes(): void - { - $this->assertTrue($this->model->useSoftDeletes); - $this->assertEquals('EndDate', $this->model->deletedField); - } - - /** - * Test model has correct allowed fields for master data - */ - public function testModelHasCorrectAllowedFields(): void - { - $allowedFields = $this->model->allowedFields; - - // Core required fields - $this->assertContains('SiteID', $allowedFields); - $this->assertContains('TestSiteCode', $allowedFields); - $this->assertContains('TestSiteName', $allowedFields); - $this->assertContains('TestType', $allowedFields); - - // Display and ordering fields - $this->assertContains('Description', $allowedFields); - $this->assertContains('SeqScr', $allowedFields); - $this->assertContains('SeqRpt', $allowedFields); - $this->assertContains('IndentLeft', $allowedFields); - $this->assertContains('FontStyle', $allowedFields); - - // Visibility fields - $this->assertContains('VisibleScr', $allowedFields); - $this->assertContains('VisibleRpt', $allowedFields); - $this->assertContains('CountStat', $allowedFields); - - // Timestamp fields - $this->assertContains('CreateDate', $allowedFields); - $this->assertContains('StartDate', $allowedFields); - $this->assertContains('EndDate', $allowedFields); - } - - /** - * Test model uses timestamps - */ - public function testModelUsesTimestamps(): void - { - $this->assertTrue($this->model->useTimestamps); - $this->assertEquals('CreateDate', $this->model->createdField); - $this->assertEquals('StartDate', $this->model->updatedField); - } - - /** - * Test model return type is array - */ - public function testModelReturnTypeIsArray(): void - { - $this->assertEquals('array', $this->model->returnType); - } - - /** - * Test model has correct skip validation - */ - public function testModelSkipValidation(): void - { - $this->assertFalse($this->model->skipValidation); - } - - /** - * Test model has correct useAutoIncrement - */ - public function testModelUseAutoIncrement(): void - { - $this->assertTrue($this->model->useAutoIncrement); - } - - /** - * Test TestSiteCode field is in allowed fields - */ - public function testTestSiteCodeFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('TestSiteCode', $allowedFields); - } - - /** - * Test TestSiteName field is in allowed fields - */ - public function testTestSiteNameFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('TestSiteName', $allowedFields); - } - - /** - * Test TestType field is in allowed fields - */ - public function testTestTypeFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('TestType', $allowedFields); - } - - /** - * Test SiteID field is in allowed fields - */ - public function testSiteIDFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('SiteID', $allowedFields); - } - - /** - * Test Description field is in allowed fields - */ - public function testDescriptionFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('Description', $allowedFields); - } - - /** - * Test SeqScr field is in allowed fields - */ - public function testSeqScrFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('SeqScr', $allowedFields); - } - - /** - * Test SeqRpt field is in allowed fields - */ - public function testSeqRptFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('SeqRpt', $allowedFields); - } - - /** - * Test VisibleScr field is in allowed fields - */ - public function testVisibleScrFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('VisibleScr', $allowedFields); - } - - /** - * Test VisibleRpt field is in allowed fields - */ - public function testVisibleRptFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('VisibleRpt', $allowedFields); - } - - /** - * Test CountStat field is in allowed fields - */ - public function testCountStatFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('CountStat', $allowedFields); - } - - /** - * Test getTests method exists and is callable - */ - public function testGetTestsMethodExists(): void - { - $this->assertTrue(method_exists($this->model, 'getTests')); - $this->assertIsCallable([$this->model, 'getTests']); - } - - /** - * Test getTest method exists and is callable - */ - public function testGetTestMethodExists(): void - { - $this->assertTrue(method_exists($this->model, 'getTest')); - $this->assertIsCallable([$this->model, 'getTest']); - } -} diff --git a/tests/unit/v2/master/TestDef/TestDefSiteModelTest.php b/tests/unit/v2/master/TestDef/TestDefSiteModelTest.php deleted file mode 100644 index 241ccec..0000000 --- a/tests/unit/v2/master/TestDef/TestDefSiteModelTest.php +++ /dev/null @@ -1,137 +0,0 @@ -model = new TestDefSiteModel(); - } - - /** - * Test model has correct table name - */ - public function testModelHasCorrectTableName(): void - { - $this->assertEquals('testdefsite', $this->model->table); - } - - /** - * Test model has correct primary key - */ - public function testModelHasCorrectPrimaryKey(): void - { - $this->assertEquals('TestSiteID', $this->model->primaryKey); - } - - /** - * Test model uses soft deletes - */ - public function testModelUsesSoftDeletes(): void - { - $this->assertTrue($this->model->useSoftDeletes); - $this->assertEquals('EndDate', $this->model->deletedField); - } - - /** - * Test model has correct allowed fields - */ - public function testModelHasCorrectAllowedFields(): void - { - $allowedFields = $this->model->allowedFields; - - // Core required fields - $this->assertContains('SiteID', $allowedFields); - $this->assertContains('TestSiteCode', $allowedFields); - $this->assertContains('TestSiteName', $allowedFields); - $this->assertContains('TestType', $allowedFields); - - // Optional fields - $this->assertContains('Description', $allowedFields); - $this->assertContains('SeqScr', $allowedFields); - $this->assertContains('SeqRpt', $allowedFields); - $this->assertContains('IndentLeft', $allowedFields); - $this->assertContains('FontStyle', $allowedFields); - $this->assertContains('VisibleScr', $allowedFields); - $this->assertContains('VisibleRpt', $allowedFields); - $this->assertContains('CountStat', $allowedFields); - - // Timestamp fields - $this->assertContains('CreateDate', $allowedFields); - $this->assertContains('StartDate', $allowedFields); - $this->assertContains('EndDate', $allowedFields); - } - - /** - * Test model uses timestamps - */ - public function testModelUsesTimestamps(): void - { - $this->assertTrue($this->model->useTimestamps); - $this->assertEquals('CreateDate', $this->model->createdField); - $this->assertEquals('StartDate', $this->model->updatedField); - } - - /** - * Test model return type is array - */ - public function testModelReturnTypeIsArray(): void - { - $this->assertEquals('array', $this->model->returnType); - } - - /** - * Test model has correct skip validation - */ - public function testModelSkipValidation(): void - { - $this->assertFalse($this->model->skipValidation); - } - - /** - * Test model has correct useAutoIncrement - */ - public function testModelUseAutoIncrement(): void - { - $this->assertTrue($this->model->useAutoIncrement); - } - - /** - * Test TestSiteCode field is in allowed fields - */ - public function testTestSiteCodeFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('TestSiteCode', $allowedFields); - } - - /** - * Test TestSiteName field is in allowed fields - */ - public function testTestSiteNameFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('TestSiteName', $allowedFields); - } - - /** - * Test TestType field is in allowed fields - */ - public function testTestTypeFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('TestType', $allowedFields); - } -} diff --git a/tests/unit/v2/master/TestDef/TestDefTechModelTest.php b/tests/unit/v2/master/TestDef/TestDefTechModelTest.php deleted file mode 100644 index 296a28b..0000000 --- a/tests/unit/v2/master/TestDef/TestDefTechModelTest.php +++ /dev/null @@ -1,160 +0,0 @@ -model = new TestDefTechModel(); - } - - /** - * Test model has correct table name - */ - public function testModelHasCorrectTableName(): void - { - $this->assertEquals('testdeftech', $this->model->table); - } - - /** - * Test model has correct primary key - */ - public function testModelHasCorrectPrimaryKey(): void - { - $this->assertEquals('TestTechID', $this->model->primaryKey); - } - - /** - * Test model uses soft deletes - */ - public function testModelUsesSoftDeletes(): void - { - $this->assertTrue($this->model->useSoftDeletes); - $this->assertEquals('EndDate', $this->model->deletedField); - } - - /** - * Test model has correct allowed fields - */ - public function testModelHasCorrectAllowedFields(): void - { - $allowedFields = $this->model->allowedFields; - - // Foreign key - $this->assertContains('TestSiteID', $allowedFields); - - // Technical fields - $this->assertContains('DisciplineID', $allowedFields); - $this->assertContains('DepartmentID', $allowedFields); - $this->assertContains('ResultType', $allowedFields); - $this->assertContains('RefType', $allowedFields); - $this->assertContains('VSet', $allowedFields); - - // Quantity and units - $this->assertContains('ReqQty', $allowedFields); - $this->assertContains('ReqQtyUnit', $allowedFields); - $this->assertContains('Unit1', $allowedFields); - $this->assertContains('Factor', $allowedFields); - $this->assertContains('Unit2', $allowedFields); - $this->assertContains('Decimal', $allowedFields); - - // Collection and method - $this->assertContains('CollReq', $allowedFields); - $this->assertContains('Method', $allowedFields); - $this->assertContains('ExpectedTAT', $allowedFields); - - // Timestamp fields - $this->assertContains('CreateDate', $allowedFields); - $this->assertContains('EndDate', $allowedFields); - } - - /** - * Test model uses timestamps - */ - public function testModelUsesTimestamps(): void - { - $this->assertTrue($this->model->useTimestamps); - $this->assertEquals('CreateDate', $this->model->createdField); - } - - /** - * Test model return type is array - */ - public function testModelReturnTypeIsArray(): void - { - $this->assertEquals('array', $this->model->returnType); - } - - /** - * Test model has correct skip validation - */ - public function testModelSkipValidation(): void - { - $this->assertFalse($this->model->skipValidation); - } - - /** - * Test model has correct useAutoIncrement - */ - public function testModelUseAutoIncrement(): void - { - $this->assertTrue($this->model->useAutoIncrement); - } - - /** - * Test TestSiteID field is in allowed fields - */ - public function testTestSiteIDFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('TestSiteID', $allowedFields); - } - - /** - * Test ResultType field is in allowed fields - */ - public function testResultTypeFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('ResultType', $allowedFields); - } - - /** - * Test RefType field is in allowed fields - */ - public function testRefTypeFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('RefType', $allowedFields); - } - - /** - * Test Unit1 field is in allowed fields - */ - public function testUnit1FieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('Unit1', $allowedFields); - } - - /** - * Test Method field is in allowed fields - */ - public function testMethodFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('Method', $allowedFields); - } -} diff --git a/tests/unit/v2/master/TestDef/TestMapModelTest.php b/tests/unit/v2/master/TestDef/TestMapModelTest.php deleted file mode 100644 index 64f3d4c..0000000 --- a/tests/unit/v2/master/TestDef/TestMapModelTest.php +++ /dev/null @@ -1,155 +0,0 @@ -model = new TestMapModel(); - } - - /** - * Test model has correct table name - */ - public function testModelHasCorrectTableName(): void - { - $this->assertEquals('testmap', $this->model->table); - } - - /** - * Test model has correct primary key - */ - public function testModelHasCorrectPrimaryKey(): void - { - $this->assertEquals('TestMapID', $this->model->primaryKey); - } - - /** - * Test model uses soft deletes - */ - public function testModelUsesSoftDeletes(): void - { - $this->assertTrue($this->model->useSoftDeletes); - $this->assertEquals('EndDate', $this->model->deletedField); - } - - /** - * Test model has correct allowed fields - */ - public function testModelHasCorrectAllowedFields(): void - { - $allowedFields = $this->model->allowedFields; - - // Foreign key - $this->assertContains('TestSiteID', $allowedFields); - - // Host system mapping - $this->assertContains('HostType', $allowedFields); - $this->assertContains('HostID', $allowedFields); - $this->assertContains('HostDataSource', $allowedFields); - $this->assertContains('HostTestCode', $allowedFields); - $this->assertContains('HostTestName', $allowedFields); - - // Client system mapping - $this->assertContains('ClientType', $allowedFields); - $this->assertContains('ClientID', $allowedFields); - $this->assertContains('ClientDataSource', $allowedFields); - $this->assertContains('ConDefID', $allowedFields); - $this->assertContains('ClientTestCode', $allowedFields); - $this->assertContains('ClientTestName', $allowedFields); - - // Timestamp fields - $this->assertContains('CreateDate', $allowedFields); - $this->assertContains('EndDate', $allowedFields); - } - - /** - * Test model uses timestamps - */ - public function testModelUsesTimestamps(): void - { - $this->assertTrue($this->model->useTimestamps); - $this->assertEquals('CreateDate', $this->model->createdField); - } - - /** - * Test model return type is array - */ - public function testModelReturnTypeIsArray(): void - { - $this->assertEquals('array', $this->model->returnType); - } - - /** - * Test model has correct skip validation - */ - public function testModelSkipValidation(): void - { - $this->assertFalse($this->model->skipValidation); - } - - /** - * Test model has correct useAutoIncrement - */ - public function testModelUseAutoIncrement(): void - { - $this->assertTrue($this->model->useAutoIncrement); - } - - /** - * Test HostType field is in allowed fields - */ - public function testHostTypeFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('HostType', $allowedFields); - } - - /** - * Test HostID field is in allowed fields - */ - public function testHostIDFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('HostID', $allowedFields); - } - - /** - * Test HostTestCode field is in allowed fields - */ - public function testHostTestCodeFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('HostTestCode', $allowedFields); - } - - /** - * Test ClientType field is in allowed fields - */ - public function testClientTypeFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('ClientType', $allowedFields); - } - - /** - * Test TestSiteID field is in allowed fields - */ - public function testTestSiteIDFieldExists(): void - { - $allowedFields = $this->model->allowedFields; - $this->assertContains('TestSiteID', $allowedFields); - } -}