
280 N.W.2d 422 (1979)
Pearl E. Voss DILLEHAY, Appellee,
v.
IOWA DEPARTMENT OF JOB SERVICE, Appellant.
No. 62388.
Supreme Court of Iowa.
June 27, 1979.
*423 Walter F. Maley and Blair H. Dewey, Des Moines, for appellant.
John G. Hinde, Council Bluffs, for appellee.
Considered by REYNOLDSON, C. J., and LeGRAND, HARRIS, ALLBEE, and LARSON, JJ.
LARSON, Justice.
Department of Job Service appeals from the district court's disposition of Ms. Dillehay's petition for judicial review. We reverse on the issue ruled upon by the district court and remand for consideration of other issues raised in the petition.
Petitioner is a retired member of the Iowa Public Employment Retirement System (IPERS). She receives retirement allowances of $75.80 per month. This controversy arose from her attempts to augment her retirement allowance which were rejected by the department. We are confronted solely by a matter of statutory construction concerning the interrelationship of IPERS and its predecessor, the Old-Age and Survivor's Insurance System (OASIS).
When IPERS was created to replace OASIS, OASIS participants were given the option of having years of public service under OASIS considered in determining the amount of the IPERS retirement allowance or of receiving a refund of their OASIS contributions. This option was available only to "member[s] in service on July 4, 1953 . . ." and was exercised by authorizing transfer of one's OASIS contributions to the IPERS fund. Section 97B.43, The Code 1954. However, the option was foreclosed to OASIS participants who were not in service on that date. Ms. Dillehay was not in service on July 4, 1953. Therefore, at the inception of IPERS, she was forced to receive a refund of her OASIS contributions.
Section 97B.43 was amended in 1973 to allow those who had originally received a refund of their OASIS contributions to recapture their years of OASIS service by tendering the amount of the refund plus interest to Job Service. However, this provision, which has come to be known as the buy-back provision, was expressly unavailable "to any person who [had] received a refund of any [IPERS] contributions." Section 97B.43, The Code 1975. In 1974 Ms. Dillehay attempted to buy back her OASIS years of service by tendering to Job Service a check in the appropriate amount. This attempt was refused on two grounds: (1) that Ms. Dillehay was not in service on July 4, 1953 and (2) that in 1962 she had received a refund of her IPERS contributions for the years 1953-1957. No appeal was taken from that agency action.
The buy-back provision was again amended in 1975[1] to extend the privilege to those "who [were] not in service on July 4, 1953." Section 97B.43, The Code 1977. Ms. Dillehay submitted another check to Job Service, and the agency again refused to accept it. This refusal was affirmed by a hearing officer, and the hearing officer's decision was affirmed by the agency. The basis for the refusal was not elucidated in the written decisions, but the trial court correctly perceived that "the real reason for denying the buy-back right" was "petitioner's receipt of the [1962] refund for years 1953-1957."
Ms. Dillehay petitioned for judicial review of the agency action alleging (1) that Job Service acted ultra vires in making the 1962 refund, (2) that the failure of Job Service to fully inform Ms. Dillehay of all her options at the time of the refund "deprived her of an important property interest without that measure of due process of law which is mandated by the Fourteenth Amendment to the United States Constitution" *424 and (3) that denying the buy-back provision to those who had received refunds of IPERS contributions violates the equal protection clauses of the United States and Iowa Constitutions.
Both parties filed motions for summary judgment. The trial court ruled that the 1962 refund was beyond the statutory authority of the agency because (a) Ms. Dillehay was "still an employee in IPERS-covered employment" at the time she received the refund, (b) her "vested status should not have been determined in June 1962 since her member's contributions to IPERS had resumed in the Fall of 1961," and (c) she was entitled to the benefit of a five year break-in service provision of the 1954 Code because she "had at least five years of prior credit." The trial court explicitly reserved ruling on the constitutional issues. The remedy fashioned by the trial court was to allow Ms. Dillehay to buy back both her OASIS years of service and her 1953-57 years of IPERS service.
We have held that summary judgment is not proper in judicial review of a contested case under section 17A.19, The Code. The basis for this rule is that "the affidavit procedure [of summary judgment] is inappropriate when the court reviewing a contested case proceeding [under the A.P.A.] is limited . . . to the record before the agency." Young Plumbing and Heating Company v. Iowa Natural Resources Council, 276 N.W.2d 377, 381 (Iowa 1979). However, in this case, neither underlying facts nor any inferences to be drawn from them are disputed. The motions of both parties, in effect, sought a judicial review on the merits based upon those facts. The trial court properly considered it in that manner, despite denomination of those requests as motions for summary judgment. We therefore proceed to a discussion of the legal issues raised.
At the time Ms. Dillehay left public employment in 1957, Section 97B.53, The Code 1954, provided, in part:

All rights to all benefits under the retirement system will cease upon a member's termination of employment with the employer prior to his retirement, other than by death, except as provided hereafter:
1. Upon the termination of employment with the employer prior to retirement other than by death of a member, the accumulated contributions by the member at the date of such termination will be paid to such members except as may be provided in subsection 2 and subsection 5 of this section.
2. If the employment with the employer of a member is terminated prior to his retirement, other than by death, but after he has either (a) obtained the age of forty-eight and completed at least eight years of service or (b) has attained the age of fifty-five, [he may remain in the system].
. . . . .
5. Any member whose employment is terminated after he has accumulated five or more years of employment, either under the provisions of this chapter or as a result of prior service credits, may elect to leave his accumulated contributions in the retirement fund. . . . In the event he returns to public employment at any time within five years after this termination of employment he shall be entitled to resume membership in the system with the same credits for prior service and accumulated contributions that he had earned when his original employment was terminated. (Emphasis added.)
By the terms of the statute, termination of public employment required cessation of participation in IPERS except under three limited sets of circumstances. Those circumstances were (1) being at least forty-eight and having at least eight years of service, (2) being at least fifty-five, or (3) having accumulated five or more years of public employment under IPERS plus prior service credit [i. e., credit received for OASIS years of service]. A careful analysis of this subsection leads us to conclude that the propriety of a refund is determined by reference to those circumstances in existence at the time public employment is terminated. *425 Post-termination events cannot affect its propriety.
A review of the trial judge's decision reveals two distinct bases for his finding that the refund was illegal. Reasons (a) and (b) are grounded on the fact that Ms. Dillehay was engaged in IPERS-covered employment at the time she received the refund. Reason (c) is premised on the fact that Ms. Dillehay could take advantage of the five year break-in-service exception.
Since the proper time focus for determining the propriety of a refund is the moment of termination, reasons (a) and (b), grounded as they are on the post-termination circumstance of return to public employment, do not support a finding of illegality.
Nor does the remaining reason support that finding for Ms. Dillehay did not qualify for the five year break-in-service exception. That exception was available to "[a]ny member whose employment [was] terminated after he [had] accumulated five or more years of employment either under the provisions of this chapter or as a result of prior service credits . . .." Section 97B.53(5), The Code 1954. Since IPERS did not go into effect until 1953 and Ms. Dillehay terminated her public employment in 1957, it is clear that she did not have five years of employment "under the provisions of . . . chapter" 97B. Therefore, whether she could avail herself of the break-in service provision depends on whether she had any "prior service credits." Prior service credits were defined in Section 97B.43:

Each member in service on July 4, 1953, who made contributions under the abolished system, and who has not applied for and qualified for benefit payments under the abolished system, shall receive credit for years of prior service in the determination of retirement allowance payments under any of the provisions of this chapter, provided (1) such member elects to become a member on or before October 1, 1953, [and] (2) such member has not made application for a refund . . . of his contributions under the abolished system. . ..
Any person with a record of thirty years as a public employee in the state of Iowa prior to July 1, 1947, and who is not eligible for prior service credit under other provisions of this section, shall be entitled to a credit for years of prior service.. . . (Emphasis added).
Ms. Dillehay was not in service on July 4, 1953, and had received a refund of her OASIS contributions; therefore, she did not receive any prior service credit under the first paragraph. Nor did she receive any under the second. Since she did not have any prior service credits to tack onto her four years of IPERS service, she did not have the five years of service needed to qualify for the break-in-service exception.
It may seem anomalous to refer to section 97B.43, The Code 1954, to determine her inability to use the break-in-service provision when it is the recent amendment to that same section which would allow her to buy back prior service credits but for the 1962 refund. However, our reference to the 1954 Code is not for the purpose of determining her present right to prior service credits. Rather, it is for the limited purpose of determining whether she could apply prior service credits to enable her to avoid mandatory cessation of her participation in IPERS at the time of her 1957 termination of public employment.
The statute clearly mandated the cessation of Ms. Dillehay's participation in IPERS at the time she terminated public employment in 1957. Therefore, the 1962 refund was not only within the statutory authority of Job Service, it would have been ultra vires for the department to allow Ms. Dillehay to continue participating in IPERS in contravention of the statutory provisions.
REVERSED AND REMANDED.
NOTES
[1]  The buy-back provision has undergone a continuing process of amendment. See, e. g., Acts 68 G.A., S.F. 489 (1979).
