The present disclosure provides a cancer-specific or tissue specific targeting theranostic capsule using hepatitis E viral nanoparticle (HEVNP) to enhance the accuracy of cancer diagnosis in endoscopic examinations, as well as treatment, for example hyperthermia treatment, after diagnosis. The present disclosure also provides a method of delivering a theranostic agent using the endoscopic apparatus, as well as a non-transitory computer readable medium storing a program that causes a computer to execute the method of the present invention.