For numeric types, you'd use the & operator with the structure name and the . member selection operator:
scanf( "%d", &p1.number );
scanf( "%f", &p1.bill );
For strings, you first need to declare each member as an array of char:
#define MAX_NAME_LEN 40
#define MAX_STATUS_LEN 20
#define MAX_MEDICATION_LEN 100
struct patient
{
...
char name[MAX_NAME_LEN+1]; // plus 1 for string terminator
char status[MAX_STATUS_LEN+1];
char medications[MAX_MEDICATION_LEN+1];
...
};
then you should read each string using fgets:
if ( !fgets( p1.name, sizeof p1.name, stdin ) )
// error on read
You could use scanf to read string inputs, but it requires some work to make it secure. It's just easier and safer to use fgets.
One quirk of fgets is that it stores the trailing newline to the buffer if there's room, so you will want to add a couple of checks for it. If it is present, you probably want to remove it so it doesn't cause problems. If it isn't present, then you probably want to consume any remaining input in the input stream so it doesn't foul up the next read:
char *newline = strchr( p1.name, '\n' );
if ( newline )
*newline = 0;
else
while ( getchar() != '\n' )
; // empty loop body