baru master

This commit is contained in:
2025-05-11 22:15:40 +07:00
parent 4d3cc4b7d9
commit dc0b822440
18 changed files with 1758 additions and 87 deletions

No files matched your search

+11
View File
@@ -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()