Initial import
This commit is contained in:
317
application/controllers/website/order.http
Normal file
317
application/controllers/website/order.http
Normal file
@@ -0,0 +1,317 @@
|
||||
|
||||
### Variabel Global
|
||||
@baseUrlOrder = https://cpone.aplikasi.web.id/one-api/website/order/
|
||||
@apiKey = 7a9b8c7d6e5f4g3h2i1j0k9l8m7n6o5p4q3r2s1t0u9v8w7x6y5z4a3b2c1d0
|
||||
|
||||
### Save Order Single - POST Request
|
||||
#Complete data
|
||||
# Permission yang dibutuhkan: order:save
|
||||
POST {{baseUrlOrder}}save
|
||||
Authorization: Bearer {{apiKey}}
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
{
|
||||
"trx_date": "2025-06-01",
|
||||
"trx_time": "10:30:00",
|
||||
"type_order": "HOME_SERVICE",
|
||||
"branch_code_lab": "R",
|
||||
"diagnose": "",
|
||||
"fo_note": "",
|
||||
"patient": {
|
||||
"name": "Nina Nani",
|
||||
"nik": "1114512191123456",
|
||||
"gender": "FEMALE",
|
||||
"birthdate": "1989-01-01",
|
||||
"phone": "081234527890",
|
||||
"email": "nina.nani@example.com",
|
||||
"job": "",
|
||||
"nip": "",
|
||||
"job_departement": "",
|
||||
"job_division": "",
|
||||
"job_position": "",
|
||||
"job_location": "",
|
||||
"address": "Jl. Semeru No. 123",
|
||||
"pro_cd": "31",
|
||||
"kab_cd": "71",
|
||||
"kec_cd": "020",
|
||||
"kel_cd": "002",
|
||||
"rt": "001",
|
||||
"rw": "002"
|
||||
},
|
||||
"details": [
|
||||
{
|
||||
"project_number": "MGM240700009",
|
||||
"x_id": "804",
|
||||
"test_id": "952",
|
||||
"test_nat_id": "4669",
|
||||
"test_name": "HDL Cholesterol",
|
||||
"test_sas_code": "10520500",
|
||||
"category": "Kimia Klinik",
|
||||
"test_requirement": null,
|
||||
"price": "30000",
|
||||
"disc": "0",
|
||||
"disc_rp": "0",
|
||||
"subtotal": "30000",
|
||||
"total": "30000",
|
||||
"px_type": "PX",
|
||||
"nat_tests": "[4669]",
|
||||
"child_test": [],
|
||||
"price_header_id": "57",
|
||||
"test_desc": ""
|
||||
},
|
||||
{
|
||||
"project_number": "MGM240700009",
|
||||
"x_id": "784",
|
||||
"test_id": "1",
|
||||
"test_nat_id": "4095",
|
||||
"test_name": "Hematologi Lengkap",
|
||||
"test_sas_code": "10110100",
|
||||
"category": "",
|
||||
"test_requirement": null,
|
||||
"price": "65000",
|
||||
"disc": "0",
|
||||
"disc_rp": "0",
|
||||
"subtotal": "65000",
|
||||
"total": "65000",
|
||||
"px_type": "PX",
|
||||
"nat_tests": "[4095,4098,4099,4101,4102,4103,4105,4106,4107,4108,4109,4110,4111,4112,4113,4114,4117,4116]",
|
||||
"child_test": [],
|
||||
"price_header_id": "57",
|
||||
"test_desc": "test"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
### Save Order Paket - POST Request
|
||||
# minimal data
|
||||
# Permission yang dibutuhkan: order:save
|
||||
POST {{baseUrlOrder}}save
|
||||
Authorization: Bearer {{apiKey}}
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
|
||||
{
|
||||
"trx_date": "2025-08-26",
|
||||
"trx_time": "10:00:00",
|
||||
"branch_code_lab": "R",
|
||||
"patient": {
|
||||
"name": "Nina Nani",
|
||||
"nik": "1114512191123456",
|
||||
"gender": "FEMALE",
|
||||
"birthdate": "1989-01-01",
|
||||
"phone": "081234527890",
|
||||
"email": "nina.nani@example.com",
|
||||
"address": "Jl. Semeru No. 123",
|
||||
"pro_cd": "31",
|
||||
"kab_cd": "71",
|
||||
"kec_cd": "020",
|
||||
"kel_cd": "002"
|
||||
},
|
||||
"details": [
|
||||
{
|
||||
"x_id": "7614",
|
||||
"test_id": "936",
|
||||
"test_nat_id": "0",
|
||||
"test_name": "PAKET TENSI",
|
||||
"test_sas_code": "PN2500374",
|
||||
"category": "packet",
|
||||
"test_requirement": null,
|
||||
"price": "210000",
|
||||
"disc": "0",
|
||||
"disc_rp": "0",
|
||||
"subtotal": "0",
|
||||
"total": "210000",
|
||||
"px_type": "PN",
|
||||
"nat_tests": "[4634,4633,4095,4098,4099,4100,4101,4102,4103,4105,4106,4107,4108,4109,4110,4111,4112,4113,4114,4116,4117,4331,4334,4335,4336,4337,4338,4339,4340,4341,4342,4344,4345,4346,4347,4348,4349,4350,4351,4352,10997,10998,6236]",
|
||||
"child_test": [
|
||||
{
|
||||
"T_PriceT_PriceHeaderID": "645",
|
||||
"T_TestID": "895",
|
||||
"T_TestName": "SGPT",
|
||||
"IsFromPanel": "N",
|
||||
"Nat_TestID": "4634",
|
||||
"T_PriceT_TestID": "895",
|
||||
"T_PriceIsCito": "N",
|
||||
"T_PricePriority": "0",
|
||||
"T_PriceAmount": "30000",
|
||||
"T_PriceDisc": "0",
|
||||
"T_PriceDiscRp": "0",
|
||||
"T_PriceSubTotal": "30000",
|
||||
"T_PriceOther": "0",
|
||||
"T_PriceTotal": "30000",
|
||||
"T_TestForceSell": "Y",
|
||||
"is_packet": "N",
|
||||
"packet_id": "0",
|
||||
"px_type": "PX",
|
||||
"nat_test": "[4634]",
|
||||
"child_test": "[]",
|
||||
"IsFavourite": "N",
|
||||
"T_TestSasCode": "10510200"
|
||||
},
|
||||
{
|
||||
"T_PriceT_PriceHeaderID": "645",
|
||||
"T_TestID": "894",
|
||||
"T_TestName": "SGOT",
|
||||
"IsFromPanel": "N",
|
||||
"Nat_TestID": "4633",
|
||||
"T_PriceT_TestID": "894",
|
||||
"T_PriceIsCito": "N",
|
||||
"T_PricePriority": "0",
|
||||
"T_PriceAmount": "30000",
|
||||
"T_PriceDisc": "0",
|
||||
"T_PriceDiscRp": "0",
|
||||
"T_PriceSubTotal": "30000",
|
||||
"T_PriceOther": "0",
|
||||
"T_PriceTotal": "30000",
|
||||
"T_TestForceSell": "Y",
|
||||
"is_packet": "N",
|
||||
"packet_id": "0",
|
||||
"px_type": "PX",
|
||||
"nat_test": "[4633]",
|
||||
"child_test": "[]",
|
||||
"IsFavourite": "N",
|
||||
"T_TestSasCode": "10510100"
|
||||
},
|
||||
{
|
||||
"T_PriceT_PriceHeaderID": "645",
|
||||
"T_TestID": "1",
|
||||
"T_TestName": "Hematologi Lengkap",
|
||||
"IsFromPanel": "N",
|
||||
"Nat_TestID": "4095",
|
||||
"T_PriceT_TestID": "1",
|
||||
"T_PriceIsCito": "N",
|
||||
"T_PricePriority": "0",
|
||||
"T_PriceAmount": "65000",
|
||||
"T_PriceDisc": "0",
|
||||
"T_PriceDiscRp": "0",
|
||||
"T_PriceSubTotal": "65000",
|
||||
"T_PriceOther": "0",
|
||||
"T_PriceTotal": "65000",
|
||||
"T_TestForceSell": "Y",
|
||||
"is_packet": "N",
|
||||
"packet_id": "0",
|
||||
"px_type": "PX",
|
||||
"nat_test": "[4095,4098,4099,4100,4101,4102,4103,4105,4106,4107,4108,4109,4110,4111,4112,4113,4114,4116,4117]",
|
||||
"child_test": "[]",
|
||||
"IsFavourite": "N",
|
||||
"T_TestSasCode": "10110100"
|
||||
},
|
||||
{
|
||||
"T_PriceT_PriceHeaderID": "645",
|
||||
"T_TestID": "448",
|
||||
"T_TestName": "Urine Lengkap",
|
||||
"IsFromPanel": "N",
|
||||
"Nat_TestID": "4331",
|
||||
"T_PriceT_TestID": "448",
|
||||
"T_PriceIsCito": "N",
|
||||
"T_PricePriority": "0",
|
||||
"T_PriceAmount": "35000",
|
||||
"T_PriceDisc": "0",
|
||||
"T_PriceDiscRp": "0",
|
||||
"T_PriceSubTotal": "35000",
|
||||
"T_PriceOther": "0",
|
||||
"T_PriceTotal": "35000",
|
||||
"T_TestForceSell": "Y",
|
||||
"is_packet": "N",
|
||||
"packet_id": "0",
|
||||
"px_type": "PX",
|
||||
"nat_test": "[4331,4334,4335,4336,4337,4338,4339,4340,4341,4342,4344,4345,4346,4347,4348,4349,4350,4351,4352,10997,10998]",
|
||||
"child_test": "[]",
|
||||
"IsFavourite": "N",
|
||||
"T_TestSasCode": "10210100"
|
||||
},
|
||||
{
|
||||
"T_PriceT_PriceHeaderID": "645",
|
||||
"T_TestID": "2562",
|
||||
"T_TestName": "Pemeriksaan Fisik",
|
||||
"IsFromPanel": "N",
|
||||
"Nat_TestID": "6236",
|
||||
"T_PriceT_TestID": "2562",
|
||||
"T_PriceIsCito": "N",
|
||||
"T_PricePriority": "0",
|
||||
"T_PriceAmount": "50000",
|
||||
"T_PriceDisc": "0",
|
||||
"T_PriceDiscRp": "0",
|
||||
"T_PriceSubTotal": "50000",
|
||||
"T_PriceOther": "0",
|
||||
"T_PriceTotal": "50000",
|
||||
"T_TestForceSell": "Y",
|
||||
"is_packet": "N",
|
||||
"packet_id": "0",
|
||||
"px_type": "PX",
|
||||
"nat_test": "[6236]",
|
||||
"child_test": "[]",
|
||||
"IsFavourite": "N",
|
||||
"T_TestSasCode": "40110100"
|
||||
}
|
||||
],
|
||||
"price_header_id": "645",
|
||||
"test_desc": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
### Save Order - Invalid Request (Missing Required Fields)
|
||||
# Testing validation error handling
|
||||
POST {{baseUrlOrder}}save
|
||||
Authorization: Bearer {{apiKey}}
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
|
||||
{
|
||||
"trx_date": "2023-09-25",
|
||||
"patient": {
|
||||
"name": "Invalid Patient"
|
||||
},
|
||||
"details": []
|
||||
}
|
||||
|
||||
### Save Order with Invalid Authorization
|
||||
# Testing unauthorized access
|
||||
POST {{baseUrlOrder}}save
|
||||
Authorization: Bearer {{apiKey}}
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
|
||||
{
|
||||
"trx_date": "2025-08-26",
|
||||
"trx_time": "10:30:00",
|
||||
"type_order": "WALK_IN",
|
||||
"branch_code_lab": "R",
|
||||
"diagnose": "",
|
||||
"fo_note": "",
|
||||
"patient": {
|
||||
"name": "Nina Nani Ninu",
|
||||
"nik": "1114512191123456",
|
||||
"gender": "FEMALE",
|
||||
"birthdate": "1989-01-01",
|
||||
"phone": "081234527890",
|
||||
"email": "nina.nani@example.com",
|
||||
"address": "Jl. Sudirman No. 123",
|
||||
"pro_cd": "01",
|
||||
"kab_cd": "01",
|
||||
"kec_cd": "001",
|
||||
"kel_cd": "001"
|
||||
},
|
||||
"details": [
|
||||
{
|
||||
"x_id": "7593",
|
||||
"test_id": "952",
|
||||
"test_nat_id": "4669",
|
||||
"test_name": "HDL Cholesterol",
|
||||
"test_sas_code": "10520500",
|
||||
"category": "Kimia Klinik",
|
||||
"test_requirement": null,
|
||||
"price": "30000",
|
||||
"disc": "0",
|
||||
"disc_rp": "0",
|
||||
"subtotal": "30000",
|
||||
"total": "30000",
|
||||
"px_type": "PX",
|
||||
"nat_tests": "[4669]",
|
||||
"child_test": [],
|
||||
"price_header_id": "645",
|
||||
"test_desc": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user