Initial import
This commit is contained in:
389
application/controllers/summarymcu/try_out.http
Normal file
389
application/controllers/summarymcu/try_out.http
Normal file
@@ -0,0 +1,389 @@
|
||||
### Variables
|
||||
@baseUrl = https://devcpone.aplikasi.web.id/one-api/summarymcu/
|
||||
@contentType = application/json
|
||||
|
||||
### ============================================================
|
||||
### SETUP & TABLE GENERATION
|
||||
### ============================================================
|
||||
|
||||
### 1. Generate Table Setup
|
||||
# Creates mcu_number record and generates table name
|
||||
POST {{baseUrl}}/generatedata/generate_table_setup
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1403
|
||||
}
|
||||
|
||||
### ============================================================
|
||||
### KELAINAN DATA GENERATION
|
||||
### ============================================================
|
||||
|
||||
### 2. Generate Kelainan Lab
|
||||
# Generates lab anomaly details data
|
||||
POST {{baseUrl}}/generatedata/generate_kelainan_lab
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 2
|
||||
}
|
||||
|
||||
### 3. Generate Kelainan Non-Lab
|
||||
# Generates non-lab anomaly details data
|
||||
POST {{baseUrl}}/generatedata/generate_kelainan_nonlab
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 2
|
||||
}
|
||||
|
||||
### 4. Generate Kelainan Fisik
|
||||
# Generates physical anomaly details data
|
||||
POST {{baseUrl}}/generatedata/generate_kelainan_fisik
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
### 5. Summary Kelainan Sepuluh
|
||||
# Generates summary of top 10 anomalies
|
||||
POST {{baseUrl}}/generatedata/summary_kelainan_sepuluh
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
### ============================================================
|
||||
### MCU RESULTS GENERATION
|
||||
### ============================================================
|
||||
|
||||
### 6. Generate All Results
|
||||
# Generates mcu_result_all table data
|
||||
POST {{baseUrl}}/generatedata/generate_all_results
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
### 7. Generate Result MCU Lab
|
||||
# Generates lab results for all orders in MCU
|
||||
POST {{baseUrl}}/generatedata/generate_result_mcu_lab
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
### 8. Generate Result MCU Non-Lab
|
||||
# Generates non-lab results
|
||||
POST {{baseUrl}}/generatedata/generate_result_mcu_nonlab
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
### 9. Generate Result MCU Kenal Warna
|
||||
# Generates color recognition test results
|
||||
POST {{baseUrl}}/generatedata/generate_result_mcu_kenal_warna
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
### 10. Generate Result MCU Visus
|
||||
# Generates visual acuity test results
|
||||
POST {{baseUrl}}/generatedata/generate_result_mcu_visus
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
### 11. Generate Result MCU Status Gizi
|
||||
# Generates nutritional status results
|
||||
POST {{baseUrl}}/generatedata/generate_result_mcu_status_gizi
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
### 12. Generate Result MCU Body Fat Monitoring
|
||||
# Generates body fat monitoring results
|
||||
POST {{baseUrl}}/generatedata/generate_result_mcu_bodyfatmonitoring
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
### 13. Generate Result MCU Fisik
|
||||
# Generates physical examination results
|
||||
POST {{baseUrl}}/generatedata/generate_result_mcu_fisik
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
### 14. Generate Result Lab (Specific Order)
|
||||
# Generates lab results for specific order
|
||||
##POST {{baseUrl}}/generatedata/generate_result_lab
|
||||
#Content-Type: {{contentType}}
|
||||
|
||||
#{
|
||||
# "T_OrderHeaderID": 12345,
|
||||
# "T_OrderHeaderLabNumber": "LAB001"
|
||||
#}
|
||||
|
||||
|
||||
|
||||
### ============================================================
|
||||
### COMPLETE WORKFLOW EXAMPLE
|
||||
### ============================================================
|
||||
|
||||
### SCENARIO 1: Setup New MCU Project (Complete Flow)
|
||||
# Step 1: Generate table setup
|
||||
POST {{baseUrl}}/generatedata/generate_table_setup
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
###
|
||||
# Step 2: Generate lab anomalies
|
||||
POST {{baseUrl}}/generatedata/generate_kelainan_lab
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
###
|
||||
# Step 3: Generate non-lab anomalies
|
||||
POST {{baseUrl}}/generatedata/generate_kelainan_nonlab
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
###
|
||||
# Step 4: Generate physical anomalies
|
||||
POST {{baseUrl}}/generatedata/generate_kelainan_fisik
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
###
|
||||
# Step 5: Generate summary
|
||||
POST {{baseUrl}}/generatedata/summary_kelainan_sepuluh
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
###
|
||||
# Step 6: Export to SQLite
|
||||
POST {{baseUrl}}/generatedata/generate_sqlite_by_mgm_mcuid
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
|
||||
### ============================================================
|
||||
### FISIK TEMPLATE MAP FUNCTIONS
|
||||
### Step-by-step workflow for template mapping
|
||||
### ============================================================
|
||||
|
||||
### STEP 1: List Active Fisik Templates (Optional)
|
||||
# View all active templates
|
||||
POST {{baseUrl}}/generatedata/list_active_fisik_templates
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{}
|
||||
|
||||
### STEP 2: Get Fisik Template Detail (Optional)
|
||||
# View detail of specific template with parsed JSON
|
||||
POST {{baseUrl}}/generatedata/get_fisik_template_detail
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"FisikTemplateCode": "RI00"
|
||||
}
|
||||
|
||||
### STEP 3: Create Fisik Template Map Table (Once Only)
|
||||
# Creates the fisik_template_map table
|
||||
POST {{baseUrl}}/generatedata/create_fisik_template_map_table
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{}
|
||||
|
||||
### STEP 4a: Generate Fisik Template Map (Full Generate)
|
||||
# Extract & save mapping for ALL active templates
|
||||
# Note: Truncates all old data, inserts all new data
|
||||
POST {{baseUrl}}/generatedata/generate_fisik_template_map
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{}
|
||||
|
||||
### STEP 4b: Generate Fisik Template Map By Code (Partial Update)
|
||||
# Extract & update mapping for ONE template only
|
||||
# Use when only one template changed
|
||||
POST {{baseUrl}}/generatedata/generate_fisik_template_map_by_code
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"FisikTemplateCode": "RI00"
|
||||
}
|
||||
|
||||
### STEP 5a: Get Fisik Template Map
|
||||
# Query mapping data with optional filters
|
||||
POST {{baseUrl}}/generatedata/get_fisik_template_map
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"FisikTemplateCode": "RI00",
|
||||
"level": 2
|
||||
}
|
||||
|
||||
### STEP 5a-1: Get All Fisik Template Map Data
|
||||
POST {{baseUrl}}/generatedata/get_fisik_template_map
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{}
|
||||
|
||||
### STEP 5a-2: Get By Template Code Only
|
||||
POST {{baseUrl}}/generatedata/get_fisik_template_map
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"FisikTemplateCode": "RI00"
|
||||
}
|
||||
|
||||
### STEP 5a-3: Get By Level Only
|
||||
POST {{baseUrl}}/generatedata/get_fisik_template_map
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"level": 2
|
||||
}
|
||||
|
||||
### STEP 5b: Search Fisik Template Map
|
||||
# Search by id_code or label (LIKE search)
|
||||
POST {{baseUrl}}/generatedata/search_fisik_template_map
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"keyword": "perut"
|
||||
}
|
||||
|
||||
### ============================================================
|
||||
### SQLITE EXPORT
|
||||
### ============================================================
|
||||
|
||||
### 15. Generate SQLite by Mgm_McuID
|
||||
# Exports kelainan_details, kelainan_summary, and mcu_number to SQLite file
|
||||
POST {{baseUrl}}/generatedata/generate_sqlite_by_mgm_mcuid
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"Mgm_McuID": 1
|
||||
}
|
||||
|
||||
### ============================================================
|
||||
### SCENARIO 2: Fisik Template Setup (First Time)
|
||||
### ============================================================
|
||||
|
||||
###
|
||||
# Step 1: Create the mapping table (once)
|
||||
POST {{baseUrl}}/generatedata/create_fisik_template_map_table
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{}
|
||||
|
||||
###
|
||||
# Step 2: Generate all template mappings
|
||||
POST {{baseUrl}}/generatedata/generate_fisik_template_map
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{}
|
||||
|
||||
###
|
||||
# Step 3: Query the generated mappings
|
||||
POST {{baseUrl}}/generatedata/get_fisik_template_map
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{}
|
||||
|
||||
### ============================================================
|
||||
### SCENARIO 3: Update Single Template (Maintenance)
|
||||
### ============================================================
|
||||
|
||||
###
|
||||
# Update mapping for specific template only
|
||||
POST {{baseUrl}}/generatedata/generate_fisik_template_map_by_code
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"FisikTemplateCode": "RI00"
|
||||
}
|
||||
|
||||
###
|
||||
# Verify the updated mapping
|
||||
POST {{baseUrl}}/generatedata/get_fisik_template_map
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"FisikTemplateCode": "RI00"
|
||||
}
|
||||
|
||||
### ============================================================
|
||||
### NOTES & TIPS
|
||||
### ============================================================
|
||||
|
||||
# 1. Update @baseUrl variable at the top with your actual server URL
|
||||
# 2. Replace Mgm_McuID with actual MCU ID from your database
|
||||
# 3. Use ### to separate requests
|
||||
# 4. Click "Send Request" above each request to execute
|
||||
# 5. For CodeIgniter, ensure index.php is in URL if not using URL rewriting
|
||||
# Example: http://localhost/project/index.php/generatedata/function_name
|
||||
# 6. Check commented documentation in controller for detailed workflow
|
||||
# 7. Some functions depend on previous steps (e.g., generate_kelainan_* requires generate_table_setup first)
|
||||
# 8. SQLite export creates file in root directory: mcu_{TableName}.sqlite
|
||||
|
||||
### ============================================================
|
||||
### ERROR TESTING
|
||||
### ============================================================
|
||||
|
||||
### Test Missing Parameter
|
||||
POST {{baseUrl}}/generatedata/generate_table_setup
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{}
|
||||
|
||||
### Test Invalid Template Code
|
||||
POST {{baseUrl}}/generatedata/get_fisik_template_detail
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"FisikTemplateCode": "INVALID_CODE"
|
||||
}
|
||||
|
||||
### Test Missing Keyword
|
||||
POST {{baseUrl}}/generatedata/search_fisik_template_map
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{}
|
||||
|
||||
Reference in New Issue
Block a user