<?php

namespace api;

use OpenApi\Annotations as OA;

/**
 * @OA\Components(

 *   @OA\Schema(
 *     schema="AboutApp",
 *     type="object",
 *     required={"name","description","version","baseUrl"},
 *     @OA\Property(property="name", type="string", description="Name App", example="PROLAB API"),
 *     @OA\Property(property="description", type="string", description="Detail Information App", example="PROLAB API SERVICE"),
 *     @OA\Property(property="version", type="string", description="Version APP", example="1.0.0"),
 *     @OA\Property(property="baseUrl", type="string", description="Base Url APP", example="https://report.prolab.co.th/api-prolab/web/v1")
 *   ),

 *   @OA\Schema(
 *     schema="User",
 *     type="object",
 *     required={"id","username","email"},
 *     @OA\Property(property="id", type="integer", format="int64", example=1),
 *     @OA\Property(property="username", type="string", example="1122"),
 *     @OA\Property(property="email", type="string", format="email", example="mail@example.com"),
 *     @OA\Property(property="hospital_id", type="integer", example=101)
 *   ),

 *   @OA\Schema(
 *     schema="Unauthorized",
 *     type="object",
 *     required={"name","message","statusCode"},
 *     @OA\Property(property="name", type="string", example="Unauthorized"),
 *     @OA\Property(property="message", type="string", example="Your request was made with invalid credentials."),
 *     @OA\Property(property="statusCode", type="integer", example=401)
 *   ),

 *   @OA\Schema(
 *     schema="ErrorValidate",
 *     type="object",
 *     required={"message","errors"},
 *     @OA\Property(property="message", type="string", example="Validation failed"),
 *     @OA\Property(property="errors", type="object", additionalProperties=true)
 *   ),

 *   @OA\Schema(
 *     schema="HisRequestTestItem",
 *     type="object",
 *     required={"TestCode"},
 *     @OA\Property(property="TestCode", type="string", example="PR1-076"),
 *     @OA\Property(property="TestName", type="string", example="Cryoglobulin"),
 *     @OA\Property(property="TestType", type="string", example="T"),
 *     @OA\Property(property="SpacimenCode", type="string", example="01"),
 *     @OA\Property(property="SpacimenName", type="string", example="Lit"),
 *     @OA\Property(property="CollectionDateTime", type="string", example="07/02/2023 11:27:30"),
 *     @OA\Property(property="TestStatus", type="string", example="N"),
 *     @OA\Property(property="TestRemark", type="string", example=""),
 *   ),

 *   @OA\Schema(
 *     schema="CreateHisRequest",
 *     type="object",
 *     required={"LabNo","HisRequestTestList"},
 *    @OA\Property(property="ID", type="integer", example=123),
 *     @OA\Property(property="LabNo", type="string", example="12345600103"),
 *     @OA\Property(property="HN", type="string", example="0845467"),
 *     @OA\Property(property="AN", type="string", example="123456"),
 *     @OA\Property(property="VN", type="string", example="123456"),
 *     @OA\Property(property="PrefixName", type="string", example="นาย"),
 *     @OA\Property(property="FirstName", type="string", example="ทดสอบ"),
 *     @OA\Property(property="LastName", type="string", example="ระบบ"),
 *     @OA\Property(property="DateOfBirth", type="string", example="13/07/1965"),
 *     @OA\Property(property="PersonalID", type="string", example=""),
 *     @OA\Property(property="PassportNo", type="string", example=""),
 *     @OA\Property(property="Phone", type="string", example=""),
 *     @OA\Property(property="Address", type="string", example=""),
 *     @OA\Property(property="SubDistrict", type="string", example=""),
 *     @OA\Property(property="District", type="string", example=""),
 *     @OA\Property(property="ProvinceCode", type="string", example="10"),
 *     @OA\Property(property="ProvinceName", type="string", example="กรุงเทพมหานคร"),
 *     @OA\Property(property="PostalCode", type="string", example="10120"),
 *     @OA\Property(property="Sex", type="string", example="M"),
 *     @OA\Property(property="Weight", type="number", example=66.80),
 *     @OA\Property(property="Height", type="number", example="155.00"),
 *     @OA\Property(property="VisitType", type="string", example="IPD"),
 *     @OA\Property(property="RequestUnit", type="string", example="01"),
 *     @OA\Property(property="RequestUnitName", type="string", example="ร.พ."),
 *     @OA\Property(property="ReceiveLocation", type="string", example="ABC"),
 *     @OA\Property(property="Room", type="string", example=""),
 *     @OA\Property(property="Priority", type="string", example="R"),
 *     @OA\Property(property="RightsCode", type="string", example=""),
 *     @OA\Property(property="RightsName", type="string", example=""),
 *     @OA\Property(property="DepartmentCode", type="string", example="D001"),
 *     @OA\Property(property="DepartmentName", type="string", example="อายุรเวช"),
 *     @OA\Property(property="WardCode", type="string", example="W002"),
 *     @OA\Property(property="WardName", type="string", example="ผู้ป่วยชาย"),
 *     @OA\Property(property="AdmissionDate", type="string", example="2023-08-16"),
 *     @OA\Property(property="DoctorCode", type="string", example="D003"),
 *     @OA\Property(property="DoctorName", type="string", example="นพ.ทดสอบ ระบบ"),
 *     @OA\Property(property="RequestRemark", type="string", example=""),
 *     @OA\Property(property="RequestDate", type="string", example="2023-08-16"),
 *     @OA\Property(property="RequestByCode", type="string", example="01"),
 *     @OA\Property(property="RequestBy", type="string", example="ทดสอบ"),
 *     @OA\Property(property="RequestStatus", type="string", example="N"),
 *     @OA\Property(
 *       property="HisRequestTestList",
 *       type="array",
 *       @OA\Items(ref="#/components/schemas/HisRequestTestItem")
 *     )
 *   ),

 *   @OA\Schema(
 *     schema="HisRequest",
 *     type="object",
 *     @OA\Property(property="message", type="string", example="success"),
 *     @OA\Property(property="statusCode", type="integer", example=0),
 *   ),

 *   @OA\Schema(
 *     schema="LisResult",
 *     type="object",
 *     required={"ID","LabNo","TestCode","Result"},
 *     @OA\Property(property="ID", type="integer", example=12345),
 *     @OA\Property(property="LabNo", type="string", example="LAB-2025-0001"),
 *     @OA\Property(property="HN", type="string", nullable=true, example="H1234567"),
 *     @OA\Property(property="AN", type="string", nullable=true, example="A7654321"),
 *     @OA\Property(property="TestCode", type="string", example="CBC"),
 *     @OA\Property(property="Result", type="string", example="13.5"),
 *     @OA\Property(property="Unit", type="string", nullable=true, example="g/dL"),
 *     @OA\Property(property="RefRange", type="string", nullable=true, example="13.0-17.0"),
 *     @OA\Property(property="Status", type="string", example="APPROVED"),
 *     @OA\Property(property="ApprovedAt", type="string", format="date-time", nullable=true, example="2025-10-04T12:30:00+07:00"),
 *     @OA\Property(property="Remark", type="string", nullable=true, example="Fasting 8 hrs")
 *   ),

 *   @OA\RequestBody(
 *     request="AuthCheckBody",
 *     required=false,
 *     description="Send token in body OR Authorization header",
 *     @OA\MediaType(
 *       mediaType="application/json",
 *       @OA\Schema(
 *         type="object",
 *         @OA\Property(property="token", type="string", example="eyJhbGciOi...")
 *       )
 *     )
 *   ),

 *   @OA\RequestBody(
 *     request="GuestLoginBody",
 *     required=true,
 *     description="Send username/password as JSON",
 *     @OA\MediaType(
 *       mediaType="application/json",
 *       @OA\Schema(
 *         type="object",
 *         required={"username","password"},
 *         @OA\Property(property="username", type="string", example="1234"),
<<<<<<< HEAD
 *         @OA\Property(property="password", type="string", format="password", example="abcd")
=======
 *         @OA\Property(property="password", type="string", format="password", example="P@ssW0rdSecureD")
>>>>>>> 77e9a7f92223c13a9925ed82b0af8b74079a56ad
 *       )
 *     )
 *   ),
 
 *   @OA\Response(
 *     response="AboutAppOK",
 *     description="OK",
 *     @OA\JsonContent(ref="#/components/schemas/AboutApp")
 *   ),

 *   @OA\Response(
 *     response="GuestLoginOK",
 *     description="Login success",
 *     @OA\JsonContent(
 *       type="object",
 *       required={"token","user"},
 *       @OA\Property(property="token", type="string", example="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."),
 *       @OA\Property(
 *         property="user",
 *         type="object",
 *         @OA\Property(property="id", type="integer", example=1),
 *         @OA\Property(property="username", type="string", example="1234"),
 *         @OA\Property(property="email", type="string", example="prolab@example.com"),
 *       )
 *     )
 *   ),

 *   @OA\Response(
 *     response="ValidationError",
 *     description="Validation error",
 *     @OA\JsonContent(ref="#/components/schemas/ErrorValidate")
 *   ),

 *   @OA\Response(
 *     response="UnauthorizedResp",
 *     description="Unauthorized",
 *     @OA\JsonContent(ref="#/components/schemas/Unauthorized")
 *   )
 * )
 
 *   @OA\RequestBody(
 *     request="HisRequestCreateBody",
 *     required=true,
 *     description="Create HIS request payload",
 *     @OA\MediaType(
 *       mediaType="application/json",
 *       @OA\Schema(ref="#/components/schemas/CreateHisRequest")
 *     )
 *   ),
 
 *   @OA\Response(
 *     response="HisRequestCreated",
 *     description="Created",
 *     @OA\JsonContent(ref="#/components/schemas/HisRequest")
 *   ),
 * 
 *   @OA\Response(
 *     response="HisRequestValidationError",
 *     description="Validation error",
 *     @OA\JsonContent(ref="#/components/schemas/ErrorValidate")
 *   )
 */
final class OpenApiComponents {}