This appeal is from an opinion of the Court of Appeals reversing an order of the circuit court which had denied a writ of mandamus sought by Appalachian Regional Healthcare, Inc. against the Harlan County Jailer.
The principal issue presented is whether a writ of mandamus should be issued requiring the jailer to take the necessary steps to ensure that an indigency determination is made for inmates in his county who require medical attention.
The dispute arose between Appalachian Regional Healthcare, Inc. and the Harlan County Jailer and county officials concerning medical services provided to inmates in the custody of the jailer from 1995 until 1998. Healthcare filed a complaint in circuit court demanding judgment for medical services rendered to indigent inmates in an amount exceeding $300,000 and sought a writ of mandamus to compel the jailer to comply with duties it believed were imposed on the jailer by statute. The question of monetary damages was settled, but the issue regarding the writ of mandamus, which centered on who had to fill out the necessary paper work, was denied by the circuit judge. The Court of Appeals reversed that decision and remanded the case to the circuit judge to issue an appropriate writ. This Court accepted discretionary review.
Harlan County argues that the jailer is under no such statutory duty to determine if an inmate is indigent for the purposes of KRS 441.045. It contends that a writ of mandamus can only issue against a public official when that official has a nondiscre-tionary duty to perform the activity being requested. Harlan County maintains that KRS 441 M5 and KRS 31.120 are clear and specific and must be strictly interpreted according to the language of each statute. It also claims that the relief granted by the Court of Appeals is not workable.
Healthcare responds that the Court of Appeals was correct in holding that the jailer had a statutory duty to take the necessary steps to seek an indigency determination for inmates of the county needing medical attention. It argues that the writ of mandamus is a proper remedy to require the jailer to perform such statutory duties and that the jailer has a statutory duty to seek an indigency determination for inmates who need medical service. Healthcare asserts that KRS 441.045 should be construed to require the jailer to take certain actions to determine or assist in the determination of indigency.
The parties agree that the county bears responsibility for the cost of “necessary” medical services for indigent prisoners pursuant to KRS 441.045. Section 8(a) of the statute begins with the following sentence: “The determination of whether a prisoner is indigent shall be made pursu*610ant to KRS 31.120.” Although Section (2) of KRS 31.120 addresses a judicial resolution of indigency status based on an affidavit of indigency “compiled by the pretrial release officer,” the county reads the Court of Appeals’ opinion as improperly placing on county jailers a “supervisory role” over pretrial release officers with regard to indigency determinations. The county also points to an apparent contradiction in the language used by the Court of Appeals:
While we agree with the jailer that a writ of mandamus should not be issued to compel him to complete the affidavit of indigency forms, we believe that his position as custodian of the prisoners requires him to take the necessary steps to seek an indigency determination.
The Court of Appeals panel remanded the case to the circuit court for entry of a writ of mandamus consistent with the opinion rendered.
I. Duties of Jailer/County
KRS 441.045(3) places the burden for the cost of necessary medical care rendered to indigent prisoners in the county jail on the shoulders of the county government. KRS 441.045(8)(a) provides that the determination of indigency shall be made pursuant to KRS 31.120, which defines a “needy” person for purposes of court appointment of counsel. A person seeking needy status is to certify by an affidavit of indigency the material factors relating to his inability to pay.
No difference is recognized between legal and medical needs by either statute. KRS 441.045(3) obliges the county to pay for necessary medical care for all indigent prisoners regardless of whether they have certified such indigency by means of an affidavit for purposes of obtaining court appointed counsel. KRS 441.045(8)(a) indicates that a prisoner shall not be considered indigent for the purposes of receiving medical care if the prisoner has funds in an inmate account to cover all or a portion of medical expenses, if there is a medical insurance policy to cover the expenses, or if the prisoner has private resources to pay for the use of medical facilities.
It is clear that the intent of this statutory system is for the jailer to have some role in seeking the determination of indigency for medical purposes. The jailer should be in the best position to know whether an inmate has funds in the inmate account, and as a custodian of the prisoner, should know whether the inmate has private insurance or other resources with which to pay medical expenses. Of necessity, this section supports the position that a jailer has a role in seeing that the necessary paper work for a determination of indigency be made for an inmate who receives medical care. We must agree with the Court of. Appeals that the statute contemplates that the jailer is responsible for the care and custody of the inmates and that it is a reasonable contemplation of the system provided by the General Assembly that the jailer is responsible for taking the necessary steps to seek a determination concerning indigency for medical care purposes.
Naturally, the determination of such a status is left to the judicial system. The presentation of the necessary paper work must be a combined effort by the jailer and the pretrial release service. Thus, KRS 441.045 must be construed so as to require the jailer to take certain actions to determine or assist in the determination of indigency. KRS 441.045 principally concerns payment for the costs associated with medical, dental and psychological care of inmates in the county jail.
It is legitimate to construe the statute so as to require the jailer to see that the *611necessary steps to seek an indigency determination for medical treatment are taken so that the requirements of the statute and the intent of the legislature will be fulfilled.
General principles of statutory construction hold that a court must not be guided by a single sentence of a statute but must look to the provisions of the whole statute and its object and policy. Democratic Party of Ky. v. Graham, Ky., 976 S.W.2d 423 (1998). The power granted by a statute is not limited to that which is expressly conferred but also includes that which is necessary to accomplish the things which are expressly authorized. See Strong v. Chandler, Ky., 70 S.W.3d 405 (2002) citing Long v. Mayo, 271 Ky. 192, 111 S.W.2d 633 (1937). In interpreting a statute, this Court must be guided by the intent of the legislature in enacting the law. No single word or sentence is determinative, but the statute as a whole must be considered. Strong, supra; see also Davis v. Commonwealth Life Insurance Co., Ky., 284 S.W.2d 809 (1955); Graham, supra. In order to effectuate the legislative intent, words may be supplied, omitted, substituted or modified. The purpose is to give effect to the intent of the legislature. Neutzel v. Ryans, 184 Ky. 292, 211 S.W. 852 (1919). KRS 446.080 provides that all statutes shall be liberally construed to carry out the intent of the legislature.
The administrative burden of the jailer comes from his custodial responsibilities as stated in KRS 71.020, 71.030 and 71.040. KRS 71.040 requires humane treatment of prisoners and as such necessarily includes the proper paper work or assistance therewith. Not to require the jailer to cooperate with other officials in providing the necessary services would produce an absurd result and frustrate the system envisioned by the legislature. There is no question that the jailer can easily comply with the duties required. The result envisioned by obedience to the statute is very workable. Here, there is a legal duty and it must be fulfilled.
In Gordon v. Morrow, 186 Ky. 713, 218 S.W. 258 (1920), the court recognized that although no express statutory authority authorized the state auditor to issue a warrant in payment of a judgment or pay special counsel employed by the Governor, the court indicated that it should hardly be a question that the state auditor would be under such a duty. Gordon, supra, went on to say “the legislature in authorizing the employment of special counsel also authorized such counsel to take such action as might be necessary to recover the compensation to which they were entitled.” In Trimble County Fiscal Court v. Trimble County Bd. of Health, Ky.App., 587 S.W.2d 276 (1979), the County Board of Health brought an action against magistrates of the Trimble County Fiscal Court seeking a writ of mandamus ordering the magistrates to set a specific health tax rate. The Court of Appeals affirmed the circuit court which granted the writ and judgment so as to direct the county clerk to prepare tax bills with the levy. The Court of Appeals reasoned that requiring the clerk to prepare the bills “merely recognizes that what has been ordered to be done will be done.”
Here, the county is statutorily required to pay for the necessary medical bills of indigent inmates. Requiring the jailer to take the necessary steps to seek a determination of indigency for inmates in his custody merely assures that what has been ordered by the legislature will be done. When KRS 441.045 is taken as a whole and considered with the responsibility of the jailer for the inmate in his custody, it is clear that the jailer has the duty to take the necessary steps to seek an indigency *612determination. To do otherwise would produce an absurd result. Cf. Layne v. Newberg, Ky., 841 S.W.2d 181 (1992).
As a custodian for the inmates, the jailer has the duty to insure that the intended result of the statute is achieved. To hold otherwise would frustrate the intent of the legislature. We find the reliance by Harlan County on Newberg, supra, to be misplaced. We are not convinced by the citations to authority in Hatchett v. City of Glasgow, Ky., 340 S.W.2d 248 (1960) or Commonwealth v. Allen, Ky., 980 S.W.2d 278 (1998).
The common sense and reasonable interpretation of KRS 441.045(8), is that the reference to KRS 81.120 was intended for the purpose of incorporating the financial provisions for determining indigency into the mandate of KRS 441.045(8). The legislature did not find it necessary to set forth another procedure for separately determining indigency. It is clear that whatever paper work the judicial system may require to establish indigency must be processed by the jailer. The jailer can request the pretrial officer to compile the necessary affidavit and swear to it. These officers must work together and already do so in many counties and in many other aspects involving prisoners. It is of interest to note from the record that the Kentucky Department of Corrections has supplied all county jailers with forms necessary for their counties to be reimbursed under the state’s catastrophic program.
The statutory system ordained by the legislature is clear. It contemplates the appropriate payment to a healthcare provider when the jailer fulfills certain statutory obligations. These responsibilities include arrangements with the sheriff for the transportation of the inmate to the healthcare facility and assistance to the inmate in obtaining indigent status so that the final medical expense can be paid by the county as necessary. The payment of medical bills for indigents is not limited to those inmates who receive public defender assistance in the legal aspects of their involvement in the judicial and penal system. Folks v. Barren County, 313 Ky. 515, 232 S.W.2d 1010 (1950), states that mere imperfections in a statute may be cured by judicial construction. Clarification may be had by considering the character and nature of the statute and the purpose to be accomplished. Deficiencies may be supplied by inference or implication from the act as a whole. Folks, supra. Folks asserted that “where the end is expressly given, the means necessary to the effectuation of that end are given by implication.”
Here, the end is that the county must pay for necessary medical expenses for indigent inmates and the means necessary to produce this end is that the jailer who has custody of the inmate, must take the necessary steps to assist in making sure that required paper work to establish indi-gency is complete.
II. Writ of Mandamus Remedy
In some ways it may seem harsh that a writ of mandamus is necessary to require a jailer to perform statutory duties. However, the function of a writ of mandamus is to compel an official to perform duties of that official where an element of discretion does not occur. It does not usurp legislative powers or invade the functions of an independent branch of government. Kavanaugh v. Chandler, 255 Ky. 182, 72 S.W.2d 1003 (1934). As noted in Kavanaugh, supra, “It is familiar law that courts may mandatorily require a public officer to perform his duty.” For other examples of this general principle, reference is made to 52 Am.Jur.2d Mandamus §§ 49 to 54 (2000).
*613Without exception, the judicial opinions and other legal -writings which treat mandamus observe that it is an extraordinary remedy which compels the performance of a ministerial act or mandatory duty where there is a clear legal right or no adequate remedy at law. Specific cases are driven by the application of these legal principles to the particular facts and naturally, the results vary. We recognize that mandamus should be cautiously employed. It is not a common means of redress and is certainly not a substitute for appeal. It is different from prohibition although it shares some common elements. The term “mandamus” comes from the Latin and means “we command.” Mandamus is a legal remedy but its issuance is largely controlled by equitable principles with consideration given to rights of the public and of third persons. See Keane v. St. Francis Hospital, 186 Wis.2d 637, 522 N.W.2d 517 (Ct.App.1994).
Mandamus compels the performance of ministerial acts or duties only. An act is ministerial when the law clearly spells out the duty to be performed by the official with sufficient certainty that nothing is left to the exercise of discretion. In some respects public officials must interpret the statutes imposing duties on them to form a judgment from the language of the statute as to what responsibilities are imposed. Such an intellectual activity does not make the duty of the officer anything other than a ministerial one. Accordingly, if the statute directs the officer to perform a particular act which does not involve discretion, the officer is required to do so and the act remains ministerial despite any doubt by the official.
Here, the only logical inferences make it sufficiently clear as to the responsibility of the jailer and nothing is left to the exercise of discretion. Thus, mandamus -will lie where a statute imposes on a public officer a specific duty which he fails or refuses to perform because of an erroneous conclusion by him as to his responsibilities. The failure or refusal to perform a particular responsibility need not be expressed but may be implied when an officer fails to act within a reasonable time so as to demonstrate an intention not to perform the duties.
It is our hope and expectation that all government officials will cooperate with the purpose of harmonizing their individual responsibilities with each other so as to produce an efficient government for the public in general. It should be understood that it is not the intention of this Court to require the jailer to physically fill out the affidavit of indigency, but only to assist the inmate in seeking indigency status and with completing the paper work necessary by the judicial system and the statutes to establish indigency. Certainly, there is no supervisory authority by the jailer over the pretrial release officer. Such is not necessary because each officer has individual responsibilities that if discharged properly are congruent. In completing these responsibilities, the jailers, who may not be notaries, should arrange for the appropriate notary to be present for the execution of the affidavit.
We affirm the opinion of the Court of Appeals which held that the county jailer has a statutory duty to take the necessary steps to seek an indigency determination for inmates in his county needing medical attention. A writ of mandamus is the proper remedy to require the performance of the statutory duties in question.
The opinion of the Court of Appeals is affirmed. This case is remanded to the Harlan Circuit Court for the entry of a writ of mandamus consistent with this opinion.
*614LAMBERT, C.J., KELLER and STUMBO, JJ., concur. GRAVES, J. dissents by separate opinion and is joined by COOPER and JOHNSTONE, JJ.