package com.gnx.telemedicine.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotation to mark methods that access PHI (Protected Health Information).
 * Methods annotated with this will automatically log PHI access for HIPAA compliance.
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface LogPhiAccess {
    /**
     * The type of resource being accessed (e.g., MEDICAL_RECORD, PRESCRIPTION, PATIENT)
     */
    String resourceType();
    
    /**
     * The patient ID parameter name (default: "patientId")
     */
    String patientIdParam() default "patientId";
    
    /**
     * The resource ID parameter name (for direct resource access)
     */
    String resourceIdParam() default "";
    
    /**
     * Access type (Treatment, Payment, Operations, Authorization)
     */
    String accessType() default "Treatment";
    
    /**
     * Fields that will be accessed (optional, for detailed logging)
     */
    String[] accessedFields() default {};
}

