Skip to content

Commit

Permalink
Remove Some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitsharma2610 authored Jun 25, 2024
1 parent 6207ade commit 23dec7f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions index.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,22 @@ def patRemove():


def dispPatient():
patdf = pd.read_csv("csvfile\\patientnew.csv", index_col= 0)
patdf = pd.read_csv("patientnew.csv", index_col= 0)
print(patdf)



def serPatientbyId(pid):
global patdf
patdf = pd.read_csv("csvfile\\patientnew.csv", index_col = 0)
patdf = pd.read_csv("patientnew.csv", index_col = 0)
if patdf.empty:
return 0
else:
return len(patdf.loc[patdf['pid'] == pid])

def getPatient(pid):
global patdf
patdf = pd.read_csv("csvfile\\patientnew.csv", index_col = 0)
patdf = pd.read_csv("patientnew.csv", index_col = 0)
if patdf.empty:
return "Invalid ID"
else:
Expand All @@ -111,7 +111,7 @@ def getPatient(pid):


def getPatientName(pid):
patdf = pd.read_csv("csvfile\\patientnew.csv", index_col = 0)
patdf = pd.read_csv("patientnew.csv", index_col = 0)
if patdf.empty:
return "Invalid ID"
else:
Expand All @@ -121,13 +121,13 @@ def getPatientName(pid):

def serPatientbyName():
global patdf
patdf = pd.read_csv("csvfile\\patientnew.csv", index_col = 0)
patdf = pd.read_csv("patientnew.csv", index_col = 0)
pname = input("Patient Name :: ")
print(patdf.loc[patdf['name'] == pname])

def serPatientbyIDPrint():
global patdf
patdf = pd.read_csv("csvfile\\patientnew.csv", index_col = 0)
patdf = pd.read_csv("patientnew.csv", index_col = 0)
tid = int(input("Patient ID :: "))
print(patdf.loc[patdf['pid'] == tid])

Expand Down

0 comments on commit 23dec7f

Please sign in to comment.