baru master
This commit is contained in:
No files matched your search
@@ -45,6 +45,17 @@ func (s *DatabaseService) InsertPatient(req patient.Patient) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *DatabaseService) InsertPatientmongo(req *patient.Patient) error {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
_, err := s.DBMongo.Collection("patient").InsertOne(ctx, req)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *DatabaseService) GetPatientByIdentifier(display string, value string) ([]*patient.Patient, error) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
|
||||
Reference in New Issue
Block a user